/* SAT bosh sahifasi va natijalar — umumiy tokenlar exam.css'dan */
body.sat-home { background: #f7f7f7; }

.home-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 32px; background: #fff; border-bottom: 1px solid #e3e3e3;
}
.brand { font-size: 22px; color: var(--navy); text-decoration: none; font-weight: 500; }
.brand b { color: var(--blue); }
.home-user { font-weight: 500; }

.home-main { max-width: 980px; margin: 0 auto; padding: 32px 20px 60px; }
.home-h1 { font-size: 36px; font-weight: 500; margin: 0 0 8px; }
.home-lead { color: #444; margin: 0 0 26px; font-size: 17px; max-width: 640px; line-height: 1.5; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.home-card { padding: 24px 26px; }
.home-card h2 { margin: 0 0 12px; font-size: 22px; }
.home-card.muted { color: var(--muted); }
.home-list { padding-left: 20px; line-height: 1.6; margin: 0 0 12px; }
.home-warn { color: var(--review); font-weight: 500; }
.home-actions { margin-top: 16px; }
.home-actions .btn-yellow, .msg-act .btn-blue { text-decoration: none; display: inline-block; }
.home-buy { line-height: 1.5; margin: 0; }
.home-h2 { font-size: 24px; font-weight: 500; margin: 40px 0 14px; }
.home-empty { color: var(--muted); }
.home-note { margin-top: 40px; color: var(--muted); font-size: 14px; }
.msg-act { margin-top: 20px; }

/* Natijalarim jadvali */
.hist-card { overflow-x: auto; }
.hist { width: 100%; border-collapse: collapse; }
.hist th, .hist td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee; }
.hist th { font-size: 13px; color: var(--muted); font-weight: 500; }
.hist-score { font-weight: 700; font-size: 18px; color: var(--navy); }
.hist-act a { color: var(--blue); font-weight: 700; text-decoration: none; }

/* Batafsil natija */
.res-back { color: var(--blue); text-decoration: none; font-weight: 500; }
.res-title { font-size: 28px; font-weight: 500; margin: 14px 0 4px; }
.res-date { color: var(--muted); margin-bottom: 22px; }
.res-top { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 20px; }
.score-card { padding: 26px; text-align: center; }
.res-route { margin-top: 10px; font-size: 15px; }
.res-small { color: var(--muted); font-size: 13px; margin: 14px 0 0; line-height: 1.45; }
.dom-card, .skill-card { padding: 22px 24px; }
.skill-card { margin-top: 20px; }
.dom-card h3, .skill-card h3 { margin: 0 0 14px; font-size: 18px; }
.skill-dom { font-weight: 700; margin: 16px 0 8px; color: var(--navy); }

