/* BinaOps — Modern koyu tema (Dark UI), saha ve mobil uyumlu bina yönetimi arayüzü */
:root {
  color-scheme: dark;
  --bg: #090d16;
  --bg-elev: #0d1322;
  --card: #111827;
  --card-hover: #162033;
  --soft: #1b253b;
  --soft-2: #24314d;
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.24);
  --brand: #3b82f6;
  --brand-light: #60a5fa;
  --brand-dark: #2563eb;
  --brand-soft: rgba(59, 130, 246, 0.16);
  --ok: #4ade80;
  --ok-solid: #16a34a;
  --ok-soft: rgba(74, 222, 128, 0.14);
  --warn: #fbbf24;
  --warn-solid: #d97706;
  --warn-soft: rgba(251, 191, 36, 0.15);
  --danger: #f87171;
  --danger-solid: #dc2626;
  --danger-soft: rgba(248, 113, 113, 0.15);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.16);
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.32), 0 1px 2px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -15%, rgba(59, 130, 246, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(124, 58, 237, 0.07), transparent);
  background-attachment: fixed;
  color: var(--ink);
  font: 14.5px/1.5 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: clip;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
ul { list-style: none; padding: 0; }
.ic { flex-shrink: 0; vertical-align: middle; }
.muted-text { color: var(--muted); }
.danger-text { color: var(--danger) !important; }
.ok-text { color: var(--ok) !important; }
.warn-text { color: var(--warn) !important; }
.blue-text { color: var(--brand-light) !important; }
.error-text { color: var(--danger); font-size: 13px; min-height: 18px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.block { display: block; }
.center { text-align: center; padding: 12px 0; }
.mt { margin-top: 18px; margin-bottom: 10px; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.print-only { display: none; }
.stack { display: flex; flex-direction: column; gap: 18px; width: 100%; min-width: 0; }

/* ------------------------ Yükleme / boş durum ----------------------- */
.boot, .loading { display: grid; place-items: center; padding: 48px 16px; }
.boot { min-height: 100dvh; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--soft-2); border-top-color: var(--brand-light); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { display: grid; place-items: center; gap: 8px; padding: 44px 16px; color: var(--muted); text-align: center; }
.empty p { font-weight: 600; color: var(--ink); font-size: 15px; }
.empty small { max-width: 300px; color: var(--muted); }

/* ------------------------------ Giriş ------------------------------ */
body.login-mode {
  background: radial-gradient(circle at 50% 0%, #172554 0%, #090d16 65%);
  color: var(--ink);
}
.login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; gap: 16px; }
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(16px);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.login-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.login-brand img { width: 44px; height: 44px; border-radius: 12px; }
.login-brand h1 { font-size: 20px; letter-spacing: -0.02em; color: #fff; }
.login-brand p { font-size: 13px; color: var(--muted); }
.login-card h2 { font-size: 16.5px; margin-bottom: 12px; color: var(--ink); }
.login-foot { color: var(--muted); font-size: 13px; text-align: center; }
.login-foot b { color: var(--ink); }
.user-pick { max-height: 56dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-right: 2px; }
.user-pick h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 10px 4px 2px; }
.user-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: rgba(27, 37, 59, 0.55); border: 1px solid var(--line); border-radius: 12px; text-align: left; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.user-btn:hover, .user-btn:active { background: var(--soft); border-color: var(--line-strong); transform: translateY(-1px); }
.user-btn div { flex: 1; min-width: 0; }
.user-btn b { display: block; font-size: 14.5px; color: var(--ink); }
.user-btn span { font-size: 12.5px; color: var(--muted); }
.user-btn .ic { color: var(--muted); }

.pin-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.back-link { align-self: flex-start; margin-bottom: 4px; font-size: 13px; color: var(--brand-light); display: inline-flex; align-items: center; gap: 2px; }
.pin-dots { display: flex; gap: 12px; margin: 12px 0 4px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--soft-2); transition: all 0.12s; }
.pin-dots i.on { background: var(--brand-light); border-color: var(--brand-light); box-shadow: 0 0 10px rgba(96, 165, 250, 0.5); transform: scale(1.1); }
.pin-dots.shake { animation: shake 0.35s; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 290px; margin-top: 6px; }
.keypad button { height: 56px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); font-size: 21px; font-weight: 600; color: var(--ink); display: grid; place-items: center; user-select: none; transition: transform 0.06s, background 0.12s; }
.keypad button:hover { background: var(--soft-2); }
.keypad button:active { transform: scale(0.95); }
.keypad button.ok { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------------------------- Ana yerleşim ------------------------- */
.shell { min-height: 100dvh; display: flex; width: 100%; }
.sidebar {
  width: 260px;
  background: rgba(13, 19, 34, 0.95);
  border-right: 1px solid var(--line);
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100dvh;
  overflow-y: auto;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand b { display: block; font-size: 17px; color: #fff; letter-spacing: -0.02em; }
.brand span { font-size: 12px; color: var(--muted); }
.new-task-btn { margin-bottom: 14px; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35); }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: var(--muted); font-weight: 500; position: relative; transition: background 0.14s, color 0.14s; }
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.sidebar nav a.active { background: var(--brand-soft); color: var(--brand-light); font-weight: 600; box-shadow: inset 3px 0 0 0 var(--brand-light); }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-foot .person { min-width: 0; flex: 1; overflow: hidden; }
.side-foot .person > div { min-width: 0; flex: 1; }
.side-foot .person b { color: var(--ink); font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .person small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-actions { display: flex; gap: 2px; flex-shrink: 0; }
.side-actions .icon-btn { color: var(--muted); }
.side-actions .icon-btn:hover { color: #fff; background: var(--soft); }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px;
  background: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.mobile-brand { display: none; padding: 0; }
.mobile-brand b { color: var(--ink); }
.role-staff .mobile-brand { display: flex; }
.spacer { flex: 1; }
.conn { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--muted); padding: 5px 11px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.conn.on i { background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); }
.bell { position: relative; }
.nbadge { background: var(--danger-solid); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-grid; place-items: center; margin-left: auto; line-height: 1; }
.nbadge[hidden] { display: none; }
.bell .nbadge { position: absolute; top: 3px; right: 3px; }
.bottom-nav .nbadge { position: absolute; top: 6px; left: calc(50% + 6px); right: auto; margin-left: 0; border: 2px solid #0d1322; }

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(13, 19, 34, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 30;
  justify-content: space-around;
  align-items: center;
}
.bottom-nav a, .bottom-nav button:not(.fab) { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); height: 100%; position: relative; }
.bottom-nav a.active, .bottom-nav button.active { color: var(--brand-light); }
.bottom-nav .fab { width: 50px; height: 50px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(37, 99, 235, 0.5); transform: translateY(-10px); }
.role-staff .bottom-nav { display: flex; }
.role-staff #view { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

#view { flex: 1; width: 100%; min-width: 0; }
.page { width: 100%; max-width: 1340px; margin: 0 auto; padding: 24px 26px 48px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.page.narrow, .detail { width: 100%; max-width: 820px; margin: 0 auto; padding: 20px 22px 48px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.page-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* -------------------------- Kartlar & butonlar ---------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card > h3, .card-head h3 { font-size: 15px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.card > h3 { margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.link { color: var(--brand-light); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.link:hover { text-decoration: underline; }
.count { background: var(--soft); color: var(--ink); font-size: 12px; padding: 1px 8px; border-radius: 99px; }
.count.danger { background: var(--danger-soft); color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.06s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn.sm.icon-only { width: 34px; padding: 0; flex-shrink: 0; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn.xl { height: 54px; padding: 0 22px; font-size: 16px; border-radius: 13px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.success { background: var(--ok-solid); color: #fff; }
.btn.success:hover { background: #15803d; }
.btn.warning { background: var(--warn-solid); color: #fff; }
.btn.danger { background: var(--danger-solid); color: #fff; }
.btn.soft { background: var(--brand-soft); color: var(--brand-light); border-color: rgba(96, 165, 250, 0.22); }
.btn.soft:hover { background: rgba(59, 130, 246, 0.25); }
.btn.ghost { background: var(--soft); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--soft-2); border-color: var(--line-strong); }
.btn-row { display: flex; align-items: center; gap: 8px; }
.btn-row.wrap { flex-wrap: wrap; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--ink-2); flex-shrink: 0; transition: background 0.14s, color 0.14s; }
.icon-btn:hover { background: var(--soft); color: #fff; }

/* -------------------------- Rozetler & avatar ---------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; flex-shrink: 0; }
.badge.cat { color: var(--c); background: var(--bg); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.badge.prio { color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.badge.prio-acil { background: var(--danger-solid); color: #fff; border-color: transparent; }
.st-bekliyor { background: var(--warn-soft); color: var(--warn); }
.st-devam { background: var(--brand-soft); color: var(--brand-light); }
.st-tamamlandi { background: var(--ok-soft); color: var(--ok); }
.st-iptal { background: var(--soft); color: var(--muted); }
.st-gecikti { background: var(--danger-soft); color: var(--danger); }

.avatar { border-radius: 50%; color: #fff; font-weight: 700; display: inline-grid; place-items: center; flex-shrink: 0; position: relative; user-select: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #475569; border: 2px solid var(--card); }
.avatar .dot.on { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.7); }
.person { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.person b { display: block; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; font-size: 12px; color: var(--muted); }

/* ---------------------------- KPI & grafikler ---------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kpi-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  box-shadow: var(--shadow);
  min-width: 0;
  transition: transform 0.14s, border-color 0.14s, background 0.14s;
}
a.kpi:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--card-hover); }
.kpi-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--soft); color: var(--ink-2); display: grid; place-items: center; flex-shrink: 0; }
.kpi.blue .kpi-ic { background: var(--brand-soft); color: var(--brand-light); }
.kpi.amber .kpi-ic { background: var(--warn-soft); color: var(--warn); }
.kpi.ok .kpi-ic { background: var(--ok-soft); color: var(--ok); }
.kpi.violet .kpi-ic { background: var(--violet-soft); color: var(--violet); }
.kpi.danger { border-color: rgba(248, 113, 113, 0.35); background: linear-gradient(135deg, rgba(127, 29, 29, 0.22), var(--card)); }
.kpi.danger .kpi-ic { background: var(--danger-soft); color: var(--danger); }
.kpi.danger .kpi-txt b { color: var(--danger); }
.kpi-txt { min-width: 0; flex: 1; }
.kpi-txt b { display: block; font-size: 25px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: #fff; }
.kpi-txt span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.kpi-txt small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid-main { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; min-width: 0; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bars { display: flex; align-items: stretch; gap: 8px; padding-top: 20px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bar-group { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { flex: 1; max-width: 18px; min-height: 3px; border-radius: 5px 5px 0 0; position: relative; transition: height 0.25s; }
.bar.zero { min-height: 0; background: transparent !important; }
.bar em { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--ink-2); }
.bar-col small { font-size: 11.5px; color: var(--muted); padding: 7px 0 4px; }
.week-sum { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding-top: 12px; }
.week-sum b { color: var(--ink); }

.cat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-tile {
  background: var(--soft);
  border: 1px solid var(--line);
  box-shadow: inset 3px 0 0 0 var(--c);
  border-radius: 13px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: background 0.14s, border-color 0.14s, transform 0.12s;
}
.cat-tile:hover { background: var(--soft-2); border-color: var(--line-strong); transform: translateY(-1px); }
.ct-head { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; color: var(--c); }
.cat-tile > b { font-size: 26px; line-height: 1.15; margin-top: 6px; color: #fff; }
.cat-tile > small { font-size: 12px; color: var(--muted); }
.ct-foot { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }

.rate { display: flex; align-items: center; gap: 8px; min-width: 110px; flex: 1; max-width: 160px; }
.rate-track { flex: 1; height: 7px; background: var(--soft-2); border-radius: 99px; overflow: hidden; }
.rate-track > div { height: 100%; border-radius: 99px; background: var(--ok); }
.rate.warn .rate-track > div { background: var(--warn); }
.rate.danger .rate-track > div { background: var(--danger); }
.rate b { font-size: 12.5px; color: var(--ink); min-width: 36px; text-align: right; }

/* ------------------------ Tablo ve satır listesi ------------------- */
.table-wrap { overflow-x: auto; width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table.compact th, .table.compact td { padding: 9px 10px; }
.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; background: rgba(27, 37, 59, 0.5); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr[data-href] { cursor: pointer; transition: background 0.12s; }
.table tbody tr[data-href]:hover { background: var(--soft); }
.table tbody tr.row-danger { background: rgba(248, 113, 113, 0.08); }
.table tbody tr.row-danger:hover { background: rgba(248, 113, 113, 0.14); }

.row-list li + li { border-top: 1px solid var(--line); }
.row-list a, .row-list .rl-plain { display: flex; align-items: center; gap: 11px; padding: 11px 4px; }
.row-list a { border-radius: 9px; transition: background 0.12s; }
.row-list a:hover { background: var(--soft); padding-left: 10px; padding-right: 10px; margin: 0 -6px; }
.cat-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.rl-main { flex: 1; min-width: 0; }
.rl-main b { display: block; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-main span { font-size: 12px; color: var(--muted); }

/* --------------------------- Filtreler & sekmeler ------------------- */
.filters,
.filter-top { display: flex; flex-direction: column; gap: 12px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; height: 42px; transition: border-color 0.14s, background 0.14s; }
.search:focus-within { background: var(--bg-elev); border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16); }
.search .ic { color: var(--muted); }
.search input { border: none; background: none; outline: none; width: 100%; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.scroll-x { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.scroll-x::-webkit-scrollbar { display: none; }
.chips { display: flex; gap: 7px; align-items: center; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--soft); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: all 0.14s; }
.chip:hover { background: var(--soft-2); color: #fff; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.cat-chip.active { background: var(--c); border-color: var(--c); color: #090d16; font-weight: 700; }

.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-width: 0; }
.filter-selects { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-selects select { height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; background: var(--soft); color: var(--ink); font-size: 13px; outline: none; }
.filter-selects select:focus { border-color: var(--brand-light); }
.view-toggle { display: inline-flex; border: 1px solid var(--line); background: var(--soft); border-radius: 9px; overflow: hidden; }
.view-toggle button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); }
.view-toggle button.active { background: var(--brand); color: #fff; }

.tabs { display: flex; background: var(--soft); border: 1px solid var(--line); padding: 4px; border-radius: 11px; gap: 3px; }
.tabs a, .tabs button { flex: 1; text-align: center; padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; transition: all 0.14s; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs.small { width: fit-content; max-width: 100%; }
.tabs.small button { flex: initial; padding: 6px 12px; font-size: 13px; }
.tabs .active { background: var(--card-hover); color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--line-strong); }

/* ---------------------------- Görev kartları ------------------------ */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.task-stack { display: flex; flex-direction: column; gap: 10px; }
.task-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 3px 0 0 0 var(--c, var(--brand)), var(--shadow);
  border-radius: var(--radius);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  transition: transform 0.14s, border-color 0.14s, background 0.14s;
}
.task-card:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--card-hover); }
.task-card.is-overdue {
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: inset 3px 0 0 0 var(--danger), var(--shadow);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.18), var(--card));
}
.task-card.is-done { opacity: 0.82; }
.tc-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tc-id { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.task-card h4 { font-size: 15.5px; font-weight: 600; line-height: 1.35; color: #fff; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.tc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.tc-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; margin-top: auto; border-top: 1px solid var(--line); }
.tc-counts { margin-left: auto; display: inline-flex; gap: 8px; font-size: 12px; color: var(--muted); }
.tc-counts span { display: inline-flex; align-items: center; gap: 3px; }
.tc-quick { padding-top: 6px; display: flex; justify-content: flex-end; }
.tc-quick .btn { width: 100%; height: 40px; }

.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.due.danger { color: var(--danger); }
.due.warn, .due.warn-soft { color: var(--warn); }
.due.ok { color: var(--ok); }
.due.muted { color: var(--muted); font-weight: 500; }

/* ----------------------------- Görev detayı ------------------------- */
.detail-top { display: flex; align-items: center; gap: 8px; }
.crumb { font-weight: 600; color: var(--muted); }
.detail-head { box-shadow: inset 0 3px 0 0 var(--c), var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.detail-head h1 { font-size: 21px; line-height: 1.3; color: #fff; }
.due-banner { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: 10px; font-weight: 600; font-size: 13.5px; background: var(--soft); color: var(--ink-2); }
.due-banner.danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.3); }
.due-banner.warn, .due-banner.warn-soft { background: var(--warn-soft); color: var(--warn); }
.due-banner.ok { background: var(--ok-soft); color: var(--ok); }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info-grid dt { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.info-grid dd { font-weight: 600; font-size: 14px; color: var(--ink); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.desc { background: var(--soft); border: 1px solid var(--line); padding: 12px 14px; border-radius: 11px; white-space: pre-wrap; font-size: 14.5px; color: var(--ink-2); }
.detail-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.closed-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; padding: 8px 0; }

.gallery, .tl-photos, .ev-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gallery img, .tl-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; cursor: zoom-in; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 4px; }
.tl-item { display: flex; gap: 12px; position: relative; }
.tl-item:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: -14px; width: 2px; background: var(--line); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, var(--soft)); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); display: grid; place-items: center; flex-shrink: 0; }
.tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 3px; }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.tl-head b { color: var(--ink); }
.tl-head time { margin-left: auto; font-size: 12px; color: var(--muted); }
.tl-msg { font-size: 14px; color: var(--ink-2); white-space: pre-wrap; }
.tl-msg.bubble { background: var(--soft); border: 1px solid var(--line); padding: 9px 12px; border-radius: 10px; }

.composer textarea { width: 100%; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; color: var(--ink); outline: none; }
.composer textarea:focus { border-color: var(--brand-light); }
.composer-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* --------------------------- Saha personeli ------------------------- */
.hello { display: flex; align-items: center; gap: 14px; }
.hello small { color: var(--muted); font-size: 13px; }
.hello h1 { font-size: 22px; line-height: 1.15; color: #fff; }
.hello span { font-size: 12.5px; color: var(--muted); }
.stat-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pill { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 12px; text-align: center; box-shadow: var(--shadow); }
.pill b { display: block; font-size: 24px; line-height: 1.1; color: #fff; }
.pill span { font-size: 12px; color: var(--muted); }
.pill.danger { border-color: rgba(248, 113, 113, 0.35); background: rgba(127, 29, 29, 0.22); }
.pill.danger b { color: var(--danger); }
.pill.ok b { color: var(--ok); }
.group-title { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: flex; align-items: center; gap: 8px; margin: 4px 2px -6px; }
.group-title.danger { color: var(--danger); }
.group-title span { background: var(--soft); color: var(--ink); padding: 1px 7px; border-radius: 99px; font-size: 11.5px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 13px; background: var(--brand-soft); border: 1px solid rgba(96, 165, 250, 0.25); color: var(--brand-light); }
.banner.ok { background: var(--ok-soft); border-color: rgba(74, 222, 128, 0.28); color: var(--ok); }
.banner div { flex: 1; min-width: 0; }
.banner b { display: block; font-size: 14px; color: #fff; }
.banner span { font-size: 12.5px; color: var(--ink-2); }

.profile-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px; }
.profile-card h1 { font-size: 20px; margin-top: 4px; color: #fff; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; }
.mini-stats b { display: block; font-size: 22px; color: #fff; }
.mini-stats span { font-size: 12px; color: var(--muted); }
.menu-list { display: flex; flex-direction: column; padding: 6px; }
.menu-list button, .menu-list a { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 10px; font-weight: 600; text-align: left; color: var(--ink); }
.menu-list button:hover, .menu-list a:hover { background: var(--soft); }
.menu-list span { flex: 1; }
.menu-list em { font-style: normal; font-size: 13px; color: var(--muted); }

/* ------------------------- Personel & Raporlar ---------------------- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  width: 100%;
}
.staff-card {
  box-shadow: inset 0 3px 0 0 var(--c, var(--brand)), var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  transition: transform 0.14s, border-color 0.14s;
}
.staff-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.sc-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sc-title { flex: 1; min-width: 0; }
.sc-title h3 { font-size: 15.5px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-title span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-now {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 10px 8px;
  border-radius: 12px;
  text-align: center;
}
.sc-now a { padding: 2px 4px; border-radius: 8px; transition: background 0.12s; }
.sc-now a:hover { background: var(--soft-2); }
.sc-now b { display: block; font-size: 19px; font-weight: 700; color: #fff; line-height: 1.15; }
.sc-now span { font-size: 11.5px; color: var(--muted); }
.sc-now .danger b { color: var(--danger); }

.sc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
}
.sc-stats > div {
  background: rgba(27, 37, 59, 0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 4px;
  min-width: 0;
}
.sc-stats dt { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-stats dd { font-weight: 700; font-size: 13.5px; color: var(--ink); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sc-rate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 2px;
}
.sc-rate .rate { max-width: 150px; }

.sc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  width: 100%;
}
.sc-actions > .btn:not(.icon-only) {
  flex: 1;
  min-width: 0;
  padding: 0 10px;
}
.sc-actions > .btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.date-nav { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 4px 8px; }
.date-nav b { min-width: 170px; text-align: center; font-size: 13.5px; color: var(--ink); }
.prio-dist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.prio-dist > div { background: var(--soft); border: 1px solid var(--line); box-shadow: inset 0 3px 0 0 var(--c); border-radius: 10px; padding: 9px 10px; text-align: center; }
.prio-dist b { display: block; font-size: 18px; color: #fff; }
.prio-dist span { font-size: 11.5px; color: var(--muted); }

/* ------------------------- Geçmiş & bildirimler --------------------- */
.ev-list { display: flex; flex-direction: column; gap: 12px; }
.ev-list.two-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px 22px; }
.ev-day { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); }
.ev-line { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.ev-line b { color: var(--ink); }
.ev-line > div { flex: 1; min-width: 0; }
.ev-line time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ev-task { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.ev-task:hover { color: var(--brand-light); }
.ev-task i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ev-line q { display: block; font-style: normal; color: var(--ink-2); background: var(--soft); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; margin-top: 5px; font-size: 12.5px; }
.ev-photos { grid-template-columns: repeat(auto-fill, 56px); margin-top: 6px; }
.ev-photos img { width: 56px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }

.notif-list li + li { border-top: 1px solid var(--line); }
.notif-list a { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; transition: background 0.12s; }
.notif-list a:hover { background: var(--soft); }
.notif-list a.unread { background: rgba(59, 130, 246, 0.1); box-shadow: inset 3px 0 0 0 var(--brand-light); }
.n-ic { width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--c) 16%, var(--soft)); color: var(--c); display: grid; place-items: center; flex-shrink: 0; }
.notif-list b { display: block; font-size: 14px; color: var(--ink); }
.notif-list span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.notif-list time { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ---------------------- Formlar, modal & fotoğraf ------------------- */
.form { display: flex; flex-direction: column; gap: 13px; width: 100%; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; width: 100%; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; width: 100%; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--soft);
  color: var(--ink);
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.field select {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.cat-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cat-opt input, .seg-opt input { display: none; }
.cat-opt span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--soft); border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; transition: all 0.14s; }
.cat-opt input:checked + span { border-color: var(--c); background: var(--bg); color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg-opt span { display: block; text-align: center; padding: 8px; background: var(--soft); border: 1.5px solid var(--line); border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all 0.14s; }
.seg-opt input:checked + span { border-color: var(--c); background: var(--c); color: #090d16; font-weight: 700; }
.quick-due { margin-top: 4px; flex-wrap: wrap; }
.quick-due .chip { height: 28px; font-size: 12px; padding: 0 10px; }

.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; color: var(--ink); }
.switch input { display: none; }
.switch span { width: 40px; height: 22px; background: var(--soft-2); border-radius: 99px; position: relative; transition: background 0.15s; }
.switch span::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform 0.15s; }
.switch input:checked + span { background: var(--ok-solid); }
.switch input:checked + span::after { transform: translateX(18px); }

.photo-picker { display: flex; flex-direction: column; gap: 8px; }
.pp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-previews { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-thumb { position: relative; width: 76px; height: 76px; }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-strong); }
.pp-thumb button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--danger-solid); color: #fff; display: grid; place-items: center; }

.modal-wrap { position: fixed; inset: 0; background: rgba(4, 7, 14, 0.72); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; opacity: 0; transition: opacity 0.18s; }
.modal-wrap.show { opacity: 1; }
.modal {
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(10px);
  transition: transform 0.18s;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  min-width: 0;
}
.modal.wide { max-width: 600px; }
.modal-wrap.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.modal-head h3 { font-size: 16.5px; color: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 16px 18px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 12px; min-width: 0; width: 100%; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--bg-elev); flex-shrink: 0; flex-wrap: wrap; }

.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.92); display: grid; place-items: center; padding: 20px; z-index: 200; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 92dvh; border-radius: 10px; }
.lightbox .icon-btn { position: fixed; top: 16px; right: 16px; background: rgba(255, 255, 255, 0.15); color: #fff; }

#toasts { position: fixed; top: 14px; right: 14px; z-index: 150; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 28px)); }
.toast { background: #172033; border: 1px solid var(--line-strong); color: #fff; padding: 12px 14px; border-radius: 12px; display: flex; align-items: flex-start; gap: 10px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5); opacity: 0; transform: translateY(-8px); transition: all 0.2s; }
.toast.show { opacity: 1; transform: none; }
.toast.success .toast-ic { color: var(--ok); }
.toast.error { background: #3b1219; border-color: rgba(248, 113, 113, 0.4); }
.toast.error .toast-ic { color: var(--danger); }
.toast-body b { display: block; font-size: 13.5px; margin-bottom: 1px; }
.toast-body span { font-size: 13px; color: var(--ink-2); }

/* ======================== OPERASYON EKRANI (TV) ===================== */
body.ops-mode .sidebar, body.ops-mode .topbar, body.ops-mode .bottom-nav { display: none !important; }
body.ops-mode { background: #060911; color: var(--ink); }
.ops { min-height: 100dvh; display: flex; flex-direction: column; padding: 14px 18px; gap: 12px; }
.ops-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; }
.ops-brand { display: flex; align-items: center; gap: 10px; color: var(--brand-light); }
.ops-brand b { display: block; font-size: 17px; color: #fff; }
.ops-brand span { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.ops-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ops-filters button { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.ops-filters button.active { background: var(--c, var(--brand)); border-color: transparent; color: #090d16; font-weight: 700; }
.ops-clock { margin-left: auto; text-align: right; }
.ops-clock b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; color: #fff; line-height: 1.05; }
.ops-clock span { font-size: 11.5px; color: var(--muted); }
.ops-actions .icon-btn { color: var(--ink-2); }
.ops-actions .icon-btn:hover { background: var(--soft); }

.ops-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ok-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ok-kpi b { font-size: 28px; color: #fff; font-variant-numeric: tabular-nums; }
.ok-kpi span { font-size: 12.5px; color: var(--muted); }
.ok-kpi.amber b { color: var(--warn); }
.ok-kpi.blue b { color: var(--brand-light); }
.ok-kpi.green b { color: var(--ok); }
.ok-kpi.violet b { color: var(--violet); }
.ok-kpi.red { border-color: rgba(248, 113, 113, 0.4); background: rgba(127, 29, 29, 0.25); }
.ok-kpi.red b { color: var(--danger); }
.ok-kpi.pulse { animation: rpulse 1.5s infinite; }
@keyframes rpulse { 50% { border-color: #ef4444; box-shadow: 0 0 18px rgba(239, 68, 68, 0.35); } }

.ops-board { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; min-height: 360px; }
.ops-col { background: var(--card); border: 1px solid var(--line); box-shadow: inset 0 3px 0 0 #475569; border-radius: 14px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ops-col.red { box-shadow: inset 0 3px 0 0 #ef4444; }
.ops-col.amber { box-shadow: inset 0 3px 0 0 #f59e0b; }
.ops-col.blue { box-shadow: inset 0 3px 0 0 #3b82f6; }
.ops-col.green { box-shadow: inset 0 3px 0 0 #22c55e; }
.ops-col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.ops-col h2 span { background: var(--soft); padding: 1px 8px; border-radius: 99px; font-size: 12px; }
.ops-list { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; }
.ops-empty, .ops-more { text-align: center; color: var(--muted); padding: 18px; font-size: 13px; }
.ops-card { background: var(--soft); border: 1px solid var(--line); box-shadow: inset 3px 0 0 0 var(--c); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 4px; transition: border-color 0.12s; }
.ops-card:hover { border-color: var(--line-strong); }
.ops-card.od { background: rgba(127, 29, 29, 0.28); border-color: rgba(248, 113, 113, 0.4); box-shadow: inset 3px 0 0 0 #ef4444; }
.oc-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.oc-cat { color: var(--c); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.oc-prio { background: var(--danger-solid); color: #fff; padding: 0 6px; border-radius: 99px; font-weight: 700; font-size: 10.5px; }
.ops-card.p-yuksek .oc-prio { background: #ea580c; }
.oc-id { margin-left: auto; color: var(--muted); }
.ops-card > b { font-size: 13.5px; color: #f8fafc; line-height: 1.3; }
.oc-meta { display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.oc-meta span { display: inline-flex; align-items: center; gap: 3px; }
.oc-due { font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.oc-due.danger { color: var(--danger); }
.oc-due.warn { color: var(--warn); }
.oc-due.ok { color: var(--ok); }

.ops-bottom { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.ops-staff { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 8px; }
.os-p { background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.os-p.od { border-color: rgba(248, 113, 113, 0.45); }
.os-p div { flex: 1; min-width: 0; }
.os-p b { display: block; font-size: 12.5px; color: #fff; }
.os-p span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-p em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ok); display: inline-flex; align-items: center; gap: 2px; }
.ops-feed { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; overflow: hidden; }
.ops-feed h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ops-feed ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 12px; }
.ops-feed li { display: flex; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.ops-feed time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* --------------------------- Mobil uyum ----------------------------- */
@media (max-width: 1140px) {
  .kpi-grid, .kpi-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
  .ops-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .mobile-brand, .bottom-nav { display: flex; }
  .hide-sm { display: none; }
  .topbar { padding: 0 12px; gap: 6px; }
  .top-bldg-wrap { max-width: 48vw; padding: 0 7px; }
  .top-bldg-select { max-width: 100%; text-overflow: ellipsis; font-size: 12.5px; }
  #view { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .page, .page.narrow, .detail { padding: 14px 14px 32px; gap: 14px; }
  .stack { gap: 14px; }
  .kpi-grid, .kpi-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; gap: 10px; }
  .kpi-txt b { font-size: 20px; }
  .cat-tiles, .grid-2, .info-grid, .task-grid, .plan-grid, .staff-grid { grid-template-columns: minmax(0, 1fr); }
  .ev-list.two-col { grid-template-columns: 1fr; }
  .ops-board { grid-template-columns: 1fr; }
  .ops-feed ul { grid-template-columns: 1fr; }
  .ops-clock { display: none; }
  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal, .modal.wide { width: 100%; max-width: 100vw; border-radius: 20px 20px 0 0; max-height: 94dvh; border-left: none; border-right: none; }
  .modal-head { padding: 12px 14px; }
  .modal-body { padding: 12px 14px; gap: 10px; }
  .modal-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .form { gap: 10px; }
  .field { gap: 4px; }
  .field input, .field select, .field textarea { padding: 8px 10px; font-size: 14px; }
  .cat-picker { gap: 6px; }
  .cat-opt span { padding: 8px 10px; font-size: 12.5px; }
  .seg { gap: 5px; }
  .seg-opt span { padding: 6px 4px; font-size: 12px; }
  .quick-due { gap: 5px; }
  .quick-due .chip { height: 26px; font-size: 11.5px; padding: 0 8px; }
}

/* ----------------------------- Yazdırma ---------------------------- */
@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --card: #ffffff;
    --soft: #f1f5f9;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #cbd5e1;
  }
  body { background: #fff !important; color: #0f172a !important; }
  .sidebar, .topbar, .bottom-nav, .no-print, #toasts { display: none !important; }
  .print-only { display: block; margin-bottom: 12px; color: #0f172a; }
  .page { max-width: 100%; padding: 0; }
  .card, .kpi { box-shadow: none; break-inside: avoid; border-color: #cbd5e1; }
  .kpi-txt b, .page-head h1, .card > h3 { color: #0f172a !important; }
}


/* =================== GERÇEK BOYUTLU MOBİL ÖNİZLEME ================== */
.sim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}
.sim-stage {
  background: radial-gradient(circle at 50% 45%, rgba(59, 130, 246, 0.12), rgba(13, 19, 34, 0.78) 70%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 680px;
  overflow: auto;
}
.phone-scaler {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}
.phone-shell {
  --pw: 393px;
  --ph: 852px;
  --pr: 52px;
  width: calc(var(--pw) + 28px);
  height: calc(var(--ph) + 28px);
  padding: 14px;
  border-radius: calc(var(--pr) + 12px);
  background: linear-gradient(145deg, #334155 0%, #1e293b 35%, #0f172a 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.16),
    inset 0 0 0 5px #0b1120,
    0 30px 70px rgba(0, 0, 0, 0.7),
    0 4px 16px rgba(0, 0, 0, 0.5);
  position: relative;
  transform-origin: top center;
  transition: width 0.22s ease, height 0.22s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.ph-btn {
  position: absolute;
  background: linear-gradient(180deg, #475569, #1e293b);
  border-radius: 3px;
}
.ph-btn-mute { left: -3px; top: 120px; width: 3px; height: 28px; }
.ph-btn-vol1 { left: -3px; top: 168px; width: 3px; height: 54px; }
.ph-btn-vol2 { left: -3px; top: 234px; width: 3px; height: 54px; }
.ph-btn-pwr  { right: -3px; top: 190px; width: 3px; height: 82px; }

.phone-bezel {
  width: var(--pw);
  height: var(--ph);
  border-radius: var(--pr);
  background: #090d16;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone-statusbar {
  height: 44px;
  padding: 0 26px;
  background: #090d16;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  user-select: none;
}
.phone-notch {
  position: absolute;
  left: 50%;
  top: 9px;
  transform: translateX(-50%);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
}
.phone-notch.island {
  width: 112px;
  height: 27px;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone-notch.punch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  top: 13px;
  padding: 0;
  justify-content: center;
}
.phone-notch i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #38bdf8, #0f172a 70%);
}
.phone-status-ic {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
}
.phone-status-ic .bat {
  width: 22px;
  height: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 3.5px;
  padding: 1.5px;
  position: relative;
  display: inline-flex;
}
.phone-status-ic .bat::after {
  content: '';
  position: absolute;
  right: -3.5px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: rgba(255, 255, 255, 0.85);
}
.phone-status-ic .bat i {
  width: 82%;
  height: 100%;
  background: #4ade80;
  border-radius: 1.5px;
}
.phone-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #090d16;
}
.phone-homebar {
  height: 20px;
  background: rgba(13, 19, 34, 0.96);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.phone-homebar i {
  width: 134px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
}
.sim-dim-tag {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 5px 14px;
  border-radius: 99px;
}

.sim-users {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sim-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
  transition: all 0.14s;
}
.sim-user-btn:hover {
  background: var(--soft-2);
  border-color: var(--line-strong);
}
.sim-user-btn.active {
  background: var(--brand-soft);
  border-color: var(--brand-light);
  box-shadow: inset 3px 0 0 0 var(--brand-light);
}

/* Bağımsız /mobile.html tam ekran stüdyo görünümü */
body.standalone-sim {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.ssim-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 22px;
  background: rgba(13, 19, 34, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.ssim-main {
  flex: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}
.ssim-bar h3 { margin-bottom: 6px; }

@media (max-width: 1020px) {
  .sim-layout, .ssim-main { grid-template-columns: 1fr; }
}


/* ========== TEKNİK BİRİM: GÜNLÜK DEVRİYE & PLANLI BAKIMLAR ========== */
.date-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 12px;
  height: 36px;
  color: var(--ink-2);
}
.date-pick input[type="date"] {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  height: 34px;
}

.patrol-hero {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.14), rgba(59, 130, 246, 0.1) 60%, var(--card));
  border-color: rgba(251, 146, 60, 0.28);
}
.patrol-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.patrol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.patrol-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 3px 0 0 #fb923c, var(--shadow);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s;
}
.patrol-card.st-ok {
  box-shadow: inset 0 3px 0 0 var(--ok), var(--shadow);
  border-color: rgba(74, 222, 128, 0.28);
}
.patrol-card.st-sorun {
  box-shadow: inset 0 3px 0 0 var(--danger), var(--shadow);
  border-color: rgba(248, 113, 113, 0.38);
}
.pc-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.pc-step {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(251, 146, 60, 0.18);
  color: #fb923c;
  font-weight: 800;
  font-size: 13.5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.patrol-card.st-ok .pc-step {
  background: var(--ok-soft);
  color: var(--ok);
}
.patrol-card.st-sorun .pc-step {
  background: var(--danger-soft);
  color: var(--danger);
}
.pc-title {
  flex: 1;
  min-width: 0;
}
.pc-title b {
  display: block;
  font-size: 15px;
  color: #fff;
}
.pc-title span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.pc-checklist {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pc-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.35;
}
.pc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
  margin-top: 5px;
  flex-shrink: 0;
}
.pc-item.st-ok .pc-dot { background: var(--ok); box-shadow: 0 0 6px rgba(74, 222, 128, 0.5); }
.pc-item.st-sorun .pc-dot { background: var(--danger); box-shadow: 0 0 6px rgba(248, 113, 113, 0.6); }
.pc-item.st-sorun span { color: #fecaca; font-weight: 600; }
.pc-item em {
  margin-left: auto;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-light);
  background: var(--brand-soft);
  padding: 1px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.pc-note {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--soft);
  padding: 8px 10px;
  border-radius: 9px;
  border-left: 3px solid var(--brand-light);
}
.pc-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Planlı Bakım & Periyodik Muayene Kartları */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.plan-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 3px 0 0 var(--brand-light), var(--shadow);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.plan-card.overdue {
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: inset 0 3px 0 0 var(--danger), var(--shadow);
}
.plan-card.soon {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: inset 0 3px 0 0 var(--warn), var(--shadow);
}
.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.plan-title {
  font-size: 15.5px;
  color: #fff;
  line-height: 1.3;
}
.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.plan-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.plan-cl {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.plan-cl-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.plan-cl-row svg {
  color: var(--ok);
  flex-shrink: 0;
}
.plan-dates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.plan-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Checklist Modal Satırları */
.routine-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rm-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 9px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.rm-sub span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.rm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.rm-bar b {
  font-size: 14px;
  color: var(--ink);
}
.chk-list,
.rm-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chk-row {
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.14s, background 0.14s;
}
.chk-row.st-ok,
.chk-row.is-ok {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(34, 197, 94, 0.05);
}
.chk-row.st-sorun,
.chk-row.is-bad {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(239, 68, 68, 0.08);
}
.chk-main {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
}
.chk-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.chk-idx,
.chk-num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.chk-lbl,
.chk-label b {
  font-size: 13.5px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.4;
  min-width: 0;
  word-break: break-word;
}
.chk-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.chk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--soft);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  transition: all 0.12s;
  white-space: nowrap;
}
.chk-btn.ok.on {
  background: var(--ok-solid);
  border-color: transparent;
  color: #fff;
}
.chk-btn.bad.on {
  background: var(--danger-solid);
  border-color: transparent;
  color: #fff;
}
.chk-sub {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-left: 36px;
}
.chk-val {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0 11px;
  min-height: 38px;
  width: 100%;
  max-width: 300px;
}
.chk-val:focus-within {
  border-color: var(--accent);
}
.chk-val input {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  padding: 0;
  height: 36px;
  font-size: 13.5px;
}
.chk-val span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.chk-note,
.chk-issue-note {
  flex: 1;
  min-width: 200px;
  width: 100%;
  min-height: 38px;
  font-size: 13px;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(15, 23, 42, 0.55);
  color: var(--ink);
}
@media (max-width: 600px) {
  .chk-row {
    padding: 11px 12px;
  }
  .chk-main {
    grid-template-columns: 24px 1fr;
    align-items: start;
    gap: 9px 10px;
  }
  .chk-btns {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .chk-btn {
    height: 38px;
    font-size: 13px;
  }
  .chk-sub {
    padding-left: 0;
    flex-direction: column;
    align-items: stretch;
  }
  .chk-val {
    max-width: 100%;
  }
  .chk-note,
  .chk-issue-note {
    min-width: 0;
  }
}

/* Kurulum / Alan Maddeleri Düzenleyici */
.area-items-ed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aie-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
}
.aie-row {
  display: grid;
  grid-template-columns: 24px 1fr 125px 32px;
  gap: 7px;
  align-items: center;
}
.aie-days {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding-left: 31px;
}
.aie-days-lbl {
  font-size: 11px;
  color: var(--muted);
  margin-right: 2px;
}
.day-pill {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.day-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}
.day-pill.on {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 600px) {
  .aie-row {
    grid-template-columns: 24px 1fr 32px;
  }
  .aie-row .aie-unit {
    grid-column: 2 / 4;
  }
  .aie-days {
    padding-left: 0;
  }
}
.aie-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.setup-item-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.setup-item-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.setup-idx {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Saha Personeli Mobil Devriye Kartları */
.staff-patrol-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.16), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 14px;
  padding: 13px 15px;
  transition: transform 0.12s, border-color 0.12s;
}
.staff-patrol-cta:hover {
  border-color: #fb923c;
}
.spc-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.spc-body {
  flex: 1;
  min-width: 0;
}
.spc-body b {
  display: block;
  font-size: 14px;
  color: #fff;
}
.spc-body span {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 2px;
}
.staff-patrol-progress {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.14), var(--card));
  border-color: rgba(251, 146, 60, 0.3);
}
.spp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.spp-who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.spp-who.ok {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(74, 222, 128, 0.35);
  color: #86efac;
}
.spc-who {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #86efac;
  margin-top: 3px;
}
.chk-done-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.4;
}
.chk-done-banner.ok {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.32);
  color: #bbf7d0;
}
.chk-done-banner.bad {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}
.chk-stats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chk-stat-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr);
  gap: 12px 18px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.chk-stat-row.is-top {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(34, 197, 94, 0.05);
}
.csr-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.csr-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink-2);
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.chk-stat-row.is-top .csr-rank {
  background: rgba(74, 222, 128, 0.18);
  color: #4ade80;
}
.csr-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.csr-nums {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
@media (max-width: 680px) {
  .chk-stat-row {
    grid-template-columns: 1fr;
  }
}

.spp-pct {
  font-size: 26px;
  font-weight: 800;
  color: #fb923c;
}
.patrol-stop-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 3px 0 0 0 #fb923c, var(--shadow);
  border-radius: 14px;
  padding: 14px;
  transition: border-color 0.14s, background 0.14s;
  min-width: 0;
}
.patrol-stop-row:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
}
.patrol-stop-row.st-ok,
.patrol-stop-row.done {
  box-shadow: inset 3px 0 0 0 var(--ok), var(--shadow);
}
.patrol-stop-row.st-sorun,
.patrol-stop-row.issue {
  box-shadow: inset 3px 0 0 0 var(--danger), var(--shadow);
}
.patrol-stop-row .pc-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  min-width: 0;
}
.patrol-stop-row .pc-title {
  flex: 1;
  min-width: 0;
}
.patrol-stop-row .pc-step {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(251, 146, 60, 0.16);
  color: #fb923c;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.patrol-stop-row.done .pc-step {
  background: var(--ok-soft);
  color: var(--ok);
}
.patrol-stop-row.issue .pc-step {
  background: var(--danger-soft);
  color: var(--danger);
}
.psr-step {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(251, 146, 60, 0.16);
  color: #fb923c;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.patrol-stop-row.st-ok .psr-step {
  background: var(--ok-soft);
  color: var(--ok);
}
.patrol-stop-row.st-sorun .psr-step {
  background: var(--danger-soft);
  color: var(--danger);
}
.psr-body {
  flex: 1;
  min-width: 0;
}
.psr-body b {
  display: block;
  font-size: 14.5px;
  color: #fff;
}
.psr-body span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}
.psr-body small {
  display: block;
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: 3px;
}
.psr-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  flex-shrink: 0;
}
.chk-simple {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.chk-simple input {
  width: 17px;
  height: 17px;
  accent-color: var(--ok-solid);
}


/* ============ MODERN KURUMSAL OTURUM AÇMA (APSİYON / SAAS STİLİ) ============ */
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  background: #080c15;
}

.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 52px;
  background:
    radial-gradient(circle at 18% 15%, rgba(37, 99, 235, 0.28) 0%, transparent 52%),
    radial-gradient(circle at 85% 85%, rgba(14, 165, 233, 0.16) 0%, transparent 48%),
    linear-gradient(160deg, #0b1326 0%, #090e1a 100%);
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.auth-hero-top,
.auth-hero-body,
.auth-hero-foot {
  position: relative;
  z-index: 1;
}

.auth-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-logo img {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.auth-logo strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.auth-logo span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.auth-hero-body {
  max-width: 540px;
  margin: auto 0;
  padding: 32px 0;
}

.auth-hero-body h1 {
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 14px;
}

.auth-hero-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 28px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-feat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(8px);
}

.auth-feat-ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.auth-feat b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 3px;
}

.auth-feat span {
  display: block;
  font-size: 12.8px;
  line-height: 1.45;
  color: var(--muted);
}

.auth-hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.auth-hero-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: radial-gradient(circle at 50% 0%, rgba(30, 58, 138, 0.18) 0%, #090d16 70%);
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 32px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 11px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.auth-mobile-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.auth-mobile-brand b {
  display: block;
  font-size: 18px;
  color: #fff;
}

.auth-mobile-brand span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.auth-head h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 6px;
}

.auth-head p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.auth-pad-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-light);
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.22);
  transition: all 0.14s;
}

.auth-pad-toggle:hover,
.auth-pad-toggle.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  height: 46px;
  padding: 0 12px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-input-wrap:focus-within {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  background: #0d1424;
}

.auth-in-ic {
  color: var(--muted);
  display: grid;
  place-items: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.auth-input-wrap:focus-within .auth-in-ic {
  color: var(--brand-light);
}

.auth-input-wrap input {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-size: 14.5px;
  color: #fff;
  outline: none;
}

.auth-input-wrap input::placeholder {
  color: #64748b;
}

.auth-eye-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: 6px;
  transition: color 0.14s, background 0.14s;
}

.auth-eye-btn:hover {
  color: #fff;
  background: var(--soft);
}

.auth-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.auth-numpad button {
  height: 44px;
  border-radius: 9px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  transition: background 0.12s, transform 0.06s;
}

.auth-numpad button:hover {
  background: var(--soft-2);
  border-color: var(--line-strong);
}

.auth-numpad button:active {
  transform: scale(0.96);
}

.auth-numpad button.muted {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}

.auth-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.auth-forgot {
  color: var(--brand-light);
  font-weight: 600;
  font-size: 12.5px;
}

.auth-forgot:hover {
  text-decoration: underline;
}

.auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

.auth-submit {
  height: 48px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
  margin-top: 2px;
}

.auth-box.shake {
  animation: shake 0.36s;
}

.auth-legal-foot {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.auth-legal-foot svg {
  color: var(--brand-light);
  flex-shrink: 0;
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    width: 100%;
  }
  .auth-hero {
    display: none;
  }
  .auth-main {
    min-height: 100dvh;
    padding: max(14px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
    align-items: center;
  }
  .auth-mobile-brand {
    display: flex;
    padding-bottom: 12px;
  }
  .auth-box {
    width: 100%;
    max-width: 420px;
    padding: 20px 18px;
    gap: 16px;
    border-radius: 18px;
  }
  .auth-head h2 {
    font-size: 21px;
    margin-bottom: 4px;
  }
  .auth-head p {
    font-size: 13px;
  }
  .auth-form {
    gap: 13px;
  }
  .auth-input-wrap {
    height: 46px;
  }
  .auth-input-wrap input {
    font-size: 16px;
  }
  .auth-options {
    flex-wrap: wrap;
    gap: 8px;
  }
  .auth-numpad {
    gap: 6px;
    padding: 8px;
  }
  .auth-numpad button {
    height: 40px;
    font-size: 16px;
  }
  .auth-submit {
    height: 46px;
  }
}

@media (max-height: 680px) and (max-width: 920px) {
  .auth-main {
    align-items: flex-start;
  }
  .auth-box {
    padding: 16px 15px;
    gap: 12px;
  }
  .auth-mobile-brand {
    padding-bottom: 10px;
  }
  .auth-head h2 {
    font-size: 19px;
  }
  .auth-form {
    gap: 10px;
  }
  .auth-input-wrap {
    height: 42px;
  }
}

/* Sol Menü & Üst Bar Bina Seçici */
.side-bldg-box {
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-bldg-box label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #38bdf8;
}
.side-bldg-box select {
  height: 32px;
  font-size: 13px;
  font-weight: 700;
  padding: 0 8px;
  background: var(--soft);
  border-color: var(--line);
  color: #fff;
}
.top-bldg-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--soft);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 10px;
  height: 34px;
  color: #38bdf8;
}
.top-bldg-select {
  height: 32px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 0 4px;
  width: auto;
}
.bldg-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 12.5px;
}

/* Yetkilendirme Modalı & Bina Kartları */
.auth-level-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.auth-level-opt {
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.14s;
}
.auth-level-opt input {
  display: none;
}
.auth-level-opt b {
  font-size: 13.5px;
  color: #fff;
}
.auth-level-opt small {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.3;
}
.auth-level-opt.active {
  border-color: var(--c, var(--brand-light));
  background: rgba(59, 130, 246, 0.12);
  box-shadow: inset 3px 0 0 0 var(--c, var(--brand-light));
}
.auth-level-opt.active b {
  color: var(--c, #fff);
}
.auth-admin-opts {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--soft);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.chk-pill input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}
.perm-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.perm-chk-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
}
.perm-chk-card input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.perm-chk-card b {
  display: block;
  font-size: 12.5px;
  color: #f8fafc;
}
.perm-chk-card small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.uname-pill {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  color: #38bdf8;
}
.bldg-badges-cell, .perm-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.perm-tag {
  font-size: 11px;
  font-weight: 600;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 2px 7px;
  border-radius: 6px;
}
.perm-tag.all {
  background: rgba(167, 139, 250, 0.16);
  border-color: rgba(167, 139, 250, 0.35);
  color: #c4b5fd;
}
.perm-tag.staff {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.28);
  color: #86efac;
}
.bldg-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.bldg-card.is-current {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: inset 0 3px 0 0 #38bdf8, var(--shadow);
}
.bldg-staff-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 30px;
}
.bldg-staff-strip .more-cnt {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--soft);
  padding: 3px 8px;
  border-radius: 99px;
}
.bldg-matrix-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.matrix-sec {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
}
.matrix-sec h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

@media (max-width: 640px) {
  .auth-level-grid, .perm-check-grid { grid-template-columns: 1fr; }
}
