@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Tema gradyan değişkenleri */
:root {
  --grad-primary-start: #e63946;
  --grad-primary-end: #c1121f;
  --grad-accent-start: #3498db;
  --grad-accent-end: #2980b9;
  --grad-success-start: #43a047;
  --grad-success-end: #66bb6a;
  --grad-week-start: #2980b9;
  --grad-week-end: #3498db;
  --grad-month-start: #6a11cb;
  --grad-month-end: #2575fc;
  --grad-warn-start: #f39c12;
  --grad-warn-end: #e67e22;
  --accent-color: #e63946;
}

/* Yüzde stilleri */
.yuzde-yuksek {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.yuzde-orta {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.yuzde-dusuk {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Ekip tahsilat yüzde barları */
.yuzde-bar-container {
    width: 100%;
    background-color: #f1f5f9;
    border-radius: 6px;
    height: 18px;
    margin-top: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.yuzde-bar {
    height: 100%;
    text-align: center;
    line-height: 18px;
    color: white;
    font-weight: 700;
    font-size: 11px;
    transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #e63946; 
}

.yuzde-bar-ekip-a { background-color: #e63946; }
.yuzde-bar-ekip-b { background-color: #c1121f; }
.yuzde-bar-ekip-c { background-color: #ff6b6b; }

.daily-bar-container {
  width: 100%;
  background-color: #f1f5f9;
  border-radius: 4px;
  height: 8px;
  margin-top: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.daily-bar {
  height: 100%;
  background-color: #cbd5e1;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.daily-bar.green { background: linear-gradient(135deg, var(--grad-success-start), var(--grad-success-end)); }
.daily-bar.orange { background: linear-gradient(135deg, var(--grad-warn-start), var(--grad-warn-end)); }
.daily-bar.red { background: linear-gradient(135deg, var(--grad-primary-start), var(--grad-primary-end)); }

.yuzde-bar-ekip-d { background-color: #d90429; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #334155;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
}

/* Beyaz arka plan üzerinde hareketli kırmızı ikonlar */
body::before {
    content: '';
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image:
      linear-gradient(135deg, rgba(160,0,0,0.10), rgba(70,0,0,0.06)),
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><circle cx='32' cy='32' r='16' fill='%23c1121f'/></svg>");
    background-blend-mode: multiply;
    background-repeat: no-repeat;
    background-size: 260px 260px;
    background-position: 85% 15%;
    filter: contrast(1.02) brightness(1.01);
    animation: bgFloat 24s ease-in-out infinite alternate;
}

@keyframes bgFloat {
  from { transform: translateY(0) scale(1) rotate(0deg); }
  to   { transform: translateY(8px) scale(1.01) rotate(1deg); }
}

.header, .container, footer { position: relative; z-index: 1; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 16px 24px;
    margin-bottom: 25px;
    border-bottom: 4px solid #e63946;
    width: 100%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo img {
    width: 44px;
    height: auto;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header-logo h1 {
    color: #f8fafc;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.panel-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--grad-primary-start), var(--grad-primary-end));
    color: white;
    text-decoration: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.panel-btn:hover {
    background: linear-gradient(135deg, var(--grad-primary-end), var(--grad-primary-start));
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dashboard Cards */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 35px;
}

.card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, #334155, #0f172a);
    padding: 12px 16px;
    border-radius: 12px 12px 0 0;
    margin: -24px -24px 20px -24px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.card-value {
    font-size: 40px;
    font-weight: 800;
    color: #e63946;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Bugünkü Tahsilat Card */
.card.bugunTahsilat {
    background: linear-gradient(135deg, var(--grad-success-start), var(--grad-success-end));
    color: white;
    box-shadow: 0 10px 15px -3px rgba(67, 160, 71, 0.3), 0 4px 6px -4px rgba(67, 160, 71, 0.2);
    border: 1px solid rgba(255,255,255,0.15);
}

.card.bugunTahsilat .card-title {
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.1));
}

.card.bugunTahsilat .card-value {
    color: #fff;
    font-size: 44px;
    text-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

/* Haftalık Tahsilat Card */
.card.haftalikTahsilat {
    background: linear-gradient(135deg, var(--grad-week-start), var(--grad-week-end));
    color: white;
    box-shadow: 0 10px 15px -3px rgba(41, 128, 185, 0.3), 0 4px 6px -4px rgba(41, 128, 185, 0.2);
    border: 1px solid rgba(255,255,255,0.15);
}

.card.haftalikTahsilat .card-title {
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.1));
}

.card.haftalikTahsilat .card-value {
    color: #fff;
    font-size: 44px;
    text-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

/* Aylık Tahsilat Card */
.card.aylikTahsilat {
    background: linear-gradient(135deg, var(--grad-month-start), var(--grad-month-end));
    color: white;
    box-shadow: 0 10px 15px -3px rgba(37, 117, 252, 0.3), 0 4px 6px -4px rgba(37, 117, 252, 0.2);
    border: 1px solid rgba(255,255,255,0.15);
}

.card.aylikTahsilat .card-title {
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.1));
}

.card.aylikTahsilat .card-value {
    color: #fff;
    font-size: 44px;
    text-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

/* Table Containers */
.table-container {
    background-color: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
    margin-bottom: 35px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.table-container:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

.table-title {
    font-size: 18px;
    margin-bottom: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.02em;
}

.table-title .title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: sub;
}

.table-title .title-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    opacity: 0.9;
}

/* Form Elemanları */
input[type="text"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

button[type="submit"], .btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--grad-accent-start), var(--grad-accent-end));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

button[type="submit"]:hover, .btn:hover {
    background: linear-gradient(135deg, var(--grad-accent-end), var(--grad-accent-start));
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #cbd5e1;
}

tr:last-child td { border-bottom: none; }

tr:hover td {
    background-color: #f8fafc;
}

/* Responsive Tasarım */
@media (max-width: 1200px) {
    .container { width: 95%; }
}

@media (max-width: 992px) {
    .dashboard { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
    .dashboard { grid-template-columns: 1fr; }
    .panel-btn { padding: 8px 16px; font-size: 13px; }
    .card-value { font-size: 32px; }
    .table-container { padding: 18px; overflow-x: auto; }
    th, td { padding: 12px; }
    
    .index-page .container { padding: 12px; }
    .index-page .table-title { font-size: 16px; }
    .index-page table { table-layout: auto; width: 100%; min-width: 500px; }
    .index-page table th, .index-page table td { font-size: 12px; padding: 6px; white-space: normal; background:none!important;}
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

.empty-state { text-align: center; padding: 40px 20px; color: #94a3b8; font-style: italic; font-weight: 500; }

.header-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; margin:8px 0 16px 0; }
.capture-btn { background: linear-gradient(135deg, #1e293b, #0f172a); color: white; border: none; padding: 10px 16px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); display: inline-flex; align-items: center; gap: 8px; }
.capture-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2); }

footer { text-align: center; margin-top: 40px; color: #94a3b8; font-size: 14px; padding: 24px 0; border-top: 1px solid #e2e8f0; font-weight: 500; }

.subgroup { margin-top: 24px; }
.subgroup-title { font-size: 15px; font-weight: 700; color: #0f172a; background: #e2e8f0; padding: 8px 16px; border-radius: 8px; display: inline-block; margin-bottom: 12px; letter-spacing: 0.02em; }

.cell-yuzde-low { background-color: #fee2e2; color: #991b1b; font-weight: 600; }
.cell-yuzde-mid { background-color: #fef08a; color: #854d0e; font-weight: 600; }
.cell-yuzde-high { background-color: #dcfce7; color: #166534; font-weight: 600; }

.header::after {
  content: ''; position: absolute; right: -40px; top: -20px; width: 160px; height: 160px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><rect x='14' y='22' width='36' height='22' rx='6' ry='6' fill='%23ef4444'/><rect x='22' y='16' width='20' height='8' rx='4' ry='4' fill='%23ef4444'/><circle cx='46' cy='33' r='4' fill='%23b91c1c'/></svg>");
  background-repeat: no-repeat; background-size: contain; opacity: 0.15; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); pointer-events: none;
  animation: floatHeaderIcon 6s ease-in-out infinite alternate;
}

/* Personel Sıralama Sayfası Ek Stilleri */
.ekip-badge {
    background: #e2e8f0;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.daily-bar-container {
    background-color: #f1f5f9;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    width: 100%;
}

.daily-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

