/* ============================================
   FleetLook — "Qanday ishlaydi" sahifasi (how-it-works.html)
   style.css dagi o'zgaruvchilar va navbar/til tanlagich ustiga quriladi.
   ============================================ */

.docs-page {
  --doc-text: #c4c8d6;
  --sev-critical: #ef4444;
  --sev-high: #f97316;
  --sev-medium: #f59e0b;
  --sev-low: #60a5fa;
  --sev-info: #6b7280;
  padding-top: 64px;
}
.docs-page .ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.15em; }
.docs-page .logo-icon .ic { width: 1.5rem; height: 1.5rem; vertical-align: -0.3em; }
.docs-page .nav-links a.active { color: var(--text); }
.docs-page .nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }

.docs-skip {
  position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; text-decoration: none; font-size: 0.9rem; transition: top .15s;
}
.docs-skip:focus { top: 12px; }

/* ---- HERO ---- */
.docs-hero { position: relative; overflow: hidden; padding: 64px 0 48px; border-bottom: 1px solid var(--border); background: var(--bg); }
.docs-hero::before {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 620px; height: 620px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(108,99,255,0.22), transparent 70%);
}
.docs-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.docs-hero-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.docs-back {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--text2); text-decoration: none; font-size: 0.88rem;
  padding: 6px 12px 6px 8px; border: 1px solid var(--border); border-radius: 99px; background: rgba(255,255,255,0.03); transition: color .2s, border-color .2s;
}
.docs-back:hover { color: var(--text); border-color: var(--accent); }
.docs-back .ic { width: 1rem; height: 1rem; }
.docs-kicker { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent2); font-weight: 700; margin-bottom: 14px; }
.docs-hero h1 { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.1; max-width: 18ch; }
.docs-sub { max-width: 62ch; margin-top: 18px; color: var(--text2); font-size: 1.05rem; line-height: 1.65; }
html[lang="uz"] .docs-hero h1 { overflow-wrap: anywhere; }

/* ---- UMUMIY MAKET ---- */
.docs-layout { max-width: 1180px; margin: 0 auto; padding: 40px 24px 96px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
.docs-toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.toc-title { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); font-weight: 700; margin-bottom: 12px; padding-left: 12px; }
.docs-toc ol { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.docs-toc a {
  display: flex; gap: 10px; align-items: baseline; padding: 7px 12px; border-radius: 8px; color: var(--text2); text-decoration: none; font-size: 0.88rem; line-height: 1.35;
  border-left: 2px solid transparent; transition: color .15s, background .15s, border-color .15s;
}
.docs-toc a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.docs-toc a.active { color: var(--text); background: rgba(108,99,255,0.12); border-left-color: var(--accent); }
.toc-num { flex: none; width: 1.5em; font-variant-numeric: tabular-nums; color: var(--text3); font-size: 0.78rem; }
.docs-toc a.active .toc-num { color: var(--accent2); }
.docs-main { min-width: 0; }

/* ---- BO'LIMLAR ---- */
.docs-sec { scroll-margin-top: 84px; padding: 44px 0 8px; border-top: 1px solid var(--border); }
.docs-sec:first-child { padding-top: 0; border-top: 0; }
.docs-sec > h2 { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-family: var(--font-head); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; line-height: 1.2; }
.sec-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; border-radius: 12px; color: var(--accent2); background: rgba(108,99,255,0.14); border: 1px solid rgba(108,99,255,0.3); }
.sec-ic .ic { width: 1.35rem; height: 1.35rem; }
.sec-num { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; color: var(--text3); font-variant-numeric: tabular-nums; align-self: flex-start; padding-top: 4px; }
.docs-sec h3 { font-family: var(--font-head); font-size: 1.12rem; font-weight: 700; margin: 34px 0 14px; color: var(--text); }
.docs-sec h4 { font-size: 0.98rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.docs-sec p { color: var(--doc-text); font-size: 0.97rem; line-height: 1.75; margin-bottom: 14px; max-width: 78ch; }
.docs-sec p.lead { font-size: 1.12rem; line-height: 1.7; color: var(--text); }

/* ro'yxatlar */
.dlist, .olist { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; max-width: 78ch; }
.dlist li, .olist li { position: relative; color: var(--doc-text); font-size: 0.95rem; line-height: 1.7; padding-left: 26px; }
.dlist li::before { content: ''; position: absolute; left: 6px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.olist { counter-reset: ol; }
.olist li { counter-increment: ol; padding-left: 38px; }
.olist li::before {
  content: counter(ol); position: absolute; left: 0; top: 0.1em; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: var(--accent2); background: rgba(108,99,255,0.14); border: 1px solid rgba(108,99,255,0.3);
}

/* izoh qutilari */
.callout { display: flex; gap: 14px; margin: 22px 0; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); border-left-width: 3px; background: var(--bg3); max-width: 78ch; }
.callout .ic { width: 1.25rem; height: 1.25rem; margin-top: 3px; }
.callout p { margin: 0; font-size: 0.93rem; line-height: 1.65; }
.callout-info { border-left-color: var(--blue); } .callout-info .ic { color: var(--blue); }
.callout-warn { border-left-color: var(--yellow); background: rgba(245,158,11,0.06); } .callout-warn .ic { color: var(--yellow); }
.callout-ok { border-left-color: var(--green); } .callout-ok .ic { color: var(--green); }

/* kartalar */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 6px 0 22px; }
.dcard { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color .2s, transform .2s; }
.dcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.dcard-ic { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; margin-bottom: 12px; color: var(--accent2); background: rgba(108,99,255,0.14); }
.dcard-ic .ic { width: 1.25rem; height: 1.25rem; }
.dcard p { font-size: 0.88rem; line-height: 1.6; margin: 0; color: var(--text2); }