.bar-row {
  display: grid; grid-template-columns: minmax(140px, 260px) 1fr 52px; gap: 12px;
  align-items: center; margin-bottom: 10px; font-size: 15px;
}
.skill-card .bar-row { font-size: 14px; }
.bar-track { height: 10px; background: #e8e8e8; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--blue); }
.bar-val { text-align: right; font-weight: 700; }

.res-filter { display: flex; gap: 8px; margin: 32px 0 14px; flex-wrap: wrap; align-items: center; }
.res-filter h3 { margin: 0 12px 0 0; font-size: 20px; }
.fbtn { background: #fff; border: 1px solid #999; border-radius: 999px; padding: 6px 16px; font-weight: 500; }
.fbtn.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Savol kartochkasi */
.ri { padding: 18px 22px; margin-bottom: 14px; border-left: 5px solid #ccc; }
.ri.is-ok { border-left-color: #2e7d32; }
.ri.is-bad { border-left-color: var(--review); }
.ri-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; }
.ri-num { background: #000; color: #fff; font-weight: 700; min-width: 26px; height: 26px; display: grid; place-items: center; }
.ri-mod { color: var(--muted); }
.ri-badge { margin-left: auto; font-weight: 700; }
.ri-badge.ok, .ri-tag.ok, .t-ok { color: #2e7d32; }
.ri-badge.bad, .ri-tag.bad, .t-bad { color: var(--review); }
.ri-text { font-size: 17px; line-height: 1.6; white-space: pre-line; }
.ri-img { max-width: 100%; max-height: 300px; margin-top: 10px; border: 1px solid #ddd; border-radius: 4px; }
.ri-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ri-opt { display: flex; align-items: center; gap: 12px; border: 1px solid #ccc; border-radius: 8px; padding: 8px 12px; font-size: 16px; }
.ri-opt img { max-height: 80px; }
.ri-opt.correct { border: 2px solid #2e7d32; background: #edf7ee; }
.ri-opt.wrong { border: 2px solid var(--review); background: #fdeeee; }
.ri-tag { margin-left: auto; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ri-spr { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 12px; font-size: 16px; }
.ri-none { color: var(--muted); font-style: italic; margin: 10px 0 0; }

@media (max-width: 700px) {
  .home-top { padding: 12px 16px; }
  .home-h1 { font-size: 28px; }
  .res-top { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr 60px; }
  .bar-row .bar-label { grid-column: 1 / -1; }
}

/* Kurs kartochkasi: progress chizig'i va ikkinchi tugma (8-ish) */
.course-prog { height: 8px; border-radius: 4px; background: rgba(47, 75, 196, .12); overflow: hidden; margin: 4px 0 12px; }
.course-prog > i { display: block; height: 100%; background: var(--blue, #2f4bc4); border-radius: 4px; }
.btn-ghost-sat {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; margin-left: 8px; border: 2px solid var(--navy, #1e2a78); border-radius: 999px;
  color: var(--navy, #1e2a78); background: transparent; text-decoration: none; font-weight: 500;
}

/* ============================================================
   /sat bosh sahifasi — landing (testbaza.uz/home) uslubi.
   Faqat body.sat-home ichida; natija va xabar ko'rinishlari eski klasslarda.
   ============================================================ */
body.sat-home {
  --l-ink: #13254A; --l-soft: #4A5B7A; --l-bg: #F3F6FC; --l-card: #FFFFFF;
  --l-blue: #3B82F6; --l-blue-deep: #1D4ED8; --l-green: #22C55E; --l-line: #D6E0F0;
  --l-shadow: 0 10px 30px -12px rgba(19, 37, 74, .28);
  background: var(--l-bg);
  color: var(--l-ink);
  font-family: Onest, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Header */
body.sat-home .home-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  height: 66px; padding: 0 max(20px, calc((100% - 1100px) / 2));
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--l-line);
}
body.sat-home .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; color: var(--l-ink); text-decoration: none; }
body.sat-home .brand b { padding: 3px 9px; border-radius: 8px; background: var(--l-ink); color: #fff; font-size: .8rem; font-weight: 700; }
body.sat-home .home-link { color: var(--l-soft); text-decoration: none; font-weight: 500; font-size: .95rem; }
body.sat-home .home-link:hover { color: var(--l-ink); }
body.sat-home .home-user { margin-left: auto; font-weight: 600; }
body.sat-home .home-user a { display: inline-flex; padding: 8px 16px; border-radius: 12px; background: var(--l-blue); color: #fff; text-decoration: none; font-size: .92rem; }
body.sat-home .home-user a:hover { background: var(--l-blue-deep); }

/* Sahifa */
body.sat-home .home-main { max-width: 1140px; padding: 44px 20px 72px; }
body.sat-home .home-h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; margin: 0 0 12px; }
body.sat-home .home-lead { color: var(--l-soft); font-size: 1.1rem; max-width: 34em; margin: 0 0 32px; }
body.sat-home .home-grid { grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: stretch; }

/* Kartalar */
body.sat-home #viewHome .home-card {
  display: flex; flex-direction: column;
  padding: 30px 32px; border: 0; border-radius: 22px;
  background: var(--l-card); box-shadow: var(--l-shadow);
}
body.sat-home #viewHome .home-card h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 14px; }
body.sat-home #viewHome .home-card p { line-height: 1.55; }
body.sat-home .home-list { color: var(--l-soft); }
body.sat-home .home-list li::marker { color: var(--l-blue); }

/* Kurs kartasi — sahifaning asosiy urg'usi */
body.sat-home #viewHome #courseCard { background: var(--l-ink); color: #C9D5EA; }
body.sat-home #viewHome #courseCard h2,
body.sat-home #viewHome #courseCard b { color: #fff; }
body.sat-home #courseCard .cc-total { margin: 0 0 6px; color: #fff; font-size: 1.2rem; font-weight: 700; }
body.sat-home .course-prog { height: 8px; margin: 4px 0 14px; border-radius: 4px; background: rgba(255, 255, 255, .16); overflow: hidden; }
body.sat-home .course-prog i { display: block; height: 100%; background: var(--l-green); }

/* Tugmalar */
body.sat-home #viewHome .home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 22px; }
body.sat-home #viewHome .home-actions .btn-yellow {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border: 0; border-radius: 12px;
  background: var(--l-blue); color: #fff; font: inherit; font-weight: 600; text-decoration: none;
  box-shadow: 0 8px 18px -8px rgba(59, 130, 246, .8);
}
body.sat-home #viewHome .home-actions .btn-yellow:hover { background: var(--l-blue-deep); }
body.sat-home #viewHome .home-actions .btn-ghost-sat {
  display: inline-flex; align-items: center; padding: 10px 20px;
  border: 2px solid var(--l-line); border-radius: 12px; background: transparent;
  color: var(--l-ink); font-weight: 600; text-decoration: none;
}
body.sat-home #viewHome #courseCard .btn-ghost-sat { border-color: rgba(255, 255, 255, .3); color: #fff; }
body.sat-home #viewHome #courseCard .btn-ghost-sat:hover { border-color: #fff; }
/* "Ro'yxatdan o'tish" havola tayyor bo'lguncha yashirin turadi */
body.sat-home #viewHome .home-actions .hidden { display: none; }

/* Natijalarim */
body.sat-home .home-h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; margin: 52px 0 14px; }
body.sat-home #viewHome .hist-card { border: 0; border-radius: 18px; background: var(--l-card); box-shadow: var(--l-shadow); }
body.sat-home .hist th, body.sat-home .hist td { border-bottom-color: var(--l-line); }
body.sat-home .hist-score { color: var(--l-ink); }
body.sat-home .hist-act a { color: var(--l-blue-deep); }
body.sat-home .home-empty, body.sat-home .home-note { color: var(--l-soft); }

@media (max-width: 760px) {
  body.sat-home .home-top { gap: 12px; height: 58px; padding: 0 16px; }
  body.sat-home .home-link { display: none; }
  body.sat-home .home-main { padding: 28px 16px 56px; }
  body.sat-home .home-grid { grid-template-columns: 1fr; }
  body.sat-home #viewHome .home-card { padding: 24px 22px; }
}
