:root {
  --kok: #1f4e9a; --kok-toq: #163a73; --kok-och: #e8f0fb; --chiziq: #d5deea;
  --matn: #1d2433; --kulrang: #5f6b7d; --yashil: #1e8e4f; --qizil: #c0392b; --sariq: #b7791f;
  --fon: #f4f7fb; --radius: 10px;
  /* Kunduzgi rejim ranglari */
  --tepa: #1f4e9a; --sirt: #ffffff; --sirt-2: #f6f9fd; --chiziq-och: #e3e9f2; --label: #33405a;
  --input-chiziq: #b9c6d8; --havola: #1f4e9a; --progress-fon: #dfe7f3; --qizil-son: #b3261e;
  --chart-nuqta: #2a78d6; --bar-fon: #edf2f8;
  --ok-fon: #dff3e6; --ok-matn: #1b6b3d; --ok-chiziq: #9fd8b2;
  --xato-fon: #fbe1de; --xato-matn: #8e2a1f; --xato-chiziq: #f1a9a0;
  --ogoh-fon: #fff3cd; --ogoh-matn: #7a5a00; --ogoh-chiziq: #f0cf73;
  --info-fon: #e0ecfb; --info-matn: #1f4e9a; --info-chiziq: #b9cdeb;
  --neytral-fon: #eef1f5; --neytral-matn: #5f6b7d;
  color-scheme: light;
}
/* Tungi rejim (ekranda; chop etishda doim kunduzgi) */
@media screen {
  html[data-theme="dark"] {
    --kok: #3a78d0; --kok-toq: #a9c8ff; --kok-och: #1c2b40; --chiziq: #2c3a4b;
    --matn: #e4ebf3; --kulrang: #9fb0c3; --yashil: #3ccf7f; --qizil: #ff7b72; --sariq: #e5b04a;
    --fon: #0f141b;
    --tepa: #15243b; --sirt: #18202b; --sirt-2: #1e2834; --chiziq-och: #263241; --label: #c9d5e3;
    --input-chiziq: #3a4a5e; --havola: #8ab8ff; --progress-fon: #263241; --qizil-son: #ff7b72;
    --chart-nuqta: #3987e5; --bar-fon: #263241;
    --ok-fon: #12351f; --ok-matn: #8fe0ad; --ok-chiziq: #2d6b45;
    --xato-fon: #3d1a17; --xato-matn: #ffaaa1; --xato-chiziq: #7a3a33;
    --ogoh-fon: #3b2f0f; --ogoh-matn: #f2d27a; --ogoh-chiziq: #7a6120;
    --info-fon: #142c4d; --info-matn: #a9c8ff; --info-chiziq: #2c4f80;
    --neytral-fon: #263241; --neytral-matn: #b4c2d2;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Roboto, Arial, sans-serif; color: var(--matn);
       background: var(--fon); font-size: 15px; line-height: 1.45; }
a { color: var(--havola); }
.tepa { background: var(--tepa); color: #fff; }
.tepa-ichi { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex;
             align-items: center; gap: 12px; flex-wrap: wrap; }
.logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; margin-right: auto; }
.menyu { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.menyu a, .menyu button { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 6px;
             font-size: 14px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.menyu a:hover, .menyu button:hover { background: rgba(255,255,255,.15); }
.menyu .chiq { border: 1px solid rgba(255,255,255,.6); }
.nishon { background: #ffcc00; color: #222; border-radius: 10px; padding: 0 7px; font-size: 12px;
          font-weight: 700; margin-left: 3px; }
.asosiy { max-width: 1200px; margin: 0 auto; padding: 18px 16px 40px; }
.tor { max-width: 860px; }
h1 { font-size: 24px; margin: 6px 0 16px; color: var(--kok-toq); }
h2 { font-size: 19px; margin: 22px 0 10px; color: var(--kok-toq); }
h3 { font-size: 16px; margin: 14px 0 8px; }
.karta { background: var(--sirt); border: 1px solid var(--chiziq); border-radius: var(--radius);
         padding: 16px; margin-bottom: 16px; }
.izoh { color: var(--kulrang); font-size: 13px; }
.past { text-align: center; color: var(--kulrang); font-size: 13px; padding: 20px; }

/* Tugmalar */
.btn { display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--kok);
       background: var(--kok); color: #fff; text-decoration: none; font-size: 15px; cursor: pointer;
       font-family: inherit; }
.btn:hover { background: var(--kok-toq); }
.btn-oq { background: var(--sirt); color: var(--havola); border-color: var(--kok); }
.btn-oq:hover { background: var(--kok-och); }
.btn-yashil { background: var(--yashil); border-color: var(--yashil); }
.btn-qizil { background: var(--qizil); border-color: var(--qizil); }
.btn-kichik { padding: 5px 10px; font-size: 13px; }
.tugmalar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Forma */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--label); }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=tel],
select, textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--input-chiziq); border-radius: 7px;
       font-size: 15px; font-family: inherit; background: var(--sirt); color: var(--matn); }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc0f5; border-color: var(--kok); }
