/* ─── Beyaz Evler 1 Sitesi — Fintech Design System ─────────
   Font: Inter + DM Mono
   Tema: Koyu (varsayılan) / Açık
   Accent: Indigo #6366f1
*/

/* ── Variables ──────────────────────────────────────────── */
:root {
    --bg:        #080810;
    --surface:   #0e0f1a;
    --surface2:  #161722;
    --surface3:  #1d1f2e;
    --border:    #252738;
    --border2:   #31334a;

    --text:      #eeeef5;
    --text2:     #8a8ca8;
    --text3:     #4e5068;

    --primary:        #6366f1;
    --primary-dim:    rgba(99, 102, 241, 0.18);
    --primary-hover:  #4f46e5;
    --on-primary:     #ffffff;

    --green:     #10d9a0;
    --red:       #f16565;
    --amber:     #f5b945;
    --blue:      #4da6ff;

    --tint-green-bg:  rgba(16, 217, 160, 0.10);
    --tint-green-bd:  rgba(16, 217, 160, 0.28);
    --tint-red-bg:    rgba(241, 101, 101, 0.10);
    --tint-red-bd:    rgba(241, 101, 101, 0.28);
    --tint-amber-bg:  rgba(245, 185, 69, 0.10);
    --tint-amber-bd:  rgba(245, 185, 69, 0.28);
    --tint-blue-bg:   rgba(77, 166, 255, 0.10);
    --tint-blue-bd:   rgba(77, 166, 255, 0.28);
    --overlay:        rgba(0, 0, 0, 0.72);

    --shadow:     0 8px 32px rgba(0,0,0,0.45);
    --shadow-sm:  0 2px 12px rgba(0,0,0,0.3);
    --shadow-xs:  0 1px 4px rgba(0,0,0,0.25);

    --sidebar-w:  252px;
    --r-card:     14px;
    --r-input:    8px;
    --r-btn:      8px;

    /* Backward compat aliases */
    --accent:    var(--primary);
    --on-accent: var(--on-primary);

    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg:        #f2f3fb;
    --surface:   #ffffff;
    --surface2:  #eef0fa;
    --surface3:  #e6e9f5;
    --border:    #e0e2f0;
    --border2:   #c8cbe0;

    --text:      #0d0e1f;
    --text2:     #555872;
    --text3:     #9598b5;

    --primary:        #6366f1;
    --primary-dim:    rgba(99, 102, 241, 0.10);
    --primary-hover:  #4f46e5;
    --on-primary:     #ffffff;

    --green:     #059669;
    --red:       #dc2626;
    --amber:     #d97706;
    --blue:      #2563eb;

    --tint-green-bg:  rgba(5, 150, 105, 0.08);
    --tint-green-bd:  rgba(5, 150, 105, 0.22);
    --tint-red-bg:    rgba(220, 38, 38, 0.08);
    --tint-red-bd:    rgba(220, 38, 38, 0.22);
    --tint-amber-bg:  rgba(217, 119, 6, 0.08);
    --tint-amber-bd:  rgba(217, 119, 6, 0.22);
    --tint-blue-bg:   rgba(37, 99, 235, 0.08);
    --tint-blue-bd:   rgba(37, 99, 235, 0.22);
    --overlay:        rgba(13, 14, 31, 0.55);

    --shadow:     0 8px 32px rgba(13,14,31,0.10);
    --shadow-sm:  0 2px 12px rgba(13,14,31,0.07);
    --shadow-xs:  0 1px 4px rgba(13,14,31,0.05);

    /* Backward compat aliases */
    --accent:    var(--primary);
    --on-accent: var(--on-primary);

    color-scheme: light;
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
.mono { font-family: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; letter-spacing: 0.02em; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: none; }
h1,h2,h3 { margin: 0; font-weight: 600; }

/* ── Layout ─────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 0;
    position: fixed; top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 40;
}
.sidebar .brand {
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}
.sidebar .brand-icon {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}
.sidebar .brand-icon svg { width: 18px; height: 18px; color: #fff; }
.sidebar .brand-text { flex: 1; min-width: 0; }
.sidebar .brand-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: -0.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .brand-text small { display: block; font-size: 11px; color: var(--text3); font-weight: 400; margin-top: 1px; }

.sidebar nav { padding: 12px 10px; flex: 1; }
.sidebar nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    color: var(--text2); font-size: 13.5px; font-weight: 500;
    border-radius: 9px;
    margin-bottom: 1px;
    transition: background .12s, color .12s;
}
.sidebar nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; transition: opacity .12s; }
.sidebar nav a:hover { background: var(--surface2); color: var(--text); }
.sidebar nav a:hover svg { opacity: 1; }
.sidebar nav a.active { background: var(--primary-dim); color: var(--primary); font-weight: 600; }
.sidebar nav a.active svg { opacity: 1; }
.nav-section {
    padding: 14px 12px 5px;
    font-size: 10px; color: var(--text3); letter-spacing: 0.9px;
    text-transform: uppercase; font-weight: 600;
}

/* Tema değiştirici */
.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.sidebar-user {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px 10px;
}
.sidebar-user .avatar {
    width: 28px; height: 28px;
    background: var(--primary-dim);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: var(--primary);
    flex-shrink: 0;
}
.sidebar-user .uinfo { flex: 1; min-width: 0; }
.sidebar-user .uname { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.theme-switch { padding: 0 0 8px; }
.theme-switch-group {
    display: flex; gap: 4px; padding: 4px;
    background: var(--surface2); border-radius: 9px;
    border: 1px solid var(--border);
}
.theme-switch-group button {
    flex: 1; padding: 6px 8px;
    background: transparent; border: 0; border-radius: 6px;
    color: var(--text3); font-family: inherit; font-size: 11px; font-weight: 500;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: all .12s;
}
.theme-switch-group button svg { width: 12px; height: 12px; }
.theme-switch-group button:hover { color: var(--text2); }
.theme-switch-group button.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}

/* ── Main content ───────────────────────────────────────── */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 28px 36px;
    max-width: calc(100vw - var(--sidebar-w));
    min-height: 100vh;
}
.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; color: var(--text); }
.page-head .sub { color: var(--text3); font-size: 12.5px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    padding: 22px;
    box-shadow: var(--shadow-xs);
}
.card + .card { margin-top: 16px; }
.card h2 {
    font-size: 12px; font-weight: 600; color: var(--text3);
    text-transform: uppercase; letter-spacing: 0.7px; margin: 0 0 16px;
}

