/* Dokon — dizayn tizimi. Yorug' va qorong'i rejim avtomatik (tizim sozlamasi), qo'lda almashtirish mumkin. */
:root {
  --bg: #f6f7f5;
  --panel: #ffffff;
  --panel-2: #f0f3f1;
  --text: #14211d;
  --muted: #5b6b66;
  --line: #dfe5e2;
  --brand: #0d7a6b;
  --brand-2: #0a5f53;
  --brand-ink: #ffffff;
  --accent: #e8a317;
  --ok: #167a3e;
  --ok-bg: #e3f5ea;
  --warn: #8a5a00;
  --warn-bg: #fdf1d6;
  --bad: #b3261e;
  --bad-bg: #fbe7e5;
  --info: #1d5fa8;
  --info-bg: #e4eefa;
  --shadow: 0 1px 2px rgba(16, 33, 29, .06), 0 6px 20px rgba(16, 33, 29, .06);
  --radius: 14px;
  --radius-s: 9px;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1513; --panel: #151e1b; --panel-2: #1c2723; --text: #e7efec; --muted: #94a6a0; --line: #263632;
    --brand: #2bb3a0; --brand-2: #4cc9b7; --brand-ink: #04211c; --accent: #f0b43a;
    --ok: #55d08a; --ok-bg: #12301f; --warn: #f0c261; --warn-bg: #33270b; --bad: #ff8b83; --bad-bg: #3a1714; --info: #7db4f0; --info-bg: #12263d;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1513; --panel: #151e1b; --panel-2: #1c2723; --text: #e7efec; --muted: #94a6a0; --line: #263632;
  --brand: #2bb3a0; --brand-2: #4cc9b7; --brand-ink: #04211c; --accent: #f0b43a;
  --ok: #55d08a; --ok-bg: #12301f; --warn: #f0c261; --warn-bg: #33270b; --bad: #ff8b83; --bad-bg: #3a1714; --info: #7db4f0; --info-bg: #12263d;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; word-break: break-all; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
main { flex: 1; padding: 22px 0 48px; }

/* ---- yuqori panel ---- */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.28rem; color: var(--text); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; padding: 10px 14px 10px 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }
.search input:focus { background: var(--panel); border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a, .nav button { white-space: nowrap; }

/* ---- tugmalar ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 650; cursor: pointer; text-decoration: none !important; line-height: 1.2; min-height: 42px;
  transition: filter .15s, transform .05s, background .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.off { opacity: .55; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--panel-2); filter: none; }
.btn.soft { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.btn.bad { background: var(--bad); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.sm { padding: 6px 13px; min-height: 34px; font-size: .9rem; }
.btn.lg { padding: 13px 26px; font-size: 1.05rem; min-height: 50px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 50%; display: inline-flex; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---- kartochkalar ---- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.app-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); transition: border-color .15s, transform .1s, box-shadow .15s; }
.app-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow); transform: translateY(-1px); }
.app-card .meta { min-width: 0; flex: 1; }
.app-card .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card .ds { color: var(--muted); font-size: .88rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.app-card .st { margin-top: 6px; display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .82rem; flex-wrap: wrap; }

.ico { width: 64px; height: 64px; border-radius: 15px; flex: none; background: var(--panel-2); object-fit: cover; box-shadow: inset 0 0 0 1px var(--line); }
.ico.xl { width: 112px; height: 112px; border-radius: 25px; }
.ico.sm { width: 44px; height: 44px; border-radius: 11px; }
.ico-ph { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.5rem; }
.ico.xl.ico-ph { font-size: 2.7rem; }
.ico.sm.ico-ph { font-size: 1.1rem; }

/* ---- chip, badge ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: .92rem; cursor: pointer; font-weight: 550; }
.chip:hover { border-color: var(--brand); text-decoration: none; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }

/* ---- forma ---- */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 5px; }
label.f > small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=search], textarea, select {
  width: 100%; padding: 10px 13px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; min-height: 42px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.sp { justify-content: space-between; }
.cols2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .cols2 { grid-template-columns: 1fr; } }
.err { color: var(--bad); font-size: .9rem; min-height: 1.3em; margin: 4px 0; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; background: var(--panel-2); }
.drop:hover, .drop.on { border-color: var(--brand); color: var(--text); }
.progress { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }

