/* ==========================================================================
   Apartman Takip — görsel tasarım katmanı (theme.css)
   Bu dosya yalnızca görünümü değiştirir; işleyişe dokunmaz.
   Ana stil dosyasından sonra yüklenir ve aynı sınıfları yeniden biçimlendirir.
   ========================================================================== */

/* ---- Yazı tipleri (sunucuda barındırılır, dış istek yok) ------------------ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("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: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("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: "Jakarta";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/jakarta-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: "Jakarta";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/jakarta-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;
}

/* ---- Tasarım değişkenleri ------------------------------------------------ */

:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Jakarta", "Inter", "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 36, 29, .04), 0 12px 28px -22px rgba(16, 36, 29, .45);
  --shadow-lift: 0 2px 4px rgba(16, 36, 29, .04), 0 22px 44px -28px rgba(16, 36, 29, .5);
  --ring: 0 0 0 4px rgba(18, 133, 106, .14);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 104% -8%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 62%),
    radial-gradient(700px 380px at -6% 6%, color-mix(in srgb, var(--brand) 5%, transparent), transparent 60%);
  background-attachment: fixed;
  font-size: 14.5px;
  letter-spacing: -.005em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -.022em;
}

::selection {
  background: var(--brand);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 36, 29, .22) transparent;
}
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb {
  background: rgba(16, 36, 29, .18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(16, 36, 29, .3); background-clip: content-box; }

/* ---- Uygulama iskeleti --------------------------------------------------- */

.app-shell {
  grid-template-columns: 268px minmax(0, 1fr);
}

.sidebar {
  padding: 20px 14px 16px;
  gap: 18px;
  background-image:
    radial-gradient(circle at 8% -6%, rgba(95, 224, 180, .26), transparent 46%),
    radial-gradient(circle at 92% 104%, rgba(24, 104, 84, .55), transparent 58%),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, .05);
  box-shadow: 1px 0 0 rgba(9, 32, 25, .35);
}

.sidebar:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 100% 46px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 72%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 72%);
}

.sidebar-brand {
  padding: 6px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  position: relative;
  z-index: 1;
}

.brand-mark {
  background: linear-gradient(145deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .07));
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 13px;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
  color: #ecfff8;
}

.sidebar-brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: -.02em;
}

.sidebar-brand-role {
  margin-top: 2px;
  color: #86a89b;
  font-size: 10px;
  letter-spacing: .14em;
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  gap: 4px;
  padding-right: 4px;
}

.nav-label {
  padding: 14px 12px 6px;
  color: #7c9d90;
  font-size: 10px;
  letter-spacing: .16em;
}

.nav-item {
  gap: 11px;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(226, 244, 237, .82);
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}

.nav-item svg {
  opacity: .78;
  transition: transform .16s var(--ease), opacity .16s var(--ease);
}

.nav-item:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  transform: translateX(1px);
}
.nav-item:hover svg { opacity: 1; }

.nav-item.is-active {
  background: linear-gradient(100deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 20px -16px rgba(0, 0, 0, .9);
  color: #fff;
  font-weight: 650;
}
.nav-item.is-active:before {
  left: -14px;
  top: 50%;
  bottom: auto;
  height: 20px;
  width: 3px;
  transform: translateY(-50%);
  background: #66e9bd;
  box-shadow: 0 0 12px 1px rgba(102, 233, 189, .6);
}
.nav-item.is-active svg { color: #7ff0c8; }

.nav-badge {
  background: linear-gradient(180deg, #f0b657, #e8a33c);
  color: #2a1a02;
  box-shadow: 0 4px 10px -6px rgba(232, 163, 60, .9);
}
.nav-badge-alert {
  background: linear-gradient(180deg, #d2554d, var(--danger));
  color: #fff;
  box-shadow: 0 4px 10px -6px rgba(178, 58, 52, .9);
}

.sidebar-foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding-top: 14px;
  margin-top: 2px;
}

.avatar {
  background: linear-gradient(145deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .1));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.avatar-lg {
  background: linear-gradient(145deg, var(--brand-soft), #fff);
  border: 1px solid var(--line);
  color: var(--brand-dark);
  box-shadow: var(--shadow);
}
.avatar-sm {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid rgba(18, 133, 106, .16);
}

.sidebar-foot-name { font-size: 13px; letter-spacing: -.01em; }
.sidebar-foot-role { color: #89ab9e; }

.logout-btn {
  border-radius: 10px;
  transition: background .16s var(--ease), color .16s var(--ease);
}

/* Yönetici çıkışı: ikon tek başına kalmasın, yazıyla birlikte görünsün */
.sidebar-foot .logout-btn {
  width: auto;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sidebar-foot .logout-btn:after {
  content: "Çıkış";
  font-size: 12px;
  font-weight: 600;
}

/* ---- Üst başlık ---------------------------------------------------------- */

.main { position: relative; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  padding: 16px 34px;
  background: rgba(242, 246, 243, .82);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.25) blur(14px);
  -webkit-backdrop-filter: saturate(1.25) blur(14px);
  border-bottom: 1px solid var(--line);
}

.page-head { gap: 5px; }

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--brand-dark);
}
.page-eyebrow:before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.page-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -.032em;
}

.page-sub {
  font-size: 13px;
  color: var(--muted);
  max-width: 76ch;
}

.topbar-meta { gap: 8px; }

.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(16, 36, 29, .03);
}

.content {
  padding: 24px 34px 56px;
  gap: 20px;
  max-width: 1360px;
  margin-inline: auto;
}

.stack { gap: 20px; }
.grid-2, .grid-3, .grid-wide-left { gap: 20px; }
.grid-wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }

/* ---- Kartlar ------------------------------------------------------------- */

.card {
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface) 74%, var(--surface-2) 180%);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.card-head {
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.022em;
}

.card-sub { font-size: 12.5px; line-height: 1.55; }
.card-actions { gap: 8px; }

/* ---- İstatistik kutuları ------------------------------------------------- */

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

.stat {
  border-radius: 16px;
  padding: 16px 18px 15px;
  gap: 5px;
  background: linear-gradient(165deg, var(--surface) 0%, var(--surface) 58%, var(--surface-2) 140%);
  box-shadow: var(--shadow);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.stat:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), rgba(18, 133, 106, .18));
  opacity: .85;
}
.stat:after { display: none; }

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.stat-good:before { background: linear-gradient(90deg, var(--good), rgba(22, 125, 84, .18)); }
.stat-warn:before { background: linear-gradient(90deg, var(--warn), rgba(176, 111, 16, .18)); }
.stat-danger:before { background: linear-gradient(90deg, var(--danger), rgba(178, 58, 52, .18)); }

.stat-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.18;
  margin-top: 1px;
}

.stat-hint { font-size: 11.5px; }

/* ---- Butonlar ------------------------------------------------------------ */

.btn {
  border-radius: 11px;
  height: 42px;
  font-weight: 600;
  letter-spacing: -.005em;
  transition: background .16s var(--ease), border-color .16s var(--ease),
    box-shadow .16s var(--ease), transform .1s var(--ease), color .16s var(--ease);
}

.btn-primary {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset, 0 8px 18px -12px var(--brand-dark);
}
.btn-primary:hover {
  background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand-dark) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 12px 24px -14px var(--brand-dark);
}

.btn-ghost {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 36, 29, .03);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(18, 133, 106, .38);
  color: var(--brand-dark);
}

.btn-soft {
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(18, 133, 106, .1);
}