.section-label {
    font-size: 11px; font-weight: 600; color: var(--text3);
    text-transform: uppercase; letter-spacing: 0.8px;
    margin: 0 0 14px;
}

/* ── KPI / Stat cards ───────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    padding: 20px;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}
.stat::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--stat-accent, var(--border));
    border-radius: var(--r-card) var(--r-card) 0 0;
}
.stat.accent-green::before { --stat-accent: var(--green); }
.stat.accent-red::before   { --stat-accent: var(--red); }
.stat.accent-amber::before { --stat-accent: var(--amber); }
.stat.accent-blue::before  { --stat-accent: var(--blue); }
.stat.accent-primary::before { --stat-accent: var(--primary); }

.stat-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}
.stat-icon svg { width: 17px; height: 17px; }
.stat-icon.green  { background: var(--tint-green-bg); color: var(--green); }
.stat-icon.red    { background: var(--tint-red-bg);   color: var(--red); }
.stat-icon.amber  { background: var(--tint-amber-bg); color: var(--amber); }
.stat-icon.blue   { background: var(--tint-blue-bg);  color: var(--blue); }
.stat-icon.primary { background: var(--primary-dim); color: var(--primary); }
.stat-icon.gray   { background: var(--surface2); color: var(--text2); }

.stat .label { font-size: 11.5px; color: var(--text2); font-weight: 500; margin-bottom: 7px; }
.stat .value { font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .value.green { color: var(--green); }
.stat .value.red   { color: var(--red); }
.stat .value.amber { color: var(--amber); }
.stat .value.blue  { color: var(--blue); }
.stat .meta { font-size: 11.5px; color: var(--text3); margin-top: 6px; }

/* Progress bar on stat cards */
.stat-bar { margin-top: 12px; }
.stat-bar-track {
    height: 4px; background: var(--surface2);
    border-radius: 99px; overflow: hidden;
}
.stat-bar-fill {
    height: 100%; border-radius: 99px;
    transition: width .6s cubic-bezier(.4,0,.2,1);
}
.stat-bar-fill.green  { background: var(--green); }
.stat-bar-fill.red    { background: var(--red); }
.stat-bar-fill.amber  { background: var(--amber); }
.stat-bar-fill.blue   { background: var(--blue); }
.stat-bar-fill.primary { background: var(--primary); }
.stat-bar-label { font-size: 11px; color: var(--text3); margin-top: 5px; display: flex; justify-content: space-between; }

/* Tıklanabilir stat kart */
.stat-link { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.stat-link:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.35); }
.stat-link-hint { font-size: 11.5px; color: var(--text3); margin-top: 10px; font-weight: 500; }

/* Ay seçici */
.month-picker {
    display: flex; gap: 5px; overflow-x: auto;
    padding-bottom: 2px; margin-bottom: 20px;
    scrollbar-width: none;
}
.month-picker::-webkit-scrollbar { display: none; }
.month-tab {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12.5px; font-weight: 500;
    color: var(--text2);
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all .12s;
    white-space: nowrap;
    position: relative;
}
.month-tab:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); text-decoration: none; }
.month-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.month-tab.bugun::after {
    content: '';
    position: absolute; bottom: 4px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--primary);
}
.month-tab.active.bugun::after { background: rgba(255,255,255,0.55); }

/* Ay başlık bloğu */
.ay-baslik {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.ay-baslik-metin {
    font-size: 22px; font-weight: 800; color: var(--text);
    letter-spacing: -0.6px; line-height: 1;
}
.ay-baslik-yil {
    font-size: 14px; font-weight: 500; color: var(--text3);
}

/* Parlayan uyarı butonu */
.btn-uyari {
    background: rgba(241, 101, 101, 0.15);
    color: var(--red);
    border-color: rgba(241, 101, 101, 0.5);
    font-weight: 600;
    position: relative;
    animation: uyari-glow 2.2s ease-in-out infinite;
}
.btn-uyari:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    animation: none;
    box-shadow: 0 4px 16px rgba(241,101,101,0.5);
}
@keyframes uyari-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(241,101,101,0); }
    50%       { box-shadow: 0 0 0 5px rgba(241,101,101,0.22), 0 0 16px rgba(241,101,101,0.15); }
}

/* Mesaj hazırla butonu (yeşil) */
.btn-mesaj {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(16,217,160,0.30);
}
.btn-mesaj:hover {
    filter: brightness(1.1);
    color: #fff;
    box-shadow: 0 4px 18px rgba(16,217,160,0.40);
}

/* WhatsApp gönder butonu */
.btn-whatsapp {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(37,211,102,0.30);
}
.btn-whatsapp:hover {
    background: #1da851;
    color: #fff;
    border-color: #1da851;
    box-shadow: 0 4px 18px rgba(37,211,102,0.40);
}

