/* ============================================================
   OBYEKTIVKA — Yangiyo'l tumani
   Dizayn tili: DAVOMAT boshqaruv paneli bilan bir xil
   ============================================================ */

:root {
  --navy-900: #0a2138;
  --navy-850: #0d2a46;
  --navy-800: #103154;
  --navy-700: #1b4270;
  --navy-600: #24558c;
  --ink: #0f2f4d;
  --ink-soft: #3d5872;

  --hero-a: #14486f;
  --hero-b: #2a7ab4;

  --gold: #f2c14e;
  --gold-deep: #b98614;
  --gold-bg: #fdf3d7;

  --paper: #eef2f7;
  --card: #ffffff;
  --line: #e3e9f1;
  --line-strong: #cfd9e6;
  --muted: #6b8099;
  --side-muted: #8bacd0;

  --green: #12b886;
  --amber: #f59f00;
  --red: #e03131;
  --violet: #6741d9;
  --teal: #0ca678;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 49, 84, .06), 0 4px 16px rgba(16, 49, 84, .05);
  --shadow-lg: 0 8px 32px rgba(10, 33, 56, .14);

  --sidebar-w: 266px;
  --font-ui: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-text: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .num { font-family: var(--font-ui); }

a { color: var(--navy-600); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--gold); color: var(--navy-900); }

:focus-visible {
  outline: 2px solid var(--navy-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------- KIRISH SAHIFASI ---------------- */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--paper);
}

