/* ============================================================
   HİLAL APARTMANI — Premium tema (lacivert + altın)
   ============================================================ */
:root {
  /* Lacivert skala */
  --navy-950: #070E1C;
  --navy-900: #0B1426;
  --navy-850: #0F1B30;
  --navy-800: #13243E;
  --navy-700: #1C3358;
  --navy-600: #284673;
  /* Altın */
  --gold:      #C8A24A;
  --gold-soft: #E3C77E;
  --gold-deep: #A8842F;
  /* Yüzeyler (açık tema varsayılan) */
  --bg:        #EEF1F6;
  --bg-2:      #E5EAF1;
  --card:      #FFFFFF;
  --card-2:    #F7F9FC;
  --ink:       #16203A;
  --ink-soft:  #45506B;
  --muted:     #6A7791;
  --line:      #DEE4EE;
  --hair:      rgba(200,162,74,.22);
  --accent:    #1C3358;
  --navy-bg:   #EFF2F8;
  --gold-bg:   rgba(200,162,74,.12);
  /* Durum */
  --green:     #2E7D58; --green-bg:#E5F2EB;
  --red:       #BC4630; --red-bg:  #F8E7E2;
  --amber:     #A97C16; --amber-bg:#FBF0D5;
  /* Sistem */
  --r:    16px;
  --r-sm: 11px;
  --shadow:      0 1px 2px rgba(11,20,38,.05), 0 10px 30px rgba(11,20,38,.07);
  --shadow-lift: 0 4px 8px rgba(11,20,38,.08), 0 24px 50px rgba(11,20,38,.14);
  --shadow-gold: 0 6px 22px rgba(168,132,47,.28);
  --input-bg: #FFFFFF;
  --display: "Spectral", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}

/* Cihaz karanlık + kullanıcı elle seçmediyse otomatik koyu */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:#070E1C; --bg-2:#0B1426; --card:#101E36; --card-2:#0D1A30;
    --ink:#EAEFF8; --ink-soft:#C3CDDF; --muted:#8A98B4; --line:#22324F;
    --hair:rgba(227,199,126,.18); --accent:#E3C77E; --navy-bg:#172943; --gold-bg:rgba(227,199,126,.12);
    --green:#5FC48A; --green-bg:#102A1D; --red:#E98C76; --red-bg:#36190F; --amber:#E0B860; --amber-bg:#2F2410;
    --input-bg:#0C1A30;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 34px rgba(0,0,0,.5);
    --shadow-lift:0 6px 14px rgba(0,0,0,.5), 0 28px 60px rgba(0,0,0,.6);
  }
}
/* Elle koyu tema */
[data-theme="dark"] {
  --bg:#070E1C; --bg-2:#0B1426; --card:#101E36; --card-2:#0D1A30;
  --ink:#EAEFF8; --ink-soft:#C3CDDF; --muted:#8A98B4; --line:#22324F;
  --hair:rgba(227,199,126,.18); --accent:#E3C77E; --navy-bg:#172943; --gold-bg:rgba(227,199,126,.12);
  --green:#5FC48A; --green-bg:#102A1D; --red:#E98C76; --red-bg:#36190F; --amber:#E0B860; --amber-bg:#2F2410;
  --input-bg:#0C1A30;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 34px rgba(0,0,0,.5);
  --shadow-lift:0 6px 14px rgba(0,0,0,.5), 0 28px 60px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; line-height: 1.55;
}
.boot { padding: 80px; text-align: center; color: var(--muted); font-family: var(--display); font-size: 18px; letter-spacing: .02em; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; }
h1,h2,h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.015em; margin: 0; color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }
::selection { background: rgba(200,162,74,.28); }