/* Kişi kartı modal */
.person-card-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary-dim);
    border: 2px solid var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: var(--primary);
    flex-shrink: 0; letter-spacing: -0.5px;
}
.person-card-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}
.person-card-row:last-child { border-bottom: 0; padding-bottom: 0; }
.person-card-icon {
    width: 28px; height: 28px; border-radius: 7px;
    background: var(--surface2); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--text2);
}
.person-card-icon svg { width: 13px; height: 13px; }
.person-card-label { font-size: 11px; color: var(--text3); margin-bottom: 1px; }
.person-card-val   { font-weight: 500; color: var(--text); }
.person-card-val a { color: var(--primary); text-decoration: none; }
.person-card-val a:hover { text-decoration: underline; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 15px;
    border-radius: var(--r-btn); border: 1px solid var(--border);
    background: var(--surface); color: var(--text2);
    font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
    text-decoration: none; transition: all .12s;
    white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); text-decoration: none; }
.btn-primary {
    background: var(--primary); color: var(--on-primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99,102,241,0.30);
}
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); border-color: var(--primary-hover); box-shadow: 0 4px 16px rgba(99,102,241,0.40); }
.btn-danger { background: var(--surface); color: var(--red); border-color: var(--tint-red-bd); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }
.btn-icon { padding: 7px; }

/* ── Forms ──────────────────────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="search"],
select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-input);
    font-family: inherit; font-size: 13.5px;
    background: var(--surface2); color: var(--text);
    transition: border-color .12s, box-shadow .12s;
    appearance: none;
    -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8ca8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
    background: var(--surface);
}
input::placeholder, textarea::placeholder { color: var(--text3); }
input[type="file"] { padding: 8px 10px; background: var(--surface2); }
input:disabled { background: var(--surface); color: var(--text3); cursor: not-allowed; opacity: 0.7; }
label { display: block; font-size: 11.5px; color: var(--text2); font-weight: 500; margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 14px; }
.field { margin-bottom: 14px; }
.error { color: var(--red); font-size: 12px; margin-top: 4px; }
.help  { color: var(--text3); font-size: 11.5px; margin-top: 4px; }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-xs);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); }
th {
    background: var(--surface2);
    font-weight: 600; color: var(--text3);
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
}
th:first-child { border-radius: var(--r-card) 0 0 0; }
th:last-child  { border-radius: 0 var(--r-card) 0 0; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .08s; }
tbody tr:hover td { background: var(--surface2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-id { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text2); background: var(--surface2); padding: 2px 7px; border-radius: 5px; border: 1px solid var(--border); display: inline-block; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 99px;
    font-size: 11.5px; font-weight: 600; letter-spacing: 0.1px;
    border: 1px solid transparent;
}
.badge.green { background: var(--tint-green-bg); color: var(--green); border-color: var(--tint-green-bd); }
.badge.red   { background: var(--tint-red-bg);   color: var(--red);   border-color: var(--tint-red-bd); }
.badge.amber { background: var(--tint-amber-bg); color: var(--amber); border-color: var(--tint-amber-bd); }
.badge.blue  { background: var(--tint-blue-bg);  color: var(--blue);  border-color: var(--tint-blue-bd); }
.badge.gray  { background: var(--surface2); color: var(--text2); border-color: var(--border); }
.badge.primary { background: var(--primary-dim); color: var(--primary); border-color: rgba(99,102,241,0.3); }

/* ── Filters ────────────────────────────────────────────── */
.filters {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
    margin-bottom: 18px; padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-xs);
}
.filters .field { margin: 0; flex: 1 1 160px; }
.filters .field.tight { flex: 0 1 140px; }

/* ── Pagination ─────────────────────────────────────────── */
.pager {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-top: 14px; padding: 12px 18px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-card); box-shadow: var(--shadow-xs);
}
.pager-info { font-size: 12.5px; color: var(--text2); }
.pager-info strong { color: var(--text); font-weight: 600; }
.pager-nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pager-btn {
    display: inline-block; padding: 5px 11px;
    font-size: 12.5px; line-height: 1.4;
    border: 1px solid var(--border); border-radius: 7px;
    background: var(--surface2); color: var(--text2);
    text-decoration: none; cursor: pointer;
    font-variant-numeric: tabular-nums; transition: all .1s;
}
.pager-btn:hover { background: var(--surface3); color: var(--text); border-color: var(--border2); text-decoration: none; }
.pager-btn.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); cursor: default; box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.pager-btn.disabled { color: var(--text3); background: var(--surface); cursor: not-allowed; opacity: 0.5; }
.pager-btn.disabled:hover { background: var(--surface); color: var(--text3); }
.pager-dots { padding: 5px 4px; color: var(--text3); font-size: 12px; }