.majburiy::after { content: " *"; color: var(--qizil); }
.panjara { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 14px; }
.panjara-kichik { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.butun { grid-column: 1 / -1; }
.belgilar { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; }
.belgilar label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.belgilar input { margin-top: 3px; width: 17px; height: 17px; }
.xato-maydon { border-color: var(--qizil) !important; background: var(--xato-fon) !important; }
.yashirin { display: none !important; }

/* Xabarlar */
.xabar { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.xabar.success { background: var(--ok-fon); border: 1px solid var(--ok-chiziq); color: var(--ok-matn); }
.xabar.error, .xatolar { background: var(--xato-fon); border: 1px solid var(--xato-chiziq); color: var(--xato-matn); }
.xatolar { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.xatolar ul { margin: 6px 0 0; padding-left: 20px; }
.ogohlantirish { background: var(--ogoh-fon); border: 1px solid var(--ogoh-chiziq); color: var(--ogoh-matn); padding: 10px 14px; border-radius: 8px;
                 margin-bottom: 12px; }

/* Anketa qadamlari */
.progress { height: 8px; background: var(--progress-fon); border-radius: 4px; overflow: hidden; }
.progress div { height: 100%; background: var(--kok); transition: width .25s; }
.qadam-nomi { font-size: 13px; color: var(--kulrang); margin: 6px 0 14px; }
.qadam { display: none; }
.qadam.faol { display: block; }
.azo { border: 1px solid var(--chiziq); border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
       background: var(--sirt-2); }
.azo-tepa { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.azo-tepa h3 { margin: 0; color: var(--kok-toq); }
.anketa-tugmalar { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.yorliq { font-size: 12px; color: var(--yashil); margin-top: 3px; }

/* Bosh sahifa */
.bosh-bloklar { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.bosh-blok { background: var(--sirt); border: 1px solid var(--chiziq); border-radius: 14px; padding: 26px;
             text-align: center; }
.bosh-blok h2 { margin-top: 0; }
.bosh-blok .btn { margin-top: 10px; padding: 12px 22px; font-size: 16px; }

/* Panel raqamlari */
.raqamlar { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
            margin-bottom: 16px; }
.raqam { background: var(--sirt); border: 1px solid var(--chiziq); border-radius: var(--radius); padding: 14px;
         text-decoration: none; color: inherit; display: block; }
.raqam b { display: block; font-size: 28px; color: var(--kok); }
.raqam span { font-size: 13px; color: var(--kulrang); }
.raqam.diqqat b { color: var(--sariq); }

/* Jadval */
.jadval-oyna { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--sirt); font-size: 14px; }
th, td { border-bottom: 1px solid var(--chiziq-och); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--kok-och); color: var(--kok-toq); font-weight: 600; white-space: nowrap; }
td.son, th.son { text-align: right; white-space: nowrap; }
tr.guruh td { background: var(--sirt-2); font-weight: 700; color: var(--kok-toq); }
td a.son-link { text-decoration: none; font-weight: 600; }
tr:hover td { background: var(--sirt-2); }
.holat { padding: 2px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.holat-tekshiruvda, .holat-yangi { background: var(--ogoh-fon); color: var(--ogoh-matn); }
.holat-tasdiqlangan, .holat-hal_qilindi { background: var(--ok-fon); color: var(--ok-matn); }
.holat-rad_etilgan, .holat-rad, .holat-arxivda { background: var(--xato-fon); color: var(--xato-matn); }
.holat-jarayonda { background: var(--info-fon); color: var(--info-matn); }

.filtr { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px;
         align-items: end; margin-bottom: 14px; }
.sahifalash { margin-top: 12px; display: flex; gap: 10px; align-items: center; }
.ikki-ustun { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) {
  .ikki-ustun { grid-template-columns: 1fr; }
  h1 { font-size: 21px; }
  .logo { width: 100%; }
}
@media print {
  .tepa, .bosmaslik { display: none !important; }
  body { background: #fff; }
}
.karta svg { width: 100%; height: auto; }
.xabar.warning { background: var(--ogoh-fon); border: 1px solid var(--ogoh-chiziq); color: var(--ogoh-matn); }
.xabar.info { background: var(--info-fon); border: 1px solid var(--info-chiziq); color: var(--info-matn); }
/* Iqtisodiyot sahifasi */
.manba-blok { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.doira { width: 220px; height: 220px; border-radius: 50%; position: relative; flex: none;
         -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doira-ich { position: absolute; inset: 42px; background: var(--sirt); border-radius: 50%; display: flex;
             flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.doira-ich b { font-size: 17px; color: var(--matn); }
.doira-ich span { font-size: 12px; color: var(--kulrang); }
.manba-jadval { flex: 1; min-width: 280px; }
.rang { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px;
        -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.chiziq-bar { height: 10px; background: var(--bar-fon); border-radius: 4px; overflow: hidden; margin: 3px 0 2px; }
.chiziq-bar div { height: 100%; background: var(--chart-nuqta); border-radius: 0 4px 4px 0;
                  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.belgi { font-size: 12px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.belgi-past { background: var(--xato-fon); color: var(--xato-matn); }
.belgi-yaqin { background: var(--ogoh-fon); color: var(--ogoh-matn); }
.belgi-yaxshi { background: var(--ok-fon); color: var(--ok-matn); }
.belgi-malumot_yoq { background: var(--neytral-fon); color: var(--neytral-matn); }
.qator-son { display: flex; justify-content: space-between; border-bottom: 1px solid var(--chiziq-och); padding: 5px 0; }
@media (max-width: 760px) { .raqam b { font-size: 22px; } .doira { margin: 0 auto; } }
/* "Navbahor MFY raqamlarda" (Statistika sahifasi tepasi) */
.raqamlarda { position: relative; overflow: hidden; background: #133654; color: #fff; border-radius: 16px;
              padding: 48px 16px 40px; margin-bottom: 22px; }
.raqamlarda-fon { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.raqamlarda-ichki { position: relative; z-index: 1; text-align: center; pointer-events: none; }
.raqamlarda h2 { color: #fff; font-size: clamp(24px, 3.4vw, 38px); font-weight: 600; margin: 0 0 10px; }
.raqamlarda-izoh { color: #d6e2ee; font-size: 16px; max-width: 680px; margin: 0 auto 32px; line-height: 1.5; }
.raqamlarda-qator { display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.raqamlarda-quti { position: relative; display: block; padding: 10px 28px 8px; min-width: 150px; color: #fff;
                   text-decoration: none; pointer-events: auto; border-radius: 8px; transition: background .2s; }
.raqamlarda-quti::before { content: ""; position: absolute; left: 0; top: 10%; width: 1px; height: 80%;
                           background: #c9a227; opacity: .85; }
.raqamlarda-quti:hover, .raqamlarda-quti:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.raqamlarda-son { display: block; font-size: clamp(34px, 5vw, 64px); font-weight: 500; line-height: 1.15;
                  font-variant-numeric: tabular-nums; }
.raqamlarda-nom { display: block; font-size: 15px; margin-top: 4px; color: #eef4fa; }
.raqamlarda.animatsiya .raqamlarda-quti { opacity: 0; transform: translateY(40px);
                                          transition: opacity .8s ease, transform .8s ease, background .2s; }
.raqamlarda.animatsiya .raqamlarda-quti.korindi { opacity: 1; transform: none; }
@media (max-width: 600px) {
  .raqamlarda { padding: 32px 8px 24px; border-radius: 12px; }
  .raqamlarda-izoh { font-size: 14px; margin-bottom: 20px; }
  .raqamlarda-qator { margin-bottom: 6px; }
  .raqamlarda-quti { min-width: 48%; flex: 0 0 48%; padding: 10px 8px 8px; }
  .raqamlarda-nom { font-size: 13px; }
}
@media print { .raqamlarda { display: none; } }

/* Tungi/kunduzgi rejim tugmasi */
.rejim-tugma { background: none; border: 1px solid rgba(255,255,255,.45); color: #fff; border-radius: 8px;
               width: 36px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
               cursor: pointer; padding: 0; flex: none; }
.rejim-tugma:hover { background: rgba(255,255,255,.15); }
.rejim-tugma svg { width: 18px; height: 18px; }
.rejim-tugma .quyosh { display: none; }
html[data-theme="dark"] .rejim-tugma .quyosh { display: block; }
html[data-theme="dark"] .rejim-tugma .oy { display: none; }
.qizil-son { color: var(--qizil-son); }
@media print { .rejim-tugma { display: none; } }

tr.jami-qator td { border-top: 2px solid var(--chiziq); }
