/* =====================================================================
   ITCOM - Giriş-çıxış nəzarət sistemi
   Rəng: universitetin bordosu (#A21441). Yaşıl = keçdi, narıncı-qırmızı = rədd.
   ===================================================================== */
/* Şriftlər serverdə saxlanılır (OFL lisenziya). Hər ikisi Azərbaycan hərflərini tam dəstəkləyir:
   Plus Jakarta Sans - başlıqlar, menyu, rəqəmlər; Inter - mətn və cədvəllər. */
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/static/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/static/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* ---- Tema dəyişənləri. Şirkət brendi üçün yalnız --brand dəyişdirmək kifayətdir (qalan çalarlar ondan törəyir). */
:root {
  color-scheme: light;
  --brand: #1c2230;        /* ITCOM: tünd şifer (ciddi, neytral); başlıq, əsas düymələr */
  --on-brand: #ffffff;
  --brand-700: color-mix(in srgb, var(--brand) 82%, #000);
  --brand-ink: var(--brand);                                    /* mətn/keçid kimi istifadə (açıq fonda) */
  --brand-50: color-mix(in srgb, var(--brand) 8%, var(--paper));
  --canvas: #f5f5f5;
  --paper: #ffffff;
  --ink: #1f2328;
  --ink-2: #444a53;
  --muted: #5d636d;
  --line: #e3e5e8;
  --line-2: #eef0f2;
  --field-line: #959ca6;
  --th-bg: #fafafa;
  --pass: #1a6e44;  --pass-bg: #e7f4ec;
  --deny: #b43a08;  --deny-bg: #fdede4;  --deny-line: #efc4ad;
  --warn: #7d5600;  --warn-bg: #fdf3dc;
  --deny-solid: #b43a08; --warn-solid: #7d5600;
  --bar-dim: #b9c0cc;
  --toast-bg: #1f2328; --toast-fg: #ffffff;
  --overlay: rgba(10, 14, 22, .55);
  --shadow: rgba(0,0,0,.18);
  --display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --r-sm: 4px; --r: 6px;
  font-family: var(--sans); font-size: 14px; color: var(--ink); line-height: 1.5;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-ink: color-mix(in srgb, var(--brand) 52%, #ffffff);
  --brand-50: color-mix(in srgb, var(--brand) 22%, var(--paper));
  --canvas: #111317;
  --paper: #1a1d22;
  --ink: #e8eaee;
  --ink-2: #bcc1c9;
  --muted: #9ba1ac;
  --line: #2f333b;
  --line-2: #262a31;
  --field-line: #5a606b;
  --th-bg: #20242b;
  --pass: #62d295;  --pass-bg: #14301f;
  --deny: #ff9c70;  --deny-bg: #3b1d11;  --deny-line: #6b3520;
  --warn: #f2c35f;  --warn-bg: #36290a;
  --bar-dim: color-mix(in srgb, var(--brand) 45%, var(--paper));
  --toast-bg: #e8eaee; --toast-fg: #14161a;
  --overlay: rgba(0, 0, 0, .65);
  --shadow: rgba(0,0,0,.55);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--canvas); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--deny); min-height: 1.3em; margin: 10px 0 0; }