/* ── Flash ──────────────────────────────────────────────── */
.flash {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; border-radius: var(--r-input);
    margin-bottom: 18px; font-size: 13.5px; font-weight: 500;
    border-left: 3px solid;
}
.flash.success { background: var(--tint-green-bg); color: var(--green); border-color: var(--green); border-right: 1px solid var(--tint-green-bd); border-top: 1px solid var(--tint-green-bd); border-bottom: 1px solid var(--tint-green-bd); }
.flash.error   { background: var(--tint-red-bg);   color: var(--red);   border-color: var(--red);   border-right: 1px solid var(--tint-red-bd);   border-top: 1px solid var(--tint-red-bd);   border-bottom: 1px solid var(--tint-red-bd); }
.flash.info    { background: var(--tint-blue-bg);  color: var(--blue);  border-color: var(--blue);  border-right: 1px solid var(--tint-blue-bd);  border-top: 1px solid var(--tint-blue-bd);  border-bottom: 1px solid var(--tint-blue-bd); }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: var(--overlay);
    display: none; align-items: center; justify-content: center;
    z-index: 100; padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--surface);
    border-radius: 16px; padding: 28px;
    max-width: 600px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    border: 1px solid var(--border2);
    box-shadow: var(--shadow);
    animation: modal-in .18s cubic-bezier(.4,0,.2,1);
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal h2 { font-size: 16px; font-weight: 700; margin: 0 0 20px; color: var(--text); letter-spacing: -0.2px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ── Login ──────────────────────────────────────────────── */
.login-shell {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: var(--bg);
    position: relative; overflow: hidden;
}
/* Subtle grid background */
.login-shell::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.3;
}
.login-shell::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 40%, var(--primary-dim) 0%, transparent 70%);
}
.login-box {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 18px;
    padding: 36px;
    box-shadow: var(--shadow);
}
.login-logo {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 28px;
}
.login-logo .icon {
    width: 42px; height: 42px;
    background: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
    flex-shrink: 0;
}
.login-logo .icon svg { width: 22px; height: 22px; color: #fff; }
.login-logo .texts strong { display: block; font-size: 15px; font-weight: 700; letter-spacing: -0.2px; color: var(--text); }
.login-logo .texts small  { display: block; font-size: 12px; color: var(--text3); margin-top: 2px; }
.login-tabs {
    display: flex; gap: 4px; margin-bottom: 22px;
    padding: 4px; background: var(--surface2);
    border-radius: 10px; border: 1px solid var(--border);
}
.login-tabs button {
    flex: 1; padding: 8px 12px;
    background: transparent; border: 0; border-radius: 7px;
    font-family: inherit; font-size: 13px; color: var(--text3);
    cursor: pointer; font-weight: 500; transition: all .12s;
}
.login-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); font-weight: 600; }
.login-theme { position: absolute; top: -44px; right: 0; display: flex; gap: 6px; }
.login-theme button {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; width: 32px; height: 32px;
    cursor: pointer; color: var(--text2); font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: all .12s;
}
.login-theme button:hover { color: var(--text); background: var(--surface2); }
.login-theme button.active { color: var(--primary); background: var(--primary-dim); border-color: var(--primary); }
.login-btn { width: 100%; padding: 11px; font-size: 14px; font-weight: 600; letter-spacing: 0.1px; }

/* ── Borç takip ─────────────────────────────────────────── */
.borc-table .ay-cell { text-align: center; font-size: 12px; font-weight: 600; padding: 8px 4px; border-radius: 4px; }
.borc-table .ay-cell.odendi  { background: var(--tint-green-bg); color: var(--green); }
.borc-table .ay-cell.odenmedi{ background: var(--tint-red-bg);   color: var(--red); }
.borc-table .ay-cell.eksik   { background: var(--tint-amber-bg); color: var(--amber); }
.borc-table th.ay-th { font-size: 10.5px; text-align: center; padding: 8px 4px; }

/* ── Chart ──────────────────────────────────────────────── */
.chart-wrap { padding: 8px 0 0; }
.chart {
    display: flex; gap: 6px; height: 180px;
    align-items: flex-end; padding: 0 4px;
    position: relative;
}
.chart::before {
    content: '';
    position: absolute; bottom: 0; left: 4px; right: 4px;
    height: 1px; background: var(--border);
}
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.chart .bar {
    width: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(99,102,241,0.5) 100%);
    border-radius: 5px 5px 0 0;
    min-height: 2px;
    cursor: pointer;
    transition: opacity .12s;
    position: relative;
}
.chart .bar:hover { opacity: 0.8; }
.chart .bar-wrap small { font-size: 10px; color: var(--text3); font-weight: 500; }
.chart .bar-wrap .val { font-size: 10px; color: var(--text2); font-variant-numeric: tabular-nums; font-weight: 500; }

/* ── Topbar mobile ──────────────────────────────────────── */
.topbar-mobile {
    display: none; align-items: center; justify-content: space-between;
    margin-bottom: 18px; padding: 12px 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-card); box-shadow: var(--shadow-xs);
}
.topbar-mobile button { background: transparent; border: 0; font-size: 18px; cursor: pointer; color: var(--text); padding: 4px; }