/* qadamlar (vertikal chiziq) */
.pipe { list-style: none; margin: 8px 0 22px; padding: 0; max-width: 78ch; }
.pipe > li { position: relative; display: flex; gap: 16px; padding-bottom: 22px; }
.pipe > li:last-child { padding-bottom: 0; }
.pipe > li:not(:last-child)::before { content: ''; position: absolute; left: 16px; top: 36px; bottom: 4px; width: 2px; background: linear-gradient(var(--accent), rgba(108,99,255,0.12)); }
.pipe-n {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 0.9rem; color: #fff; background: var(--accent); box-shadow: 0 0 0 5px rgba(108,99,255,0.16);
}
.pipe > li > div { min-width: 0; padding-top: 3px; }
.pipe p { margin: 0; font-size: 0.92rem; line-height: 1.7; }

/* jadvallar */
.tbl-wrap { margin: 14px 0 24px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg3); }
.dt { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dt th { text-align: left; padding: 12px 16px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border); font-weight: 700; }
.dt td { padding: 13px 16px; vertical-align: top; color: var(--doc-text); line-height: 1.55; border-bottom: 1px solid var(--border); }
.dt tbody tr:last-child td, .dt tfoot tr:last-child td { border-bottom: 0; }
.dt tbody tr:hover td { background: rgba(255,255,255,0.025); }
.dt td:first-child { color: var(--text); font-weight: 600; }
.dt .num, .dt th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt tfoot td { background: rgba(108,99,255,0.07); color: var(--text); font-weight: 600; border-top: 1px solid var(--border2); }
.dt b { color: var(--text); }