/* ============ LOGIN ============ */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1100px 600px at 78% -12%, rgba(200,162,74,.20), transparent 58%),
    radial-gradient(820px 680px at 8% 112%, rgba(40,70,115,.55), transparent 60%),
    linear-gradient(155deg, var(--navy-950), var(--navy-850) 55%, var(--navy-900));
}
.login-card {
  width: 100%; max-width: 410px; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border: 1px solid rgba(227,199,126,.26); border-radius: 22px;
  padding: 44px 34px 38px; backdrop-filter: blur(10px);
  box-shadow: 0 40px 100px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
}
.login-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 22px; padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(227,199,126,.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.crest { display: grid; place-items: center; margin-bottom: 16px; }
.crest svg { width: 58px; height: 58px; filter: drop-shadow(0 4px 14px rgba(200,162,74,.4)); }
.login-card h1 { color: #fff; text-align: center; font-size: 32px; font-weight: 700; }
.login-card .sub { text-align: center; color: var(--gold-soft); font-size: 12px; letter-spacing: .26em; text-transform: uppercase; margin: 8px 0 28px; font-weight: 500; }
.login-card label { display: block; color: #C4CFE2; font-size: 12.5px; margin: 16px 0 7px; font-weight: 500; letter-spacing: .02em; }
.login-card input {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  border: 1px solid rgba(227,199,126,.22); background: rgba(7,14,28,.5); color: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.login-card input::placeholder { color: #6B7896; }
.login-card input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,162,74,.18); }
.login-card .err { color: #FFB4A3; font-size: 13.5px; margin-top: 16px; min-height: 18px; }
.seg { display: flex; gap: 5px; background: rgba(7,14,28,.45); padding: 5px; border-radius: 13px; border: 1px solid rgba(227,199,126,.14); }
.seg-btn { flex: 1; padding: 10px 4px; border: none; background: transparent; color: #B9C4DA; font: inherit; font-size: 13.5px; font-weight: 600; border-radius: 9px; transition: all .18s; }
.seg-btn:hover { color: #fff; }
.seg-btn.active { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #2A2207; box-shadow: 0 4px 14px rgba(200,162,74,.35); }
.btn-gold {
  width: 100%; margin-top: 26px; padding: 14px; border: none; border-radius: 12px;
  font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--navy-950);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 70%, var(--gold-deep));
  box-shadow: var(--shadow-gold); transition: transform .12s, filter .18s;
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-gold:active { transform: translateY(1px); }

/* ============ APP SHELL ============ */
.topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; padding: 0 22px;
  display: flex; align-items: center; gap: 13px; color: #fff;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 4px 24px rgba(0,0,0,.22);
}
.topbar .brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: .01em; }
.topbar .brand svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 8px rgba(200,162,74,.45)); }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13.5px; color: #B9C4DA; }
.topbar .who b { color: var(--gold-soft); font-weight: 600; }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; padding: 0 4px; margin-right: 2px; white-space: nowrap; }
.clock-time { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--gold-soft); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.clock-date { font-size: 11px; color: #94A1BC; margin-top: 1px; }
.sifat-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 7px; background: rgba(227,199,126,.16); color: var(--gold-soft); margin-left: 3px; }
.logout {
  background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.14);
  padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: background .16s, border-color .16s;
}
.logout:hover { background: rgba(227,199,126,.16); border-color: rgba(227,199,126,.4); }
.icon-btn { padding: 8px 10px; }