.fine { color: var(--muted); font-size: 12px; margin: 14px 0 0; }
a { color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
.masthead :focus-visible, .login :focus-visible, .nv-drawer :focus-visible { outline-color: #fff; }
.login-card :focus-visible { outline-color: var(--brand-ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -0.02em; }
h1, .page-head { overflow-wrap: anywhere; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------- giriş */
.login { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: linear-gradient(135deg, #12151c 0%, var(--brand) 100%); }
.login-brand { display: flex; flex-direction: column; justify-content: center; padding: 48px 8vw; color: #fff; }
.logo-plate { background: #fff; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; }
.login-logo { width: 280px; align-self: flex-start; max-width: 100%; height: auto; display: block; }
.login-system { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin: 28px 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.4); max-width: 300px; }
.login-card { background: var(--paper); align-self: center; justify-self: start; width: min(400px, 90vw); padding: 36px; border-radius: var(--r); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.login-card h1 { font-size: 26px; margin-bottom: 8px; }
.login-card label { display: block; margin-top: 16px; font-weight: 600; font-size: 13px; }
.login-card input { margin-top: 6px; }
@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 32px 24px 8px; align-items: center; text-align: center; }
  .login-logo { align-self: center; width: 220px; }
  .login-system { max-width: none; }
  .login-card { justify-self: center; margin-bottom: 40px; }
}

/* ------------------------------------------------------------- başlıq (sayt üslubu) */
.masthead { background: var(--brand); color: #fff; }
.masthead { position: relative; z-index: 20; }
.mast-top { display: flex; align-items: center; gap: 24px; padding-top: 10px; padding-bottom: 10px; }
.mast-logo { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.mast-logo img { height: 30px; width: auto; display: block; }
.mast-name { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.mast-system { font-family: var(--display); font-size: 16px; font-weight: 500; letter-spacing: -0.01em; padding-left: 24px; border-left: 1px solid rgba(255,255,255,.45); }
.mast-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mast-user { position: relative; }
.user-btn { background: var(--canvas); color: var(--ink); border: 0; border-radius: var(--r-sm); padding: 8px 12px; font: inherit; cursor: pointer; display: flex; gap: 10px; align-items: center; font-family: var(--display); font-size: 14px; font-weight: 600; }
.user-btn:hover { background: var(--paper); }
.role-tag { font-family: var(--sans); font-size: 11px; font-weight: 700; color: var(--brand-ink); background: var(--brand-50); padding: 2px 8px; border-radius: 99px; }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--paper); border-radius: var(--r); box-shadow: 0 12px 32px var(--shadow); min-width: 190px; padding: 6px; z-index: 30; }
.user-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; font: inherit; color: var(--ink); cursor: pointer; border-radius: var(--r-sm); }
.user-menu button:hover { background: var(--canvas); }
@media (max-width: 900px) {
  .mast-system { display: none; }
  .mast-logo img { height: 26px; }
  .mast-name { display: none; }
  .wrap { padding: 0 16px; }
}

/* ------------------------------------------------------------- səhifə */
.view { padding-top: 18px; padding-bottom: 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 20px; }
.panel > h2 { margin-bottom: 4px; }
.panel > .sub { color: var(--muted); margin: 0 0 16px; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--field-line); border-radius: var(--r-sm); font: inherit; background: var(--paper); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-50); border-color: var(--brand); }
input:disabled, select:disabled, textarea:disabled { background: var(--canvas); color: var(--ink-2); }
.btn { font-family: var(--display); letter-spacing: -0.005em; display: inline-block; text-decoration: none; border: 1px solid var(--field-line); background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: var(--r-sm); cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn.danger { color: var(--deny); border-color: var(--deny-line); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.wide { width: 100%; margin-top: 22px; padding: 11px; }
.btn:disabled { opacity: .55; cursor: wait; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
.form-grid label, .field { font-size: 12px; font-weight: 600; color: var(--ink-2); display: block; }
.form-grid label > input, .form-grid label > select, .form-grid label > textarea { margin-top: 5px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.chk { display: inline-flex; align-items: center; gap: 7px; margin: 4px 16px 4px 0; font-weight: 500; color: var(--ink); font-size: 13px; }
.chk input { width: auto; margin: 0; accent-color: var(--brand); }

/* cədvəl */
.tbl { overflow: auto; max-height: 74vh; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.01em; background: var(--th-bg); position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--brand-50); }
td.r, th.r { text-align: right; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--pass-bg); color: var(--pass); }
.pill.bad { background: var(--deny-bg); color: var(--deny); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.brand { background: var(--brand-50); color: var(--brand-ink); }
.thumb { width: 36px; height: 46px; border-radius: var(--r-sm); object-fit: cover; background: var(--line-2); display: block; }

/* filtr sətri */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.seg { display: inline-flex; border: 1px solid var(--field-line); border-radius: var(--r-sm); overflow: hidden; background: var(--paper); }
.seg button { border: 0; background: none; padding: 8px 13px; font: inherit; cursor: pointer; color: var(--ink-2); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.filters input[type=date] { width: 150px; }
.filters select { width: auto; min-width: 170px; }
.filters input[type=search] { max-width: 320px; }

/* ------------------------------------------------------------- İcmal */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 20px; }
.kpi { padding: 18px 22px; border-right: 1px solid var(--line-2); }
.kpi:last-child { border-right: 0; }
.kpi .k { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.kpi .v { font-family: var(--display); font-size: 36px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi .d .up { color: var(--pass); } .kpi .d .down { color: var(--deny); }
.kpi.alert .v { color: var(--deny); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } .kpi:nth-child(2) { border-right: 0; } .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); } }

.dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.dash-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dash-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1080px) { .dash, .dash-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .dash-2 { grid-template-columns: 1fr; } .user-btn #meName { display: none; } }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--brand-ink); }
.chart .bar.dim { fill: var(--bar-dim); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart g:hover .bar { fill: var(--brand-700); }
.chart .lbl { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--display); }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }

.hbars { display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hb .t, .hb .f { display: block; }
.hb .t { background: var(--line-2); height: 10px; border-radius: 0 4px 4px 0; overflow: hidden; }
.hb .f { height: 100%; background: var(--brand-ink); border-radius: 0 4px 4px 0; }
.hb .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

/* canlı lent - panelin əsas elementi */
.live { padding: 0; overflow: hidden; }
.live-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pass); margin-right: 8px; box-shadow: 0 0 0 3px var(--pass-bg); }
.live-list { max-height: 640px; overflow-y: auto; }
.pass { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; }
.pass:hover { background: var(--brand-50); }
.pass img, .pass .ph { width: 52px; height: 66px; object-fit: cover; border-radius: var(--r-sm); background: var(--line-2); display: block; }
.pass .who { font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.pass .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.pass .when { text-align: right; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pass .when .pill { margin-top: 4px; }
.pass.denied { box-shadow: inset 3px 0 0 var(--deny); }
.pass.fresh { animation: fresh 2.4s ease-out 1; }
@keyframes fresh { from { background: var(--pass-bg); } to { background: transparent; } }

/* ------------------------------------------------------------- şəxs səhifəsi */
.person-head { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .person-head { grid-template-columns: 1fr; } }
.photo-box { width: 100%; aspect-ratio: 3/4; border-radius: var(--r); background: var(--line-2); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: grid; gap: 8px; margin-top: 12px; }
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.dev { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.dev .name { font-weight: 700; } .dev .loc { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.dev .line { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; }
.dev.off { opacity: .55; }
.snaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; }
.snap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 11px; background: var(--paper); }
.snap img { width: 100%; aspect-ratio: 3/5; object-fit: cover; display: block; background: var(--line-2); cursor: zoom-in; }
.snap div { padding: 5px 7px; }
.snap button { width: 100%; border: 0; border-top: 1px solid var(--line); background: var(--th-bg); padding: 6px; cursor: pointer; font-size: 11px; color: var(--brand-ink); font-weight: 600; }
.snap button:hover { background: var(--brand-50); }
.snap button.snap-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; font-size: inherit; }
.snap button.snap-zoom:hover { background: none; }
.readonly-note { background: var(--brand-50); color: var(--brand-ink); padding: 10px 14px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 16px; }

/* ------------------------------------------------------------- modal, tooltip, toast */
.modal { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--paper); border-radius: var(--r); padding: 24px; width: min(640px, 100%); max-height: 92vh; overflow: auto; }
.modal-card h2 { margin-bottom: 10px; }
.cam-wrap { position: relative; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 3/4; max-height: 60vh; margin: 0 auto; }
.cam-wrap video, .cam-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-guide { position: absolute; inset: 0; pointer-events: none; }
.cam-guide::after { content: ""; position: absolute; left: 22%; right: 22%; top: 14%; bottom: 26%; border: 3px dashed rgba(255,255,255,.9); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.3); }
.tip { position: fixed; z-index: 70; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.14); border-radius: var(--r-sm); padding: 8px 10px; font-size: 12px; pointer-events: none; min-width: 140px; }
.tip b { display: block; font-family: var(--display); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.tip .tr { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-2); }
.tip .tr span:last-child { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 80; }
.toast { background: var(--toast-bg); color: var(--toast-fg); padding: 10px 14px; border-radius: var(--r-sm); max-width: 420px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.bad { background: var(--deny-solid); color: #fff; } .toast.ok { background: var(--pass); color: var(--paper); }
.result-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.result-list li { font-size: 12px; padding: 7px 9px; border-radius: var(--r-sm); background: var(--canvas); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.progress { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand-ink); transition: width .4s; }
.roles-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.roles-legend div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-size: 13px; color: var(--ink-2); }
.roles-legend b { display: block; font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
@media (max-width: 900px) { .roles-legend { grid-template-columns: 1fr; } }
/* ---- terminal idarəetməsi */
.note { padding: 10px 12px; border-radius: 6px; font-size: 13px; background: var(--line-2); color: var(--ink-2); margin-top: 10px; }
.note.ok { background: var(--pass-bg); color: var(--pass); }
.note.bad { background: var(--deny-bg); color: var(--deny); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.modal-card.wide { max-width: 860px; width: 94vw; }
.tbl.compact td, .tbl.compact th { padding: 6px 8px; }
.tbl.compact input { padding: 5px 8px; font-size: 13px; min-width: 110px; }

/* ---- operator icazələri */
.perm-grp { margin: 10px 0 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; }
.perm-grp h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.perm-row { display: flex; margin: 4px 0; font-weight: 500; color: var(--ink); }

/* ---- qrup ağacı seçicisi */
.tp { position: relative; display: inline-block; min-width: 220px; max-width: 100%; }
.form-grid .tp, .field .tp { display: block; }
.tp-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.tp-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-btn i { font-style: normal; color: var(--ink-2); font-size: 11px; }
.tp-pop { position: absolute; z-index: 40; left: 0; top: calc(100% + 4px); width: max(100%, 380px); max-width: 92vw; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 8px; }
.tp-pop.inline { position: static; width: auto; max-width: none; box-shadow: none; }
.tp-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.tp-tools .tp-q { flex: 1 1 120px; min-width: 100px; padding: 6px 9px; }
.tp-list { max-height: 300px; overflow: auto; border: 1px solid var(--line-2, var(--line)); border-radius: 6px; padding: 4px 0; }
.tp-row { display: flex; align-items: center; gap: 2px; min-height: 28px; }
.tp-row:hover { background: var(--line-2); }
.tp-tg { width: 22px; height: 22px; flex: none; border: 0; background: none; color: var(--ink-2); cursor: pointer; font-size: 12px; padding: 0; }
.tp-lb { display: flex; align-items: center; gap: 7px; flex: 1; cursor: pointer; padding: 3px 8px 3px 0; font-weight: 400; }
.tp-lb input { margin: 0; width: auto; accent-color: var(--brand); flex: none; }
.tp-lb > span:first-of-type { flex: 1; }
.tp-n { font-size: 12px; }
.field > .tp { margin-top: 5px; }

/* ---- qrup ağacı (Qruplar səhifəsi və redaktə pəncərəsi) */
.gt-cell { display: flex; align-items: center; gap: 2px; }
.gt-ind { flex: none; height: 30px; background: repeating-linear-gradient(90deg, transparent 0 10px, var(--line) 10px 11px, transparent 11px 22px); }
.gt-tg { flex: none; }
.gt-leaf { display: inline-flex; align-items: center; justify-content: center; color: var(--line); cursor: default; }
.gt-path { margin-top: 6px; padding: 8px 10px; background: var(--line-2); border-radius: 6px; font-weight: 500; color: var(--ink); font-size: 13px; line-height: 1.7; }
.gt-path i { font-style: normal; color: var(--ink-2); }
.gt-path span { color: var(--ink-2); }
.gt-kid { cursor: pointer; border: 0; font: inherit; }
.gt-kid:hover { background: var(--brand); color: #fff; }
.gt-bulk { display: block; margin-top: 8px; font-weight: 600; }
.gt-bulk textarea { width: 100%; margin-top: 5px; }

/* ---- davamiyyət nəzarəti */
.mon-sum { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.mon-card { --c: #546e7a; display: flex; flex-direction: column; gap: 2px; min-width: 120px; padding: 10px 14px; border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mon-card b { font-size: 22px; line-height: 1.1; }
.mon-card span { font-size: 13px; font-weight: 600; }
.mon-card small { color: var(--ink-2); font-size: 11px; }
.mon-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.mon-card.on { background: var(--c); color: #fff; }
.mon-card.on small { color: rgba(255,255,255,.85); }
.mon-row td:first-child { border-left: 6px solid var(--c); }
.mon-days { display: inline-block; min-width: 44px; padding: 4px 10px; border-radius: 14px; background: var(--c); color: #fff; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.mon-bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.mon-bar > div { height: 100%; background: var(--c); }
.mon-row { --c: #546e7a; }
.mon-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; color: #fff; font-size: 12px; font-weight: 600; }
.band-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 5px 0; }
.band-row .b-from { width: 80px; }
.band-row .b-color { width: 44px; height: 36px; padding: 2px; flex: none; }
.band-row .b-label { flex: 1 1 140px; min-width: 0; }
@media (max-width: 480px) { .band-row .b-label { flex-basis: 100%; order: 5; } }

/* ---- idxal önizləməsi, qrupsuz sayğac, seçim zolağı */
.imp-warn { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.imp-sec { margin-top: 18px; }
.imp-h { font-size: 15px; margin: 0 0 8px; }
.imp-tree { max-height: 340px; overflow: auto; }
.kpis-sub { margin-top: -8px; grid-template-columns: repeat(2, 1fr); }
.kpis-sub .kpi:nth-child(-n+2) { border-bottom: 0; }
.ungrp-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.ungrp-chip { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.ungrp-chip.on { background: var(--warn-solid); color: #fff; }
.selbar { margin: 0 0 10px; }
.linkbtn { background: none; border: 0; padding: 0; margin-left: 6px; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 700px) {
  #impPreview .kpis, #impPreview .kpis-sub { grid-template-columns: 1fr; }
  #impPreview .kpi { border-right: 0; border-bottom: 1px solid var(--line-2); }
  #impPreview .kpi:last-child { border-bottom: 0; }
  .imp-tree table, #impPreview .tbl table { min-width: 0; }
  .ungrp-note { flex-direction: column; align-items: flex-start; }
}
.ungrp-chip[hidden], .selbar[hidden] { display: none !important; }

/* ---- qrup təmiri */
.rp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 0 0 12px; }
.rp-stat { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.rp-stat b { display: block; font-family: var(--display); font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rp-stat span { font-size: 12px; color: var(--ink-2); }
.rp-stat.hl { border-color: var(--brand); } .rp-stat.hl b { color: var(--brand-ink); }
.rp-stat.warn b { color: var(--warn); } .rp-stat.ok b { color: var(--pass); }
.rp-danger { display: flex; flex-direction: column; gap: 3px; margin: 10px 0; padding: 12px 14px; border: 2px solid var(--deny); border-radius: 8px; background: var(--deny-bg); color: var(--deny); }
.rp-danger b { font-size: 17px; } .rp-danger span { font-size: 13px; }
.rp-impact { margin: 10px 0; }
.rp-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.rp-prev { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.rp-s { max-height: 300px; overflow: auto; }
.rp-h4 { font-size: 14px; margin: 14px 0 6px; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow: auto; }
.rp-lab { font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.rp-job { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rp-inl { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
#dpList { width: 100%; }
.btn.rp-del { background: var(--deny-solid); border-color: var(--deny-solid); color: #fff; }
@media (max-width: 800px) { .rp-two { grid-template-columns: 1fr; } .rp-stats { grid-template-columns: repeat(2, 1fr); } #rpKpis.kpis { grid-template-columns: 1fr 1fr; } }

/* =====================================================================
   Naviqasiya, alətlər, dialoqlar, skeleton, çap (ux qatı)
   ===================================================================== */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -80px; z-index: 300; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; box-shadow: 0 4px 16px var(--shadow); }
.skip-link:focus { top: 8px; }
body:has(#shell.hidden) .skip-link { display: none; }
kbd { font: 600 11px/1 var(--sans); padding: 3px 6px; border: 1px solid var(--field-line); border-bottom-width: 2px; border-radius: 4px; background: var(--paper); color: var(--ink); white-space: nowrap; }
.ic { flex: none; vertical-align: middle; }

/* ikon düymələr + ipucu */
.ibtn { width: 38px; height: 38px; flex: none; display: inline-grid; place-items: center; padding: 0; border-radius: var(--r); border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; cursor: pointer; font: inherit; }
.ibtn:hover { background: rgba(255,255,255,.16); }
.theme-fab { position: absolute; top: 16px; right: 16px; z-index: 2; }
.tooltip { position: fixed; z-index: 200; background: var(--toast-bg); color: var(--toast-fg); font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: var(--r-sm); pointer-events: none; white-space: nowrap; box-shadow: 0 4px 14px var(--shadow); }

/* başlıq: alətlər və istifadəçi */
.user-id { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.me-company { font: 500 11px var(--sans); color: var(--muted); }
.user-menu button kbd { float: right; margin-left: 12px; }
.user-menu button:focus-visible { outline-offset: -2px; }
.nv-burger { display: none; }

/* ---- ierarxik menyu (masaüstü) */
.mast-nav { border-top: 1px solid rgba(255,255,255,.45); padding-top: 0; padding-bottom: 0; position: relative; }
.nv-drawer-head { display: none; }
.nv-list { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nv-i { position: relative; }
.nv-top { position: relative; display: inline-flex; align-items: center; gap: 6px; color: #fff; background: none; border: 0; text-decoration: none; font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -0.005em; padding: 16px 0 14px; white-space: nowrap; cursor: pointer; opacity: .92; }
.nv-top:hover, .nv-top[aria-expanded="true"] { opacity: 1; }
.nv-top .ic { transition: transform .15s; }
.nv-top[aria-expanded="true"] .ic { transform: rotate(180deg); }
.nv-top.active { opacity: 1; }
/* saytdakı kimi: aktiv bəndin üstündə üç nöqtə */
.nv-top.active::before { content: "• • •"; position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font-size: 9px; letter-spacing: 1px; }
.nv-top:focus-visible { outline: 2px solid #fff; outline-offset: 0; border-radius: 3px; }
.nv-sub { position: absolute; left: -14px; top: 100%; min-width: 230px; margin: 0; padding: 6px; list-style: none; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 14px 36px var(--shadow); z-index: 40; }
.nv-link { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.nv-link:hover { background: var(--brand-50); }
.nv-link.active { color: var(--brand-ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand-ink); }
.nv-link:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: -2px; }

/* ---- çörək qırıntısı və bölmə tabları */
.subbar { padding-top: 12px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.subnav { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-top: 10px; scrollbar-width: thin; }
.tab { padding: 9px 14px; margin-bottom: -1px; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; font-family: var(--display); font-weight: 600; }
.tab:hover { color: var(--ink); background: var(--brand-50); }
.tab.active { color: var(--brand-ink); border-bottom-color: var(--brand-ink); }
.tab:focus-visible { outline-offset: -2px; }

/* ---- mobil çekmece */
.nv-scrim { position: fixed; inset: 0; background: var(--overlay); z-index: 55; }
body.nv-lock { overflow: hidden; }
body.nv-lock .masthead { z-index: 60; }
@media (max-width: 800px) {
  .nv-burger { display: inline-grid; }
  .mast-top { gap: 10px; }
  .mast-logo img { height: 26px; }
  .mast-tools { gap: 6px; }
  .user-btn { padding: 6px 8px; gap: 6px; }
  .user-btn .user-id { display: none; }
  .mast-nav.wrap { position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; width: min(330px, 88vw); max-width: none; margin: 0; padding: 0; overflow-y: auto; background: var(--paper); color: var(--ink); border: 0;
    transform: translateX(-104%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; box-shadow: 8px 0 32px var(--shadow); }
  .mast-nav.wrap.open { transform: none; visibility: visible; transition: transform .2s ease; }
  .nv-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--display); font-size: 16px; }
  .nv-drawer-head .ibtn { color: var(--ink); border-color: var(--field-line); }
  .nv-drawer-head .ibtn:hover { background: var(--brand-50); }
  .nv-list { display: block; padding: 6px 0 24px; }
  .nv-i { border-bottom: 1px solid var(--line-2); }
  .nv-top { display: flex; width: 100%; justify-content: space-between; padding: 14px 18px; color: var(--ink); text-align: left; opacity: 1; font-size: 16px; }
  .nv-top.active { color: var(--brand-ink); }
  .nv-top.active::before { display: none; }
  .nv-top:focus-visible { outline-color: var(--brand-ink); outline-offset: -3px; }
  .nv-sub { position: static; min-width: 0; margin: 0; padding: 0 0 8px; border: 0; border-radius: 0; box-shadow: none; background: var(--canvas); }
  .nv-link { padding: 12px 18px 12px 32px; border-radius: 0; white-space: normal; }
  .nv-link.active { box-shadow: inset 4px 0 0 var(--brand-ink); }
  .subnav { margin-left: -4px; }
  .view { padding-top: 14px; }
}

/* ---- dialoqlar (təsdiq, sessiya, axtarış) */
.dlg-scrim { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--overlay); }
.dlg-card { background: var(--paper); color: var(--ink); width: min(460px, 100%); max-height: 92vh; overflow: auto; padding: 24px; border-radius: var(--r); border-top: 4px solid var(--brand-ink); box-shadow: 0 24px 60px var(--shadow); }
.dlg-card.danger { border-top-color: var(--deny); }
.dlg-card h2 { margin-bottom: 8px; }
.dlg-msg { margin: 0 0 18px; color: var(--ink-2); white-space: pre-line; line-height: 1.5; }
.dlg-card label.field { margin-bottom: 12px; }
.dlg-card label.field input { margin-top: 5px; }
.btn.rp-del:hover { filter: brightness(1.08); }
.qs-scrim { place-items: start center; padding-top: 12vh; }
.qs-card { width: min(640px, 100%); background: var(--paper); color: var(--ink); border-radius: 10px; box-shadow: 0 24px 60px var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.qs-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.qs-in:focus-within { box-shadow: inset 0 -2px 0 var(--brand-ink); }
.qs-in input { border: 0; outline: 0; padding: 6px 0; font-size: 16px; background: transparent; flex: 1; min-width: 0; }
.qs-list { max-height: 52vh; overflow: auto; list-style: none; margin: 0; padding: 6px; }
.qs-h { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.qs-it { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r); cursor: pointer; color: var(--ink); }
.qs-it .ic { color: var(--muted); }
.qs-it.sel { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand-ink); }
.qs-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-s { margin-left: auto; padding-left: 12px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.qs-note, .qs-empty { padding: 8px 12px; color: var(--muted); font-size: 13px; }
.qs-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .qs-foot { display: none; } .qs-scrim { padding-top: 8px; } .qs-s { display: none; } }
.kbd-table td:first-child { white-space: nowrap; width: 1%; }

/* ---- skeleton və boş vəziyyət */
@keyframes shim { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.skel { display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--line-2) 25%, var(--line) 37%, var(--line-2) 63%); background-size: 400% 100%; animation: shim 1.4s ease infinite; }
.skel-h { height: 30px; width: min(260px, 70%); margin-bottom: 10px; }
.skel-p { height: 14px; width: min(420px, 90%); margin-bottom: 22px; }
.skel-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.skel-kpis .skel { height: 84px; }
.skel-tbl { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.skel-row { display: flex; gap: 18px; padding: 14px; border-bottom: 1px solid var(--line-2); }
.skel-row:last-child { border-bottom: 0; }
@media (max-width: 600px) { .skel-kpis { grid-template-columns: 1fr 1fr; } .skel-row .skel:nth-child(n+3) { display: none; } }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 16px; color: var(--muted); }
.empty-state .ic { color: var(--field-line); margin-bottom: 4px; }
.empty-state h3 { color: var(--ink); }
.empty-state p { margin: 0 0 8px; max-width: 440px; }
.empty-state .row { justify-content: center; }

/* ---- forma xətaları */
.field-err { color: var(--deny); font-size: 12px; font-weight: 500; margin-top: 4px; }
[aria-invalid="true"] { border-color: var(--deny) !important; }

/* ---- platforma */
.platform { min-height: 100vh; background: var(--canvas); }
.plat-head { background: var(--brand); color: #fff; }
.plat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.plat-title { font-family: var(--display); font-size: 18px; }
.plat-head .muted { color: rgba(255,255,255,.85); }
.plat-user { font-weight: 600; }
.plat-main { padding-top: 24px; padding-bottom: 60px; }
.plat-login { margin: 32px auto; }
.plat-detail td { background: var(--canvas); }
.plat-d h3 { margin: 4px 0 8px; }

/* ---- cədvəl: kiçik ekranda kart görünüşü */
@media (max-width: 600px) {
  .tbl:not(.keep) { max-height: none; overflow: visible; border: 0; background: transparent; }
  .tbl:not(.keep) table, .tbl:not(.keep) tbody, .tbl:not(.keep) tr, .tbl:not(.keep) td { display: block; width: 100%; }
  .tbl:not(.keep) thead { display: none; }
  .tbl:not(.keep) tr { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; padding: 4px 0; }
  .tbl:not(.keep) td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 12px; border: 0; text-align: right; word-break: break-word; }
  .tbl:not(.keep) td::before { content: attr(data-label); flex: none; max-width: 42%; text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; }
  .tbl:not(.keep) td[data-label=""] { justify-content: flex-start; }
  .tbl:not(.keep) td input[type=checkbox] { width: auto; }
  .tbl:not(.keep) td[data-label=""]::before { display: none; }
  .tbl:not(.keep) td.span-all { display: block; text-align: center; }
  .tbl:not(.keep) td.span-all::before { display: none; }
  .tbl:not(.keep) td > .muted:only-child { margin-left: auto; }
  .tbl:not(.keep) tr.mon-row { border-left: 6px solid var(--c); }
  .tbl:not(.keep) tr.mon-row td:first-child { border-left: 0; }
  .tbl:not(.keep).compact input { min-width: 0; width: 100%; }
}

/* ---- çap */
@media print {
  :root, :root[data-theme="dark"] { color-scheme: light; --paper: #fff; --canvas: #fff; --ink: #000; --ink-2: #222; --muted: #444; --line: #bbb; --line-2: #ddd; --th-bg: #eee; --brand-ink: #000; --brand-50: #f0f0f0; --pass: #0a5; --deny: #b00; --warn: #860; }
  html, body { background: #fff; color: #000; }
  .masthead, .subbar, .nv-scrim, .toasts, .tooltip, .tip, .pager, .btn, .ibtn, .skip-link, .filters, .modal, .dlg-scrim { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .view { padding: 0; }
  .tbl, .tbl:not(.keep) { max-height: none !important; overflow: visible; border: 1px solid #bbb; }
  th { position: static; box-shadow: none; }
  tr, .panel, .kpi { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .panel { border: 1px solid #bbb; }
}

/* ---- video / ANPR (vision.js) və platforma əlavələri */
.nowrap { flex-wrap: nowrap; }
.btn.is-off { opacity: .55; cursor: not-allowed; }
.btn.is-off:hover { border-color: var(--field-line); }
.btn.primary.is-off:hover { background: var(--brand); border-color: var(--brand); }
.vhint { font-size: 12px; margin: 10px 0 0; }
.verr { color: var(--deny); font-size: 12px; }
.vtabs { margin: 0 0 18px; }
.vtabs .tab { display: inline-flex; align-items: center; gap: 6px; }
.vbadge { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.vbadge.bad { background: var(--deny-bg); color: var(--deny); }
.plate { display: inline-block; font-family: var(--display); font-weight: 800; letter-spacing: .08em; font-size: 15px; padding: 2px 9px; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.plate-raw { display: block; font-size: 11px; margin-top: 2px; }
.vthumb { width: 76px; height: 48px; object-fit: cover; border-radius: var(--r-sm); background: var(--line-2); display: block; cursor: zoom-in; }
.vthumb.vno { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); cursor: default; text-align: center; line-height: 1.1; }
.vsnap { position: relative; display: block; width: 112px; height: 64px; }
.vsnap .vthumb { position: absolute; inset: 0; width: 112px; height: 64px; cursor: pointer; }
.vsnap .vthumb.vno { z-index: 0; }
.vsnap .vsnapimg { z-index: 1; background: transparent; }
.vbig { width: 100%; max-width: 360px; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: var(--line-2); border-radius: var(--r); display: block; }
.vlive { width: 100%; max-height: 360px; object-fit: contain; background: var(--line-2); border-radius: var(--r); display: block; min-height: 120px; }
.vconf { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.vfeed { max-height: 70vh; }
.vrow { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.vrow.denied { box-shadow: inset 3px 0 0 var(--deny); }
.vrow.fresh { animation: fresh 2.4s ease-out 1; }
.vmain { min-width: 0; }
.vmeta { font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.vact { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; font-size: 12px; }
.vchip { text-decoration: none; }
.vkpis { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; }
.vkpi { padding: 12px 16px; border-right: 1px solid var(--line-2); }
.vkpi:last-child { border-right: 0; }
.vkpi b { display: block; font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vkpi span { font-size: 12px; color: var(--ink-2); }
.vkpi.bad b { color: var(--deny); }
.vsum { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.vrev { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 18px; align-items: start; }
.vrevf { margin: 12px 0; }
.vwin { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.vdays { display: flex; flex-wrap: wrap; flex: 1 1 100%; }
.vsched { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin: 0; }
.vsched legend { font-weight: 600; font-size: 12px; padding: 0 6px; color: var(--ink-2); }
.vadv summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.vadv textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.vhelp { display: block; font-size: 12px; font-weight: 400; margin-top: 3px; }
.vdef { white-space: nowrap; }
.vevd { display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: 18px; }
.vdl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.vdl dt { color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 2px; }
.vdl dd { margin: 0; overflow-wrap: anywhere; }
.vchtbl { max-height: 60vh; }
.snippet { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; margin: 0 0 8px; max-height: 240px; }
.secret-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.secret-l { flex: 0 0 130px; font-size: 12px; font-weight: 600; color: var(--muted); }
.secret-v { flex: 1 1 200px; min-width: 0; padding: 7px 10px; background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-sm); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.pm { display: inline-block; width: 54px; height: 6px; margin-left: 8px; border-radius: 3px; background: var(--line); overflow: hidden; vertical-align: middle; }
.pm i { display: block; height: 100%; background: var(--brand); }
.pm.hot i { background: var(--deny); }
.plat-tabs { margin: 0 0 18px; }
.plat-tabs .tab { background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; font-size: 14px; }
.plat-tabs .tab.active { border-bottom-color: var(--brand-ink); }
.plat-usage { margin-bottom: 12px; }
.plat-unl { white-space: nowrap; margin: 0; }
.aud-d { max-width: 360px; overflow-wrap: anywhere; font-size: 12px; color: var(--ink-2); }
@media (max-width: 900px) { .vkpis { grid-template-columns: repeat(3, 1fr); } .vkpi:nth-child(3n) { border-right: 0; } .vkpi { border-bottom: 1px solid var(--line-2); } }
@media (max-width: 600px) {
  .vkpis { grid-template-columns: repeat(2, 1fr); } .vkpi:nth-child(3n) { border-right: 1px solid var(--line-2); } .vkpi:nth-child(2n) { border-right: 0; }
  .vrow { grid-template-columns: 64px 1fr; padding: 10px 12px; } .vrow .vthumb { width: 64px; } .vact { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
  .vrev, .vevd { grid-template-columns: 1fr; } .vbig { max-width: none; }
  .secret-l { flex-basis: 100%; }
  .vsnap, .vsnap .vthumb { width: 88px; height: 50px; }
  .tbl:not(.keep) td .vthumb { margin-left: auto; }
}
.vlink { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.plate { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.vmain { overflow: hidden; }
@media (max-width: 600px) { .tbl:not(.keep) tr.plat-detail td { display: block; text-align: left; } .plat-detail .form-grid label { text-align: left; } }

/* ---- əlavə funksiyalar: davamiyyət, ziyarətçi, bildiriş, zona, qapı (feat*.js) */
.fx-body { min-width: 0; }
.fx-bar { margin-bottom: 14px; gap: 12px; align-items: center; }
.fx-bar > p { margin: 0; max-width: 62ch; }
.fx-filters { padding: 16px 20px; }
.fx-fgrid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 12px 0; }
.fx-presets { margin-bottom: 4px; }
.fx-legend { font-size: 12px; max-width: 46ch; text-align: right; }
.fx-per { margin: 6px 0 14px; font-size: 13px; }
.fx-cnt { font-size: 13px; font-weight: 500; margin-left: 6px; }
.fx-loading { padding: 18px 0; }
.fx-hint { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.fx-h3 { font-size: 14px; margin: 16px 0 6px; }
.fx-bad { color: var(--deny); } .fx-warn { color: var(--warn); }
.fx-tag { background: var(--line-2); color: var(--ink-2); font-weight: 500; }
.fx-live { font-size: 12px; }
.fx-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.fx-inline { align-items: flex-end; gap: 10px; }
.fx-inline label { margin: 0; }
.fx-pp-inline { min-width: 240px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.fx-params { font-size: 13px; color: var(--ink-2); }
.fx-params-box { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.fx-chs, .fx-devs, .fx-modes, .fx-wdpick { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-top: 6px; }
.fx-devtbl { max-height: 280px; margin-top: 6px; }
.fx-devtbl td label { font-weight: 500; color: var(--ink); font-size: 13px; }
.fx-devtbl input[type=checkbox] { width: auto; }
.fx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 8px; }
.fx-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-left: 5px solid var(--field-line); border-radius: var(--r); background: var(--paper); }
.fx-kpi.ok { border-left-color: var(--pass); } .fx-kpi.warn { border-left-color: var(--warn); } .fx-kpi.bad { border-left-color: var(--deny); }
.fx-kv { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--ink); }
.fx-kl { font-size: 12px; color: var(--muted); }
.att-row { --c: transparent; }
.att-row > td:first-child { box-shadow: inset 4px 0 0 var(--c); }
.att-row.st-absent { --c: var(--deny); } .att-row.st-late { --c: var(--warn); } .att-row.st-ok { --c: var(--pass); }
.att-row.st-holiday, .att-row.st-leave { --c: var(--brand-ink); } .att-row.st-pending { --c: var(--field-line); }
.fx-key { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.fx-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; background: var(--c, var(--field-line)); }
.fx-sw:first-child { margin-left: 0; }
.fx-sw.st-absent { --c: var(--deny); } .fx-sw.st-late { --c: var(--warn); } .fx-sw.st-holiday, .fx-sw.st-leave { --c: var(--brand-ink); } .fx-sw.st-pending { --c: var(--field-line); }
.fx-wds { display: inline-flex; gap: 3px; }
.fx-wd { min-width: 24px; padding-left: 4px; padding-right: 4px; text-align: center; font-size: 11px; font-weight: 600; padding: 2px 0; border-radius: 4px; background: var(--line-2); color: var(--muted); }
.fx-wd.on { background: var(--brand-50); color: var(--brand-ink); }
.fx-prev { display: grid; gap: 10px; margin-top: 12px; }
.fx-pv { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--canvas); }
.fx-pv pre, .fx-det pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 13px; color: var(--ink-2); }
.fx-det summary { cursor: pointer; }
.fx-kvs { display: grid; gap: 4px; }
.fx-kv2 { display: grid; grid-template-columns: 130px 1fr; gap: 10px; font-size: 13px; }
.fx-photo-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; align-items: flex-start; }
.fx-photo { width: 120px; height: 160px; border: 1px dashed var(--field-line); border-radius: var(--r); background: var(--canvas); display: grid; place-items: center; overflow: hidden; font-size: 12px; text-align: center; }
.fx-photo img { width: 100%; height: 100%; object-fit: cover; }
.fx-photo-act { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fx-photo-act label.btn { margin: 0; }
.fx-stgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--canvas); margin-bottom: 12px; }
.fx-stgrid > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.fx-revert { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.fx-st { margin: 10px 0; }
/* şəxs seçici */
.pp { position: relative; }
.pp-list { position: absolute; z-index: 45; left: 0; right: 0; top: calc(100% + 2px); max-height: 240px; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 8px 24px var(--shadow); }
.pp-it { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.pp-it:hover, .pp-it:focus-visible { background: var(--brand-50); }
.pp-msg { padding: 8px 10px; font-size: 12px; }
.pp-sel { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pp-chip { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--line-2); font-size: 13px; font-weight: 500; color: var(--ink); }
@media (max-width: 800px) {
  .fx-legend { text-align: left; }
  .fx-kpis { grid-template-columns: repeat(2, 1fr); }
  .tbl:not(.keep) tr.att-row { border-left: 6px solid var(--c); }
  .tbl:not(.keep) tr.att-row > td:first-child { box-shadow: none; }
  .fx-kv2 { grid-template-columns: 1fr; gap: 0; }
  .fx-pp-inline { min-width: 0; width: 100%; }
}

.fx-body td.num { white-space: nowrap; }
.form-grid .field > .pp, .form-grid .field > .tp-host, .form-grid .field > .tp { margin-top: 5px; }
.fx-act { flex-wrap: nowrap; }
.subnav + .note { margin: 12px 0 14px; }
.fx-stgrid .pill { align-self: flex-start; }

/* ---- platforma: maliyyə kartları (məbləğ sığsın) */
.rp-stats.plat-usage { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.rp-stat.bad b { color: var(--deny); }
.plat-main .num.err, .modal-card .err b, b.err { color: var(--deny); }

/* ---- iş təqvimi */
.cal-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 10px; }
.cal-m h3 { margin: 0 0 6px; font-size: 14px; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-h { display: contents; } .cal-h i { font-style: normal; font-size: 10px; text-align: center; color: var(--muted, #666); }
.cal-d { border: 1px solid var(--line, #ddd); background: transparent; border-radius: 6px; padding: 5px 0; font-size: 12px; cursor: pointer; color: inherit; min-width: 0; }
.cal-d.t-weekend { background: #eceff1; color: #546e7a; } .cal-d.t-holiday { background: #c62828; color: #fff; border-color: #c62828; }
.cal-d.t-swap { background: #2e7d32; color: #fff; border-color: #2e7d32; } .cal-d.today { outline: 2px solid var(--brand); outline-offset: 1px; }
.cal-leg { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; font-size: 12px; } .cal-leg span { display: inline-flex; align-items: center; gap: 6px; }
.cal-leg .cal-d { display: inline-block; width: 16px; height: 16px; padding: 0; cursor: default; }

/* ---- dil seçimi */
.lang-sel { height: 34px; border: 1px solid var(--line, #ddd); border-radius: 8px; background: var(--surface, transparent); color: inherit; font-size: 12px; font-weight: 600; padding: 0 6px; cursor: pointer; }
.mast-tools .lang-sel { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.mast-tools .lang-sel option { color: #111; }
.login-langrow { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #e3e3e8); }
.login-langrow .lang-sel { flex: 1; width: auto; min-width: 0; max-width: none; }

/* müəllif hüquqları (ITCOM.az) */
.copyright { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.copyright a { color: inherit; font-weight: 600; text-decoration: none; }
.copyright a:hover { text-decoration: underline; }
.login-copy { position: absolute; left: 0; right: 0; bottom: 14px; padding: 0 16px; color: rgba(255,255,255,.6); }
.app-footer { padding: 28px 24px 22px; margin-top: 24px; border-top: 1px solid var(--line, #e3e3e8); }
@media (max-width: 820px) { .login-copy { position: static; grid-column: 1 / -1; padding: 0 16px 20px; } }
@media print { .app-footer, .login-copy { display: none; } }

/* sistem haqqında / əlaqə */
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.about p { margin: 0 0 10px; line-height: 1.55; }
.about h3 { font-size: 15px; margin: 18px 0 8px; }
.about-lead { font-size: 15px; }
.about-contact { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.about-contact dt { color: var(--muted); font-weight: 600; }
.about-contact dd { margin: 0; }
.about-contact a { font-weight: 600; }
.about-list { margin: 0 0 10px; padding-left: 20px; line-height: 1.55; }