/* ── Sidebar çıkış butonu ─────────────────────────────── */
.sidebar-cikis-btn {
    width: 100%; justify-content: center;
    color: #fff !important;
    background: var(--red);
    border: 1px solid var(--red);
}
.sidebar-cikis-btn:hover { background: #dc2626; border-color: #dc2626; }
.sidebar-cikis-btn svg { stroke: #fff; }

/* ── Topbar çıkış butonu (header sağ köşe) ────────────── */
.topbar-cikis-btn {
    display: inline-flex !important; align-items: center; gap: 4px;
    padding: 2px 6px; border-radius: 5px;
    font-size: 9px; font-weight: 700; letter-spacing: .1px;
    color: #fff !important;
    background: var(--red) !important;
    border: 1px solid var(--red) !important;
    cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s;
    line-height: 1;
}
.topbar-cikis-btn:hover { background: #dc2626 !important; border-color: #dc2626 !important; }

/* ── Details / import log ───────────────────────────────── */
details summary { color: var(--text2); cursor: pointer; padding: 6px 0; }
details pre { background: var(--surface2); color: var(--text); border: 1px solid var(--border); padding: 12px; border-radius: 8px; font-size: 12px; overflow-x: auto; }

/* ── 2-col mobile stats ─────────────────────────────────── */
.stats-mobile-2col { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ── Chart bar active state ─────────────────────────────── */
.chart .bar-wrap { text-decoration: none; color: inherit; }
.chart .bar-wrap:hover .bar { opacity: 0.75; }
.chart .bar.bar-active {
    background: linear-gradient(180deg, var(--green) 0%, rgba(16,217,160,0.45) 100%);
}

/* ── Pie chart ──────────────────────────────────────────── */
.pie-layout {
    display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap;
}
.pie-chart-wrap {
    flex-shrink: 0; position: relative;
    display: flex; align-items: center; justify-content: center;
}
.pie-center-label {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    text-align: center; pointer-events: none;
}
.pie-legend {
    flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px;
    max-height: 280px; overflow-y: auto;
}
.pie-legend-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 8px; border-radius: 7px; cursor: default;
    transition: background .1s;
    font-size: 12.5px;
}
.pie-legend-item:hover { background: var(--surface2); }
.pie-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pie-leg-label { flex: 1; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pie-leg-pct { color: var(--text3); font-size: 11.5px; font-weight: 600; margin-left: auto; }
.pie-leg-val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 8px; font-size: 12px; }

/* ── Sakin Hero Kartı ───────────────────────────────────── */
.sakin-hero {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
    border: 1px solid var(--border2);
    border-radius: 16px; padding: 24px 28px;
    margin-bottom: 20px; box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
.sakin-hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--green));
}
.sakin-hero-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--primary-dim); border: 2.5px solid var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; color: var(--primary);
    flex-shrink: 0; letter-spacing: -1px;
}
.sakin-hero-info { flex: 1; min-width: 160px; }
.sakin-hero-name {
    font-size: 26px; font-weight: 800; color: var(--text);
    letter-spacing: -0.8px; line-height: 1.1; margin-bottom: 8px;
}
.sakin-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sakin-hero-borc { flex-shrink: 0; }
.sakin-borc-ok {
    display: flex; align-items: center; gap: 12px;
    background: var(--tint-green-bg); border: 1.5px solid var(--tint-green-bd);
    border-radius: 12px; padding: 14px 18px; color: var(--green);
}
.sakin-borc-var {
    display: flex; align-items: center; gap: 12px;
    background: var(--tint-red-bg); border: 1.5px solid var(--tint-red-bd);
    border-radius: 12px; padding: 14px 18px; color: var(--red);
}

/* ── Ödeme Takvimi Kartları ─────────────────────────────── */
.ay-takvim {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}
.takvim-kart {
    border-radius: 10px; padding: 10px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    border: 1.5px solid transparent; text-align: center;
    transition: transform .1s;
}
.takvim-kart:hover { transform: translateY(-2px); }
.takvim-ay { font-size: 10.5px; font-weight: 700; opacity: .75; text-transform: uppercase; letter-spacing: .4px; }
.takvim-ikon { font-size: 20px; line-height: 1; font-weight: 700; }
.takvim-tutar { font-size: 10px; font-weight: 600; opacity: .8; }
.takvim-odendi {
    background: rgba(16, 200, 90, 0.18);
    border-color: rgba(16, 200, 90, 0.45);
    color: #14c85a;
}
[data-theme="light"] .takvim-odendi { background: rgba(5,150,105,.1); border-color: rgba(5,150,105,.35); color: #059669; }
.takvim-eksik {
    background: rgba(245, 185, 69, 0.18);
    border-color: rgba(245, 185, 69, 0.45);
    color: var(--amber);
}
.takvim-odenmedi {
    background: rgba(235, 50, 50, 0.18);
    border-color: rgba(235, 50, 50, 0.45);
    color: #eb3232;
}
[data-theme="light"] .takvim-odenmedi { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.35); color: #dc2626; }
.takvim-bos {
    background: var(--surface2); border-color: var(--border); color: var(--text3);
}

/* ── Duyuru Ticker ──────────────────────────────────────── */
.duyuru-ticker {
    display: flex; align-items: center;
    background: var(--primary); border: none;
    border-radius: 8px; overflow: hidden;
    margin-bottom: 16px; height: 38px;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb, 99,71,255), 0.35);
}
.duyuru-ticker-label {
    flex-shrink: 0; display: flex; align-items: center; gap: 5px;
    background: rgba(0,0,0,0.22); color: #fff;
    padding: 0 14px; height: 100%; font-size: 11.5px; font-weight: 700;
    white-space: nowrap; letter-spacing: 0.2px; border-right: 1px solid rgba(255,255,255,0.18);
}
.duyuru-ticker-track {
    flex: 1; overflow: hidden; position: relative; height: 100%;
}
.duyuru-ticker-inner {
    display: flex; align-items: center; gap: 28px;
    height: 100%;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap; padding-left: 20px;
}
.duyuru-ticker-inner:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.duyuru-ticker-item { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.92); }
.duyuru-ticker-item.onemli { color: #fde68a; font-weight: 600; }
.duyuru-ticker-item.acil   { color: #fca5a5; font-weight: 700; }
.duyuru-ticker-sep { color: rgba(255,255,255,0.35); font-size: 18px; font-weight: 300; }

/* ── Sakin Hero v2 (no avatar) ──────────────────────────── */
.sakin-hero2 {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
    border: 1px solid var(--border2);
    border-radius: 18px; padding: 28px 32px;
    margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.sakin-hero2::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--green));
}
.sakin-hero2-bg-icon {
    position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
    width: 120px; height: 120px; opacity: 0.045; pointer-events: none;
    color: var(--text);
}
.sakin-hero2-bg-icon svg { width: 100%; height: 100%; }
.sakin-hero2-inner {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    position: relative; z-index: 1;
}
.sakin-hero2-left { flex: 1; min-width: 0; }
.sakin-hero2-label {
    font-size: 11px; font-weight: 600; letter-spacing: 0.6px;
    color: var(--text3); text-transform: uppercase; margin-bottom: 6px;
}
.sakin-hero2-name {
    font-size: 30px; font-weight: 800; color: var(--text);
    letter-spacing: -1px; line-height: 1.1;
}
.sakin-hero2-status { flex-shrink: 0; }
.sakin-status-ok {
    display: flex; align-items: center; gap: 12px;
    background: var(--tint-green-bg); border: 1.5px solid var(--tint-green-bd);
    border-radius: 14px; padding: 14px 20px; color: var(--green);
}
.sakin-status-bad {
    display: flex; align-items: center; gap: 12px;
    background: var(--tint-red-bg); border: 1.5px solid var(--tint-red-bd);
    border-radius: 14px; padding: 14px 20px; color: var(--red);
}
.sakin-status-amount { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; }
.sakin-status-label  { font-size: 11.5px; opacity: .8; margin-top: 2px; }
.sakin-status-bad.detailed { align-items: flex-start; }
.sakin-status-breakdown {
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid rgba(239,68,68,.25);
    display: flex; flex-direction: column; gap: 5px;
}
.sakin-breakdown-row {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    font-size: 11.5px; font-weight: 500; color: var(--red);
}
.sakin-breakdown-row span:last-child { font-weight: 700; white-space: nowrap; font-family: 'DM Mono', monospace; }
.sakin-breakdown-row.ceza { opacity: .75; }
.sakin-breakdown-divider { height: 1px; background: rgba(239,68,68,.2); margin: 2px 0; }
.sakin-breakdown-total { font-size: 12px; font-weight: 800; color: var(--red); }
.sakin-breakdown-total span:last-child { font-family: 'DM Mono', monospace; }

