/* =========================================================
   SiteYönetim — Tasarım sistemi
   Az metin + güçlü ikon + renkle durum + temiz kart + bol boşluk
   ========================================================= */
:root {
  --navy: #0F3D5E;
  --blue: #2563EB;
  --blue-soft: #EFF6FF;
  --maint: #3B82F6;
  --green: #22C55E;
  --green-ink: #15803D;
  --green-soft: #F0FDF4;
  --red: #EF4444;
  --red-ink: #B91C1C;
  --red-soft: #FEF2F2;
  --amber: #F59E0B;
  --amber-ink: #B45309;
  --amber-soft: #FFFBEB;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --ink: #1E293B;
  --muted: #64748B;
  --faint: #94A3B8;
  --line: #E2E8F0;
  --line-soft: #F1F5F9;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .03);
  --shadow-hover: 0 6px 18px -6px rgba(15, 23, 42, .12), 0 2px 4px rgba(15, 23, 42, .04);
  --shadow-pop: 0 16px 40px -12px rgba(15, 23, 42, .22), 0 4px 10px rgba(15, 23, 42, .06);

  --sidebar: 260px;
  --header: 84px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 20px; height: 20px; flex: none; stroke-width: 1.75; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------------- Uygulama iskeleti ---------------- */
.app { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 24px 22px 22px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--navy); color: #fff;
}
.brand-mark svg.i { width: 24px; height: 24px; }
.brand-text strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--navy); }
.brand-text span { display: block; font-size: 13.5px; color: var(--muted); }

.nav { flex: 1; overflow-y: auto; padding: 4px 14px 16px; scrollbar-width: thin; }
.nav-gap { height: 14px; }
.nav-group { margin-top: 14px; padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.nav a {
  display: flex; align-items: center; gap: 14px;
  height: 46px; padding: 0 12px; margin: 2px 0; border-radius: 10px;
  color: var(--muted); font-weight: 500; font-size: 15px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--line-soft); color: var(--ink); }
.nav a.active { background: var(--blue-soft); color: var(--navy); font-weight: 600; }
.nav a svg.i { width: 22px; height: 22px; }
.nav a.active svg.i { color: var(--navy); }
.nav a .count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--red-soft); color: var(--red-ink);
}
.nav a .count.amber { background: var(--amber-soft); color: var(--amber-ink); }
.sidebar-foot { padding: 14px 24px 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--faint); }
.sidebar-foot a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sidebar-foot a:hover { color: var(--blue); }

.main { margin-left: var(--sidebar); min-width: 0; }

