/* YirmiSekiz Diafon - bağımsız CSS (CDN yok) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/orbitron-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --canvas: #d1d5db;
  --amber: #d97706;
  --amber-dark: #92400e;
  --amber-deep: #78350f;
  --amber-light: #fef3c7;
  --indigo: #4f46e5;
  --indigo-dark: #4338ca;
  --green: #059669;
  --green-dark: #065f46;
  --red: #e11d48;
  --red-dark: #881337;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.09);
  --radius: 2rem;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.65), transparent 42%),
    radial-gradient(circle at 85% 8%, rgba(148,163,184,.3), transparent 38%),
    var(--canvas);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.diafon-font { font-family: 'Orbitron', 'Inter', sans-serif; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* ---------- üst bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148,163,184,.35);
  box-shadow: 0 3px 18px rgba(15,23,42,.05);
}
.topbar-inner {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--amber-dark), #451a03);
  color: #fde68a;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(146,64,14,.3);
  flex: 0 0 auto;
}
.brand-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.topbar-right { display: flex; align-items: center; gap: 9px; }
.month-badge {
  max-width: 48vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(148,163,184,.55);
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(15,23,42,.05);
}
.lock-link, .icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  color: #94a3b8;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: .2s ease;
}
.lock-link:hover, .icon-btn:hover { background: #e2e8f0; color: #475569; transform: translateY(-1px); }
.lock-link.active { background: #fee2e2; color: #e11d48; }
.lock-link svg, .icon-btn svg { width: 19px; height: 19px; }

/* ---------- genel sayfa ---------- */
.page {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 22px 16px 56px;
  position: relative;
}
.loading-card, .error-card, .card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.loading-card, .error-card {
  padding: 44px 22px;
  text-align: center;
}
.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 4px solid #e2e8f0;
  border-top-color: var(--amber-dark);
  animation: spin .8s linear infinite;
}
.spinner.small { width: 17px; height: 17px; border-width: 3px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 10px; font-weight: 900; letter-spacing: .16em; color: #94a3b8; text-transform: uppercase; }
.error-card h2 { margin: 0 0 8px; font-size: 20px; }
.error-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }

/* ---------- bina ---------- */
.building-view { position: relative; }
.building-wrap {
  position: relative;
  width: 100%;
  transform-origin: 50% 48%;
  transition: transform .75s cubic-bezier(.2,.85,.2,1), opacity .75s ease, filter .75s ease;
}
.building-wrap.zooming {
  transform: scale(7.5);
  opacity: 0;
  filter: blur(4px);
  pointer-events: none;
}
.roof {
  position: relative;
  z-index: 2;
  height: 96px;
  width: 108%;
  left: -4%;
  border-radius: 80px 80px 6px 6px;
  background: linear-gradient(180deg, #a14a12 0%, #92400e 42%, #78350f 100%);
  border-bottom: 8px solid #5b2b09;
  box-shadow: 0 24px 48px rgba(69,26,3,.35);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.roof::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .28;
  background:
    repeating-linear-gradient(0deg, transparent 0 11px, #451a03 11px 13px),
    repeating-linear-gradient(90deg, transparent 0 22px, #451a03 22px 23px);
}
.roof::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.32), transparent);
  border-radius: 80px 80px 0 0;
}
.roof-title {
  position: relative;
  z-index: 2;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(69,26,3,.55);
  border: 1px solid rgba(255,255,255,.15);
  color: #fef3c7;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: .3em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.wall {
  position: relative;
  z-index: 1;
  margin-top: -4px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.28), transparent 15%, transparent 85%, rgba(120,53,15,.08)),
    var(--amber-light);
  border-left: 14px solid rgba(217,119,6,.25);
  border-right: 14px solid rgba(217,119,6,.25);
  border-radius: 0 0 3.4rem 3.4rem;
  padding: 22px 18px 20px;
  box-shadow: var(--shadow);
}
.wall::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: repeating-linear-gradient(0deg, transparent 0 28px, rgba(146,64,14,.35) 28px 29px);
  border-radius: inherit;
}
.doors {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border-radius: 2.6rem;
  background: rgba(69,26,3,.06);
  box-shadow: inset 0 1px 12px rgba(69,26,3,.09);
}
.door {
  position: relative;
  height: 104px;
  border: 8px solid var(--amber-dark);
  border-radius: 1.55rem;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  color: #fff;
  box-shadow: 0 8px 0 rgba(69,26,3,.32), inset 0 0 18px rgba(0,0,0,.34);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 8px 8px;
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: visible;
}
.door:hover, .door:focus-visible { transform: translateY(-2px); box-shadow: 0 11px 0 rgba(69,26,3,.3), inset 0 0 18px rgba(0,0,0,.34); }
.door:active { transform: translateY(1px) scale(.985); }
.door-plate {
  position: relative;
  z-index: 3;
  max-width: 100%;
  padding: 7px 14px;
  border-radius: .9rem;
  background: linear-gradient(180deg, #e08808, #c26a04);
  border: 2px solid rgba(120,53,15,.4);
  box-shadow: 0 4px 12px rgba(0,0,0,.32);
  color: #431407;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.door-knob {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 9px #f59e0b;
  transform: translateY(-50%);
}
.door-status {
  position: absolute;
  z-index: 4;
  top: 5px;
  left: 10%;
  right: 10%;
  height: 5px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: var(--red);
  box-shadow: 0 0 10px rgba(225,29,72,.6);
}
.door.paid .door-status { background: #10b981; box-shadow: 0 0 10px rgba(16,185,129,.6); }
.door-status:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.door-tip {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 190px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(15,23,42,.18);
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: .16s ease;
}
.door-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}
.door:hover .door-tip, .door:focus-visible .door-tip, .door.tip-open .door-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.building-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 12px;
  min-height: 92px;
  padding: 0 6px;
}
.trees { display: flex; align-items: flex-end; gap: 0; color: #065f46; }
.trees svg { width: 64px; height: 76px; filter: drop-shadow(0 5px 7px rgba(6,95,70,.22)); }
.trees svg + svg { width: 52px; height: 64px; color: #047857; margin-left: -8px; }
.chimney-stack { position: relative; display: flex; align-items: flex-end; gap: 10px; }
.chimney {
  position: relative;
  width: 78px;
  height: 116px;
  border-radius: 22px 22px 4px 4px;
  background: linear-gradient(145deg, #57200a, #3b1405);
  border: 7px solid #78350f;
  border-bottom-width: 0;
  box-shadow: 0 12px 26px rgba(0,0,0,.24);
  overflow: hidden;
}
.chimney::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(0,0,0,.2) 14px 16px);
}
.chimney-button {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fbbf24;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-transform: uppercase;
  z-index: 2;
  transition: background .2s ease;
}
.chimney-button:hover { background: rgba(251,191,36,.1); }
.chimney-light {
  position: absolute;
  right: 9px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 9px #f59e0b;
  z-index: 3;
  pointer-events: none;
}
.antenna {
  width: 26px;
  height: 56px;
  border-radius: 9px;
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  border: 2px solid #64748b;
  box-shadow: 0 7px 14px rgba(15,23,42,.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 5px 3px;
}
.antenna::before {
  content: '';
  width: 16px;
  height: 6px;
  border-radius: 3px;
  background: #0f172a;
  box-shadow: inset 0 0 0 1px #334155;
}
.antenna::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0f172a;
  border: 1px solid rgba(59,130,246,.6);
  box-shadow: 0 0 8px rgba(59,130,246,.5);
}
.hint {
  text-align: center;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 18px 0 0;
}

/* ---------- hava durumu balonu ---------- */
.weather-balloon {
  position: absolute;
  z-index: 40;
  top: 142px;
  right: 6px;
  width: 152px;
  padding: 11px 12px 10px;
  border-radius: 1.35rem;
  border: 1px solid rgba(16,185,129,.3);
  background: rgba(255,255,255,.96);
  box-shadow: 0 16px 36px rgba(15,23,42,.18);
  text-align: center;
  animation: floatWeather 9s ease-in-out infinite;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.weather-balloon.warn { border-color: rgba(245,158,11,.45); }
.weather-balloon.bad { border-color: rgba(59,130,246,.4); }
.weather-balloon::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-right: 1px solid rgba(148,163,184,.35);
  border-bottom: 1px solid rgba(148,163,184,.35);
  transform: translateX(-50%) rotate(45deg);
}
.weather-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15,23,42,.05);
  font-size: 10px;
  font-weight: 900;
}
.weather-top svg { width: 15px; height: 15px; }
.weather-text {
  margin-top: 5px;
  font-size: 8px;
  line-height: 1.3;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
}
.weather-rain { display: block; font-size: 8px; color: #64748b; margin-top: 2px; letter-spacing: .05em; }
@keyframes floatWeather {
  0%, 100% { transform: translate(0, 0) rotate(-1deg); }
  28% { transform: translate(-11px, -12px) rotate(1.5deg); }
  55% { transform: translate(7px, -20px) rotate(-1.5deg); }
  78% { transform: translate(12px, -7px) rotate(1deg); }
}

/* ---------- kar ---------- */
.snow { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.snowflake {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  background: #fff;
  opacity: .75;
  filter: blur(.2px);
  animation-name: snowFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes snowFall {
  0% { transform: translate3d(0, -20px, 0); }
  50% { transform: translate3d(18px, 52vh, 0); }
  100% { transform: translate3d(-8px, 106vh, 0); }
}

/* ---------- kişisel ekran ---------- */
.person-view { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 4px 0 16px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.back-link:hover { color: var(--ink); }
.back-link svg { width: 18px; height: 18px; }
.person-hero {
  position: relative;
  overflow: hidden;
  border-radius: 3rem;
  padding: 30px 22px 24px;
  color: #fff;
  background: linear-gradient(145deg, #4c0519, #1f0710);
  box-shadow: var(--shadow);
}
.person-hero.paid { background: linear-gradient(145deg, #022c22, #052e16); }
.person-hero::after {
  content: '';
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  right: -90px;
  top: -90px;
  background: rgba(255,255,255,.06);
}
.person-name {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(27px, 8vw, 40px);
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-align: center;
}
.status-pill {
  display: table;
  margin: 12px auto 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(244,63,94,.2);
  color: #fda4af;
  text-align: center;
}
.person-hero.paid .status-pill { background: rgba(16,185,129,.18); color: #6ee7b7; }
.person-total-label {
  margin: 24px 0 3px;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.48);
}
.person-total {
  text-align: center;
  font-size: clamp(38px, 12vw, 60px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.04em;
  word-break: break-word;
}
.person-total span { font-size: .35em; color: rgba(255,255,255,.42); margin-left: 5px; letter-spacing: 0; }
.person-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 25px;
}
.person-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  border-radius: 1.2rem;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.055);
  text-align: left;
}
.person-field .pf-icon {
  width: 28px;
  height: 28px;
  border-radius: .8rem;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.06);
  flex: 0 0 auto;
}
.person-field svg { width: 14px; height: 14px; }
.pf-label { display: block; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.34); }
.pf-value { display: block; margin-top: 2px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress-wrap {
  margin-top: 20px;
  padding: 15px 16px;
  border-radius: 1.4rem;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.055);
}
.progress-head { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.progress-head strong { color: rgba(255,255,255,.8); }
.progress-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 9px; }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #34d399, #6ee7b7); transition: width .7s ease; }
.progress-note { margin-top: 7px; font-size: 9px; color: rgba(255,255,255,.35); }
.account-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.account-title { margin: 0 0 10px; text-align: center; font-size: 9px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; color: #fcd34d; }
.account-button {
  width: 100%;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 1.5rem;
  background: rgba(255,255,255,.05);
  color: #fff;
  padding: 14px 12px;
  transition: .2s ease;
}
.account-button:hover { background: rgba(255,255,255,.09); }
.account-button:active { transform: scale(.98); }
.account-name { display: block; color: #fbbf24; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.account-iban { display: block; margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 700; word-break: break-all; }
.copy-row { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 9px; color: #94a3b8; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.copy-row.copied { color: #34d399; }
.copy-row svg { width: 13px; height: 13px; }
.person-history {
  margin-top: 22px;
  border-radius: 1.5rem;
  background: rgba(15,23,42,.28);
  border: 1px solid rgba(255,255,255,.07);
  padding: 14px;
}
.person-history h3 { margin: 0 0 9px; font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: 10px;
}
.history-row:first-of-type { border-top: 0; }
.history-row .h-month { color: rgba(255,255,255,.7); font-weight: 800; }
.history-row .h-values { color: rgba(255,255,255,.42); font-size: 9px; text-align: right; font-variant-numeric: tabular-nums; }
.history-row .h-net { font-weight: 900; }
.history-row .h-net.debt { color: #fda4af; }
.history-row .h-net.ok { color: #6ee7b7; }

/* ---------- rapor modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15,23,42,.7);
  backdrop-filter: blur(10px);
  padding: 16px;
  overflow-y: auto;
}
.modal-inner { width: min(100%, 560px); margin: 18px auto; animation: fadeUp .3s ease both; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 2px 14px; }
.modal-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.modal-close svg { width: 17px; height: 17px; }
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 14px;
  background: var(--indigo);
  color: #fff;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(79,70,229,.3);
}
.download-btn:disabled { opacity: .6; cursor: wait; }
.download-btn svg { width: 15px; height: 15px; }
.report-paper {
  background: #fff;
  border-radius: 1.6rem;
  padding: 22px 18px 18px;
  box-shadow: 0 24px 60px rgba(15,23,42,.28);
  border: 1px solid rgba(226,232,240,.8);
}
.report-head { text-align: center; margin-bottom: 18px; }
.report-head h2 { margin: 0; font-family: 'Orbitron', sans-serif; font-size: 24px; letter-spacing: .04em; text-transform: uppercase; }
.report-head p { margin: 4px 0 0; font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.report-month { margin-top: 6px; color: #94a3b8; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.report-list { display: flex; flex-direction: column; gap: 6px; }
.report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 1rem;
}
.report-name { font-size: 11px; font-weight: 900; text-transform: uppercase; color: #334155; }
.report-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 900; text-align: right; }
.report-value.debt { color: #e11d48; }
.report-value.ok { color: #059669; }
.report-foot { margin-top: 20px; padding-top: 13px; border-top: 1px solid #f1f5f9; text-align: center; color: #cbd5e1; font-size: 8px; font-weight: 900; font-style: italic; letter-spacing: .13em; text-transform: uppercase; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  z-index: 400;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(12px);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 14px 40px rgba(15,23,42,.35);
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #881337; }

/* ---------- yönetim ---------- */
.admin-body { background: #e2e8f0; }
.admin-page { padding-bottom: 120px; }
.login-gate { display: grid; place-items: center; min-height: 62vh; }
.login-card {
  width: min(100%, 390px);
  background: #fff;
  border-radius: 3rem;
  padding: 34px 26px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid #fff;
}
.login-lock {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 1.4rem;
  display: grid;
  place-items: center;
  background: #fef3c7;
  color: var(--amber-dark);
}
.login-lock svg { width: 28px; height: 28px; }
.login-card h1 { margin: 0; font-size: 24px; letter-spacing: -.04em; text-transform: uppercase; }
.login-card p { margin: 8px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.pin-input {
  width: 100%;
  border: 3px solid transparent;
  border-radius: 1.25rem;
  background: #f8fafc;
  padding: 18px;
  text-align: center;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: .18em;
  outline: none;
  box-shadow: inset 0 1px 5px rgba(15,23,42,.06);
  transition: .2s ease;
}
.pin-input:focus { background: #fff; border-color: var(--amber-dark); }
.login-submit {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 1.25rem;
  padding: 17px;
  background: var(--amber-dark);
  color: #fff;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 14px 28px rgba(146,64,14,.22);
}
.login-error { min-height: 18px; margin-top: 12px; color: #be123c; font-size: 11px; font-weight: 800; }
.login-note { margin-top: 14px !important; color: #94a3b8 !important; font-size: 9px !important; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5 !important; }
.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 16px;
}
.admin-head h1 { margin: 0; font-size: 26px; letter-spacing: -.05em; text-transform: uppercase; line-height: 1; }
.admin-head p { margin: 6px 0 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-head .status-pill { margin: 0; flex: 0 0 auto; }
.admin-head .status-pill.calculated { background: #ecfdf5; color: #047857; }
.admin-head .status-pill.waiting { background: #fff1f2; color: #be123c; }
.card { padding: 20px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card-head svg { width: 18px; height: 18px; color: var(--indigo); flex: 0 0 auto; }
.card-head h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.card-head .sub { margin-left: auto; color: #94a3b8; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; margin: 0 2px 5px; color: #94a3b8; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.input, .textarea {
  width: 100%;
  border: 2px solid transparent;
  border-radius: 1rem;
  background: #f8fafc;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: .16s ease;
}
.input:focus, .textarea:focus { background: #fff; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.08); }
.input.money { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.textarea { min-height: 72px; resize: vertical; }
.input-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segment { display: flex; gap: 6px; }
.segment button {
  flex: 1;
  border: 2px solid transparent;
  border-radius: .9rem;
  padding: 11px 8px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.segment button.active.green { background: #ecfdf5; border-color: #10b981; color: #047857; }
.segment button.active.red { background: #fff1f2; border-color: #f43f5e; color: #be123c; }
.vault-card {
  background: linear-gradient(145deg, #0f172a, #111827);
  color: #fff;
  border-color: rgba(255,255,255,.06);
  box-shadow: 0 24px 55px rgba(15,23,42,.28);
}
.vault-card .label { color: #64748b; }
.vault-card .card-head h2 { color: #fff; }
.vault-card .card-head svg { color: #818cf8; }
.vault-display { font-size: 40px; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin-bottom: 3px; }
.vault-display span { font-size: 18px; color: #818cf8; }
.vault-input {
  width: 100%;
  border: 2px solid rgba(255,255,255,.08);
  border-radius: 1rem;
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 11px 14px;
  font-size: 16px;
  font-weight: 800;
  outline: none;
}
.vault-input:focus { border-color: #6366f1; }
.vault-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.btn {
  border: 0;
  border-radius: 1rem;
  padding: 13px 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: .18s ease;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-danger { background: #e11d48; color: #fff; box-shadow: 0 10px 20px rgba(225,29,72,.2); }
.btn-dark { background: #334155; color: #fff; }
.btn-indigo { background: var(--indigo); color: #fff; box-shadow: 0 10px 20px rgba(79,70,229,.2); }
.btn-ghost { background: #f1f5f9; color: #475569; }
.btn-green { background: #ecfdf5; color: #047857; }
.btn-wa { background: #dcfce7; color: #15803d; }
.person-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.person-chip {
  border: 0;
  border-radius: .9rem;
  padding: 10px 4px;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}
.person-chip.active { background: var(--indigo); color: #fff; box-shadow: 0 8px 18px rgba(79,70,229,.22); }
.quick-help { margin: 8px 2px 0; color: #94a3b8; font-size: 9px; font-weight: 700; line-height: 1.5; }
.summary-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.summary-box { border-radius: 1.25rem; background: #f8fafc; padding: 13px; border: 1px solid #f1f5f9; }
.summary-box.dark { background: #0f172a; color: #fff; border-color: transparent; }
.summary-label { font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; }
.summary-value { margin-top: 3px; font-size: 19px; font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.summary-box.dark .summary-label { color: #64748b; }
.summary-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mini-badge { padding: 5px 9px; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: 9px; font-weight: 900; }
.mini-badge.red { background: #fff1f2; color: #be123c; }
.mini-badge.blue { background: #eef2ff; color: #4338ca; }
.people-list { display: flex; flex-direction: column; gap: 7px; }
.person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 1.1rem;
  background: #f8fafc;
  border-left: 4px solid #10b981;
}
.person-row.debt { border-left-color: #e11d48; background: #fff7f8; }
.person-row .pr-name { font-size: 12px; font-weight: 900; text-transform: uppercase; flex: 1; min-width: 0; }
.person-row .pr-state { font-size: 9px; font-weight: 800; color: #059669; white-space: nowrap; }
.person-row.debt .pr-state { color: #e11d48; }
.person-row .pr-amount { font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.person-row .pr-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.pr-actions .btn { padding: 7px 9px; border-radius: .65rem; font-size: 8px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { border-radius: 1rem; background: #f8fafc; border: 1px solid #f1f5f9; overflow: hidden; }
.history-item summary { list-style: none; cursor: pointer; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.history-item summary::-webkit-details-marker { display: none; }
.hi-month { font-size: 12px; font-weight: 900; }
.hi-meta { color: #94a3b8; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.hi-amount { font-size: 11px; font-weight: 900; color: #475569; white-space: nowrap; }
.history-detail { border-top: 1px solid #eef2f7; padding: 10px 13px 12px; }
.history-detail .hd-row { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; padding: 4px 0; color: #64748b; }
.history-detail .hd-row strong { color: #334155; font-variant-numeric: tabular-nums; }
.history-detail .hd-row.debt strong { color: #e11d48; }
.empty-note { padding: 16px; text-align: center; color: #94a3b8; font-size: 10px; font-weight: 700; }
.save-dock {
  position: fixed;
  z-index: 70;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(226,232,240,0), rgba(226,232,240,.92) 32%);
}
.save-dock .save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(100%, 680px);
  margin: 0 auto;
  border: 0;
  border-radius: 1.7rem;
  padding: 17px;
  background: var(--indigo);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: 0 18px 38px rgba(79,70,229,.28);
  transition: .2s ease;
}
.save-dock .save-btn:disabled { background: #cbd5e1; color: #fff; box-shadow: none; cursor: not-allowed; }
.save-dock .save-btn.dirty { animation: savePulse 1.8s ease-in-out infinite; }
.save-dock .save-btn .spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes savePulse {
  0%, 100% { box-shadow: 0 18px 38px rgba(79,70,229,.28); }
  50% { box-shadow: 0 18px 52px rgba(79,70,229,.5); }
}
.import-drop {
  border: 2px dashed #cbd5e1;
  border-radius: 1.2rem;
  padding: 18px;
  text-align: center;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  background: #f8fafc;
}
.import-drop input { display: block; width: 100%; margin-top: 10px; font-size: 11px; }
.import-warning { margin-top: 9px; color: #be123c; font-size: 9px; font-weight: 800; line-height: 1.5; }
.footer-note { text-align: center; color: #94a3b8; font-size: 9px; font-weight: 700; padding: 12px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 430px) {
  .topbar-inner { padding: 10px 12px; }
  .brand-text { display: none; }
  .month-badge { max-width: 52vw; }
  .page { padding: 16px 10px 48px; }
  .roof { height: 84px; }
  .roof-title { font-size: 11px; letter-spacing: .24em; }
  .wall { border-left-width: 10px; border-right-width: 10px; padding: 18px 12px 16px; }
  .doors { gap: 10px; padding: 10px; border-radius: 2rem; }
  .door { height: 94px; border-width: 7px; border-radius: 1.3rem; }
  .door-plate { font-size: 11px; padding: 6px 9px; }
  .weather-balloon { top: 124px; right: -2px; width: 138px; }
  .person-hero { border-radius: 2.4rem; padding: 26px 16px 20px; }
  .person-grid { gap: 7px; }
  .person-field { padding: 10px 9px; gap: 7px; }
  .pf-value { font-size: 11px; }
  .card { padding: 16px; border-radius: 1.7rem; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-value { font-size: 17px; }
  .person-row { flex-wrap: wrap; }
  .person-row .pr-actions { width: 100%; justify-content: flex-end; }
  .person-chips { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 720px) {
  .page { padding-top: 30px; }
  .doors { gap: 18px; padding: 18px; }
  .door { height: 126px; }
  .wall { padding: 26px 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