/* ---- jadval ---- */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 650; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; background: var(--panel-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* ---- bo'limlar ---- */
.hero { padding: 34px 0 10px; }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); max-width: 18ch; }
.hero p { color: var(--muted); max-width: 56ch; font-size: 1.08rem; }
.sec { margin-top: 32px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.sec-h h2 { margin: 0; }
.stars { display: inline-flex; gap: 1px; color: var(--accent); vertical-align: middle; }
.stars svg { width: 15px; height: 15px; }
.stars .e { color: var(--line); }
.facts { display: flex; gap: 22px; flex-wrap: wrap; margin: 16px 0; }
.fact { text-align: center; min-width: 70px; }
.fact b { display: block; font-size: 1.05rem; }
.fact span { color: var(--muted); font-size: .8rem; }
.shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.shots img { height: 380px; width: auto; border-radius: 14px; border: 1px solid var(--line); scroll-snap-align: start; flex: none; background: var(--panel-2); cursor: zoom-in; }
@media (max-width: 640px) { .shots img { height: 300px; } }
.two { display: grid; gap: 22px; grid-template-columns: 1fr 300px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border: 0; }
.reply { margin: 8px 0 0 14px; padding: 8px 12px; background: var(--panel-2); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; font-size: .92rem; }
.bars .b { display: grid; grid-template-columns: 14px 1fr 36px; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); }
.bars .b i { display: block; height: 8px; border-radius: 99px; background: var(--panel-2); position: relative; overflow: hidden; }
.bars .b i > u { position: absolute; inset: 0 auto 0 0; background: var(--accent); text-decoration: none; }
.notice { padding: 12px 16px; border-radius: var(--radius-s); background: var(--info-bg); color: var(--info); margin-bottom: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.steps .s { padding: 5px 12px; border-radius: 999px; font-size: .82rem; background: var(--panel-2); color: var(--muted); font-weight: 650; }
.steps .s.on { background: var(--brand); color: var(--brand-ink); }
.steps .s.done { background: var(--ok-bg); color: var(--ok); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { display: block; font-size: 1.6rem; letter-spacing: -.02em; }
.kpi span { color: var(--muted); font-size: .85rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--muted); font-weight: 650; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }
.tabs .n { background: var(--bad); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .74rem; margin-left: 6px; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding-top: 8px; }
.chart i { flex: 1; background: color-mix(in srgb, var(--brand) 70%, transparent); border-radius: 3px 3px 0 0; min-height: 2px; }
.chart i:hover { background: var(--brand); }
.ul { margin: 0; padding-left: 1.2em; }
.ul li { margin: 3px 0; }
.perm { display: inline-block; margin: 3px 4px 3px 0; padding: 2px 9px; border-radius: 6px; background: var(--panel-2); font-size: .8rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
.perm.risk { background: var(--warn-bg); color: var(--warn); }

/* ---- modal va xabarlar ---- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(8, 14, 12, .55); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--panel); border-radius: 18px; max-width: 480px; width: 100%; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal.wide { max-width: 720px; }
.modal h2 { margin-top: 0; }
.toasts { position: fixed; z-index: 80; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); pointer-events: none; }
.toast { background: #17231f; color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.35); max-width: 520px; font-size: .95rem; pointer-events: auto; animation: tin .2s ease-out; }
.toast.bad { background: #8d1d17; } .toast.ok { background: #11663a; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: sp .8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px 0; }
.lightbox img { max-height: 86vh; max-width: 100%; border-radius: 12px; margin: 0 auto; }

footer.foot { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: .88rem; background: var(--panel); }
footer.foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 720px) {
  .top .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .nav { margin-left: auto; }
  h1 { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