/* ---------------- Header ---------------- */
.header {
  position: sticky; top: 0; z-index: 20; height: var(--header);
  display: flex; align-items: center; gap: 16px; padding: 0 44px;
  background: rgba(248, 250, 252, .86); backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.header.scrolled { border-bottom-color: var(--line); }
.hello h1 { font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.hello p { font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.hello p .sep { margin: 0 6px; color: var(--faint); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; color: var(--muted);
  border: 1px solid var(--line); background: var(--card); transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--ink); border-color: #CBD5E1; }
.icon-btn svg.i { width: 22px; height: 22px; }
.icon-btn .dot {
  position: absolute; top: 10px; right: 11px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 2px var(--card);
}
.profile-btn {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 5px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
}
.profile-btn:hover { border-color: #CBD5E1; }
.avatar {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--blue-soft); color: var(--navy);
}
.avatar.round { border-radius: 50%; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; border-radius: 12px; }
.profile-btn .who { text-align: left; line-height: 1.2; }
.profile-btn .who strong { display: block; font-size: 14.5px; font-weight: 600; }
.profile-btn .who span { font-size: 11.5px; color: var(--muted); }
.profile-btn svg.i { width: 16px; height: 16px; color: var(--faint); }

/* Açılır menüler */
.pop-wrap { position: relative; }
.popover {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  min-width: 220px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 6px;
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right;
  pointer-events: none; transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.popover.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; font-size: 15px;
  border-radius: var(--r-sm); color: var(--ink); font-weight: 500; text-align: left;
}
.menu-item:hover { background: var(--line-soft); }
.menu-item svg.i { color: var(--muted); width: 17px; height: 17px; }
.menu-item.danger, .menu-item.danger svg.i { color: var(--red-ink); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; }
.pop-head strong { font-size: 14px; }
.pop-head button { font-size: 12.5px; color: var(--blue); font-weight: 600; }
.notif-pop { width: 360px; max-width: calc(100vw - 24px); }
.notif { display: flex; gap: 12px; padding: 10px; border-radius: var(--r-sm); }
.notif:hover { background: var(--line-soft); }
.notif .ico { margin-top: 1px; }
.notif p { font-size: 14px; font-weight: 500; line-height: 1.4; }
.notif small { font-size: 12px; color: var(--muted); }
.notif.unread p::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--blue); vertical-align: middle; }

/* ---------------- İçerik ---------------- */
.content { padding: 12px 44px 72px; max-width: 1400px; }
.view { animation: viewIn .28s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 12px 0 28px; flex-wrap: wrap; }
.page-head h2 { font-size: 27px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin-top: 6px; font-size: 15px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.back:hover { color: var(--blue); }
.back svg.i { width: 16px; height: 16px; }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.section-head h3 svg.i { display: none; }
.section-head .link { display: inline-flex; align-items: center; gap: 4px; font-size: 14.5px; font-weight: 600; color: var(--blue); }
.section-head .link svg.i { width: 15px; height: 15px; }
.section-head .link:hover { text-decoration: underline; text-underline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* Grid'ler */
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.g-auto-lg { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.g-sys { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; }
.split > .section, .split > div > .section:first-child { margin-top: 0; }
.split.cal-split { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
.dash { display: flex; flex-direction: column; }
.dash > .split > div > .section { margin-top: 32px; }

/* ---------------- Kart ---------------- */
.card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
:where(a.card, button.card, .card.hover) { cursor: pointer; display: block; text-align: left; width: 100%; }
a.card:hover, button.card:hover, .card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card.flush { padding: 0; }
.card.s-ok { border-color: color-mix(in srgb, var(--green) 38%, white); }
.card.s-fault { border-color: var(--red); background: color-mix(in srgb, var(--red-soft) 70%, white); }
.card.s-maint { border-color: var(--maint); background: color-mix(in srgb, var(--blue-soft) 70%, white); }
.card.s-warn { border-color: var(--amber); background: color-mix(in srgb, var(--amber-soft) 70%, white); }

/* İkon rozeti */
.ico {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  display: grid; place-items: center; background: var(--line-soft); color: var(--muted);
}
.ico svg.i { width: 26px; height: 26px; }
.ico.sm { width: 42px; height: 42px; border-radius: 11px; }
.ico.sm svg.i { width: 22px; height: 22px; }
.ico.lg { width: 60px; height: 60px; border-radius: 16px; }
.ico.lg svg.i { width: 30px; height: 30px; }
.ico.ok { background: var(--green-soft); color: var(--green-ink); }
.ico.fault { background: var(--red-soft); color: var(--red); }
.ico.maint, .ico.info { background: var(--blue-soft); color: var(--blue); }
.ico.warn { background: var(--amber-soft); color: var(--amber-ink); }
.ico.navy { background: var(--blue-soft); color: var(--navy); }

/* Durum etiketi */
.badge {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px;
  border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: var(--line-soft); color: var(--muted);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--green-soft); color: var(--green-ink); }
.badge.fault { background: var(--red-soft); color: var(--red-ink); }
.badge.maint, .badge.info { background: var(--blue-soft); color: #1D4ED8; }
.badge.warn { background: var(--amber-soft); color: var(--amber-ink); }
.badge.event { background: #F5F3FF; color: #6D28D9; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--green); }
.dot.fault { background: var(--red); }
.dot.maint { background: var(--maint); }
.dot.warn { background: var(--amber); }
.dot.pulse { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

/* ---------------- Buton ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 11px; font-weight: 600; font-size: 15px;
  white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn svg.i { width: 19px; height: 19px; }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.btn.primary:hover { background: #1D4ED8; }
.btn.secondary { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.btn.secondary:hover { border-color: #CBD5E1; background: var(--bg); }
.btn.ghost { color: var(--blue); padding: 0 10px; }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.danger { background: var(--red-soft); color: var(--red-ink); }
.btn.success { background: var(--green-soft); color: var(--green-ink); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Filtre sekmeleri */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--line-soft); border-radius: 11px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px;
  border-radius: 9px; font-weight: 600; font-size: 14.5px; color: var(--muted); white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.tab .n { font-size: 12.5px; color: var(--faint); font-weight: 600; }
.tab.active .n { color: var(--blue); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.underline-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 28px 0 20px; overflow-x: auto; scrollbar-width: none; }
.underline-tabs button { padding: 10px 0 13px; font-size: 15px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.underline-tabs button:hover { color: var(--ink); }
.underline-tabs button.active { color: var(--navy); border-bottom-color: var(--blue); }

.search {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--card); min-width: 260px;
}
.search svg.i { color: var(--faint); width: 17px; height: 17px; }
.search input { border: 0; outline: 0; background: none; width: 100%; }
.select {
  height: 46px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--card);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ---------------- Dashboard ---------------- */
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 11px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px;
  transition: border-color .15s, transform .15s var(--ease), box-shadow .15s;
}
.chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.chip strong { font-weight: 700; }
.chip svg.i { width: 15px; height: 15px; color: var(--faint); margin-left: 2px; }
.chip.fault { border-color: color-mix(in srgb, var(--red) 45%, white); }
.chip.warn { border-color: color-mix(in srgb, var(--amber) 50%, white); }
.chip.maint { border-color: color-mix(in srgb, var(--maint) 45%, white); }

.kpi { display: flex; flex-direction: column; gap: 18px; }
.kpi-top { display: flex; align-items: center; gap: 14px; }
.kpi-label { font-size: 15px; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.kpi-value small { font-size: 20px; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.kpi-sub { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: -6px; }
.t-fault { color: var(--red-ink) !important; font-weight: 600; }
.t-ok { color: var(--green-ink) !important; }
.kpi-sub span { display: inline-flex; align-items: center; gap: 6px; }
.kpi-sub b { color: var(--ink); font-weight: 600; }
.kpi .arrow { color: var(--faint); transition: transform .18s var(--ease), color .18s; }
.kpi:hover .arrow { transform: translateX(2px); color: var(--blue); }

.bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--green); transition: width .8s var(--ease); }
.bar.blue > i { background: var(--blue); }
.bar.lg { height: 10px; border-radius: 5px; }

/* Dikkat gerekenler */
.alerts { padding: 6px; }
.alert-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px;
  transition: background .15s;
}
.alert-row:hover { background: var(--bg); }
.alert-row + .alert-row { border-top: 1px solid var(--line-soft); }
.alert-row .txt { flex: 1; min-width: 0; }
.alert-row .txt strong { display: block; font-weight: 600; font-size: 16px; }
.alert-row .txt span { font-size: 14px; color: var(--muted); }
.alert-row time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.alert-row .go { color: var(--faint); }
.alert-row:hover .go { color: var(--blue); }
.all-good {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  border-color: color-mix(in srgb, var(--green) 50%, white); background: color-mix(in srgb, var(--green-soft) 70%, white);
}
.all-good strong { display: block; font-size: 17px; }
.all-good span { font-size: 14.5px; color: var(--muted); }

/* Sistem kartı */
.sys { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; }
.sys .txt { min-width: 0; width: 100%; }
.card.sys.s-ok { border-color: var(--line); }
.sys h4 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.sys .state { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; margin-top: 4px; }
.state.ok { color: var(--green-ink); }
.state.fault { color: var(--red-ink); }
.state.maint { color: #1D4ED8; }
.state.warn { color: var(--amber-ink); }
.sys .detail { font-size: 13.5px; color: var(--muted); margin-top: 3px; }

/* Liste */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 16px; padding: 16px 24px; }
.row + .row { border-top: 1px solid var(--line-soft); }
a.row:hover, button.row:hover { background: var(--bg); }
button.row { width: 100%; text-align: left; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .amt.pos { color: var(--green-ink); }
.row .amt.neg { color: var(--ink); }
.row time, .row .when { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.card.flush .list-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 14px; border-bottom: 1px solid var(--line-soft); }
.card.flush .list-head h4 { font-size: 14.5px; font-weight: 700; }
.card.flush .list-foot { padding: 12px 24px 16px; border-top: 1px solid var(--line-soft); }

/* Aidat özeti */
.dues-sum { display: flex; flex-direction: column; gap: 20px; }
.dues-sum .big { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dues-sum .big strong { font-size: 36px; font-weight: 700; letter-spacing: -.02em; }
.dues-sum .big > span { font-size: 15px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-stats div { padding: 12px; border-radius: 10px; background: var(--bg); }
.mini-stats small { display: block; font-size: 12px; color: var(--muted); }
.mini-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }

/* Takvim satırı */
.date-box {
  width: 54px; flex: none; text-align: center; padding: 6px 0; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line-soft); line-height: 1.1;
}
.date-box b { display: block; font-size: 19px; font-weight: 700; }
.date-box small { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.date-box.today { background: var(--blue-soft); border-color: #BFDBFE; color: var(--navy); }
.date-box.today small { color: var(--blue); }

/* ---------------- Arıza kartları ---------------- */
.fault-card { display: flex; flex-direction: column; gap: 20px; }
.fault-card .more { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: 14px; }
.fault-card .more svg.i { width: 17px; height: 17px; transition: transform .18s var(--ease); }
.fault-card:hover .more svg.i { transform: translateX(3px); }
.fault-card .head { display: flex; gap: 16px; align-items: center; }
.fault-card h4 { font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.fault-card .loc { font-size: 14px; color: var(--muted); margin-top: 3px; }
.fault-card .loc svg.i { width: 14px; height: 14px; }
.fault-card .note { font-size: 13px; color: var(--muted); }
.fault-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.fault-card .foot time { font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.fault-card .foot time svg.i { width: 14px; height: 14px; }
.fault-card.solved { opacity: .72; }
.fault-card.solved h4 { color: var(--muted); }

.tech { display: flex; align-items: center; gap: 16px; }
.tech .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tech .name { font-weight: 600; font-size: 16px; }
.tech .loc { font-size: 14px; color: var(--muted); }
.tech .line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; margin-top: 8px; }
.tech .line .state { margin: 0; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.card.tech.s-ok { border-color: var(--line); }
.dues-hero { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.dues-hero .pct { font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.dues-hero .grow { flex: 1; min-width: 260px; }
.dues-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.dues-nums small { display: block; font-size: 14px; color: var(--muted); }
.dues-nums b { font-size: 19px; font-variant-numeric: tabular-nums; }
.dues-nums a { border-radius: 10px; }
.dues-nums a:hover small { color: var(--red-ink); }

/* ---------------- Binalar ---------------- */
.block-card { display: flex; flex-direction: column; gap: 16px; }
.block-card .name { display: flex; align-items: center; justify-content: space-between; }
.block-card .name h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.block-card .stats { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.block-card .stats span { display: inline-flex; align-items: center; gap: 6px; }
.unit-dots { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.unit-dots i { aspect-ratio: 1; border-radius: 3px; background: color-mix(in srgb, var(--green) 70%, white); }
.unit-dots i.v { background: var(--line); }
.unit-dots i.l { background: var(--red); }
.unit-dots i.p { background: var(--amber); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.floors { display: flex; flex-direction: column; gap: 10px; }
.floor { display: grid; grid-template-columns: 56px repeat(4, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.floor-label { display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--faint); }
.unit {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); text-align: left; min-height: 84px;
  transition: transform .15s var(--ease), box-shadow .15s, border-color .15s;
}
.unit:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #CBD5E1; }
.unit .top { display: flex; justify-content: space-between; align-items: center; }
.unit .no { font-weight: 700; font-size: 17px; }
.unit .who { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit.vacant { background: repeating-linear-gradient(-45deg, var(--bg), var(--bg) 6px, #F1F5F9 6px, #F1F5F9 12px); }
.unit.late { border-color: color-mix(in srgb, var(--red) 60%, white); }
.unit.pending { border-color: color-mix(in srgb, var(--amber) 60%, white); }

/* Daire detay */
.hero-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-card h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.hero-card .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.info-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.info { display: flex; gap: 12px; align-items: flex-start; }
.info small { display: block; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.info b { display: block; font-size: 16px; font-weight: 600; margin-top: 2px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.kv > div { padding: 12px 0; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 12px; }
.kv > div:nth-child(odd) { margin-right: 24px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.month { padding: 14px; border-radius: 12px; border: 1px solid var(--line); text-align: center; }
.month small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.month b { display: block; margin: 6px 0; font-size: 14px; }
.month.paid { border-color: color-mix(in srgb, var(--green) 45%, white); background: color-mix(in srgb, var(--green-soft) 60%, white); }
.month.unpaid { border-color: color-mix(in srgb, var(--red) 45%, white); background: color-mix(in srgb, var(--red-soft) 60%, white); }
.month.due { border-color: color-mix(in srgb, var(--amber) 55%, white); background: color-mix(in srgb, var(--amber-soft) 60%, white); }

/* Aidatlar */
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat small { font-size: 14.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.progress-card { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.progress-card .pct { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.progress-card .grow { flex: 1; min-width: 220px; }
.progress-card .legend { margin-top: 10px; }

/* Takvim */
.cal { user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head strong { font-size: 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .dow { font-size: 11px; font-weight: 600; color: var(--faint); text-align: center; padding-bottom: 6px; text-transform: uppercase; }
.cal-day {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums;
}
.cal-day.out { color: #CBD5E1; }
.cal-day.today { background: var(--blue); color: #fff; font-weight: 700; }
.cal-day.has::after { content: ''; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--maint); }
.cal-day.has.done::after { background: var(--green); }
.cal-day.today.has::after { background: #fff; }
button.cal-day:hover { background: var(--line-soft); }
button.cal-day.today:hover { background: #1D4ED8; }
.group-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 18px 20px 6px; }

/* Duyuru */
.ann { display: flex; flex-direction: column; gap: 12px; }
.ann h4 { font-size: 17px; font-weight: 600; }
.ann p { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann .foot { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13.5px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.ann .foot span { display: inline-flex; align-items: center; gap: 6px; }
.ann .foot svg.i { width: 14px; height: 14px; }

/* Belge */
.doc { display: flex; align-items: center; gap: 14px; }
.doc .ext { width: 44px; height: 52px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.doc .ext.pdf { background: var(--red-soft); color: var(--red-ink); }
.doc .ext.xlsx { background: var(--green-soft); color: var(--green-ink); }
.doc .ext.docx { background: var(--blue-soft); color: #1D4ED8; }
.doc .ext.img { background: var(--amber-soft); color: var(--amber-ink); }

/* Personel */
.person { display: flex; flex-direction: column; gap: 14px; }
.person .top { display: flex; gap: 12px; align-items: center; }
.person h4 { font-size: 16.5px; font-weight: 600; }
.person .role { font-size: 14px; color: var(--muted); }
.person .lines { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); }
.person .lines span { display: flex; align-items: center; gap: 8px; }
.person .lines svg.i { width: 15px; height: 15px; color: var(--faint); }
.person .lines a:hover { color: var(--blue); }

/* Rapor çubukları */
.bars { display: flex; align-items: flex-end; gap: 16px; height: 160px; padding-top: 12px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bars .col i { width: 100%; max-width: 44px; border-radius: 8px 8px 4px 4px; background: #BFDBFE; }
.bars .col.cur i { background: var(--blue); }
.bars .col small { font-size: 12px; color: var(--muted); font-weight: 600; }
.bars .col b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 90px; gap: 12px; align-items: center; font-size: 13px; }
.hbar span:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar .bar { height: 8px; }
.hbar .bar > i { background: var(--navy); opacity: .85; }

/* Ayarlar */
.form { display: grid; gap: 16px; }
.form.cols { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .field select, .field textarea {
  height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--card);
  transition: border-color .15s, box-shadow .15s; width: 100%;
}
.field textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--muted); }
.seg input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--navy); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.switch-row + .switch-row { border-top: 1px solid var(--line-soft); }
.switch-row strong { display: block; font-weight: 600; }
.switch-row span { font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 12px; background: #CBD5E1; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Boş durum */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ico { margin: 0 auto 12px; }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ---------------- Modal / sheet ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .38);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; transition: opacity .2s var(--ease);
}
.overlay.open { opacity: 1; }
.modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-pop);
  transform: translateY(8px) scale(.98); transition: transform .22s var(--ease);
}
.modal.wide { max-width: 640px; }
.overlay.open .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.modal-head h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.modal-body { padding: 20px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 24px 22px; }
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.tl { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.tl:not(:last-child)::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl .dot { margin-top: 5px; width: 16px; height: 16px; border: 4px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.tl p { font-weight: 600; font-size: 13.5px; }
.tl small { color: var(--muted); font-size: 12.5px; }

/* Toast */
.toasts { position: fixed; z-index: 90; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; font-weight: 500; box-shadow: var(--shadow-pop);
  animation: toastIn .25s var(--ease);
}
.toast svg.i { color: #4ADE80; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------------- Mobil alt navigasyon ---------------- */
.bottom-nav { display: none; }
.sheet-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-list a {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px;
  border-radius: 14px; background: var(--bg); font-size: 13.5px; font-weight: 600; text-align: center; color: var(--ink);
}
.sheet-list a svg.i { width: 28px; height: 28px; color: var(--navy); }
.sheet-list a.active { background: var(--blue-soft); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1280px) {
  .months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-sys { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  :root { --sidebar: 84px; }
  .brand { justify-content: center; padding: 20px 0 18px; }
  .brand-text, .nav-group, .nav a span, .sidebar-foot { display: none; }
  .nav { padding: 6px 12px; }
  .nav a { justify-content: center; padding: 0; height: 50px; position: relative; }
  .nav a svg.i { width: 24px; height: 24px; }
  .nav-gap { height: 8px; }
  .header { padding: 0 32px; }
  .content { padding: 12px 32px 64px; }
  .nav a .count { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; margin: 0; }
  .split, .split.even { grid-template-columns: minmax(0, 1fr); }
  .split.cal-split { grid-template-columns: minmax(0, 1fr); }
  .split > div + div .section:first-child, .split > .section + .section { margin-top: 32px; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  :root { --header: 64px; }
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .header { padding: 0 16px; gap: 10px; }
  .hello h1 { font-size: 19px; }
  .hello p { font-size: 13.5px; }
  .hello p .date { display: none; }
  .profile-btn { padding: 0 4px; border: 0; background: none; }
  .profile-btn .who, .profile-btn > svg.i { display: none; }
  .icon-btn { border: 0; background: none; }
  .content { padding: 4px 16px calc(104px + env(safe-area-inset-bottom)); }
  .page-head { margin: 8px 0 18px; align-items: flex-start; }
  .page-head h2 { font-size: 23px; }
  .page-head .actions .btn { height: 38px; }
  .g-4, .g-3, .g-2, .g-auto, .g-auto-lg, .g-sys { grid-template-columns: minmax(0, 1fr); }
  .row .btn .lbl { display: none; }
  .row .btn.sm { padding: 0 9px; }
  .g-4.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { gap: 14px; }
  .section { margin-top: 32px; }
  .card { padding: 20px; border-radius: 16px; }
  .kpi { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 14px; row-gap: 2px; align-items: center; padding: 16px 18px; }
  .kpi .kpi-top { display: contents; }
  .kpi .ico { grid-column: 1; grid-row: 1 / 3; width: 46px; height: 46px; }
  .kpi .kpi-label { grid-column: 2; grid-row: 1; align-self: end; font-size: 15px; color: var(--ink); }
  .kpi .kpi-sub { grid-column: 2; grid-row: 2; align-self: start; margin: 0; font-size: 13px; gap: 4px 10px; }
  .kpi .kpi-value { grid-column: 3; grid-row: 1 / 3; font-size: 24px; }
  .kpi .kpi-value small { font-size: 15px; }
  .dash-kpis .grid { gap: 10px; }
  .dues-nums { grid-template-columns: 1fr 1fr; }
  .dues-hero { gap: 16px; }
  .sys { flex-direction: row; align-items: center; gap: 16px; padding: 16px 18px; }
  .sys .detail { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tech { flex-wrap: wrap; }
  /* Mobilde önce sorunlar */
  .dash > * { order: 3; }
  .dash > .quick { order: 0; }
  .dash > .dash-alerts { order: 1; margin-top: 0; }
  .dash > .dash-kpis { order: 2; margin-top: 32px; }
  .dash > .split > div > .section { margin-top: 32px; }
  .row { padding: 14px 18px; gap: 14px; }
  .row .when { display: none; }
  .alert-row { padding: 14px 12px; gap: 14px; }
  .search { min-width: 0; flex: 1; }
  .toolbar > * { max-width: 100%; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv > div:nth-child(odd) { margin-right: 0; }
  .months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floor { grid-template-columns: 20px repeat(4, minmax(0, 1fr)); gap: 6px; }
  .floor-label .kat { display: none; }
  .unit { padding: 8px; min-height: 64px; border-radius: 10px; }
  .unit .no { font-size: 13.5px; }
  .unit .who { display: none; }
  .form.cols { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 90px 1fr 76px; }
  .toasts { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .mini-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .mini-stats div { padding: 10px; }

  .overlay { place-items: end center; padding: 0; }
  .modal { max-width: none !important; border-radius: 20px 20px 0 0; max-height: 88vh; transform: translateY(24px); padding-bottom: env(safe-area-inset-bottom); }
  .modal-head { padding: 18px 20px 0; }
  .modal-body { padding: 16px 20px; }
  .modal-foot { padding: 0 20px 20px; }
  .modal-foot .btn { flex: 1; }

  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .bottom-nav a, .bottom-nav button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 0; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--muted);
  }
  .bottom-nav svg.i { width: 25px; height: 25px; }
  .bottom-nav .active { color: var(--navy); }
  .bottom-nav .active svg.i { color: var(--blue); }
  .bottom-nav .badge-n {
    position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center;
  }
}
@media (max-width: 400px) {
  .quick .chip { flex: 1 1 auto; justify-content: center; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
