/* DILMUSS analitika -- brend ranglari: pushti #d86487, bordo #4a202a */
:root {
  --pushti: #d86487;
  --pushti-och: #eeaac3;
  --siyoh: #1a1220;
  --bordo: #4a202a;
  --matn: #16202a;
  --matn-2: #6b6570;
  --chiziq: #e8e4ea;
  --fon: #f6f4f7;
  --oq: #fff;
  --qizil: #a4382a;
  --qizil-f: #fbe6e1;
  --amber: #8a6516;
  --amber-f: #fbf1dc;
  --yashil: #2e6a4e;
  --yashil-f: #e6f1ea;
}
* { box-sizing: border-box; }
body {
  margin: 0; display: flex; min-height: 100vh; background: var(--fon);
  font-family: Montserrat, "Segoe UI", system-ui, sans-serif;
  color: var(--matn); font-size: 14px;
}

/* --- yon menyu */
.yon {
  width: 208px; flex: 0 0 208px; background: var(--siyoh); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0;
  height: 100vh;
}
.brend {
  padding: 20px 18px 14px; font-weight: 700; font-size: 17px;
  letter-spacing: .06em; color: #fff;
}
.brend span {
  display: block; font-size: 11px; font-weight: 500; letter-spacing: .18em;
  color: var(--pushti-och); text-transform: uppercase; margin-top: 2px;
}
.yon nav { display: flex; flex-direction: column; overflow-y: auto; flex: 1; }
.guruh-nom {
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: #6f6676; padding: 14px 18px 5px; font-weight: 600;
}
.yon nav a {
  color: #cfc7d4; text-decoration: none; padding: 9px 18px; font-size: 13px;
  border-left: 3px solid transparent;
}
.yon nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.yon nav a.faol {
  background: rgba(216,100,135,.16); color: #fff; font-weight: 600;
  border-left-color: var(--pushti);
}
.yon-past { padding: 14px 18px 18px; border-top: 1px solid rgba(255,255,255,.1); }
.kichik { font-size: 11px; color: #9d94a4; margin-bottom: 4px; }
.chiqish {
  display: inline-block; margin-top: 8px; font-size: 12px;
  color: var(--pushti-och); text-decoration: none;
}

/* --- asosiy qism */
main { flex: 1; padding: 22px 26px 60px; min-width: 0; }
.bosh {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
h1 { font-size: 22px; margin: 0; color: var(--pushti); font-weight: 700; }
.bosh-ong { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* --- kartochkalar */
.kartalar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.karta {
  background: var(--oq); border: 1px solid var(--chiziq); border-radius: 10px;
  padding: 14px 16px;
}
.karta .yorliq {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--matn-2); font-weight: 600;
}
.karta .qiymat {
  font-size: 24px; font-weight: 700; margin: 6px 0 2px; color: var(--siyoh);
}
.karta .izoh { font-size: 11px; color: var(--matn-2); }
.karta.pushti .qiymat { color: var(--pushti); }

/* --- jadval */
.quti {
  background: var(--oq); border: 1px solid var(--chiziq); border-radius: 10px;
  overflow: auto; max-height: calc(100vh - 230px);
}
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th, td { padding: 7px 10px; white-space: nowrap; }
thead th {
  position: sticky; top: 0; z-index: 2; background: var(--siyoh); color: #fff;
  font-size: 10px; font-weight: 600; text-align: right; letter-spacing: .02em;
}
thead th.chap { text-align: left; }
tbody td { border-bottom: 1px solid var(--chiziq); text-align: right;
  font-variant-numeric: tabular-nums; }
tbody td.chap { text-align: left; }
tbody tr:nth-child(even) { background: #fafafb; }
tbody tr:hover { background: #fdf3f6; }
tfoot td {
  position: sticky; bottom: 0; background: #f3eff4; font-weight: 700;
  border-top: 2px solid var(--chiziq); text-align: right;
}
tfoot td.chap { text-align: left; }
.kul { color: var(--matn-2); }
/* Qo'shimcha ustunlar: "Batafsil" bosilmaguncha yashirin turadi.
   13-16 ta ustun bir vaqtda ko'rsatilsa jadval o'qilmay qoladi. */
table.oddiy .qosh { display: none; }
.tugma.yoqilgan { background: var(--pushti); border-color: var(--pushti);
  color: #fff; }
.guruh td {
  background: #f7f2f6; font-weight: 700; color: var(--pushti);
  border-top: 1px solid var(--chiziq);
}

/* --- belgilar */
.belgi { padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.b-qizil { background: var(--qizil-f); color: var(--qizil); }
.b-amber { background: var(--amber-f); color: var(--amber); }
.b-yashil { background: var(--yashil-f); color: var(--yashil); }
.b-kul { background: #f0eef1; color: var(--matn-2); }
.manfiy { color: var(--qizil); }
.musbat { color: var(--yashil); }

/* --- boshqaruv */
.tugma, select, input[type=date], input[type=search], input[type=password] {
  font-family: inherit; font-size: 13px; padding: 7px 11px;
  border: 1px solid var(--chiziq); border-radius: 8px; background: var(--oq);
  color: var(--matn);
}
.tugma { text-decoration: none; cursor: pointer; display: inline-block; }
.tugma:hover { border-color: var(--pushti); color: var(--pushti); }
.tugma.asosiy {
  background: var(--pushti); border-color: var(--pushti); color: #fff;
  font-weight: 600;
}
.tugma.asosiy:hover { background: #c4557a; color: #fff; }
form.davr { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
label.kichik-y { font-size: 11px; color: var(--matn-2); }

/* --- kirish sahifasi */
body.kirish { display: flex; align-items: center; justify-content: center; }
.kirish-quti {
  background: var(--oq); border: 1px solid var(--chiziq); border-radius: 14px;
  padding: 34px 32px; width: 320px; text-align: center;
}
.kirish-quti h1 { font-size: 20px; margin: 0 0 4px; }
.kirish-quti p { color: var(--matn-2); font-size: 12px; margin: 0 0 18px; }
.kirish-quti input { width: 100%; margin-bottom: 10px; }
.kirish-quti button { width: 100%; }
.xato { color: var(--qizil); font-size: 12px; margin-bottom: 10px; }

/* --- davr paneli */
.davr-panel {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--oq); border: 1px solid var(--chiziq);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
}
.tugmalar { display: flex; gap: 6px; flex-wrap: wrap; }
.tugma.kichik-t { padding: 5px 11px; font-size: 12px; }
.davr-izoh { font-size: 11px; color: var(--matn-2); margin-left: auto; }

/* --- diqqat bloki: avtomatik xulosa */
.diqqat {
  background: var(--oq); border: 1px solid var(--chiziq);
  border-radius: 10px; padding: 12px 16px 14px; margin-bottom: 18px;
}
.diqqat-nom {
  font-size: 10px; letter-spacing: .12em; color: var(--matn-2);
  font-weight: 700; margin-bottom: 8px;
}
.diqqat-satr {
  display: flex; gap: 10px; align-items: baseline; padding: 6px 0 6px 12px;
  border-left: 3px solid var(--chiziq); flex-wrap: wrap;
}
.diqqat-satr + .diqqat-satr { border-top: 1px solid var(--chiziq); }
.diqqat-satr span { color: var(--matn-2); font-size: 12px; }
.d-qizil { border-left-color: var(--qizil); }
.d-amber { border-left-color: var(--amber); }
.d-yashil { border-left-color: var(--yashil); }

/* --- ikki ustunli panel */
.ikki {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.quti-panel {
  background: var(--oq); border: 1px solid var(--chiziq);
  border-radius: 10px; padding: 12px 14px;
}
.quti-panel h3 {
  margin: 0 0 8px; font-size: 12px; color: var(--matn-2); font-weight: 600;
}
table.mayda { font-size: 12px; }
table.mayda td { padding: 5px 6px; border-bottom: 1px solid var(--chiziq); }
table.mayda tr:last-child td { border-bottom: none; }
table.mayda a { color: var(--matn); text-decoration: none; }
table.mayda a:hover { color: var(--pushti); }

/* --- katak ichidagi chiziqcha va mini grafik */
.bar {
  display: inline-block; width: 64px; height: 7px; background: #efecf1;
  border-radius: 4px; overflow: hidden; vertical-align: middle;
}
.bar i { display: block; height: 100%; background: var(--pushti-och); }
.bar-matn { font-size: 11px; color: var(--matn-2); margin-left: 6px; }
.spark { vertical-align: middle; }

tbody td a { color: var(--matn); text-decoration: none;
  border-bottom: 1px dotted var(--chiziq); }
tbody td a:hover { color: var(--pushti); border-bottom-color: var(--pushti); }

/* --- non ushshoq (breadcrumb) */
.nonushta { font-size: 12px; color: var(--matn-2); margin: -6px 0 12px; }
.nonushta a { color: var(--pushti); text-decoration: none; }

/* --- grafik */
.grafik { background: var(--oq); border: 1px solid var(--chiziq);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; }
.grafik h3 { margin: 0 0 10px; font-size: 13px; color: var(--matn-2);
  font-weight: 600; }

@media (max-width: 900px) {
  body { flex-direction: column; }
  .yon { width: 100%; flex: none; height: auto; position: static; }
  .yon nav { flex-direction: row; overflow-x: auto; }
  .yon nav a { border-left: none; border-bottom: 3px solid transparent;
    white-space: nowrap; }
  .yon nav a.faol { border-left: none; border-bottom-color: var(--pushti); }
  main { padding: 16px; }
  .quti { max-height: none; }
}