/* ta'rif ro'yxati */
.defs { margin: 8px 0 22px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg3); max-width: 100%; }
.defs > div { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.defs > div:last-child { border-bottom: 0; }
.defs dt { font-weight: 700; color: var(--text); font-size: 0.92rem; line-height: 1.5; }
.defs dd { color: var(--doc-text); font-size: 0.92rem; line-height: 1.7; margin: 0; }

/* ishonchlilik: og'irliklar */
.weights { margin: 10px 0 26px; }
.wbar { display: flex; height: 38px; border-radius: 10px; overflow: hidden; gap: 3px; }
.wseg { display: flex; align-items: center; justify-content: center; min-width: 0; font-size: 0.82rem; font-weight: 700; color: #fff; }
.wlist { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.wlist li { display: flex; gap: 12px; padding: 14px 16px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); }
.wdot { flex: none; width: 12px; height: 12px; border-radius: 4px; margin-top: 5px; }
.wlist b { font-size: 0.95rem; color: var(--text); }
.wnum { margin-left: 8px; font-size: 0.78rem; font-weight: 700; color: var(--accent2); font-variant-numeric: tabular-nums; }
.wlist p { margin: 4px 0 0; font-size: 0.85rem; line-height: 1.6; color: var(--text2); }
.c1 { background: #6c63ff; } .c2 { background: #22c55e; } .c3 { background: #f59e0b; } .c4 { background: #ef4444; } .c5 { background: #3b82f6; }

/* bayroq darajalari */
.sev { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 99px; font-size: 0.8rem; font-weight: 700; border: 1px solid; white-space: nowrap; }
.sev::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sev-critical { color: var(--sev-critical); background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.35); }
.sev-high { color: var(--sev-high); background: rgba(249,115,22,0.12); border-color: rgba(249,115,22,0.35); }
.sev-medium { color: var(--sev-medium); background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.35); }
.sev-low { color: var(--sev-low); background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.35); }
.sev-info { color: #9ca3af; background: rgba(107,114,128,0.14); border-color: rgba(107,114,128,0.35); }

/* daraja shkalasi */
.scale { position: relative; margin: 30px 0 46px; }
.scale-bar { display: flex; height: 18px; border-radius: 99px; overflow: hidden; gap: 3px; }
.scale-bar i { display: block; }
.scale-high { background: var(--red); } .scale-medium { background: var(--yellow); } .scale-low { background: var(--green); }
.scale-cap { position: absolute; top: -8px; width: 0; height: 34px; border-left: 2px dashed var(--text); }
.scale-cap span { position: absolute; top: -20px; left: 0; transform: translateX(-50%); font-size: 0.72rem; font-weight: 700; color: var(--text); white-space: nowrap; background: var(--bg); padding: 0 4px; }
.scale-ticks { position: relative; height: 22px; margin-top: 8px; font-size: 0.72rem; color: var(--text3); font-variant-numeric: tabular-nums; }
.scale-ticks span { position: absolute; transform: translateX(-50%); }
.scale-ticks span:first-child { transform: none; }
.scale-ticks span:last-child { transform: translateX(-100%); }
.dt .lvl { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }

/* savollar */
.faq { margin: 8px 0 28px; display: flex; flex-direction: column; gap: 10px; max-width: 78ch; }
.faq details { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s; }
.faq details[open] { border-color: rgba(108,99,255,0.45); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; position: relative; font-weight: 600; font-size: 0.97rem; color: var(--text); line-height: 1.5; border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--text2); border-bottom: 2px solid var(--text2); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.faq details p { margin: 0; padding: 0 18px 18px; font-size: 0.93rem; }

/* yakuniy blok */
.docs-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin: 40px 0 0; padding: 28px 30px; border-radius: 18px;
  border: 1px solid rgba(108,99,255,0.4); background: linear-gradient(135deg, rgba(108,99,255,0.18), rgba(108,99,255,0.04));
}
.docs-cta h3 { margin: 0 0 6px; font-size: 1.3rem; }
.docs-cta p { margin: 0; color: var(--text2); }
.docs-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.docs-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 99px; font-size: 0.92rem; font-weight: 600; text-decoration: none; border: 1px solid var(--accent); transition: background .2s, border-color .2s, color .2s; }
.docs-btn .ic { width: 1.05rem; height: 1.05rem; }
.docs-btn-primary { background: var(--accent); color: #fff; }
.docs-btn-primary:hover { background: var(--accent2); border-color: var(--accent2); }
.docs-btn-ghost { background: transparent; color: var(--text); border-color: var(--border2); }
.docs-btn-ghost:hover { border-color: var(--accent); color: var(--accent2); }
.docs-btn:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* ---- MOBIL ---- */
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 28px; }
  .docs-toc { position: static; max-height: none; overflow: visible; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg3); margin-bottom: 24px; }
  .docs-toc { padding: 14px 14px 10px; }
  .toc-title { padding-left: 4px; margin-bottom: 10px; }
  .docs-toc ol { flex-direction: row; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
  .docs-toc li { flex: none; }
  .docs-toc a { border: 1px solid var(--border); border-radius: 99px; padding: 6px 12px; white-space: nowrap; }
  .docs-toc a.active { border-color: var(--accent); }
  .toc-num { display: none; }
}
@media (max-width: 720px) {
  .docs-hero { padding: 40px 0 34px; }
  .docs-hero-inner { padding: 0 16px; }
  .docs-layout { padding: 22px 16px 72px; }
  .docs-sec { padding-top: 34px; }
  .docs-sec > h2 { gap: 10px; }
  .sec-ic { width: 36px; height: 36px; }
  .sec-num { display: none; }
  .defs > div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 16px; }
  .wlist { grid-template-columns: minmax(0, 1fr); }
  .wseg { font-size: 0.7rem; }
  /* jadval qatorlari kartaga aylanadi: ustun nomi (data-label) har katak oldida */
  .tbl-wrap { border: 0; background: transparent; overflow: visible; }
  .dt, .dt tbody, .dt tfoot, .dt tr, .dt td { display: block; width: 100%; }
  .dt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dt tr { margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg3); overflow: hidden; }
  .dt td { display: grid; grid-template-columns: minmax(84px, 36%) minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; }
  .dt td::before { content: attr(data-label); color: var(--text3); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; padding-top: 2px; }
  .dt td:first-child { background: rgba(108,99,255,0.08); }
  .dt .num { text-align: left; }
  .dt td.span { grid-template-columns: minmax(0, 1fr); background: rgba(108,99,255,0.07); }
  .dt td.span::before { display: none; }
  .dt tbody tr:hover td { background: transparent; }
  .dt tbody tr:hover td:first-child { background: rgba(108,99,255,0.08); }
  .dt tfoot td { border-top: 0; }
  .docs-cta { padding: 22px 20px; }
  .docs-cta-btns { width: 100%; }
  .docs-btn { flex: 1 1 100%; justify-content: center; }
  .scale-cap span { font-size: 0.66rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dcard, .dcard:hover { transition: none; transform: none; }
  html { scroll-behavior: auto; }
}
@media print {
  .navbar, .docs-toc, .docs-skip, .docs-cta, .docs-back { display: none !important; }
  .docs-page { padding-top: 0; background: #fff; color: #000; }
  .docs-layout { display: block; }
  .faq details:not([open]) > *:not(summary) { display: block; }
}

/* ---- IMKONIYATLAR SAHIFASI (features.html) ---- */
.feat-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 96px; }
.fstats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: -28px; }
.fstat { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.fstat b { display: block; font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; line-height: 1.1; color: var(--accent2); font-variant-numeric: tabular-nums; }
.fstat span { display: block; margin-top: 4px; color: var(--text2); font-size: 0.85rem; line-height: 1.4; }
.fnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.fnav a { padding: 7px 14px; border: 1px solid var(--border); border-radius: 99px; color: var(--text2); text-decoration: none; font-size: 0.86rem; transition: color .15s, border-color .15s, background .15s; }
.fnav a:hover { color: var(--text); border-color: var(--accent); background: rgba(108,99,255,0.1); }
.fnav a:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.features-page .docs-sec { padding-top: 40px; }
.fsec-lead { max-width: 70ch; }
.features-page .cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dcard h4 { margin-bottom: 6px; }
.fmore { margin: 4px 0 0; }
.fmore a { display: inline-flex; align-items: center; gap: 8px; color: var(--accent2); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.fmore a:hover { color: var(--text); text-decoration: underline; }
.fmore a:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; border-radius: 4px; }
.fmore .ic { width: 1rem; height: 1rem; transition: transform .2s; }
.fmore a:hover .ic { transform: translateX(3px); }
@media (max-width: 720px) {
  .feat-wrap { padding: 0 16px 72px; }
  .fstats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -20px; gap: 10px; }
  .fstat { padding: 14px 16px; }
  .fstat b { font-size: 1.8rem; }
  .fnav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
  .fnav a { flex: none; white-space: nowrap; }
  .features-page .docs-sec { padding-top: 32px; }
}
@media print { .fnav, .fstats { display: none !important; } }