.app-body { display: flex; align-items: flex-start; max-width: 1280px; margin: 0 auto; }
.content-col { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - 64px); }
.content-col .container { flex: 1; }
.container { flex: 1; min-width: 0; padding: 30px 28px 90px; }
.site-footer { text-align: center; padding: 18px 20px 26px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); margin: 0 28px; }
.site-footer a { color: var(--gold, #C9A24B); text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }
.login-wrap .site-footer { border: none; margin: 16px 0 0; padding: 8px 0 0; }

/* ============ SIDEBAR (sol) ============ */
.sidebar {
  width: 264px; flex-shrink: 0; order: -1;
  position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
  padding: 22px 16px; background: var(--card-2);
  border-right: 1px solid var(--line); scrollbar-width: thin;
}
.nav-link, .nav-group > summary {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 13px; border-radius: var(--r-sm); font-size: 14.5px; font-weight: 600;
  text-align: left; border: none; background: none; cursor: pointer; color: var(--muted);
  transition: background .16s, color .16s, box-shadow .16s;
}
.nav-group > summary { color: var(--ink); font-weight: 700; }
.nav-link:hover, .nav-group > summary:hover { background: var(--navy-bg); color: var(--ink); }
.nav-link.active {
  color: var(--navy-950); font-weight: 700;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 4px 14px rgba(200,162,74,.3);
}
[data-theme="dark"] .nav-link.active, :root:not([data-theme]) .nav-link.active { color: var(--navy-950); }
.nav-ico { font-size: 16px; width: 23px; text-align: center; flex-shrink: 0; line-height: 1; }
.nav-lbl { flex: 1; min-width: 0; }
.nav-group { margin-bottom: 3px; }
.nav-group > summary { list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-caret { color: var(--muted); flex-shrink: 0; transition: transform .22s; }
.nav-group[open] > summary .nav-caret { transform: rotate(180deg); }
.nav-sub { padding: 3px 0 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-sub .nav-link { padding: 9px 13px 9px 15px; font-size: 14px; }
.nav-toggle { display: none; }
.sidebar-overlay { display: none; }

/* ============ KARTLAR ============ */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 17px;
  transition: box-shadow .2s, border-color .2s;
}
.card h2 { font-size: 20px; margin-bottom: 5px; }
.card .hint { color: var(--muted); font-size: 13.5px; margin-bottom: 15px; }
.hint { color: var(--muted); font-size: 13.5px; }
.section-title {
  display: flex; align-items: center; gap: 12px; font-family: var(--display);
  font-size: 15px; color: var(--accent); margin: 30px 4px 14px; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase;
}
.section-title::before { content: ""; width: 18px; height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 2px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--hair), transparent); }

/* Hero / balance */
.balance {
  position: relative; overflow: hidden; color: #fff; border: 1px solid var(--hair);
  background:
    radial-gradient(600px 300px at 88% -40%, rgba(200,162,74,.22), transparent 60%),
    linear-gradient(140deg, var(--navy-800), var(--navy-900) 60%, var(--navy-950));
}
.balance .moon { position: absolute; right: -26px; top: -26px; opacity: .9; }
.balance .moon svg { width: 176px; height: 176px; filter: drop-shadow(0 6px 22px rgba(200,162,74,.3)); }
.balance .lbl { color: var(--gold-soft); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.balance .amt { font-family: var(--display); font-size: 46px; font-weight: 700; margin: 6px 0 3px; letter-spacing: -.02em; }
.balance .amt.ok { color: var(--gold-soft); }
.balance .desc { color: #C3CEE0; font-size: 14px; }

/* Stat grid */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat {
  position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 19px 18px 17px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 3px; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); }
.stat::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, var(--hair), transparent); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--gold); }
.stat.tikla { cursor: pointer; }
.stat.tikla .k::after { content: " ›"; color: var(--gold, #C9A24B); font-weight: 700; opacity: .6; }
.stat.tikla:hover .k::after { opacity: 1; }
.stat .k { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.stat .v { font-family: var(--display); font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.stat .v small { font-size: 14px; color: var(--muted); font-family: var(--body); font-weight: 500; }
.stat.alert::before { background: linear-gradient(180deg, var(--amber), var(--gold-deep)); }
.stat.alert .v { color: var(--amber); }

/* ============ SATIRLAR / LİSTE ============ */
.row { display: flex; align-items: center; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; font-size: 15px; }
.row .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.row .amt2 { font-weight: 700; font-size: 15.5px; font-family: var(--display); }

.badge { font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; }
.badge.paid { color: var(--green); background: var(--green-bg); }
.badge.debt { color: var(--red); background: var(--red-bg); }
.badge.pend { color: var(--amber); background: var(--amber-bg); }

/* ============ BUTONLAR ============ */
.btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 10px 16px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600;
  transition: background .16s, border-color .16s, transform .1s, box-shadow .16s;
}
.btn:hover { border-color: var(--navy-600); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--navy-700), var(--navy-800)); color: #fff; border-color: transparent; box-shadow: 0 4px 16px rgba(19,36,62,.28); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.good { background: var(--green); color: #fff; border-color: var(--green); }
.btn.danger { background: var(--input-bg); color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { padding: 7px 12px; font-size: 12.5px; }
.btn.gold { background: linear-gradient(180deg, var(--gold-soft), var(--gold) 70%, var(--gold-deep)); color: var(--navy-950); border: none; box-shadow: var(--shadow-gold); }
.btn.gold:hover { filter: brightness(1.06); }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }
.ozet-aksiyon { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin: 6px 0 14px; }
.ozet-aksiyon .btn { flex: 0 1 auto; }
.asistan-ornekler { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); border-radius: 20px; padding: 7px 14px; font-size: 13px; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--gold, #C9A24B); color: var(--gold-soft, #E4CC8A); }
.asistan-chat { min-height: 220px; max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.asistan-msg { display: flex; }
.asistan-msg.siz { justify-content: flex-end; }
.asistan-msg.ai { justify-content: flex-start; }
.asistan-balon { max-width: 82%; padding: 11px 15px; border-radius: 15px; font-size: 14.5px; line-height: 1.5; }
.asistan-msg.siz .asistan-balon { background: linear-gradient(135deg, var(--gold, #C9A24B), var(--gold-soft, #E4CC8A)); color: #1a1205; border-bottom-right-radius: 5px; font-weight: 500; }
.asistan-msg.ai .asistan-balon { background: var(--bg-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.asistan-girdi { display: flex; gap: 9px; margin-top: 13px; }
.asistan-girdi input { flex: 1; }
@media (max-width: 980px) { .asistan-balon { max-width: 88%; } }
.harita-yol { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; }
.harita-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.harita-kart { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 14px; cursor: pointer; text-align: center; transition: all .15s; color: var(--ink); }
.harita-kart:hover { border-color: var(--gold, #C9A24B); transform: translateY(-2px); }
.harita-ikon { font-size: 30px; }
.harita-baslik { font-weight: 600; font-size: 15.5px; margin-top: 6px; }
.harita-alt { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.harita-daire { background: var(--bg-2); border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; margin-bottom: 12px; }
.harita-daire:last-child { margin-bottom: 0; }
.harita-daire-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.harita-daire-no { font-weight: 700; font-size: 16px; font-family: var(--display); }
.harita-satir { display: flex; gap: 12px; padding: 5px 0; font-size: 14px; border-top: 1px solid var(--line); }
.harita-satir span:first-child { min-width: 110px; color: var(--muted); }
.harita-satir b { font-weight: 600; }
.harita-satir a { color: var(--gold, #C9A24B); text-decoration: none; }
.acil-banner { border: 1.5px solid var(--red, #c0392b); background: color-mix(in srgb, var(--red, #c0392b) 9%, transparent); }
.acil-banner-bas { font-weight: 700; color: var(--red, #c0392b); font-size: 15.5px; margin-bottom: 8px; }
.acil-banner-sat { padding: 6px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.acil-banner-sat:first-of-type { border-top: none; }
.acil-banner-zaman { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.duyuru-banner { border: 1.5px solid var(--gold, #C9A24B); }
.duyuru-banner-bas { font-weight: 700; color: var(--gold-soft, #E4CC8A); font-size: 15.5px; margin-bottom: 8px; }
.duyuru-banner-sat { padding: 8px 0; border-top: 1px solid var(--line); }
.duyuru-banner-sat:first-of-type { border-top: none; }
.duyuru-banner-baslik { font-weight: 600; font-size: 14.5px; }
.duyuru-banner-icerik { font-size: 13.5px; color: var(--ink-soft, #c7d0e0); margin-top: 2px; }
.duyuru-banner-zaman { font-size: 12px; color: var(--muted); margin-top: 3px; }
.yardim-item { border-bottom: 1px solid var(--line); }
.yardim-item:last-child { border-bottom: none; }
.yardim-item summary { cursor: pointer; padding: 12px 2px; font-weight: 600; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 8px; }
.yardim-item summary::-webkit-details-marker { display: none; }
.yardim-item summary::after { content: "+"; margin-left: auto; color: var(--gold, #C9A24B); font-size: 20px; font-weight: 400; line-height: 1; }
.yardim-item[open] summary::after { content: "−"; }
.yardim-item summary:hover { color: var(--gold-soft, #E4CC8A); }
.yardim-icerik { padding: 2px 2px 14px; font-size: 14px; line-height: 1.6; color: var(--ink-soft, #c7d0e0); }
.yardim-icerik b { color: var(--ink, #e8eefc); }
.bilgi-kart { text-align: center; }
.bilgi-avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 32px; font-weight: 700; color: #1a1205; background: linear-gradient(135deg, var(--gold, #C9A24B), var(--gold-soft, #E4CC8A)); }
.bilgi-ad { font-family: var(--display); font-size: 22px; font-weight: 700; }
.bilgi-konum { color: var(--muted); font-size: 14px; margin-top: 4px; }
.bilgi-sat { display: flex; justify-content: space-between; gap: 14px; padding: 11px 2px; border-top: 1px solid var(--line); font-size: 14.5px; }
.bilgi-sat:first-child { border-top: none; }
.bilgi-sat span { color: var(--muted); }
.bilgi-sat b { font-weight: 600; text-align: right; }
.bilgi-sat a { color: var(--gold, #C9A24B); text-decoration: none; }

/* IBAN */
.iban-card {
  color: #fff; border: 1px solid var(--hair);
  background: radial-gradient(500px 220px at 90% -30%, rgba(200,162,74,.18), transparent 60%), linear-gradient(140deg, var(--navy-800), var(--navy-950));
}
.iban-card .lbl { color: var(--gold-soft); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.iban-card .iban { font-family: var(--display); font-size: 21px; letter-spacing: .05em; margin: 7px 0; word-break: break-all; }
.iban-card .who { color: #C3CEE0; font-size: 13.5px; }

/* ============ FORMLAR ============ */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--input-bg); color: var(--ink); transition: border-color .16s, box-shadow .16s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,162,74,.16); }
.field textarea { min-height: 92px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.tip-row input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--input-bg); color: var(--ink); }
.tip-row .t-ad { flex: 1; min-width: 0; }
.tip-row .t-tutar { width: 120px; }

/* ============ DUYURULAR ============ */
.ann { border-left: 3px solid var(--gold); padding: 5px 0 5px 17px; margin-bottom: 20px; }
.ann.pin { border-left-color: var(--accent); }
.ann h3 { font-size: 17.5px; }
.ann .date { color: var(--muted); font-size: 12.5px; margin: 3px 0 9px; }
.ann .pinflag { color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.ann p { margin: 0; white-space: pre-wrap; font-size: 14.5px; }

.empty { text-align: center; color: var(--muted); padding: 34px 12px; font-size: 14px; }

/* ============ TOAST ============ */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); color: #fff;
  padding: 13px 22px; border-radius: 13px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--hair); box-shadow: 0 16px 50px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: all .26s; z-index: 100; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: linear-gradient(180deg, #C0492F, #8E3422); border-color: rgba(255,180,160,.3); }

/* ============ MODAL ============ */
.modal-bg { position: fixed; inset: 0; background: rgba(7,14,28,.62); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 18px; z-index: 90; }
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 470px;
  padding: 26px; box-shadow: var(--shadow-lift); max-height: 90vh; overflow-y: auto;
}
.modal h2 { font-size: 22px; margin-bottom: 18px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }

/* ============ BİLDİRİM ============ */
.bell { position: relative; }
.bell-badge {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: linear-gradient(180deg, #E0584A, #BC4630); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--navy-900);
}
.notif-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; gap: 10px; }
.notif-list { display: flex; flex-direction: column; max-height: 52vh; overflow-y: auto; margin: 0 -5px; }
.notif { display: flex; gap: 11px; padding: 13px 7px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notif:last-child { border-bottom: none; }
.notif.unread { background: var(--gold-bg); border-radius: 9px; }
.notif-tur { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--navy-bg); color: var(--accent); }
.notif-tur.t-acil { background: var(--red-bg); color: var(--red); }
.notif-tur.t-kargo { background: var(--green-bg); color: var(--green); }
.notif-tur.t-aidat { background: var(--amber-bg); color: var(--amber); }
.notif-tur.t-duyuru { background: var(--gold-bg); color: var(--gold-deep); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 14.5px; }
.notif.unread .notif-title::before { content: "● "; color: var(--gold); font-size: 11px; vertical-align: middle; }
.notif-text { color: var(--muted); font-size: 13px; margin-top: 2px; }
.notif-date { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.notif-prefs { margin-top: 17px; border-top: 1px solid var(--line); padding-top: 13px; }
.notif-prefs summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); }
.pref-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 0; }
.pref-row input { width: auto; }

/* ============ ACİL ============ */
.acil-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.acil-btn {
  border: none; border-radius: var(--r); padding: 24px 12px; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(160deg, #D2553B, #A8341F); display: flex; flex-direction: column;
  align-items: center; gap: 9px; box-shadow: 0 8px 24px rgba(168,52,31,.3); transition: transform .1s;
}
.acil-btn:active { transform: scale(.97); }
.acil-btn .ico { font-size: 27px; line-height: 1; }

.btn, .tab, .seg-btn, .logout, .icon-btn, .badge, .nav-link, .acil-btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ============ MOBİL ============ */
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex !important; order: -1; flex-shrink: 0; }
  .app-body { display: block; max-width: none; }
  .container { padding: 20px 14px 90px; }
  .site-footer { margin: 0 14px; padding: 16px 12px 24px; }
  .topbar { padding: 0 10px; gap: 6px; height: 56px; flex-wrap: nowrap; overflow: hidden; }
  .topbar .brand { font-size: 16px; min-width: 0; flex-shrink: 1; gap: 7px; }
  .topbar .brand svg { width: 22px; height: 22px; flex-shrink: 0; }
  .brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .who { display: none; }
  .topbar .spacer { display: none; }
  .clock { flex-shrink: 0; padding: 0 2px; }
  .clock-time { font-size: 13px; }
  .clock-date { display: none; }
  .icon-btn { padding: 7px; flex-shrink: 0; }
  .icon-btn svg { width: 19px; height: 19px; }
  #logoutBtn { padding: 7px; flex-shrink: 0; }
  #logoutBtn .btn-text { display: none; }       /* mobilde çıkış sadece ikon */
  #logoutBtn svg { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; width: 290px; max-width: 86vw; z-index: 60;
    transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 14px 0 50px rgba(0,0,0,.4); padding-top: 22px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(7,14,28,.55); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .26s; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .stats { grid-template-columns: 1fr 1fr; gap: 11px; }
  .stat { padding: 16px 14px 14px; }
  .stat .v { font-size: 23px; }
  .grid2 { grid-template-columns: 1fr; }
  .balance .amt { font-size: 36px; }
  .row { flex-wrap: wrap; align-items: center; gap: 8px 10px; }
  .row .grow { flex: 1 1 100%; }
  .row .btn-row { flex-basis: 100%; }
  .row .badge { order: 5; }
  .ozet-aksiyon { justify-content: stretch; }
  .ozet-aksiyon .btn { flex: 1 1 100%; }
  .row .btn { margin-top: 4px; }
  .card { padding: 18px 15px; }
  .modal { padding: 22px 18px; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .iban-card .iban { font-size: 17px; }
}
@media (max-width: 560px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-card { padding: 15px 13px; }
  #logoutBtn svg, .icon-btn svg { width: 18px; height: 18px; }
}
@media (max-width: 380px) {
  .stats { gap: 9px; }
  .stat .v { font-size: 21px; }
  .topbar .brand { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ============ HIZLI ERİŞİM (ana sayfa panosu) ============ */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 6px; }
.quick-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 18px 16px; border-radius: var(--r); cursor: pointer; text-align: left;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s, background .18s;
}
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--gold); }
.quick-card:active { transform: translateY(-1px); }
.quick-card .q-ico {
  font-size: 22px; line-height: 1; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 13px; background: var(--gold-bg); border: 1px solid var(--hair);
}
.quick-card .q-lbl { font-size: 14.5px; font-weight: 600; color: var(--ink); }
@media (max-width: 980px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } .quick-card { padding: 15px 13px; } }

/* ============ DEMO HIZLI GİRİŞ (login ekranı) ============ */
.demo-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; }
.demo-divider::before, .demo-divider::after { content: ""; flex: 1; height: 1px; background: rgba(227,199,126,.22); }
.demo-divider span { color: var(--gold-soft); font-size: 11px; letter-spacing: .16em; font-weight: 600; white-space: nowrap; }
.demo-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.demo-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 13px 6px; border-radius: 12px; cursor: pointer; font: inherit;
  background: rgba(255,255,255,.05); border: 1px solid rgba(227,199,126,.2); color: #fff;
  font-size: 21px; transition: background .16s, border-color .16s, transform .1s;
}
.demo-btn span { font-size: 12px; font-weight: 600; color: #C4CFE2; }
.demo-btn:hover { background: rgba(227,199,126,.14); border-color: var(--gold); transform: translateY(-2px); }
.demo-btn:hover span { color: #fff; }
.demo-btn:active { transform: translateY(0); }