.login-art {
  background:
    radial-gradient(900px 500px at 82% 12%, rgba(93, 168, 224, .28), transparent 62%),
    linear-gradient(150deg, var(--navy-900), var(--navy-800) 58%, #16456f);
  color: #fff;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-art::after {
  content: "";
  position: absolute;
  right: -180px; bottom: -220px;
  width: 620px; height: 620px;
  border-radius: 40px;
  transform: rotate(28deg);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: -70px -70px 0 -1px rgba(255, 255, 255, .05), -140px -140px 0 -1px rgba(255, 255, 255, .035);
}

.login-art h1 {
  font-size: 40px; line-height: 1.12; margin: 0 0 16px;
  font-weight: 800; letter-spacing: -.02em;
}
.login-art p { color: #b9d2ec; font-size: 15px; line-height: 1.65; max-width: 46ch; margin: 0; }
.login-art .eyebrow {
  color: var(--gold); font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; font-size: 11.5px; margin-bottom: 18px;
}

.login-points { list-style: none; padding: 0; margin: 28px 0 0; position: relative; z-index: 1; }
.login-points li {
  color: #cfe1f4; padding: 9px 0 9px 26px; position: relative; font-size: 14px;
}
.login-points li::before {
  content: ""; position: absolute; left: 0; top: 15px;
  width: 9px; height: 9px; background: var(--gold);
  transform: rotate(45deg); border-radius: 2px;
}

.login-panel {
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.login-card {
  width: 100%; max-width: 388px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 34px 32px 30px;
  box-shadow: var(--shadow);
}
.login-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.login-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 13.5px; }

/* ---------------- ASOSIY QOLIP ---------------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800) 72%, #12395f);
  color: #dbe7f4;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 30;
}

.brand { padding: 20px 20px 16px; display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  background: linear-gradient(140deg, #3d95d6, #1b4f80);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.brand-mark i { width: 13px; height: 13px; background: #fff; transform: rotate(45deg); border-radius: 2px; display: block; }
.brand-text b { display: block; color: #fff; font-family: var(--font-ui); font-weight: 800; font-size: 17.5px; letter-spacing: .04em; }
.brand-text span { display: block; color: var(--side-muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }

.nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .13); border-radius: 4px; }

/* --- bo'lim sarlavhasi (oddiy yozuv, bosilmaydi) --- */
.nav-label {
  color: var(--side-muted); font-family: var(--font-ui);
  font-size: 10px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase;
  padding: 18px 14px 8px;
}
.nav-label:first-child { padding-top: 8px; }

/* --- oddiy band --- */
.nav .nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 12px; border-radius: 10px; color: #cfdff0;
  font-size: 13.5px; margin-bottom: 2px; position: relative;
  transition: background .14s ease, color .14s ease;
  text-decoration: none; background: none; border: none; cursor: pointer;
  font-family: var(--font-text); text-align: left;
}
.nav .nav-item svg { width: 18px; height: 18px; flex: none; opacity: .78; }
.nav .nav-item .nav-lab { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav .nav-item:hover svg { opacity: 1; }

.nav .nav-item.active { background: var(--navy-700); color: #fff; font-weight: 600; }
.nav .nav-item.active svg { opacity: 1; color: var(--gold); }
.nav .nav-item.active::before {
  content: ""; position: absolute; left: 3px; top: 50%;
  width: 3px; height: 18px; background: var(--gold);
  transform: translateY(-50%); border-radius: 2px;
}

/* --- ochiladigan band --- */
.nav-parent .nav-chev {
  width: 14px; height: 14px; flex: none; opacity: .6;
  transition: transform .18s ease;
}
.nav-parent.open .nav-chev { transform: rotate(90deg); }
.nav-parent.open { color: #fff; }
.nav-parent.open svg:first-child { opacity: 1; }
.nav-parent.has-active svg:first-child { color: var(--gold); opacity: 1; }

/* --- ichki bandlar --- */
.nav-sub {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .2s ease;
  overflow: hidden;
}
.nav-sub.open { grid-template-rows: 1fr; }
.nav-sub-in {
  overflow: hidden; margin: 2px 0 4px 22px;
  padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .12);
}
.nav-sub-in .nav-item { font-size: 13px; padding: 7px 10px; gap: 10px; }
.nav-sub-in .nav-item svg { width: 15px; height: 15px; }
.nav-sub-in .nav-item.active::before { left: -13px; height: 16px; }

/* --- son belgisi --- */
.nav-badge {
  flex: none; background: var(--gold); color: #4a3400;
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px; line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.nav-sub-in .nav-badge { background: rgba(242, 193, 78, .22); color: var(--gold); }

.side-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-user { display: flex; gap: 10px; align-items: center; padding: 8px 6px 12px; }
.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: linear-gradient(140deg, #3d95d6, #1b4f80); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  font-family: var(--font-ui);
}
.side-user b { color: #fff; font-size: 13px; display: block; font-weight: 700; }
.side-user span { color: var(--side-muted); font-size: 11px; }

/* ---------------- ASOSIY MAYDON ---------------- */

.main { flex: 1; min-width: 0; padding: 22px 26px 60px; }

.topbar { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.topbar h1 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.015em; }
.topbar .crumb { color: var(--muted); font-size: 13px; margin-top: 3px; }
.topbar .spacer { flex: 1; }

/* ---------------- HERO ---------------- */

.hero {
  border-radius: var(--r-lg); padding: 26px 30px;
  background:
    radial-gradient(720px 320px at 88% 0%, rgba(140, 200, 245, .3), transparent 60%),
    linear-gradient(120deg, var(--hero-a), var(--hero-b));
  color: #fff; position: relative; overflow: hidden; margin-bottom: 20px;
}
.hero::after {
  content: ""; position: absolute; right: -110px; top: -140px;
  width: 420px; height: 420px; border-radius: 34px; transform: rotate(24deg);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: -54px 54px 0 -1px rgba(255, 255, 255, .08);
}
.hero .eyebrow { color: var(--gold); font-weight: 800; letter-spacing: .13em; text-transform: uppercase; font-size: 11px; }
.hero h2 { margin: 10px 0 8px; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.hero p { margin: 0; color: #cbe1f5; max-width: 62ch; line-height: 1.6; font-size: 13.5px; }
.hero-stats { display: flex; gap: 42px; margin-top: 22px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stats div b { display: block; font-family: var(--font-ui); font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stats div span { display: block; color: #bcd6ee; font-size: 10.5px; letter-spacing: .11em; text-transform: uppercase; margin-top: 7px; font-weight: 600; }

/* ---------------- KARTALAR ---------------- */

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 18px; }
.panel-head { padding: 18px 22px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.panel-head .note { color: var(--muted); font-size: 13px; }
.panel-body { padding: 18px 22px 22px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 16px; position: relative; overflow: hidden;
}
.stat b { display: block; font-family: var(--font-ui); font-size: 27px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.stat.dark { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.stat.dark span { color: #a9c6e2; }
.stat.bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--navy-600); }
.stat.bar.green::before { background: var(--green); }
.stat.bar.amber::before { background: var(--amber); }
.stat.bar.violet::before { background: var(--violet); }
.stat.bar.teal::before { background: var(--teal); }
.stat.bar.red::before { background: var(--red); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-bg); color: var(--gold-deep);
  border-radius: 20px; padding: 5px 13px; font-size: 12px; font-weight: 700;
}
.pill.ok { background: #e3f9f0; color: #087f5b; }
.pill.info { background: #e7f0fb; color: #1a5a94; }
.pill.warn { background: #ffe8e8; color: #c92a2a; }

/* ---------------- TUGMALAR ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  padding: 9px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: var(--font-text);
  transition: background .14s, border-color .14s, transform .06s, box-shadow .14s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #f6f9fc; border-color: #b9c8da; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #4a3400; font-weight: 700; }
.btn-gold:hover { background: #e9b73c; border-color: #e9b73c; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: #eaeff6; }
.btn-danger { color: var(--red); border-color: #f3c6c6; background: #fff; }
.btn-danger:hover { background: #fff2f2; border-color: #eaa; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------------- FORMALAR ---------------- */

.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; font-size: 13.5px; font-family: var(--font-text);
  background: #fff; color: var(--ink); transition: border-color .14s, box-shadow .14s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(36, 85, 140, .13);
}
textarea { resize: vertical; min-height: 76px; line-height: 1.6; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%236b8099' stroke-width='2' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.section-title {
  font-family: var(--font-ui); font-size: 12px; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase; color: var(--navy-600);
  padding-bottom: 9px; border-bottom: 2px solid var(--line);
  margin: 26px 0 18px; display: flex; align-items: center; gap: 9px;
}
.section-title:first-child { margin-top: 0; }
.section-title i { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); border-radius: 2px; display: block; flex: none; }

/* ---------------- JADVAL ---------------- */

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; background: #f5f8fb; color: var(--ink-soft);
  font-weight: 700; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase;
  padding: 11px 13px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 11px 13px; border-bottom: 1px solid #f0f4f8; vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: #f8fbfe; }
table.tbl td.num { font-variant-numeric: tabular-nums; color: var(--muted); width: 44px; }

.rowfio { font-weight: 700; color: var(--ink); }
.rowsub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------------- QARINDOSHLAR / MEHNAT SATRLARI ---------------- */

.repeat-item {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 14px 2px; margin-bottom: 12px; background: #fbfdff; position: relative;
}
.repeat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.repeat-head b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-600); font-family: var(--font-ui); }
.repeat-head .spacer { flex: 1; }

.line-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.line-row .idx {
  flex: none; width: 26px; height: 38px; display: grid; place-items: center;
  color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
.line-row input { flex: 1; }

/* ---------------- FOTO ---------------- */

.photo-box {
  width: 132px; height: 176px; border: 2px dashed var(--line-strong);
  border-radius: 10px; display: grid; place-items: center; overflow: hidden;
  background: #f7fafd; color: var(--muted); font-size: 11.5px; text-align: center;
  cursor: pointer; flex: none; transition: border-color .14s, background .14s;
}
.photo-box:hover { border-color: var(--navy-600); background: #f0f6fc; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- KO'RISH (PREVIEW) ---------------- */

.paper-preview {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 30px 34px; font-family: "Times New Roman", Times, serif; font-size: 14px;
  line-height: 1.35; color: #111; overflow-x: auto;
}
.paper-preview .pp-title { text-align: center; font-weight: 700; font-size: 18px; }
.paper-preview .pp-fio { text-align: center; font-weight: 700; font-size: 18px; margin-top: 14px; }
.paper-preview .pp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-top: 11px; }
.paper-preview .pp-lab { font-weight: 700; }
.paper-preview .pp-mehnat { margin-top: 6px; }
.paper-preview table { border-collapse: collapse; width: 100%; margin-top: 10px; font-size: 13px; }
.paper-preview table td, .paper-preview table th { border: 1px solid #333; padding: 4px 6px; text-align: center; }

/* ---------------- KO'MAKCHI ---------------- */

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.search input { padding-left: 34px; }
.search::before { content: "\1F50D"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: .5; }

.empty { text-align: center; padding: 52px 20px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 12px; opacity: .35; }
.empty h4 { margin: 0 0 6px; font-size: 16px; color: var(--ink); font-weight: 700; }
.empty p { margin: 0 0 18px; font-size: 13.5px; }

.alert { padding: 11px 15px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; line-height: 1.55; }
.alert-err { background: #fff0f0; color: #b02020; border: 1px solid #f6d0d0; }
.alert-ok { background: #eafaf3; color: #0a7048; border: 1px solid #c7eddc; }
.alert-info { background: #eef5fd; color: #1a5a94; border: 1px solid #cfe2f6; }

.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--navy-800); color: #fff; padding: 12px 17px; border-radius: 11px;
  box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 340px;
  animation: toastIn .22s ease;
}
.toast.ok { background: #0b7a54; }
.toast.err { background: #b02525; }
@keyframes toastIn { from { opacity: 0; transform: translateY(9px); } }

.modal-host { position: fixed; inset: 0; background: rgba(10, 33, 56, .5); display: grid; place-items: center; z-index: 150; padding: 20px; }
.modal { background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal h3 { margin: 0; padding: 20px 22px 0; font-size: 17px; font-weight: 800; }
.modal .modal-body { padding: 14px 22px 20px; }
.modal .modal-foot { padding: 14px 22px; background: #f7fafd; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; }

.mode-flag {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px;
  background: #fff4e0; color: #8a5a00; border: 1px solid #f0cf8a;
  padding: 9px 16px; border-radius: 14px; font-size: 12.5px; z-index: 90;
  box-shadow: var(--shadow-lg); max-width: calc(100vw - 28px);
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; line-height: 1.5;
}
.mode-flag b { font-weight: 800; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  border: none; background: none; padding: 10px 15px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
  font-family: var(--font-text); margin-bottom: -1px;
}
.tabs button.active { color: var(--navy-700); border-bottom-color: var(--gold); }
.tabs button:hover { color: var(--ink); }

.sticky-actions {
  position: sticky; bottom: 0; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px); border-top: 1px solid var(--line);
  padding: 13px 22px; display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
  border-radius: 0 0 var(--r-lg) var(--r-lg); z-index: 20;
}
.sticky-actions .spacer { flex: 1; }

.hamburger { display: none; }

@media (max-width: 980px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 34px 26px; }
  .login-art h1 { font-size: 29px; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { padding: 16px 15px 60px; }
  .hamburger { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  .sidebar, .sticky-actions, .toolbar, .topbar .btn { display: none !important; }
  .main { padding: 0; }
}

/* ---------------- DOIMIY NAMUNA VA TEKSHIRUV ---------------- */

.field .eg {
  display: inline-flex; align-items: baseline; gap: 9px;
  max-width: 100%; margin-top: 7px;
  padding: 4px 14px 5px 11px;
  border-left: 2px solid var(--gold);
  border-radius: 0 9px 9px 0;
  background: linear-gradient(90deg, #f5f9fd 0%, rgba(245, 249, 253, 0) 100%);
}
.field .eg-tag {
  flex: none; font-family: var(--font-ui);
  font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-deep); position: relative; top: -1px;
}
.field .eg-text {
  font-family: "Times New Roman", Times, serif;
  font-size: 14.5px; font-style: italic; line-height: 1.45;
  color: #4a6480;
}

.field .fmsg { font-size: 12px; line-height: 1.5; margin-top: 5px; }
.field .fmsg .e { color: var(--red); font-weight: 600; }
.field .fmsg .w { color: #a05a00; font-weight: 600; }

.field.bad > input, .field.bad > textarea,
.field.bad .line-row input {
  border-color: #e8a0a0; background: #fffbfb;
}
.field.bad > input:focus, .field.bad > textarea:focus,
.field.bad .line-row input:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(224, 49, 49, .13);
}
.field.warn > input, .field.warn > textarea { border-color: #edd08a; }

.field.mline { margin-bottom: 10px; }
.field.mline .line-row { margin-bottom: 0; }
.field.mline .fmsg { padding-left: 34px; }

.tabs button.locked { opacity: .42; cursor: not-allowed; }
.tabs button.locked:hover { color: var(--muted); }

/* ---------------- NAMUNA VA QOIDALAR SAHIFASI ---------------- */

.namuna-hero {
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 18px;
  background:
    radial-gradient(680px 300px at 90% 0%, rgba(150, 205, 245, .26), transparent 60%),
    linear-gradient(118deg, var(--hero-a), var(--hero-b));
  color: #fff; position: relative;
  display: grid; grid-template-columns: 1.35fr .65fr; gap: 0;
}
.namuna-hero .nh-text { padding: 28px 30px 30px; position: relative; z-index: 1; }
.namuna-hero .eyebrow { color: var(--gold); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
.namuna-hero h2 { margin: 11px 0 9px; font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.namuna-hero p { margin: 0 0 20px; color: #cbe1f5; line-height: 1.65; font-size: 13.5px; max-width: 54ch; }

.namuna-hero .nh-sheet {
  position: relative; display: grid; place-items: center; padding: 26px 26px 26px 0;
}
.doc-thumb {
  width: 132px; height: 186px; background: #fff; border-radius: 4px;
  box-shadow: 0 14px 34px rgba(6, 24, 44, .38);
  padding: 13px 11px; transform: rotate(-3deg);
  display: flex; flex-direction: column; gap: 5px;
}
.doc-thumb .dt-title { height: 6px; width: 58%; margin: 0 auto 4px; background: #2c4a6b; border-radius: 2px; }
.doc-thumb .dt-name { height: 5px; width: 44%; margin: 0 auto 6px; background: #5b7a9a; border-radius: 2px; }
.doc-thumb .dt-row { display: flex; gap: 5px; }
.doc-thumb .dt-row i { height: 3px; background: #d3dde8; border-radius: 2px; display: block; }
.doc-thumb .dt-photo {
  position: absolute; right: 30px; top: 38px; width: 26px; height: 34px;
  background: #eef3f8; border: 1px solid #b9cadb; border-radius: 2px; transform: rotate(-3deg);
}

.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 12px; }
.rule {
  display: flex; gap: 13px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 15px; background: #fbfdff;
}
.rule .rn {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  background: var(--navy-800); color: #fff;
  font-family: var(--font-ui); font-size: 12px; font-weight: 800;
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.rule p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.rule b { color: var(--ink); }

.spec-list { display: grid; gap: 0; }
.spec-list .sp {
  display: flex; gap: 14px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.spec-list .sp:last-child { border-bottom: none; }
.spec-list .sp b {
  flex: 0 0 172px; font-family: var(--font-ui); font-size: 11.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--navy-600);
}
.spec-list .sp span { font-size: 13.5px; color: var(--ink-soft); }

@media (max-width: 860px) {
  .namuna-hero { grid-template-columns: 1fr; }
  .namuna-hero .nh-sheet { padding: 0 0 30px; }
  .spec-list .sp { flex-direction: column; gap: 3px; }
  .spec-list .sp b { flex: none; }
}

/* ---------------- WORD FAYLDAN YUKLASH ---------------- */

.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--r-lg);
  padding: 38px 24px; text-align: center; cursor: pointer;
  background: #f8fbfe; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--navy-600); background: #eff6fd; }
.dropzone .dz-icon {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 14px;
  background: var(--navy-800); color: #fff; display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
}
.dropzone h4 { margin: 0 0 5px; font-size: 16px; font-weight: 700; color: var(--ink); }
.dropzone p { margin: 0; font-size: 13px; color: var(--muted); }

.import-sum {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin: 18px 0 14px;
}
.import-sum .is-num {
  border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px; background: #fff;
  border-left-width: 4px; border-left-color: var(--navy-600);
}
.import-sum .is-num.ok { border-left-color: var(--green); }
.import-sum .is-num.warn { border-left-color: var(--amber); }
.import-sum .is-num b {
  display: block; font-family: var(--font-ui); font-size: 24px; font-weight: 800;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.import-sum .is-num span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }

.miss-list { margin: 8px 0 0; padding-left: 18px; line-height: 1.75; }
.miss-list li { font-weight: 600; }

/* ============================================================
   A4 VARAQ — JONLI KO'RINISH
   ============================================================ */

.sheet-wrap { position: relative; }
.sheets { --k: 1; --sh-h: 1123px; }
.sheets .sh-hold { position: relative; margin: 0 auto 14px; }
.sheets.two-up { display: flex; gap: 14px; align-items: flex-start; }
.sheets.two-up .sh-hold { margin-bottom: 0; }

.sheet {
  width: 794px; height: 1123px;
  background: #fff; color: #111;
  font-family: "Times New Roman", Times, serif;
  font-size: 14.7px; line-height: 1.24;
  padding: 41px 38px 15px 102px;
  transform-origin: top left;
  box-shadow: 0 2px 6px rgba(16, 49, 84, .12), 0 12px 34px rgba(16, 49, 84, .10);
  border: 1px solid #dde5ee; border-radius: 2px;
  position: relative; overflow: hidden;
}

.sh-photo {
  position: absolute; right: 38px; top: 36px;
  width: 113px; height: 151px;
  border: 1px solid #9fb0c2; background: #f7fafd;
  display: grid; place-items: center; color: #90a4b8; font-size: 12px;
  font-family: var(--font-ui);
}
.sh-photo img { width: 100%; height: 100%; object-fit: cover; }

.sh-title { text-align: center; font-weight: 700; font-size: 18.7px; padding-right: 80px; }
.sh-name { text-align: center; font-weight: 700; font-size: 18.7px; padding-right: 80px; margin-top: 22px; }
.sh-date { margin-top: 20px; }
.sh-pos { font-weight: 700; padding-right: 170px; }

.sh-row { display: grid; grid-template-columns: 282px 1fr; margin-top: 11px; }
.sh-row.sh-vals { margin-top: 0; }
.sh-row.sh-inline { margin-top: 11px; }
.sh-lb { font-weight: 700; }
.sh-full { display: block; }
.sh-v { min-height: 1.24em; }
.sh-hang { padding-left: 94px; text-indent: -94px; }
.sh-dim { color: #9aa8b6; }

.sh-h2 { text-align: center; font-weight: 700; font-size: 18.7px; margin: 18px 0 4px; }
.sh-work { margin-top: 5px; padding-left: 99px; text-indent: -99px; }

.sh-sign { margin-top: 22px; padding-left: 36px; display: grid; grid-template-columns: 1fr 90px 110px; align-items: end; }
.sh-sig-left { font-weight: 700; }
.sh-sig-mid { font-style: italic; text-decoration: underline; text-align: center; }
.sh-sig-fio { font-weight: 700; text-align: center; }

.sh-h3 { text-align: center; font-weight: 700; font-size: 16px; }
.sh-h2b { text-align: center; font-weight: 700; font-size: 16px; margin-bottom: 10px; }

table.sh-tbl { border-collapse: collapse; table-layout: fixed; margin-left: -52px; }
table.sh-tbl th, table.sh-tbl td {
  border: 1px solid #000; padding: 2px 4px; text-align: center;
  vertical-align: middle; font-size: 14.7px; line-height: 1.2;
}
table.sh-tbl th { font-weight: 700; }
table.sh-tbl td.b { font-weight: 700; }

/* yoritilgan joy */
.sheet .hl {
  background: #fff3c4; box-shadow: 0 0 0 3px #fff3c4; border-radius: 2px;
  animation: hlPulse .5s ease;
}
@keyframes hlPulse { from { background: #ffe08a; } }

/* ---------------- forma + ko'rinish yonma-yon ---------------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(430px, 520px); gap: 22px; align-items: start; }
.split.prev-max { grid-template-columns: 1fr; }
.split.prev-max .split-form { display: none; }
.split.prev-max .split-prev { position: static; }
.split.prev-max .prev-scroll { max-height: calc(100vh - 210px); }
.split-form { min-width: 0; }
.split-prev { position: sticky; top: 16px; }

.prev-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line);
}
.prev-head b { font-family: var(--font-ui); font-size: 11.5px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: var(--navy-600); }
.prev-head .spacer { flex: 1; }

.zoom-grp { display: inline-flex; align-items: center; gap: 3px; }
.zoom-grp .btn { min-width: 30px; padding: 5px 8px; }
.zoom-lab { font-size: 11.5px; font-weight: 700; color: var(--muted); min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }

.prev-scroll {
  max-height: calc(100vh - 190px); overflow: auto;
  background: #eef2f7; border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px;
}
.prev-scroll::-webkit-scrollbar { width: 8px; }
.prev-scroll::-webkit-scrollbar-thumb { background: #c3d0de; border-radius: 4px; }

.prev-toggle { display: none; }

@media (max-width: 1280px) {
  .split { grid-template-columns: 1fr; }
  .split-prev { position: static; }
  .split-prev.collapsed .prev-scroll { display: none; }
  .prev-toggle { display: inline-flex; }
}

/* ---------------- tayyor obyektivka ---------------- */

.ready-hero {
  border-radius: var(--r-lg); padding: 24px 28px; margin-bottom: 18px;
  background: radial-gradient(600px 260px at 88% 0%, rgba(150, 205, 245, .25), transparent 60%),
    linear-gradient(118deg, #0d6b4f, #14a06f);
  color: #fff;
}
.ready-hero .eyebrow { color: #ffe9a8; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
.ready-hero h2 { margin: 10px 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.ready-hero p { margin: 0 0 18px; color: #d6f5e7; font-size: 13.5px; line-height: 1.6; }

.page-cap {
  text-align: center; font-family: var(--font-ui); font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 9px;
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .panel-head, .sticky-actions, .toast-host,
  .ready-hero, .btn, .page-cap, .prev-head { display: none !important; }
  .main { padding: 0 !important; }
  .panel { border: none !important; box-shadow: none !important; }
  .prev-scroll { max-height: none !important; overflow: visible !important; background: #fff !important; border: none !important; padding: 0 !important; }
  .sheets.two-up { display: block !important; }
  .sheets .sh-hold { height: auto !important; width: auto !important; margin: 0 !important; page-break-after: always; }
  .sheet { transform: none !important; box-shadow: none !important; border: none !important; }
}

/* ---------------- STATISTIKA VA NOMENKLATURA ---------------- */

.chart-row { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.legend { display: grid; gap: 9px; min-width: 220px; }
.lg-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.lg-row i { width: 11px; height: 11px; border-radius: 3px; flex: none; display: block; }
.lg-nom { flex: 1; color: var(--ink-soft); }
.lg-row b { font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.lg-pct { color: var(--muted); font-size: 12px; min-width: 34px; text-align: right; }

td.num2 { font-variant-numeric: tabular-nums; font-weight: 600; width: 92px; }

.mini-bar { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.mini-bar i { height: 7px; border-radius: 4px; display: block; min-width: 2px; }
.mini-bar::before { content: ""; position: absolute; }
.mini-bar span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; margin-bottom: 16px; }

.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; }
.school-card {
  border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px;
  background: #fff; text-decoration: none; color: inherit; display: block;
  transition: border-color .14s, box-shadow .14s, transform .08s;
}
.school-card:hover { border-color: var(--navy-600); box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.sc-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.sc-top b { flex: 1; font-size: 14.5px; font-weight: 700; }
.sc-nums { display: flex; gap: 20px; margin-bottom: 11px; }
.sc-nums b { display: block; font-family: var(--font-ui); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sc-nums span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   MA'NAVIYATCHILAR — PROFIL KARTASI VA MODUL
   ============================================================ */

.prof-top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: #f6f9fd; border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 16px; margin-bottom: 14px;
}
.prof-top .pt-left { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 14px; }
.prof-top b { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }

.prog { display: flex; align-items: center; gap: 9px; min-width: 130px; flex: 1; }
.prog i { height: 8px; border-radius: 5px; display: block; min-width: 3px; }
.prog span { font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
td .prog { min-width: 96px; }

.mini-photo {
  width: 40px; height: 52px; flex: none; border-radius: 6px; overflow: hidden;
  background: #eef3f8; border: 1px solid var(--line); display: grid; place-items: center;
  color: #b6c6d6;
}
.mini-photo img { width: 100%; height: 100%; object-fit: cover; }

.school-card.vakant { background: #fff8f8; border-color: #f3d4d4; }

/* ---------------- PROFIL KARTASI (16:9 slayd) ---------------- */

.mcard-wrap { display: flex; justify-content: center; }

.mcard {
  width: 100%; max-width: 980px; min-height: 56.25cqw;
  background: #fff; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 3px 10px rgba(10, 33, 56, .12), 0 18px 48px rgba(10, 33, 56, .16);
  border: 1px solid #dde5ee;
  container-type: inline-size;
  font-size: clamp(10px, 1.24cqw, 15px);
}

.mc-head {
  background: #0c2c66; color: #fff;
  padding: 2.2cqw 3cqw 1.9cqw; display: flex; align-items: center; gap: 1.5cqw;
}
.mc-tuman {
  font-family: var(--font-ui); font-size: 1.45em; font-weight: 700;
  letter-spacing: .1em; color: #f0b429;
}
.mc-title {
  font-family: var(--font-ui); font-size: 2.75em; font-weight: 800;
  letter-spacing: .01em; margin-top: .18em; line-height: 1.05;
}
.mc-num {
  margin-left: auto; align-self: flex-start;
  font-family: var(--font-ui); font-size: 1.7em; font-weight: 700;
  color: #dbe6f5; font-variant-numeric: tabular-nums;
}
.mc-gold { height: .42cqw; min-height: 3px; background: #f0b429; }

.mc-body { flex: 1; display: flex; gap: 2.6cqw; padding: 2.2cqw 3cqw 1cqw; min-height: 0; }

.mc-photo {
  width: 23.5cqw; flex: none; border-radius: 1.4cqw; overflow: hidden;
  background: #eef3f8; display: grid; place-items: center; color: #9db1c4;
  font-family: var(--font-ui); font-size: 1.2em; letter-spacing: .18em;
  align-self: flex-start; aspect-ratio: 3 / 4;
}
.mc-photo img { width: 100%; height: 100%; object-fit: cover; }

.mc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.mc-fio {
  font-family: var(--font-ui); font-size: 2.15em; font-weight: 800;
  color: #1a6fd4; line-height: 1.15; letter-spacing: -.01em;
  padding-bottom: .3em; border-bottom: .16em solid #0c2c66;
}
.mc-slab {
  font-family: var(--font-ui); font-size: 1.05em; font-weight: 800;
  letter-spacing: .09em; color: #1a6fd4; margin-top: .8em;
}
.mc-maktab {
  font-family: var(--font-ui); font-size: 1.7em; font-weight: 800;
  color: #12325c; line-height: 1.2; margin-top: .1em;
}
.mc-mnum { color: #e03131; }

.mc-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .7em;
  margin-top: .85em;
}
.mc-box { background: #eef4fb; border-radius: .5em; padding: .6em .85em; }
.mc-blab {
  font-family: var(--font-ui); font-size: .95em; font-weight: 800;
  letter-spacing: .07em; color: #1a6fd4; margin-bottom: .22em;
}
.mc-bval { font-size: 1.12em; color: #16324f; line-height: 1.28; }

.mc-tel-lab {
  font-family: var(--font-ui); font-size: 1.12em; font-weight: 800;
  color: #1a6fd4; margin-top: .85em;
}
.mc-tel { font-size: 1.2em; color: #16324f; margin-top: .15em; padding-left: .5em; }

.mc-foot {
  padding: .6cqw 3cqw 1.6cqw; display: flex; align-items: center; gap: 1em;
}
.mc-tag { font-size: 1.15em; color: #7d93ab; }
.mc-slogan { margin-left: auto; font-size: 1.15em; color: #7d93ab; }

@media print {
  .mcard { box-shadow: none; border: none; width: 100%; }
  .mcard-wrap { display: block; }
}

@media (max-width: 700px) {
  .mcard { aspect-ratio: auto; font-size: 12px; }
  .mc-body { flex-direction: column; padding: 18px; gap: 16px; }
  .mc-photo { width: 160px; }
  .mc-grid { grid-template-columns: 1fr; }
  .mc-head, .mc-foot { padding-left: 18px; padding-right: 18px; }
}

/* ---------------- PAROL BOSHQARUVI ---------------- */
.pw-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  background: #f5f9fd; border: 1px solid #dce8f4; border-radius: var(--r); padding: 14px 16px;
}
.pw-lab { font-family: var(--font-ui); font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-600); margin-bottom: 4px; }
.pw-val { font-family: "Courier New", monospace; font-size: 15px; font-weight: 700; color: var(--ink); word-break: break-all; }
.pw-val.pw-big { font-size: 19px; color: var(--navy-700); letter-spacing: .04em; }
.pw-chip {
  font-family: "Courier New", monospace; font-size: 12.5px; font-weight: 700;
  background: var(--gold-bg); color: var(--gold-deep);
  border: 1px solid #f0dca8; border-radius: 6px; padding: 3px 8px; white-space: nowrap;
}
@media (max-width: 520px) { .pw-box { grid-template-columns: 1fr; } }

/* ---------------- OBYEKTIVKADAN OLINGAN MEHNAT FAOLIYATI ---------------- */
.meh-list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.meh-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 14px; border-bottom: 1px solid #f0f4f8;
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.5;
}
.meh-row:last-child { border-bottom: none; }
.meh-n {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  background: #eef4fb; color: var(--navy-600);
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 800;
  display: grid; place-items: center;
}

/* ============================================================
   O'QUVCHILAR YUTUQLARI
   ============================================================ */

.ybar {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end;
  background:
    radial-gradient(520px 220px at 92% 0%, rgba(242, 193, 78, .13), transparent 62%),
    linear-gradient(120deg, var(--navy-900), var(--navy-800) 68%, #16456f);
  border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.ybar::after {
  content: ""; position: absolute; right: -70px; top: -80px;
  width: 210px; height: 210px; border-radius: 28px; transform: rotate(24deg);
  border: 1px solid rgba(242, 193, 78, .16); pointer-events: none;
}
.yb-item { flex: 1; min-width: 200px; max-width: 320px; position: relative; z-index: 1; }
.yb-item label {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: 10px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 7px;
}
.yb-item select {
  width: 100%;
  appearance: none; -webkit-appearance: none;
  background-color: rgba(255, 255, 255, .08);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%23f2c14e' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  color: #fff; font-size: 14px; font-weight: 600; font-family: var(--font-text);
  padding: 11px 38px 11px 14px;
  transition: border-color .14s, background-color .14s;
}
.yb-item select:hover { background-color: rgba(255, 255, 255, .13); border-color: rgba(242, 193, 78, .5); }
.yb-item select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 193, 78, .2);
}
.yb-item select option { color: #16324f; background: #fff; font-weight: 500; }
.yb-item select:disabled { opacity: .7; cursor: not-allowed; }

.ygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }

.ykarta {
  border: 1px solid var(--line); border-left: 4px solid var(--yr, var(--navy-600));
  border-radius: var(--r); background: #fff; padding: 15px 16px;
  display: flex; flex-direction: column; gap: 9px;
  transition: box-shadow .14s, transform .08s;
}
.ykarta:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.yk-top { display: flex; gap: 12px; align-items: center; }
.yk-photo {
  width: 46px; height: 60px; flex: none; border-radius: 8px; overflow: hidden;
  background: #eef3f8; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 20px; color: #b6c6d6;
}
.yk-photo img { width: 100%; height: 100%; object-fit: cover; }
.yk-fio { font-weight: 700; font-size: 14.5px; color: var(--ink); display: block; text-decoration: none; }
.yk-fio:hover { color: var(--navy-600); text-decoration: underline; }
.yk-mak { font-size: 12px; color: var(--muted); margin-top: 2px; }

.ymedal {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 700; line-height: 1.3;
}
.ym-bel { font-size: 14px; }

.yk-yon { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-soft); }
.yk-tanlov { font-size: 13.5px; color: var(--ink); line-height: 1.45; font-weight: 600; }
.yk-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.yk-chip {
  font-size: 11.5px; background: #f1f5f9; color: var(--ink-soft);
  border-radius: 6px; padding: 3px 8px; font-variant-numeric: tabular-nums;
}
.yk-chip.yk-yil { background: var(--gold-bg); color: var(--gold-deep); font-weight: 700; }
.yk-ustoz { font-size: 12px; color: var(--muted); }
.yk-act { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 2px; }

.yfayl {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 15px; background: #fbfdff; margin-bottom: 15px;
}
.yf-nom { font-weight: 700; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.yfayl-st { margin-bottom: 10px; }

.yr-orin {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  background: #eef3f8; color: var(--ink-soft);
  font-family: var(--font-ui); font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.yr-orin.yr-top { background: var(--gold); color: #4a3400; }
tr.yr-bosh td { opacity: .5; }

.stat.bar[style*="--b"]::before { background: var(--b); }

@media (max-width: 560px) {
  .ybar { flex-direction: column; align-items: stretch; }
  .yb-item { max-width: none; }
  .ygrid { grid-template-columns: 1fr; }
}

.ykarta.yk-arx { opacity: .62; background: #fbfcfd; border-style: dashed; }
.ykarta.yk-arx .yk-fio::after {
  content: " \2630 arxivda"; font-size: 10.5px; font-weight: 700;
  color: var(--muted); letter-spacing: .04em;
}

/* ---------------- TIZIM MODULLARI ---------------- */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.mod-card {
  border: 1px solid var(--line); border-top: 3px solid var(--mc, var(--navy-600));
  border-radius: var(--r); background: #fff; padding: 16px 17px;
  display: flex; flex-direction: column; gap: 13px;
  transition: box-shadow .14s, transform .08s;
}
.mod-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.mod-top { display: flex; gap: 12px; align-items: flex-start; }
.mod-bel {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  background: color-mix(in srgb, var(--mc) 14%, #fff);
  color: var(--mc); display: grid; place-items: center; font-size: 18px;
}
.mod-top b { display: block; font-family: var(--font-ui); font-size: 15px; font-weight: 800; color: var(--ink); }
.mod-izoh { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.mod-nums { display: flex; gap: 18px; flex-wrap: wrap; margin-top: auto; }
.mod-nums b {
  display: block; font-family: var(--font-ui); font-size: 21px; font-weight: 800;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1;
}
.mod-nums span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.mod-card .btn { align-self: flex-start; }

/* ---------------- TAKRORIY YOZUVLAR ---------------- */
tr.dup-row { background: #fffaf5; }
tr.dup-row:hover { background: #fff4e8; }
.dup-chip {
  display: inline-block; margin-left: 8px;
  font-family: var(--font-ui); font-size: 9.5px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  background: #ffe8d5; color: #b34700;
  border-radius: 5px; padding: 2px 7px; vertical-align: middle;
}

.build-stamp {
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; color: var(--side-muted);
  text-align: center; padding: 8px 0 2px; opacity: .85;
}

/* ---------------- MAYDON HOLATI ---------------- */
.fld-row { display: flex; gap: 5px; flex-wrap: wrap; }
.fld-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 700;
  border-radius: 6px; padding: 3px 7px; white-space: nowrap; cursor: default;
}
.fld-chip.ok { background: #e7f7ef; color: #0b7a45; border: 1px solid #c7ecd9; }
.fld-chip.yoq { background: #fdeeee; color: #b42318; border: 1px solid #f6d5d2; }

.tbl input.bosh { background: #fffdf6; border-color: #f0dca8; }
tr.qator-chala td:first-child { box-shadow: inset 3px 0 0 var(--amber); }

/* ============================================================
   TUG'ILGAN KUNLAR
   ============================================================ */
.tk-royxat { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }

.tk-karta {
  display: flex; align-items: center; gap: 13px;
  border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  padding: 13px 15px; transition: box-shadow .14s, transform .08s;
}
.tk-karta:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tk-karta.tk-bugun { border-color: #f0cf8a; background: #fffdf6; }

.tk-foto {
  width: 48px; height: 62px; flex: none; border-radius: 9px; overflow: hidden;
  background: #eef3f8; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 21px; color: #b6c6d6;
}
.tk-foto img { width: 100%; height: 100%; object-fit: cover; }

.tk-fio { font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.3; }
.tk-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tk-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.tk-chip {
  font-size: 11px; background: #f1f5f9; color: var(--ink-soft);
  border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
.tk-chip.tk-sana { background: var(--gold-bg); color: var(--gold-deep); font-weight: 700; }
.tk-chip.tk-nusxa { background: #eef4fb; color: var(--navy-600); cursor: help; }

.tk-qoldi {
  flex: none; text-align: center; min-width: 54px;
  padding-left: 11px; border-left: 1px solid var(--line);
}
.tk-qoldi b {
  display: block; font-family: var(--font-ui); font-size: 19px; font-weight: 800;
  color: var(--navy-700); font-variant-numeric: tabular-nums; line-height: 1;
}
.tk-qoldi span { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.tk-qoldi.bugun b { font-size: 22px; }
.tk-qoldi.bugun span { color: var(--gold-deep); font-weight: 800; letter-spacing: .06em; }

tr.tk-satr-bugun { background: #fffdf6; }
tr.tk-satr-bugun td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

@media (max-width: 560px) { .tk-royxat { grid-template-columns: 1fr; } }

/* ============================================================
   HUDUDLAR VA RAHBARLAR
   ============================================================ */
.hd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 11px; }

.hd-karta {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1px solid var(--line); border-left: 4px solid var(--hr, var(--navy-600));
  border-radius: var(--r); background: #fff; padding: 12px 14px; cursor: pointer;
  font-family: var(--font-text); transition: box-shadow .14s, transform .08s;
}
.hd-karta:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.hd-karta.tanlangan {
  background: color-mix(in srgb, var(--hr) 7%, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hr) 35%, #fff);
}

.hd-nomer {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: var(--hr, var(--navy-600)); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-ui); font-weight: 800; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hd-nomer.kichik { width: 24px; height: 24px; font-size: 11.5px; border-radius: 7px; }

.hd-matn { flex: 1; min-width: 0; }
.hd-matn b { display: block; font-size: 14px; color: var(--ink); line-height: 1.3; }
.hd-joy { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.hd-son { flex: none; text-align: center; min-width: 42px; }
.hd-son b {
  display: block; font-family: var(--font-ui); font-size: 17px; font-weight: 800;
  color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums;
}
.hd-son span { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }

.hd-masul {
  flex: none; font-family: var(--font-ui); font-size: 10.5px; font-weight: 800;
  background: #fdeeee; color: #b42318; border: 1px solid #f6d5d2;
  border-radius: 6px; padding: 3px 7px; font-variant-numeric: tabular-nums;
}
.hd-masul.toliq { background: #e7f7ef; color: #0b7a45; border-color: #c7ecd9; }

.hd-tel {
  font-weight: 600; color: var(--navy-600); text-decoration: none;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.hd-tel:hover { text-decoration: underline; }

@media (max-width: 560px) { .hd-grid { grid-template-columns: 1fr; } }

/* --- tahrirlash --- */
.hd-karta { padding: 0; overflow: hidden; }
.hd-asos {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 12px 10px 12px 14px; font-family: var(--font-text);
}
.hd-amal {
  display: flex; gap: 5px; padding: 0 12px 0 0; flex: none;
  border-left: 1px solid var(--line); margin-left: 2px; padding-left: 10px;
}

.hd-fon {
  position: fixed; inset: 0; z-index: 200; background: rgba(10, 33, 56, .45);
  display: grid; place-items: center; padding: 20px; overflow: auto;
}
.hd-oyna {
  background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(10, 33, 56, .3); overflow: hidden;
}
.hd-oyna.keng { max-width: 680px; }
.hd-oyna h3 { margin: 0; padding: 18px 22px 0; font-size: 17px; }
.hd-oyna-tana { padding: 16px 22px; max-height: 62vh; overflow: auto; }
.hd-oyna-oyoq {
  display: flex; gap: 9px; padding: 14px 22px 18px;
  border-top: 1px solid var(--line); background: #fbfdff;
}

.hd-ranglar { display: flex; gap: 7px; flex-wrap: wrap; }
.hd-rang {
  width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent;
  cursor: pointer; padding: 0;
}
.hd-rang.tanlangan { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }

.hd-maktablar {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px;
  max-height: 260px; overflow: auto; padding: 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: #fbfdff;
}
.hd-maktab {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  padding: 5px 8px; border-radius: 7px; cursor: pointer; background: #fff;
  border: 1px solid var(--line);
}
.hd-maktab.bor { background: #e7f7ef; border-color: #c7ecd9; font-weight: 600; }
.hd-maktab.band { opacity: .45; cursor: not-allowed; }

.hd-toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 300;
  padding: 10px 18px; border-radius: 12px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); transition: opacity .35s, transform .35s;
}
.hd-toast.ok { background: #0b7a45; color: #fff; }
.hd-toast.err { background: #b42318; color: #fff; }
.hd-toast.ket { opacity: 0; transform: translateX(-50%) translateY(8px); }
/* ============================================================
   MA'NAVIYAT — QO'SHIMCHA STATISTIKA
   ============================================================ */
.ms-bars { display: flex; flex-direction: column; gap: 9px; }

.ms-bar { display: flex; align-items: center; gap: 12px; }
.ms-bar-nom {
  flex: none; width: 210px; font-size: 13px; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ms-bar-yo {
  flex: 1; height: 10px; background: #eef3f8; border-radius: 6px; overflow: hidden;
}
.ms-bar-yo i { display: block; height: 100%; border-radius: 6px; transition: width .35s ease; }
.ms-bar-son { flex: none; width: 76px; text-align: right; }
.ms-bar-son b {
  font-family: var(--font-ui); font-size: 14px; font-weight: 800;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.ms-bar-son span { font-size: 11.5px; color: var(--muted); margin-left: 5px; }

.ms-toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 300;
  padding: 10px 18px; border-radius: 12px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); transition: opacity .35s, transform .35s;
}
.ms-toast.ok { background: #0b7a45; color: #fff; }
.ms-toast.err { background: #b42318; color: #fff; }
.ms-toast.ket { opacity: 0; transform: translateX(-50%) translateY(8px); }

@media (max-width: 640px) {
  .ms-bar-nom { width: 120px; font-size: 12px; }
  .ms-bar-son { width: 62px; }
}