/* ── Sakin Ek Ödeme Kart ────────────────────────────────── */
.sakin-ek-odeme-kart {
    background: var(--surface); border: 1px solid var(--border2);
    border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.sakin-ek-odeme-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--text2);
    margin-bottom: 14px;
}
.sakin-ek-odeme-taksitler {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.sakin-taksit-kart {
    background: var(--surface2); border: 1.5px solid var(--border);
    border-radius: 10px; padding: 13px 15px;
    display: flex; align-items: center; gap: 10px;
}
.sakin-taksit-kart.ok { border-color: var(--tint-green-bd); background: var(--tint-green-bg); }
.sakin-taksit-kart.bekle { border-color: var(--tint-red-bd); }
.sakin-taksit-emoji { font-size: 22px; line-height: 1; flex-shrink: 0; }
.sakin-taksit-vade { font-size: 11.5px; color: var(--text3); margin-bottom: 3px; }
.sakin-taksit-durum { font-size: 13.5px; font-weight: 700; color: var(--text); }
.sakin-taksit-kart.ok .sakin-taksit-durum { color: var(--green); }
.sakin-taksit-kart.bekle .sakin-taksit-durum { color: var(--red); }

/* ── Gider Aylık Takvim (tıklanabilir) ──────────────────── */
.gider-takvim-kart {
    text-decoration: none; cursor: pointer;
}
.gider-takvim-kart.secili {
    background: var(--primary-dim); border-color: var(--primary);
    color: var(--primary); box-shadow: 0 0 0 2px var(--primary-dim);
}
.gider-takvim-kart.secili .takvim-ikon { font-weight: 800; }

/* ── Sidebar Mobile Overlay ─────────────────────────────── */
.sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 49;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .stats-mobile-2col { grid-template-columns: 1fr 1fr !important; }
    .pie-layout { flex-direction: column; }
    .pie-legend { max-height: none; }
    .ay-takvim { grid-template-columns: repeat(4, 1fr); }
    .sakin-hero { padding: 18px; gap: 14px; }
    .sakin-hero-name { font-size: 20px; }
    .sakin-hero-avatar { width: 50px; height: 50px; font-size: 17px; }
    .sakin-hero2 { padding: 20px 18px; }
    .sakin-hero2-name { font-size: 22px; }
    .sakin-hero2-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
    .sakin-hero2-status { width: 100%; }
    .sakin-status-ok, .sakin-status-bad { width: 100%; box-sizing: border-box; }
    .sakin-ek-odeme-taksitler { grid-template-columns: 1fr; }
    .duyuru-ticker-inner { animation-duration: 18s; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s cubic-bezier(.4,0,.2,1); z-index: 50; }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
    .main { margin-left: 0; padding: 16px 18px; max-width: 100vw; }
    .topbar-mobile { display: flex !important; }
    .stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .page-head h1 { font-size: 18px; }
}
@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .login-card { padding: 24px 20px; }
    .main { padding: 12px 14px; }
}
@media (max-width: 600px) {
    .pager { padding: 10px 12px; }
    .pager-info { width: 100%; text-align: center; }
    .pager-nav { width: 100%; justify-content: center; }
}

/* ── Anket / Poll Modülü ────────────────────────────────── */
.poll-tabs {
    display: flex; gap: 4px; margin-bottom: 16px;
    border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.poll-tab {
    padding: 8px 18px; border: none; background: transparent;
    color: var(--text2); font-size: 14px; font-weight: 500;
    cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -1px; font-family: inherit; transition: all .15s;
}
.poll-tab:hover { color: var(--text); }
.poll-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.poll-tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-dim); color: var(--primary);
    font-size: 11px; font-weight: 700; border-radius: 99px;
    padding: 1px 7px; margin-left: 5px;
}
.poll-card { padding: 20px; }
.poll-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.poll-results { margin-top: 8px; }
.vote-option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 8px;
    border: 1px solid var(--border); margin-bottom: 8px;
    cursor: pointer; transition: background .12s, border-color .12s;
    font-size: 14px; color: var(--text);
}
.vote-option:hover { background: var(--surface2); border-color: var(--border2); }
.vote-option input[type="radio"] {
    width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer;
}
.vote-option-text { flex: 1; }

