:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #1e3a8a;
  --primary-2: #2748b0;
  --primary-soft: #e8edfb;
  --accent: #f59e0b;
  --green: #059669;
  --green-soft: #e6f6f0;
  --red: #dc2626;
  --red-soft: #fdecec;
  --amber-soft: #fef5e4;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .05);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--text); background: var(--bg); }
.hidden { display: none !important; }
a { color: var(--primary-2); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

/* ───── Kirish ───── */
.login {
  min-height: 100%; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 10% -10%, #2748b0 0%, transparent 60%),
              radial-gradient(900px 500px at 110% 110%, #b45309 0%, transparent 55%), #0f1d4a;
}
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border-radius: 18px;
  padding: 28px; display: grid; gap: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-lg { margin-bottom: 8px; }
.logo {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
  background: var(--primary); color: #fbbf24;
}
.brand-title { font-weight: 700; font-size: 16px; }
.brand-sub { color: var(--muted); font-size: 12px; }

/* ───── Joylashuv ───── */
.layout { display: flex; min-height: 100%; }
.sidebar {
  width: 250px; flex: none; background: #0f1d4a; color: #cbd5e1;
  display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand-title { color: #fff; }
.sidebar .brand-sub { color: #94a3b8; }
.sidebar .brand { padding: 0 8px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
nav { display: grid; gap: 2px; margin-top: 14px; }
nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: #cbd5e1; text-decoration: none; font-weight: 500;
}
nav a span { width: 18px; text-align: center; opacity: .8; }
nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
nav a.active { background: var(--primary-2); color: #fff; }
.sidebar-foot { margin-top: auto; display: grid; gap: 6px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-foot .me { color: #fff; font-weight: 600; margin-bottom: 4px; }
.sidebar-foot .btn { color: #cbd5e1; justify-content: flex-start; }
.sidebar-foot .btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 24px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 18px; flex: 1; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; }
#menuToggle { display: none; }
.view { padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
.view > *, .grid-2 > * { min-width: 0; }

/* ───── Komponentlar ───── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 4px; }
.stat .hint { color: var(--muted); font-size: 12px; }
.stat.green .value { color: var(--green); }
.stat.red .value { color: var(--red); }
.stat.blue .value { color: var(--primary-2); }
.stat.amber .value { color: #b45309; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }

.bar-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 70px; gap: 12px; align-items: center; padding: 8px 18px; }
.bar { height: 8px; border-radius: 99px; background: var(--primary-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary-2); border-radius: 99px; }
.bar-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }

.feed { max-height: 520px; overflow: auto; }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-time { font-variant-numeric: tabular-nums; font-weight: 600; width: 48px; }
.feed-name { flex: 1; min-width: 0; }
.feed-name .sub { color: var(--muted); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 13px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.toolbar .spacer { flex: 1; }
label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 11px; min-width: 0; outline: none;
}
input:focus, select:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.toolbar input[type=search] { min-width: 220px; }

.btn {
  font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.icon { padding: 6px 10px; }
.btn.block { width: 100%; padding: 11px; }
.btn:disabled { opacity: .6; cursor: default; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap { white-space: normal; }
tr.clickable { cursor: pointer; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--primary-soft); color: var(--primary-2); }
.badge.amber { background: var(--amber-soft); color: #b45309; }
.badge.gray { background: #eef1f5; color: var(--muted); }

.muted { color: var(--muted); }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; color: var(--muted); }
.error { color: var(--red); font-size: 13px; min-height: 1em; }
code, .code { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--border); padding: 2px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

/* ───── Modal ───── */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-card { background: var(--surface); border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal-card.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.modal-head h2 { font-size: 16px; }
.form { display: grid; gap: 14px; padding: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }

.toast { position: fixed; bottom: 20px; right: 20px; background: #0f172a; color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 60; box-shadow: var(--shadow); max-width: calc(100vw - 40px); }
.toast.err { background: var(--red); }

/* ───── Mobil ───── */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  #menuToggle { display: inline-flex; }
  .view { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .clock { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .toolbar input[type=search] { min-width: 0; width: 100%; }
  .toolbar > * { flex: 1 1 140px; min-width: 0; }
  .toolbar select, .toolbar input { width: 100%; }
  .stat .value { font-size: 24px; }
}

/* ───── v3: turi almashtirgich, rasm, sinxronlash ───── */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 7px 16px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--primary); color: #fff; }
.person-head { display: flex; gap: 16px; align-items: flex-start; }
.face-col { display: grid; gap: 8px; justify-items: center; }
.face-box { width: 132px; height: 170px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 12px; text-align: center; }
.face-box.sm { width: 72px; height: 92px; font-size: 18px; font-weight: 700; }
.face-box img { width: 100%; height: 100%; object-fit: cover; }
.face-preview-note { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sync-box { border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.sync-box.ok { background: var(--green-soft); color: #065f46; }
.sync-box.warn { background: var(--amber-soft); color: #92400e; }
.sync-list { margin-top: 6px; display: grid; gap: 2px; max-height: 180px; overflow: auto; }
.err-text { color: var(--red); }
@media (max-width: 760px) {
  .person-head { flex-direction: column; align-items: center; }
  .person-head > div:last-child { width: 100%; }
}
.form { grid-template-columns: minmax(0, 1fr); }
.form-actions { flex-wrap: wrap; }
@media (max-width: 760px) {
  .form-actions .btn { flex: 1 1 auto; }
  .form-actions .btn.danger { margin-right: 0 !important; }
}

/* ===== TSUULL DAVOMAT V3 FINAL ===== */
:root{--navy:#063c7a;--blue:#0877f9;--bg:#f2f7fd;--ink:#08285c;--line:#dce9f7;--green:#08b879;--red:#ff3b38;--violet:#8a2be2}
body{background:var(--bg);color:var(--ink)}.layout{min-height:100vh}.sidebar{width:270px;flex:0 0 270px;background:linear-gradient(155deg,#1266c5 0%,#07509d 45%,#07376d 100%);color:white;padding:18px 15px;box-shadow:none;position:relative;overflow:hidden}.sidebar:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at -10% 65%,rgba(255,255,255,.08),transparent 35%),linear-gradient(135deg,rgba(255,255,255,.08),transparent 30%);pointer-events:none}.sidebar>*{position:relative;z-index:1}.uni-brand{text-align:center;padding:0 4px 15px;border-bottom:1px solid rgba(255,255,255,.18)}.uni-brand img{width:86px;height:86px;object-fit:contain;display:block;margin:0 auto 7px}.uni-brand b{display:block;font-size:12px;line-height:1.45;color:#fff}.uni-brand>span{display:none}.sidebar nav{margin-top:10px;gap:4px}.sidebar nav a{color:#fff;border-radius:10px;padding:11px 13px;font-size:14px;font-weight:600}.sidebar nav a span{width:25px;font-size:18px}.sidebar nav a:hover{background:rgba(255,255,255,.10)}.sidebar nav a.active{background:linear-gradient(135deg,#0b83ff,#076af0);box-shadow:0 7px 18px rgba(0,43,120,.25)}.sidebar-foot{margin-top:auto;padding:16px 7px 0;border-top:1px solid rgba(255,255,255,.18)}.admin-row{display:flex;gap:10px;align-items:center;margin-bottom:12px}.admin-avatar{width:42px;height:42px;border-radius:50%;background:#fff;color:#4f75a5;display:grid;place-items:center;font-size:20px}.admin-row b,.admin-row span{display:block}.admin-row span{font-size:12px;color:#d7e9ff;margin-top:2px}.sidebar-foot .btn{width:100%;justify-content:flex-start;color:#fff;background:rgba(255,255,255,.09);border:0;margin-top:7px}.main{background:linear-gradient(180deg,#f8fbff,#eef6fd);min-width:0}.topbar{min-height:120px;padding:18px 28px;background:linear-gradient(120deg,#fff 0%,#eef7ff 65%,#f7fbff 100%);border-bottom:1px solid var(--line);position:relative;overflow:hidden}.topbar:after{content:"";position:absolute;left:260px;right:0;bottom:-36px;height:95px;background:linear-gradient(165deg,transparent 25%,rgba(91,159,242,.10) 26%,rgba(91,159,242,.10) 48%,transparent 49%);pointer-events:none}.page-brand{margin-right:auto;z-index:1}.page-brand h1{font-size:34px;line-height:1;margin:0 0 9px;color:#092d67}.page-brand>span:not(.sr-only){font-size:15px;color:#5678a6}.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.top-status{z-index:1;display:flex;align-items:center;gap:7px;font-weight:600;margin-left:12px}.live-dot{width:10px;height:10px;border-radius:50%;background:#0bbb7d;box-shadow:0 0 0 5px rgba(11,187,125,.09)}.clock{z-index:1;font-weight:700;background:rgba(255,255,255,.7);border:1px solid #e3eef9;border-radius:12px;padding:10px 13px}.view{padding:14px;gap:14px}.kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.kpi{background:#fff;border:1px solid #e4eef9;border-radius:12px;padding:14px;display:flex;gap:11px;align-items:center;min-width:0;box-shadow:0 4px 16px rgba(31,83,140,.05)}.kpi-icon{width:48px;height:48px;border-radius:11px;display:grid;place-items:center;font-style:normal;font-size:23px;flex:0 0 auto}.kpi-icon.blue{background:#e9f4ff;color:#0877f9}.kpi-icon.green{background:#e8faf4;color:#08ae76}.kpi-icon.violet{background:#f4eaff;color:#8a2be2}.kpi-icon.red{background:#fff0ef;color:#ff3b38}.kpi-icon.slate{background:#edf2fa;color:#60799d}.kpi span,.kpi small{display:block}.kpi span{font-size:12px;color:#193c6e}.kpi strong{display:block;font-size:25px;color:#08285c;margin:3px 0;white-space:nowrap}.kpi small{font-size:10px;color:#6e89ae}.dash-card{background:#fff;border:1px solid #e2edf8;border-radius:13px;box-shadow:0 4px 18px rgba(31,83,140,.05);overflow:hidden}.section-head{display:flex;align-items:center;gap:10px;padding:11px 14px}.section-head h3{font-size:16px;margin:0;color:#092e68}.section-head .muted{margin-left:auto;font-size:11px}.soft-btn{margin-left:auto;padding:7px 11px;border:1px solid #d7e8fb;border-radius:9px;color:#0874e8;font-size:12px;background:#fff}.device-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:0 14px 14px}.device-tile{border:1px solid #d9e8f8;border-radius:10px;min-width:0;padding:11px;display:flex;align-items:center;gap:14px;background:linear-gradient(180deg,#fff,#fbfdff)}.terminal-art{width:48px;height:92px;background:linear-gradient(90deg,#121212,#333,#101010);border-radius:5px;position:relative;flex:0 0 48px;box-shadow:0 3px 8px rgba(0,0,0,.18)}.terminal-screen{position:absolute;left:7px;right:7px;top:17px;height:44px;background:linear-gradient(160deg,#243d6c,#7296d4);display:grid;place-items:center;color:white;border-radius:2px}.terminal-home{position:absolute;width:7px;height:7px;border:1px solid #aaa;border-radius:2px;bottom:7px;left:20px}.device-copy{min-width:0}.device-copy b,.device-copy span,.device-copy em{display:block}.device-copy b{font-size:14px;margin-bottom:5px}.device-copy span{font-size:11px;color:#5879a6;line-height:1.45;overflow:hidden;text-overflow:ellipsis}.device-copy em{font-size:11px;font-style:normal;margin-top:5px;width:max-content;padding:3px 7px;border-radius:10px}.device-copy .on{color:#079a68;background:#e5faf2}.device-copy .off{color:#ff3535;background:#fff0ef}.dash-bottom{display:grid;grid-template-columns:1.55fr .75fr;gap:12px}.inside-card table{font-size:12px}.inside-card th{background:#f5f9fe}.person-cell{display:flex;align-items:center;gap:8px}.mini-avatar{width:28px;height:28px;border-radius:50%;background:#eaf3ff;display:grid;place-items:center;font-size:10px;font-weight:700}.badge.violet{background:#f3eaff;color:#7e22ce}.unit-bars{padding:4px 14px 16px}.unit-row{display:grid;grid-template-columns:130px 1fr 38px;align-items:center;gap:9px;margin:12px 0;font-size:11px}.unit-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.unit-track{height:8px;border-radius:10px;background:#eaf1f8;overflow:hidden}.unit-track i{display:block;height:100%;background:linear-gradient(90deg,#0b79f6,#43a2ff);border-radius:10px}.dash-loading{padding:60px;text-align:center;color:#6782a7}.card{border-color:#dce9f7;border-radius:12px;box-shadow:0 4px 16px rgba(31,83,140,.05)}
@media(max-width:1250px){.kpi-grid{grid-template-columns:repeat(3,1fr)}.device-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:800px){.sidebar{width:270px}.topbar{min-height:80px;padding:14px}.page-brand h1{font-size:25px}.top-status{display:none}.kpi-grid{grid-template-columns:repeat(2,1fr)}.device-grid{grid-template-columns:1fr}.dash-bottom{grid-template-columns:1fr}.view{padding:10px}}@media(max-width:480px){.kpi-grid{grid-template-columns:1fr}}

/* ===== TSUULL DAVOMAT V4 DARK — approved layout ===== */
:root{--bg:#0b1220;--surface:#121b2d;--surface-2:#172238;--border:#26344d;--text:#edf5ff;--muted:#8fa4c3;--primary:#1688ff;--primary-2:#4da8ff;--primary-soft:#102e53;--green:#12d697;--green-soft:#12382f;--red:#ff3d4f;--red-soft:#3a1d29;--amber:#f7b84b;--shadow:0 10px 30px rgba(0,0,0,.18);--ink:#edf5ff;--line:#26344d;--navy:#0a315f;--blue:#1688ff;--violet:#a855f7}
body{background:#080e19;color:var(--text)}.main{background:radial-gradient(circle at 75% -10%,#142744 0,transparent 30%),linear-gradient(180deg,#0a1220,#0b1424 70%,#09111f);color:var(--text)}
.sidebar{width:238px;flex:0 0 238px;background:radial-gradient(circle at 20% 45%,#123e73 0,transparent 35%),linear-gradient(180deg,#0d2544,#0a1b33 62%,#0b1d37);padding:16px 12px;border-right:1px solid #20324c}.sidebar:before{background:linear-gradient(145deg,rgba(34,139,255,.12),transparent 35%,rgba(27,115,210,.08) 70%,transparent)}.uni-brand img{width:72px;height:72px}.uni-brand b{font-size:11px}.sidebar nav a{font-size:13px;font-weight:500;padding:11px 12px;color:#eef6ff}.sidebar nav a.active{background:linear-gradient(135deg,#087dff,#0863dd);box-shadow:0 8px 22px rgba(0,94,255,.22)}.sidebar-foot .btn{background:#132d50;color:#eaf4ff}.admin-avatar{background:#f6f9ff;color:#153c6c}
.topbar{min-height:98px;padding:18px 28px;background:transparent;border-bottom:1px solid #1c2b42}.topbar:after{display:none}.page-brand h1{font-size:36px;color:#f5f8ff}.page-brand>span:not(.sr-only){color:#8298b8}.top-status{color:#e8f3ff}.clock{background:#111d31;border-color:#263853;color:#f4f8ff}.view{padding:14px 28px 24px;gap:14px}
.kpi-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.kpi,.dash-card,.card{background:linear-gradient(145deg,#121d31,#101a2b);border:1px solid #24344e;box-shadow:0 8px 22px rgba(0,0,0,.12);color:#edf5ff}.kpi{border-radius:10px;padding:13px}.kpi span{color:#dce8f7}.kpi strong{color:#f6f9ff}.kpi small{color:#8ca3c2}.kpi-icon{width:48px;height:48px}.kpi-icon svg,.section-head h3 svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.kpi-icon.blue{background:#123c72;color:#2c94ff}.kpi-icon.green{background:#0d4b3d;color:#14e0a0}.kpi-icon.violet{background:#3a2359;color:#b466ff}.kpi-icon.red{background:#542331;color:#ff6572}.kpi-icon.slate{background:#1c2d48;color:#b5cae8}
.top-tables{display:grid;grid-template-columns:1fr 1fr;gap:12px}.section-head{padding:10px 14px;border-bottom:1px solid #22324a}.section-head h3{color:#f3f7fd;display:flex;align-items:center;gap:8px}.section-head h3 svg{width:20px;height:20px;color:#27a0ff}.section-head h3.exit-title svg{color:#ff4255}.soft-btn{background:#0e1b2d;border-color:#245c94;color:#4ba8ff}.muted{color:#8da3c0}table{color:#dbe7f6}th{background:#17243a;color:#91a7c6;border-bottom-color:#273952}td{border-bottom-color:#203047}tbody tr:hover{background:#16233a}.mini-avatar{background:#e9f1fb;color:#153f70}.badge.blue{background:#123b70;color:#55adff}.badge.violet{background:#3a2257;color:#c47aff}.badge.green{background:#113c32;color:#26dfa6}.empty{color:#849ab9}
.charts-row{display:grid;grid-template-columns:1.2fr 1fr;gap:12px}.chart-card,.faculty-chart{min-height:225px}.line-chart{padding:4px 18px 12px;height:185px}.chart-legend{font-size:11px;color:#91a7c5;text-align:center;margin:4px 0 2px}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin:0 5px 0 12px}.blue-dot{background:#1688ff}.red-dot{background:#ff3448}.line-chart svg{width:100%;height:125px;overflow:visible}.grid-lines path{stroke:#25354d;stroke-width:.4;fill:none}.line{fill:none;stroke-width:1.7;vector-effect:non-scaling-stroke}.in-line{stroke:#1688ff}.out-line{stroke:#ff3448}.xlabels{display:flex;justify-content:space-between;color:#7188a9;font-size:10px}.vbars{height:165px;padding:15px 18px 8px;display:flex;align-items:flex-end;gap:14px;border-top:0}.vbar-item{height:100%;flex:1;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}.vbar-item i{display:block;width:60%;max-width:54px;background:linear-gradient(180deg,#1688ff,#0769dc);border-radius:5px 5px 1px 1px;box-shadow:0 0 18px rgba(22,136,255,.12)}.vbar-item b{font-size:10px;color:#dce8f7}.vbar-item span{width:100%;font-size:9px;color:#8096b6;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.device-section{margin-top:0}.device-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;padding:10px 12px 12px}.device-tile{background:#111d30;border-color:#263a57;border-radius:8px;padding:9px;gap:9px}.terminal-art{width:42px;height:76px;flex-basis:42px}.terminal-screen{height:36px;top:14px}.terminal-home{left:17px}.device-copy b{color:#f0f6ff;font-size:12px}.device-copy span{color:#7f99bc;font-size:10px}.device-copy .off{background:#45202b;color:#ff5260}.device-copy .on{background:#123d32;color:#25dfa6}
.login-card,.modal-card,.modal-head{background:#111c2e;color:#edf5ff;border-color:#273850}input,select,textarea{background:#0d1727!important;color:#edf5ff!important;border-color:#2b3c55!important}.toolbar,.pager{color:#dce8f7}
@media(max-width:1400px){.device-grid{grid-template-columns:repeat(4,1fr)}}@media(max-width:1150px){.kpi-grid{grid-template-columns:repeat(3,1fr)}.top-tables,.charts-row{grid-template-columns:1fr}.device-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:760px){.view{padding:10px}.kpi-grid{grid-template-columns:repeat(2,1fr)}.device-grid{grid-template-columns:1fr}.top-tables,.charts-row{grid-template-columns:1fr}}
.nav-ico{width:25px!important;height:25px;display:grid;place-items:center}.nav-ico svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* ===== V4 SIDEBAR FIX ===== */
html, body {
  min-height: 100%;
  background: #07111f !important;
}

.layout {
  min-height: 100vh !important;
}

.sidebar {
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  background:
    radial-gradient(circle at 20% 12%, rgba(30,136,255,.20), transparent 30%),
    linear-gradient(180deg,#102d50 0%,#0b2340 48%,#081b32 100%) !important;
}

.main {
  margin-left: 258px !important;
  min-height: 100vh !important;
}

.sidebar .brand img,
.sidebar .brand-logo,
.sidebar img.logo {
  display: block !important;
  width: 92px !important;
  height: 92px !important;
  object-fit: contain !important;
  margin: 4px auto 12px !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}

.sidebar .sidebar-foot {
  margin-top: auto !important;
}


/* ===== GOLD LOGO PATCH ===== */
.sidebar .brand img,
.sidebar .brand-logo,
.sidebar img.logo {
    opacity: 1 !important;
    visibility: visible !important;
    filter:
        sepia(1)
        saturate(5)
        hue-rotate(355deg)
        brightness(1.35)
        contrast(1.15)
        drop-shadow(0 0 8px rgba(255, 196, 70, .35)) !important;
}


/* ===== GOLD LOGO PATCH ===== */
.sidebar .brand img,
.sidebar .brand-logo,
.sidebar img.logo {
    opacity: 1 !important;
    visibility: visible !important;
    filter:
        sepia(1)
        saturate(5)
        hue-rotate(355deg)
        brightness(1.35)
        contrast(1.15)
        drop-shadow(0 0 8px rgba(255, 196, 70, .35)) !important;
}


/* ===== SIDEBAR GOLD UNIVERSITY LOGO ===== */
.sidebar .uni-brand img {
    display: block !important;
    width: 92px !important;
    height: 92px !important;
    margin: 0 auto 12px !important;
    object-fit: contain !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter:
        sepia(1)
        saturate(6)
        hue-rotate(350deg)
        brightness(1.55)
        contrast(1.2)
        drop-shadow(0 0 8px rgba(255, 193, 55, .45)) !important;
}

.sidebar .uni-brand b {
    color: #f4c65d !important;
}


/* ===== BIG CLEAR GOLD LOGO ===== */
.sidebar .uni-brand {
    padding-top: 18px !important;
}

.sidebar .uni-brand img {
    width: 125px !important;
    height: 125px !important;
    max-width: 125px !important;
    object-fit: contain !important;
    margin: 0 auto 14px !important;
    opacity: 1 !important;
    visibility: visible !important;

    filter:
        sepia(1)
        saturate(7)
        hue-rotate(350deg)
        brightness(1.8)
        contrast(1.3)
        drop-shadow(0 0 6px rgba(255,193,55,.55))
        drop-shadow(0 0 14px rgba(255,174,0,.22)) !important;
}

.sidebar .uni-brand b {
    display: block !important;
    color: #f6cc68 !important;
    text-align: center !important;
    line-height: 1.35 !important;
    text-shadow: 0 1px 5px rgba(0,0,0,.5) !important;
}


/* ===== WHITE LOGO + GOLD UNIVERSITY NAME ===== */
.sidebar .uni-brand img {
    width: 125px !important;
    height: 125px !important;
    max-width: 125px !important;
    object-fit: contain !important;
    margin: 0 auto 14px !important;
    opacity: 1 !important;
    visibility: visible !important;

    /* logoni oq qilish */
    filter:
        brightness(0)
        invert(1)
        drop-shadow(0 0 5px rgba(255,255,255,.35))
        drop-shadow(0 0 12px rgba(255,255,255,.12)) !important;
}

/* Universitet nomi oltin rangda qoladi */
.sidebar .uni-brand b {
    display: block !important;
    color: #f6cc68 !important;
    text-align: center !important;
    line-height: 1.35 !important;
    text-shadow: 0 1px 5px rgba(0,0,0,.55) !important;
}


/* ===== LOGIN PAGE FIX ===== */
#login.login {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 24px !important;
    box-sizing: border-box !important;
    background:
        radial-gradient(circle at 50% 40%, rgba(20,110,210,.18), transparent 38%),
        #102354 !important;
}

#login.login.hidden {
    display: none !important;
}

#login .login-card {
    width: 100% !important;
    max-width: 430px !important;
    min-width: 0 !important;
    height: auto !important;

    padding: 32px !important;
    margin: 0 !important;

    background: #0d1b30 !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 20px !important;

    box-shadow: 0 24px 70px rgba(0,0,0,.35) !important;
    transform: none !important;
}

#login .login-bran,
#login .login-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
    margin-bottom: 25px !important;
}

#login .login-bran img,
#login .login-brand img {
    display: block !important;
    width: 115px !important;
    height: 115px !important;
    object-fit: contain !important;

    filter:
        brightness(0)
        invert(1)
        drop-shadow(0 0 8px rgba(255,255,255,.20)) !important;
}

#login .login-bran b,
#login .login-brand b {
    display: block !important;
    color: #ffffff !important;
    font-size: 22px !important;
    line-height: 1.25 !important;
}

#login .login-bran span,
#login .login-brand span {
    display: block !important;
    margin-top: 5px !important;
    color: #94a8c6 !important;
    font-size: 13px !important;
}

#login form label {
    display: block !important;
    width: 100% !important;
    margin: 14px 0 !important;
    color: #aebed4 !important;
    font-size: 13px !important;
}

#login input {
    display: block !important;
    width: 100% !important;
    height: 46px !important;
    box-sizing: border-box !important;
    margin-top: 7px !important;
    padding: 0 14px !important;

    background: #091729 !important;
    color: #fff !important;
    border: 1px solid #294361 !important;
    border-radius: 10px !important;

    font-size: 15px !important;
}

#login button {
    width: 100% !important;
    min-height: 46px !important;
    margin-top: 12px !important;
    border-radius: 10px !important;
}


/* ===== LOGIN UNIVERSITY NAME - TIMES NEW ROMAN ===== */
#login .login-bran b,
#login .login-brand b {
    font-family: "Times New Roman", Times, serif !important;
    font-size: 21px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: .3px !important;
    text-align: center !important;
    color: #ffffff !important;
}


/* ===== LOGIN TITLE WIDTH FIX ===== */
#login .login-card {
    max-width: 520px !important;
}

#login .login-brand {
    width: 100% !important;
}

#login .login-brand > div {
    width: 100% !important;
}

#login .login-brand b {
    width: 100% !important;
    white-space: nowrap !important;
    font-size: 21px !important;
}


/* ===== PROFESSIONAL LOGIN BACKGROUND ===== */
#login.login {
    background:
        radial-gradient(circle at 18% 18%,
            rgba(30, 136, 255, .20) 0%,
            rgba(30, 136, 255, 0) 32%),
        radial-gradient(circle at 82% 78%,
            rgba(0, 191, 255, .10) 0%,
            rgba(0, 191, 255, 0) 30%),
        linear-gradient(
            135deg,
            #07111f 0%,
            #0a1c35 42%,
            #102b50 72%,
            #081626 100%
        ) !important;
}

/* Orqa fondagi yumshoq bezak */
#login.login::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    left: -180px;
    top: -200px;
    border-radius: 50%;
    background: rgba(38, 132, 255, .07);
    filter: blur(30px);
    pointer-events: none;
}

#login.login::after {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    right: -150px;
    bottom: -200px;
    border-radius: 50%;
    background: rgba(0, 174, 255, .06);
    filter: blur(35px);
    pointer-events: none;
}

/* Login kartasi fondan ajralib tursin */
#login .login-card {
    position: relative !important;
    z-index: 2 !important;
    background: rgba(9, 25, 45, .94) !important;
    border: 1px solid rgba(100, 164, 230, .20) !important;
    box-shadow:
        0 30px 80px rgba(0,0,0,.40),
        0 0 35px rgba(30,136,255,.06) !important;
}


/* Dashboard student/employee photos */
.photo-avatar {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.photo-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-avatar span {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