.btn-danger { box-shadow: inset 0 0 0 1px rgba(178, 58, 52, .1); }
.btn-success { background: linear-gradient(160deg, #1c9265, var(--good)); }

.btn-sm { border-radius: 9px; height: 34px; }
.btn-icon { border-radius: 9px; }

.btn-link {
  border-radius: 6px;
  padding: 4px 6px;
}
.btn-link:hover { background: var(--brand-soft); text-decoration: none; }

/* ---- Form alanları ------------------------------------------------------- */

.field { gap: 7px; }
.field > label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field .hint { font-size: 11.5px; }

.input, .select, .textarea {
  border-radius: 11px;
  border-color: var(--line);
  background: var(--surface);
  height: 44px;
  font-size: 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.input:hover, .select:hover, .textarea:hover { border-color: rgba(18, 133, 106, .32); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
  background: var(--surface);
}
.input::placeholder, .textarea::placeholder { color: #93a49c; }

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b7d76' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.checkbox-row { font-size: 13px; }
.checkbox-row input[type="checkbox"] { width: 17px; height: 17px; border-radius: 5px; }

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand);
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.combobox-trigger {
  border-radius: 11px;
  min-height: 44px;
  box-shadow: 0 1px 2px rgba(16, 36, 29, .02);
}
.combobox-trigger:hover, .combobox-trigger.is-open {
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.combobox-panel {
  border-radius: 14px;
  border-color: var(--line);
  box-shadow: 0 26px 60px -30px rgba(9, 44, 34, .55), 0 2px 6px rgba(16, 36, 29, .06);
  padding: 9px;
}
.combobox-option { border-radius: 9px; padding: 9px 11px; }
.combobox-option.is-active { background: var(--brand-soft); }
.combobox-option.is-selected { border-color: rgba(18, 133, 106, .45); background: var(--brand-soft); }

.theme-color-input { border-radius: 11px; }

input[type="file"] {
  font-size: 12.5px;
  color: var(--muted);
}
input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  margin-right: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
input[type="file"]::file-selector-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.theme-swatch { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.theme-swatch.is-active { border-color: var(--ink); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand-soft); }

.form-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  border: 1px solid rgba(178, 58, 52, .18);
}

/* ---- Tablolar ------------------------------------------------------------ */

.table-wrap { margin: 0; padding: 0; }

table.data { font-size: 13.5px; }
table.data th {
  font-size: 10px;
  letter-spacing: .11em;
  padding: 9px 10px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
table.data th:first-child { border-radius: 9px 0 0 9px; }
table.data th:last-child { border-radius: 0 9px 9px 0; }
table.data td {
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.45;
}
table.data tbody tr { transition: background .12s var(--ease); }
table.data tbody tr:hover td { background: rgba(18, 133, 106, .035); }
table.data tbody tr:last-child td { border-bottom: none; }

.cell-main { font-weight: 650; }
.cell-sub { display: block; font-size: 11.5px; margin-top: 2px; }
.row-actions { gap: 4px; }
.table-wrap .row-actions .btn-icon { width: 32px; height: 32px; }

/* Geniş tablolarda işlem sütunu sağda sabit kalsın (yalnız işlem butonlu tablolar) */
table.data:has(.row-actions) th:last-child,
table.data td:last-child:has(.row-actions) {
  position: sticky;
  right: 0;
  background: var(--surface);
  border-left: 1px solid var(--line-soft);
  box-shadow: -8px 0 14px -12px rgba(16, 36, 29, .38);
}
table.data:has(.row-actions) th:last-child { background: var(--surface-2); }
table.data tbody tr:hover td:last-child:has(.row-actions) { background: #f7fbf9; }

.toolbar {
  gap: 10px;
  padding: 12px;
  margin-bottom: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 13px;
}
.toolbar:empty { display: none; }
.toolbar .field > label { font-size: 10px; }
.toolbar .input, .toolbar .select { height: 38px; background: var(--surface); }
.toolbar .spacer { flex: 1; min-width: 0; }

/* ---- Etiketler & uyarılar ------------------------------------------------ */

.badge {
  font-size: 11px;
  font-weight: 650;
  padding: 4px 10px;
  border: 1px solid transparent;
  letter-spacing: .01em;
}
.badge:empty { display: none; }
.badge-neutral { background: #eef2f0; color: #4b5d56; border-color: rgba(75, 93, 86, .08); }
.badge-brand { border-color: rgba(18, 133, 106, .16); }
.badge-warn { border-color: rgba(176, 111, 16, .18); }
.badge-danger { border-color: rgba(178, 58, 52, .18); }
.badge-good { border-color: rgba(22, 125, 84, .18); }
.badge-info { border-color: rgba(44, 106, 143, .18); }

.alert {
  border-radius: 13px;
  padding: 13px 16px;
  box-shadow: 0 1px 2px rgba(16, 36, 29, .03);
  border-left-width: 3px;
  border-left-style: solid;
}
.alert-info { border-left-color: rgba(44, 106, 143, .5); }
.alert-warn { border-left-color: rgba(176, 111, 16, .5); }
.alert-danger { border-left-color: rgba(178, 58, 52, .5); }
.alert-success { border-left-color: rgba(22, 125, 84, .5); }
.alert-text { font-size: 12.5px; }

/* ---- Sekmeler ------------------------------------------------------------ */

.tabs {
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  margin-bottom: 20px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 9px 15px;
  border: none;
  border-radius: 9px;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.tab.is-active {
  background: var(--surface);
  color: var(--brand-dark);
  border-bottom-color: transparent;
  box-shadow: 0 1px 2px rgba(16, 36, 29, .07), 0 6px 14px -12px rgba(16, 36, 29, .5);
}
.tab-badge { box-shadow: 0 2px 6px -3px rgba(176, 111, 16, .8); }

/* ---- Boş durum, yükleme, bildirim --------------------------------------- */

.empty {
  padding: 40px 18px;
  gap: 8px;
}
.empty-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px dashed rgba(18, 133, 106, .3);
  font-size: 20px;
  color: var(--brand);
  margin-bottom: 4px;
}
.empty strong { font-family: var(--font-display); font-size: 14px; letter-spacing: -.02em; }

.loading { gap: 10px; }
.spinner { border-color: var(--line); border-top-color: var(--brand); }

.toast {
  right: auto;
  width: max-content;
  max-width: min(440px, calc(100vw - 24px));
  background: rgba(15, 48, 39, .96);
  background: color-mix(in srgb, var(--sidebar) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  box-shadow: 0 26px 50px -26px rgba(7, 30, 24, .8);
  padding: 13px 14px 13px 18px;
}
.toast-ok { background: rgba(16, 63, 48, .96); }
.toast-ok { background: color-mix(in srgb, #167d54 34%, var(--sidebar)); }
.toast-err { background: rgba(109, 35, 32, .97); }
.toast-err { background: color-mix(in srgb, #8d2a25 48%, var(--sidebar)); }
.toast-warn { background: rgba(92, 61, 12, .97); }
.toast-warn { background: color-mix(in srgb, #7a5410 26%, var(--sidebar)); }

/* ---- Liste & dönem & daire kutuları ------------------------------------- */

.list-item { padding: 15px 0; }
.list-title { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.list-body { font-size: 13px; }

.period-card {
  border-radius: 13px;
  padding: 13px;
  background: linear-gradient(170deg, var(--surface) 0%, var(--surface-2) 130%);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.period-card:hover { transform: translateY(-1px); border-color: rgba(18, 133, 106, .3); }
.period-card .p-main { font-family: var(--font-display); letter-spacing: -.02em; }
.period-card.is-paid { border-color: #c9e8da; background: linear-gradient(170deg, #fff, #f1fbf6); }
.period-card.is-due { border-color: #f0dfbc; background: linear-gradient(170deg, #fff, #fff8ec); }

.flats-grid { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 11px; }
.flat-tile {
  border-radius: 13px;
  padding: 13px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.flat-tile:hover { border-color: rgba(18, 133, 106, .34); box-shadow: var(--shadow); transform: translateY(-1px); }
.flat-no { font-size: 11px; letter-spacing: .06em; }
.flat-tile.is-empty { background: transparent; }

.settlement { padding: 13px 0; }
.meter { height: 7px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-soft); }
.meter > span { background: linear-gradient(90deg, var(--brand), #3fc79b); }

.target-card { border-radius: 12px; padding: 11px 13px; transition: border-color .15s var(--ease), background .15s var(--ease), transform .15s var(--ease); }
.target-card:hover { border-color: rgba(18, 133, 106, .35); transform: translateY(-1px); }

.pick-list { border-radius: 13px; background: var(--surface); }
.pick-row { padding: 10px 13px; }
.pick-row:hover { background: var(--surface-2); }

.support-item { border-radius: 13px; }
.support-item.is-new { border-left-color: var(--brand); background: linear-gradient(100deg, var(--brand-soft), rgba(255, 255, 255, .6)); }
.support-reply { border-radius: 11px; background: var(--surface-2); }

.caretaker-strip { border-radius: 15px; padding: 14px 16px; }

.wa-preview { border-radius: 13px; background: var(--surface-2); }

.project-payment strong { font-variant-numeric: tabular-nums; }

/* ---- Giriş / kurulum ekranı --------------------------------------------- */

.auth-shell { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }

.brand-panel {
  padding: 62px 64px;
  gap: 30px;
  background-color: var(--sidebar);
  background-image:
    radial-gradient(circle at 14% 8%, rgba(84, 214, 174, .34), transparent 46%),
    radial-gradient(circle at 86% 92%, rgba(20, 96, 78, .8), transparent 58%),
    linear-gradient(155deg, var(--sidebar-2) 0%, var(--sidebar) 62%);
}
.brand-panel:after {
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 65% 25%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 65% 25%, #000, transparent 78%);
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .08));
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.brand-headline {
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -.038em;
  max-width: 16ch;
  text-wrap: balance;
}

.brand-copy { font-size: 14px; color: #a9cabe; line-height: 1.75; }

.brand-points li {
  font-size: 13px;
  color: #cde7dc;
  padding: 2px 0;
}
.brand-points svg {
  color: #6fe4bb;
  filter: drop-shadow(0 0 8px rgba(111, 228, 187, .35));
}

.brand-foot {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #86ab9d;
}

.auth-main { padding: 44px 28px; }

.auth-card {
  max-width: 428px;
  border-radius: 24px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .9);
  background: linear-gradient(180deg, #fff 0%, #fdfefd 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 34px 70px -46px rgba(9, 44, 34, .5),
    0 4px 12px -8px rgba(9, 44, 34, .16);
  outline: 1px solid var(--line);
  outline-offset: -1px;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.03em;
}
.auth-card .auth-sub { margin-top: 7px; font-size: 13px; line-height: 1.6; }
.auth-form { margin-top: 24px; gap: 15px; }
.auth-foot { margin-top: 22px; padding-top: 18px; font-size: 12px; }

.auth-badge {
  background: var(--brand-soft);
  border: 1px solid rgba(18, 133, 106, .14);
  color: var(--brand-dark);
  padding: 5px 11px;
  font-size: 11px;
  letter-spacing: .01em;
}

/* ---- Sakin (sakin paneli) ------------------------------------------------ */

.resident-shell { position: relative; }

.resident-top {
  background-color: var(--sidebar);
  background-image:
    radial-gradient(circle at 84% -30%, rgba(84, 214, 174, .3), transparent 52%),
    linear-gradient(150deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  box-shadow: 0 18px 40px -34px rgba(9, 44, 34, .9);
}
.resident-top-inner { padding: 18px 0 16px; }
.resident-brand-name { font-family: var(--font-display); letter-spacing: -.02em; }

.resident-body { padding: 26px 22px 56px; gap: 20px; }

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 28px;
  background-color: var(--brand-dark);
  background-image:
    radial-gradient(120% 140% at 100% 0%, rgba(122, 246, 204, .38), transparent 52%),
    radial-gradient(90% 120% at 0% 100%, rgba(4, 34, 27, .55), transparent 60%),
    linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 60px -38px rgba(9, 52, 40, .85), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.hero-card:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 90% 10%, #000, transparent 62%);
  -webkit-mask-image: radial-gradient(circle at 90% 10%, #000, transparent 62%);
}
.hero-label { font-size: 11px; letter-spacing: .16em; color: #b3e7d5; }
.hero-value {
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -.04em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .18);
}
.hero-note { color: #b6dfd1; }
.hero-side { position: relative; z-index: 1; }
.hero-pill {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  padding: 13px 15px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-pill span { color: #bde3d6; font-size: 10.5px; letter-spacing: .08em; }
.hero-pill strong {
  font-family: var(--font-display);
  font-size: 17px;
  margin-top: 4px;
  letter-spacing: -.02em;
}

/* ==========================================================================
   Sakin (kiracı / ev sahibi) paneli — daha sade ve tek dokunuşla erişim
   ========================================================================== */

.resident-shell { background: var(--bg); }

/* Başlık: tek satır, tekrar yok */
.resident-top {
  background-image:
    radial-gradient(circle at 88% -40%, rgba(84, 214, 174, .26), transparent 55%),
    linear-gradient(150deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.resident-top-inner { padding: 14px 0; }
.resident-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.resident-brand-name { font-size: 14.5px; }
.resident-brand-sub { font-size: 11px; color: #9dbcb0; margin-top: 1px; }

/* Rol, başlıkta ikinci kez yazılmaz */
.resident-user-sub { display: none; }
.resident-user-meta { display: block; }
.resident-user-name { font-size: 13.5px; }

/* Çıkış: ikon + yazı, kolay bulunur */
.resident-user .logout-btn {
  width: auto;
  height: 36px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #eafff6;
  font-size: 12px;
  font-weight: 600;
}
.resident-user .logout-btn:after { content: "Çıkış"; }
.resident-user .logout-btn:hover { background: rgba(255, 255, 255, .22); }

/* Gövde: daha az boşluk, daha çok içerik */
.resident-body {
  padding: 16px 20px 48px;
  gap: 14px;
  max-width: 940px;
}
.resident-body .stack { gap: 14px; }

/* Sekmeler: yapışkan, sessiz, tek renk */
.resident-body .tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 2px;
  padding: 6px;
  border-radius: 0 0 14px 14px;
  background: var(--surface);
  box-shadow: 0 10px 24px -22px rgba(9, 44, 34, .8), 0 1px 2px rgba(16, 36, 29, .05);
}
.resident-body .tab {
  padding: 8px 12px;
  font-size: 12.5px;
  border-radius: 9px;
  min-height: 36px;
}
.resident-body .tab.is-active { color: var(--brand-dark); }

/* Bakiye kartı: desensiz, sakin, tek odak */
.hero-card {
  padding: 24px;
  border-radius: 18px;
  background-image:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, .14), transparent 52%),
    linear-gradient(140deg, var(--brand-dark) 0%, var(--brand) 100%);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 18px 36px -30px rgba(9, 52, 40, .9);
}
.hero-card:after { display: none; }
.hero-label { font-size: 10.5px; letter-spacing: .14em; }
.hero-value { font-size: clamp(34px, 5vw, 42px); }
.hero-note { font-size: 12.5px; margin-top: 4px; }

/* Bu ay özeti: kutular yerine ince ayraçlı satır */
.hero-card { flex-wrap: wrap; }
.hero-side { gap: 0; }
.hero-pill {
  background: none;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, .22);
  border-radius: 0;
  padding: 2px 0 2px 16px;
  margin-right: 16px;
  min-width: 96px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hero-pill:first-child { border-left: none; padding-left: 0; }
.hero-pill span { font-size: 10px; color: #b4dccd; }
.hero-pill strong { font-size: 16px; }

/* Bilgi / yönlendirme kutusu: tek renk, sakin */
.resident-body .alert {
  background: var(--brand-soft);
  border: 1px solid rgba(18, 133, 106, .14);
  border-left-width: 3px;
  border-left-color: var(--brand);
  color: var(--ink-2);
  padding: 11px 14px;
}
.resident-body .alert strong { color: var(--brand-dark); font-size: 13px; }
.resident-body .alert-text { font-size: 12px; }
.resident-body .alert-action .btn { height: 38px; }

/* Kartlar: gölgesiz, ince çizgili ve başlıkta çizgi yok */
.resident-body .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(16, 36, 29, .03);
}
.resident-body .card-head {
  padding-bottom: 0;
  margin-bottom: 14px;
  border-bottom: none;
}
.resident-body .card-title { font-size: 15px; }
.resident-body .card-sub { font-size: 12px; }

/* Dönem kutuları: daha sakin yüzeyler */
.resident-body .period-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
}
.resident-body .period-card.is-paid { background: #f6fbf8; }
.resident-body .period-card.is-due { background: #fffcf5; }
.resident-body .period-card .p-main { font-size: 15px; }

/* Tablo başlıkları sade */
.resident-body table.data th { background: transparent; padding: 8px 10px; }
.resident-body table.data td { padding: 10px; }

/* Sakin listeleri ve formlar biraz daha ferah */
.resident-body .list-item { padding: 12px 0; }
.resident-body .meter { margin-top: 8px; }

/* ---- Duyarlı ince ayarlar ------------------------------------------------ */

/* Dar masaüstünde tabloları biraz sıkıştır (içerik gizlenmez) */
@media (max-width: 1100px) and (min-width: 621px) {
  table.data th { padding: 8px 8px; }
  table.data td { padding: 9px 8px; font-size: 12.5px; }
  table.data .badge { padding: 3px 8px; font-size: 10.5px; }
  table.data .cell-main { font-size: 12.5px; }
}

/* Dar ekranda kenar çubuğu alt bilgisi: çıkış butonu alta iner */
@media (max-width: 1100px) and (min-width: 901px) {
  .sidebar-foot { flex-wrap: wrap; row-gap: 8px; }
  .sidebar-foot .sidebar-foot-text { flex: 1 1 auto; min-width: 0; }
  .sidebar-foot .logout-btn { width: 100%; justify-content: center; }
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 236px minmax(0, 1fr); }
  .topbar, .content { padding-left: 24px; padding-right: 24px; }
  .brand-panel { padding: 44px 38px; }
  .grid-2, .grid-wide-left { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .sidebar {
    border-radius: 0 0 20px 20px;
    padding: 14px 16px 10px;
    background-image:
      radial-gradient(circle at 88% -46%, rgba(84, 214, 174, .34), transparent 58%),
      linear-gradient(150deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  }
  .sidebar-brand { border-bottom: none; padding: 2px 4px 8px; }
  .sidebar:after { display: none; }
  .sidebar-nav { gap: 4px; padding: 2px 0 4px; }
  .nav-item { border-radius: 12px; padding: 8px 10px; }
  .nav-item.is-active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 8px 16px -12px rgba(0, 0, 0, .9); }
  .nav-item:hover { transform: none; }

  .topbar {
    position: sticky;
    padding: 14px 18px;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
  }
  .content { padding: 16px 18px 46px; }
  .page-title { font-size: 22px; }
  .brand-panel { padding: 30px 24px; }
  .auth-main { padding: 26px 18px 40px; }
  .resident-body { padding: 20px 16px 46px; }
  .hero-card { padding: 22px; }
  .tabs { border-radius: 12px; }
}

@media (max-width: 620px) {
  .alert {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .alert-action .btn { width: 100%; }
  .alert-body strong { font-size: 13px; }

  .stats-grid { gap: 10px; }
  /* Tek başına kalan istatistik kartı satırı tamamlar */
  .stats-grid > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 14px; border-radius: 14px; }
  .stat-value { font-size: 20px; }
  .card { padding: 16px; border-radius: 16px; }
  .card-head { padding-bottom: 12px; margin-bottom: 14px; }
  .topbar {
    padding: 13px 16px;
    gap: 8px;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  .topbar > div:first-child { min-width: 0; flex: 1 1 auto; }
  .topbar-meta { flex: 0 0 auto; }
  .topbar-meta .chip { display: none; }
  .content { padding: 14px 16px 40px; gap: 16px; }
  .stack, .grid-2, .grid-3, .grid-wide-left { gap: 16px; }
  .page-title { font-size: 20px; }
  .page-eyebrow { font-size: 10px; }
  .toolbar { padding: 10px; border-radius: 12px; }
  .tabs { margin: 0 0 16px; padding: 4px; }
  .tab { padding: 9px 11px; font-size: 12.5px; }
  .table-wrap { margin: 0; }
  table.data th, table.data td { padding: 9px 10px; }
  .auth-card { padding: 24px; border-radius: 20px; }
  .hero-card { padding: 20px; border-radius: 18px; }
  .hero-value { font-size: 32px; }
  .resident-body { padding: 16px 14px 40px; }
  .resident-top { padding: 0 14px; }
  .brand-panel { padding: 26px 20px; }
  .theme-swatch { width: 28px; height: 28px; }
}

/* Sakin paneli — küçük ekran ince ayarları */
@media (max-width: 900px) {
  .resident-body { padding: 14px 16px 44px; }
  .card-head { align-items: flex-start; text-align: left; }
}

@media (max-width: 620px) {
  .resident-top-inner { padding: 12px 0; }
  .resident-brand .brand-mark { width: 32px; height: 32px; }
  .resident-brand-name { font-size: 13.5px; }
  .resident-brand-sub { font-size: 10.5px; }
  .resident-user { gap: 8px; }
  .resident-user-name {
    font-size: 12px;
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .resident-user .avatar { width: 32px; height: 32px; font-size: 11px; }
  .resident-user .logout-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }
  .resident-user .logout-btn:after { content: none; }

  .resident-body { padding: 12px 14px 40px; gap: 12px; }
  .resident-body .stack { gap: 12px; }
  .resident-body .card { padding: 15px; border-radius: 14px; }
  .resident-body .tabs { padding: 4px; border-radius: 12px; }
  .resident-body .tab { padding: 8px 10px; font-size: 12px; min-height: 34px; }

  .hero-card { padding: 20px; border-radius: 16px; gap: 16px; }
  .hero-value { font-size: 32px; }
  .hero-side {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    width: 100%;
  }
  .hero-pill {
    margin: 0;
    padding: 0 10px;
    min-width: 0;
    flex: none;
  }
  .hero-pill span { font-size: 9.5px; letter-spacing: .04em; }
  .hero-pill strong { font-size: 14px; }

  .resident-body .alert { padding: 10px 12px; }
  .resident-body .alert-action .btn { height: 40px; }
}