/* ── Notification Bell ──────────────────────────────────── */
.topbar-sakin { display: flex !important; }
@media (min-width: 769px) {
    .topbar-sakin .btn-hamburger-mobile { display: none; }
}

.notif-wrap { position: relative; }

.notif-bell {
    position: relative;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text2);
    transition: color .15s, border-color .15s, background .15s;
}
.notif-bell:hover, .notif-bell.active {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-dim);
}

.notif-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: var(--red); color: #fff;
    font-size: 9px; font-weight: 700;
    border-radius: 99px; min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px; border: 2px solid var(--bg);
    pointer-events: none;
}

.notif-dropdown {
    position: absolute;
    right: 0; top: calc(100% + 8px);
    width: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow);
    z-index: 300;
    flex-direction: column;
    overflow: hidden;
    max-height: 480px;
}
@media (max-width: 400px) {
    .notif-dropdown { width: calc(100vw - 24px); right: -8px; }
}

.notif-dd-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px; font-weight: 600; color: var(--text);
}
.notif-dd-oku {
    background: none; border: none; cursor: pointer;
    font-size: 11px; color: var(--text3);
    display: flex; align-items: center; gap: 4px;
    padding: 3px 7px; border-radius: 6px;
    transition: background .12s, color .12s;
}
.notif-dd-oku:hover { background: var(--surface2); color: var(--primary); }

.notif-list {
    overflow-y: auto; flex: 1;
    max-height: 360px;
}

.notif-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    text-decoration: none; color: var(--text2);
    transition: background .12s;
    position: relative;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: var(--primary-dim); color: var(--text); }
.notif-item.unread:hover { background: rgba(99,102,241,.12); }

.notif-item-ikon {
    font-size: 15px; flex-shrink: 0; margin-top: 1px;
    width: 22px; text-align: center;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-baslik {
    display: block; font-size: 12.5px; line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-item.unread .notif-item-baslik { font-weight: 600; color: var(--text); }
.notif-item-meta {
    display: block; font-size: 11px; color: var(--text3); margin-top: 2px;
}
.notif-dot {
    flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%;
    background: var(--primary); margin-top: 6px;
}

.notif-empty {
    padding: 28px 16px; text-align: center;
    font-size: 13px; color: var(--text3);
}

.notif-dd-footer {
    display: block; padding: 10px 14px;
    font-size: 12px; text-align: center; color: var(--primary);
    text-decoration: none; border-top: 1px solid var(--border);
    transition: background .12s;
}
.notif-dd-footer:hover { background: var(--surface2); }

/* ═══════════════════════════════════════════════════════
   DASHBOARD YENİLEME — Gruplu bar chart, top-5, grid
═══════════════════════════════════════════════════════ */

/* Gruplu bar chart */
.chart-grouped { gap: 8px; }
.chart-grouped .bar-group-wrap {
    display: flex; flex-direction: column;
    align-items: center; gap: 4px; flex: 1;
}
.bar-group { display: flex; gap: 4px; align-items: flex-end; }
.bar-gelir {
    background: var(--green);
    border-radius: 3px 3px 0 0;
    min-height: 2px; min-width: 13px;
    transition: opacity .15s;
}
.bar-gelir:hover { opacity: .75; }
.bar-gider {
    background: var(--amber);
    border-radius: 3px 3px 0 0;
    min-height: 2px; min-width: 13px;
    transition: opacity .15s;
}
.bar-gider:hover { opacity: .75; }
.chart-legend-row {
    display: flex; gap: 18px; justify-content: center;
    padding-top: 10px; font-size: 12px; color: var(--text2);
    align-items: center;
}
.legend-dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block; margin-right: 5px; vertical-align: middle;
}

/* Dashboard iki-sütunlu grid'ler */
.dash-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.dash-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .dash-charts-row,
    .dash-action-row { grid-template-columns: 1fr; }
}

/* Top 5 borçlular listesi */
.borclu-list { display: flex; flex-direction: column; gap: 12px; }
.borclu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.borclu-item:last-child { border-bottom: 0; }
.borclu-rank {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--surface3);
    font-size: 11px; font-weight: 700; color: var(--text2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.borclu-rank.top1 {
    background: var(--tint-red-bg); color: var(--red);
    border: 1px solid var(--tint-red-bd);
}
.borclu-info { flex: 1; min-width: 0; }
.borclu-daire {
    font-size: 11px; font-family: 'DM Mono', monospace;
    color: var(--text3); margin-bottom: 1px;
}
.borclu-sakin {
    font-size: 13px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--text);
}
.borclu-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.borclu-tutar {
    font-size: 13px; font-weight: 700; color: var(--red); white-space: nowrap;
}
.borclu-mini-bar {
    height: 4px; border-radius: 2px;
    background: var(--surface3); overflow: hidden; width: 72px;
}
.borclu-mini-bar-fill {
    height: 100%; background: var(--red);
    border-radius: 2px; opacity: .65;
}

