/* ============================================================
   USTOZ AI — Premium edtech design system
   Deep green accent · sand neutrals · charcoal text
   ============================================================ */

/* Shriftlar head.ejs'da <link rel="preconnect"> + stylesheet bilan yuklanadi
   (CSS @import render bloklaydigani uchun olib tashlandi). */

:root {
  /* ---- Brand greens ---- */
  --green-900: #0a3326;
  --green-800: #0c402f;
  --green-700: #0f5132;   /* primary */
  --green-600: #156c43;
  --green-500: #1f8a57;
  --green-400: #3aa978;
  --green-300: #7cc6a4;
  --green-200: #bfe3d2;
  --green-100: #e3f2ea;
  --green-50:  #f1f8f4;

  --accent:        var(--green-700);
  --accent-hover:  var(--green-800);
  --accent-soft:   var(--green-100);
  --accent-tint:   var(--green-50);

  /* ---- Sand / beige ---- */
  --sand-700: #b8a888;
  --sand-500: #d8c9a8;
  --sand-300: #ece3d0;
  --sand-200: #f3ecdd;
  --sand-100: #f8f3e9;

  /* ---- Gold (premium / certificates, used sparingly) ---- */
  --gold-600: #b88a2e;
  --gold-500: #c99a3f;
  --gold-100: #f6edd8;

  /* ---- Neutrals ---- */
  --ink-900: #16201b;   /* charcoal headings */
  --ink-800: #1f2a24;
  --ink-700: #2b352f;
  --ink-600: #475149;   /* body */
  --ink-500: #69736b;
  --ink-400: #919a92;   /* muted */
  --ink-300: #c2c8c3;
  --line:    #e7eae6;
  --line-soft:#eff1ed;
  --surface: #ffffff;
  --surface-2: #f7f9f6;  /* app bg, slightly green-tinted */
  --surface-3: #eef2ed;

  /* ---- Status ---- */
  --rose-600:#c0473f; --rose-100:#fbeae8;
  --amber-600:#c08a1e; --amber-100:#fbf1d8;
  --blue-600:#2c6fb3; --blue-100:#e6eff7;

  /* ---- Radii ---- */
  --r-xs: 7px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---- Shadows (soft) ---- */
  --sh-xs: 0 1px 2px rgba(16,40,28,.05);
  --sh-sm: 0 2px 8px rgba(16,40,28,.06);
  --sh-md: 0 8px 24px rgba(16,40,28,.08);
  --sh-lg: 0 20px 48px rgba(16,40,28,.10);
  --sh-xl: 0 32px 70px rgba(16,40,28,.14);

  /* ---- Type ----
     Onest — lotin/kirill uchun. Arab harflari Onest'da yo'q, shuning uchun
     ular avtomatik Amiri (keyin Noto Naskh) shriftiga tushadi — butun saytda
     arabcha matn klasssiz ham chiroyli ko'rinadi. */
  --font: 'Onest', 'Amiri', 'Noto Naskh Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ar: 'Amiri', 'Noto Naskh Arabic', serif;
  --font-ar-ui: 'Noto Naskh Arabic', serif;

  /* ---- Density (overridable by tweaks) ---- */
  --density: 1;
  --pad: calc(1rem * var(--density));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-700);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 { color: var(--ink-900); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.ar { font-family: var(--font-ar); direction: rtl; }
.ar-ui { font-family: var(--font-ar-ui); direction: rtl; }

/* ---------- Layout helpers ---------- */
.container { max-width: 1200px; margin: 0 auto; padding-inline: 40px; }
.wide { max-width: 1320px; }
.muted { color: var(--ink-500); }
.eyebrow {
  display:inline-flex; align-items:center; gap:8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-600);
}
.eyebrow::before { content:''; width:18px; height:1.5px; background: var(--green-400); border-radius:2px; }
.section-title { font-size: clamp(28px, 3vw, 40px); }
.lede { font-size: 18px; color: var(--ink-600); line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family: var(--font); font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; transition: .18s ease; white-space: nowrap; line-height:1;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color:#fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--sh-md); }
.btn-ghost { background: transparent; color: var(--ink-700); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-300); }
.btn-soft { background: var(--accent-soft); color: var(--green-700); }
.btn-soft:hover { background: var(--green-200); }
.btn-white { background:#fff; color: var(--green-700); box-shadow: var(--sh-sm); }
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
.btn-gold { background: var(--gold-500); color:#3a2c08; }
.btn-gold:hover { background: var(--gold-600); color:#fff; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }
.btn-block { width:100%; }

/* ---------- Chips / badges ---------- */
.chip {
  display:inline-flex; align-items:center; gap:7px; white-space:nowrap;
  padding: 8px 15px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 500; color: var(--ink-600);
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition:.15s;
}
.chip:hover { border-color: var(--green-300); color: var(--green-700); }
.chip.active { background: var(--accent); color:#fff; border-color: var(--accent); }
.badge {
  display:inline-flex; align-items:center; gap:6px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; letter-spacing:.01em;
}
.badge-green { background: var(--green-100); color: var(--green-700); }
.badge-sand  { background: var(--sand-200); color: #806b3e; }
.badge-gold  { background: var(--gold-100); color: var(--gold-600); }
.badge-rose  { background: var(--rose-100); color: var(--rose-600); }
.badge-blue  { background: var(--blue-100); color: var(--blue-600); }
.badge-amber { background: var(--amber-100); color: var(--amber-600); }
.badge-outline { background:#fff; border:1px solid var(--line); color: var(--ink-600); }

.dot { width:8px; height:8px; border-radius:50%; display:inline-block; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-xs);
}
.card-pad { padding: calc(26px * var(--density)); }
.card-hover { transition:.2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--green-200); }

/* ---------- Progress ---------- */
.bar { height: 8px; background: var(--surface-3); border-radius: var(--r-pill); overflow:hidden; }
.bar > span { display:block; height:100%; background: var(--accent); border-radius: var(--r-pill); }
.bar-gold > span { background: var(--gold-500); }

/* ---------- Avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--green-100); display:grid; place-items:center; color: var(--green-700); font-weight:700; }

/* ---------- Forms ---------- */
.field { display:flex; flex-direction:column; gap:7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink-700); }
.input, .textarea, .select {
  font-family: var(--font); font-size: 15px; color: var(--ink-800, var(--ink-900));
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: #fff; transition:.15s; width:100%;
}
.input:focus, .textarea:focus, .select:focus { outline:none; border-color: var(--green-400); box-shadow: 0 0 0 3px var(--green-100); }
.input::placeholder { color: var(--ink-400); }
.search {
  display:flex; align-items:center; gap:10px; background:#fff;
  border:1px solid var(--line); border-radius: var(--r-pill); padding: 11px 18px;
}
.search input { border:none; outline:none; font-family: var(--font); font-size:15px; width:100%; background:transparent; }

/* ---------- Geometric motif ---------- */
.motif-bg {
  background-image: url("assets/geo-pattern.svg");
  background-size: 220px;
}

/* ---------- Section bands ---------- */
.band-sand { background: var(--sand-100); }
.band-tint { background: var(--surface-2); }
.band-green { background: var(--green-700); color:#fff; }
.band-green h1,.band-green h2,.band-green h3 { color:#fff; }

/* ---------- Tables (admin) ---------- */
.table { width:100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align:left; font-size:12px; letter-spacing:.04em; text-transform:uppercase; color: var(--ink-400); font-weight:600; padding: 12px 16px; border-bottom:1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom:1px solid var(--line-soft); color: var(--ink-700); }
.table tbody tr:hover { background: var(--surface-2); }

/* ---------- Scroll niceties ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 8px; border: 2px solid #fff; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Utility ---------- */
.flex { display:flex; } .col { flex-direction:column; }
.items-center { align-items:center; } .justify-between { justify-content:space-between; }
.gap-2{gap:8px;} .gap-3{gap:12px;} .gap-4{gap:16px;} .gap-5{gap:20px;} .gap-6{gap:24px;}
.grid { display:grid; }
.rounded-full { border-radius: 50%; }
.shadow-md { box-shadow: var(--sh-md); }

/* Tilga mos SVG bayroqlar (kurs kartalari) */
.flag-svg{display:inline-block;width:1.55em;height:1.04em;border-radius:4px;overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,.18),0 0 0 1px rgba(0,0,0,.04);vertical-align:middle;line-height:0}
.flag-svg svg{width:100%;height:100%;display:block}

/* Qo'sh-tegish (double-tap) zoomini o'chirish — scroll ishlayveradi.
   Matnni kattalashtirish faqat A−/A+ bilan; ekran o'lchami qotib turadi. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