/* ── İhtar Hesap Detayı ─────────────────────────────────── */
.ihtar-detail-tr td { background: var(--surface2); }
.ihtar-detail-wrap {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    padding: 16px 20px 20px;
    border-top: 2px solid var(--tint-red-bd);
}
.ihtar-detail-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: var(--text3); margin-bottom: 12px;
}
.ihtar-detail-analiz {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 14px 16px;
}
.ihtar-detail-kv {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 10px; font-size: 12px; padding: 4px 0;
    border-bottom: 1px dashed var(--border);
}
.ihtar-detail-kv:last-child { border-bottom: none; }
.ihtar-detail-kv span:first-child { color: var(--text2); }
.ihtar-detail-kv span:last-child  { font-weight: 600; text-align: right; }
.ihtar-detail-kv--highlight { background: var(--tint-red-bg); border-radius: 6px; padding: 5px 8px; margin: 4px -8px; border-bottom: none; }
.ihtar-detail-kv--highlight span:last-child { color: var(--red); }
.ihtar-detail-kv--total { background: var(--tint-red-bg); border-radius: 6px; padding: 6px 8px; margin: 0 -8px; border-bottom: none; }
.ihtar-detail-kv--total span:last-child { color: var(--red); font-weight: 800; font-size: 13px; }
.ihtar-detail-hesap {
    display: flex; align-items: center; gap: 8px;
    margin: 10px 0 4px;
    background: var(--tint-red-bg); border: 1px solid var(--tint-red-bd);
    border-radius: 8px; padding: 8px 12px;
    font-size: 12.5px;
}
.ihtar-detail-dim { color: var(--text3); font-size: 11.5px; }
.ihtar-detail-tablo { min-width: 0; }
.ihtar-ceza-mini-table {
    width: 100%; border-collapse: collapse; font-size: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden;
}
.ihtar-ceza-mini-table th {
    background: var(--surface2); padding: 7px 12px;
    font-size: 11px; font-weight: 600; color: var(--text2);
    text-align: left; border-bottom: 1px solid var(--border);
}
.ihtar-ceza-mini-table th.num,
.ihtar-ceza-mini-table td.num { text-align: right; }
.ihtar-ceza-mini-table td {
    padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.ihtar-ceza-mini-table tbody tr:last-child td { border-bottom: none; }
.ihtar-ceza-row-manuel td { background: var(--tint-red-bg); }
.ihtar-ceza-mini-table tfoot td {
    padding: 8px 12px; background: var(--surface2);
    border-top: 2px solid var(--border); border-bottom: none;
}
@media(max-width: 900px) {
    .ihtar-detail-wrap { grid-template-columns: 1fr; }
}

/* Ödeme dağılımı pie — center label */
.pie-center-text {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center; pointer-events: none;
}
.pie-center-text .n {
    font-size: 20px; font-weight: 700; color: var(--text); line-height: 1;
}
.pie-center-text .label {
    font-size: 10px; color: var(--text3); margin-top: 2px;
}
.pie-chart-wrap { position: relative; }

/* ── Ay Durumu Gridi ─────────────────────────────────────────── */
.month-status-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}
.month-card {
    display: block;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 7px 9px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.month-card:hover {
    border-color: var(--primary);
    background: var(--surface2);
    text-decoration: none;
}
.month-card.active {
    border-color: var(--primary);
    background: var(--tint-blue-bg, #eff6ff);
}
.month-card.future {
    opacity: .45;
}
.month-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
}
.month-card.active .month-card-name { color: var(--primary); }
.month-card-counts {
    font-size: 10px;
    color: var(--text3);
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
}
.month-card-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--surface3);
    overflow: hidden;
}
.month-card-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .3s ease;
}
@media (max-width: 900px) {
    .month-status-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
    .month-status-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Dashboard Alt Satır (Uyarılar + Ek Ödeme) ─────────────── */
.dash-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
.dash-bottom-card {
    display: flex;
    flex-direction: column;
}
.dash-uyari-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dash-uyari-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity .15s;
}
.dash-uyari-item.red {
    background: var(--tint-red-bg, #fef2f2);
    border: 1px solid var(--tint-red-bd, #fecaca);
}
.dash-uyari-item:hover { opacity: .8; }
.dash-taksit-row {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface2);
    transition: opacity .15s;
    display: block;
}
.dash-taksit-row:hover { opacity: .8; }
@media (max-width: 768px) {
    .dash-bottom-row { grid-template-columns: 1fr; }
}

/* ─── Sakin Talepler ─────────────────────── */

/* Form + WA yan yana layout */
.talep-layout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Form kartı — flex büyür, inline width yok */
.talep-form-card {
    flex: 1 1 0%;
    min-width: 0;
    box-sizing: border-box;
}

/* WhatsApp yan panel — sadece class'tan genişlik */
.talep-wa-side {
    flex: 0 0 230px;
    width: 230px;
    box-sizing: border-box;
}

/* Dosya yükleme kutusu */
.file-upload-wrap {
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    transition: border-color .15s;
}
.file-upload-wrap:hover { border-color: var(--primary); }
.file-upload-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    user-select: none;
}
.file-upload-label:hover { color: var(--primary); }

/* Talep geçmişi */
.talep-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.talep-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    box-sizing: border-box;
    width: 100%;
}
.talep-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.talep-body { flex: 1; min-width: 0; }

/* Mobil: alt alta, WA tam genişlik */
@media (max-width: 640px) {
    .talep-layout {
        flex-direction: column;
        gap: 10px;
    }
    .talep-form-card,
    .talep-wa-side {
        flex: none;
        width: 100%;
    }
}

/* Dashboard 3-column list grid */
.dash-three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 900px) {
    .dash-three-col { grid-template-columns: 1fr; }
}
.dash-list-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dash-list-card-red { border-color: var(--tint-red-bd, #fecaca); }
.dash-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.dash-list-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.dash-list-body {
    overflow-y: auto;
    height: var(--dash-list-body-h, 200px);
    flex-shrink: 0;
}
.dash-list-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background .12s;
}
.dash-list-row:last-child { border-bottom: 0; }
.dash-list-row:hover { background: var(--surface2); }
.dash-list-name {
    flex: 1;
    font-size: 12.5px;
    color: var(--text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-list-empty {
    padding: 26px 14px;
    font-size: 13px;
    color: var(--text3);
    text-align: center;
}
.dash-list-empty.green {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--green);
}
.btn-red-xs {
    color: var(--red);
    border-color: var(--tint-red-bd, #fecaca);
}
