/* Azero Panel — rənglər tasarim.md (2026-11-22, 2026-11-23) üzrə */
:root,
:root[data-theme="dark"] {
  --bg: #0A0E1F;
  --surface: #121735;
  --surface-2: #181E42;
  --line: #262D55;
  --text: #F3F4FF;
  --text-2: #AEB4D8;
  --brand-1: #20B4FF;
  --brand-2: #3A63FF;
  --brand-3: #5B45F0;
  --brand-4: #7C3AED;
  --accent: #7C8CFF;
  --ok: #22C55E;
  --warn: #F5B544;
  --danger: #F26B6B;
  --focus: #5B8CFF;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
:root[data-theme="light"] {
  --bg: #F5F7FC;
  --surface: #FFFFFF;
  --surface-2: #EEF1FA;
  --line: #DCE1EF;
  --text: #0A0E1F;
  --text-2: #4A5175;
  --accent: #3A47D5;
  --ok: #15803D;
  --warn: #A16207;
  --danger: #C0392B;
  --focus: #3A63FF;
  --shadow: 0 8px 24px rgba(20, 30, 80, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- Üst panel ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo { height: 26px; width: auto; display: block; }
:root[data-theme="dark"] .logo-light, :root[data-theme="light"] .logo-dark { display: none; }
.brand-tag {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--text-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px;
}
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a {
  padding: 7px 12px; border-radius: 9px; text-decoration: none; color: var(--text-2);
  white-space: nowrap; font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-chip { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.user-chip b { color: var(--text); font-weight: 600; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 16px;
}

/* ---- Əsas sahə ---- */
.main { max-width: 1080px; margin: 0 auto; padding: 24px 24px 80px; outline: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
h1 { font-size: 24px; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.draft-note {
  font-size: 12px; color: var(--text-2); border: 1px dashed var(--line); border-radius: 10px;
  padding: 6px 10px; margin: 0 0 16px;
}

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > .card + .card { margin-top: 0; }
.stack > .card:last-child { max-width: 560px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }

/* ---- Düymələr ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn-primary {
  border: 0; color: #fff;
  background: linear-gradient(100deg, var(--brand-1), var(--brand-2) 45%, var(--brand-4));
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok); }
.btn-danger { border-color: color-mix(in srgb, var(--danger) 55%, transparent); color: var(--danger); background: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- Filtr çipləri ---- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13px; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--surface-2); color: var(--text); border-color: var(--accent); }

/* ---- Status nişanları (rəng + mətn; yalnız rəngə güvənilmir) ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-yeni { color: var(--brand-1); border-color: color-mix(in srgb, var(--brand-1) 45%, transparent); }
.st-islemde { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.st-yoxlamada { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.st-tamamlandi { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.st-legv { color: var(--text-2); border-color: var(--line); }

/* ---- Sifariş siyahısı ---- */
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 4px 16px; align-items: center;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; color: var(--text);
}
.row:hover { border-color: var(--accent); }
.row-id { color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.row-title { font-weight: 600; overflow-wrap: anywhere; }
.row-meta { grid-column: 2 / 3; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.row .badge { grid-row: 1 / 3; grid-column: 3; }
.empty { text-align: center; padding: 40px 16px; color: var(--text-2); }

/* ---- Detallar ---- */
.back { display: inline-block; margin-bottom: 12px; color: var(--text-2); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--text); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.note-box { white-space: pre-wrap; overflow-wrap: anywhere; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-4));
}
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.tl-title { font-weight: 600; }
.tl-meta { font-size: 13px; color: var(--text-2); }
.tl-note { margin-top: 4px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

.action + .action { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---- Formlar ---- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.hint { font-size: 12.5px; color: var(--text-2); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--bg);
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; }
.form-error { color: var(--danger); font-size: 14px; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

/* ---- Cədvəl (istifadəçilər, bizneslər) ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--text-2); font-weight: 600; font-size: 13px; }
td select { min-height: 36px; padding: 5px 8px; }

/* ---- Bildiriş ---- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 16px; box-shadow: var(--shadow); max-width: calc(100% - 32px);
}
.toast.error { border-color: var(--danger); }

/* ---- Yalnız yerli test zolağı ---- */
.dev-bar {
  position: fixed; right: 12px; bottom: 12px; z-index: 15; font-size: 12px;
  background: var(--surface); border: 1px dashed var(--warn); border-radius: 10px; padding: 6px 8px;
  display: flex; gap: 6px; align-items: center;
}
.dev-bar select { min-height: 30px; padding: 2px 6px; font-size: 12px; width: auto; }

/* ---- Telefon ---- */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 8px 12px; }
  .nav { order: 3; flex-basis: 100%; }
  .topbar-right { margin-left: auto; }
  .user-chip { display: none; }
  .main { padding: 18px 16px 90px; }
  h1 { font-size: 21px; }
  .grid-2 { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr auto; }
  .row-id { grid-column: 1; }
  .row-title { grid-column: 1 / 3; }
  .row-meta { grid-column: 1 / 3; }
  .row .badge { grid-row: 1; grid-column: 2; justify-self: end; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .btn-row .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- Giriş səhifəsi ---- */
.auth-page { display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.auth-logo { height: 34px; align-self: flex-start; }
.btn-google { background: var(--surface); }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }
.ts-box { min-height: 65px; max-width: 100%; overflow: hidden; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.logout-btn { font-size: 13px; }

/* ---- Hesabat (5 bölmə) ---- */
.tab-list { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 16px 0 12px; border-bottom: 1px solid var(--line); }
.tab { padding: 9px 12px; text-decoration: none; color: var(--text-2); white-space: nowrap; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand-3); }
.tab-panel > .card + .card, .tab-panel > div > .card + .card { margin-top: 16px; }
.sub { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
details.sub summary { cursor: pointer; font-weight: 600; }
.small-btn { min-height: 32px; padding: 4px 10px; font-size: 13px; }

.score-card { display: flex; gap: 18px; align-items: center; margin-bottom: 4px; }
.score-ring {
  width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-content: center; text-align: center;
  background: conic-gradient(var(--brand-1), var(--brand-4)); position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.score-num { position: relative; font-size: 26px; font-weight: 700; line-height: 1; }
.score-max { position: relative; font-size: 11px; color: var(--text-2); }
.score-title { font-weight: 700; font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.score-parts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.score-parts b { color: var(--text); }
.sample-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--warn); color: var(--warn); }

.rank-pill { font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; color: #0A0E1F; }
.hm-green { --hm: #22C55E; } .hm-yellow { --hm: #EAB308; } .hm-orange { --hm: #F97316; } .hm-red { --hm: #EF4444; }
.rank-pill.hm-green, .rank-pill.hm-yellow, .rank-pill.hm-orange, .rank-pill.hm-red { background: var(--hm); }

.heatmap-wrap {
  max-width: 420px; margin: 8px auto; border-radius: 16px; padding: 10px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 20% 20%,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 20% 20%,
    var(--surface-2);
}
.heatmap-svg { width: 100%; height: auto; display: block; }
.hm-pt circle { fill: var(--hm); fill-opacity: .9; stroke: rgba(255,255,255,.7); stroke-width: .6; }
.hm-pt text { font-size: 4.2px; font-weight: 700; text-anchor: middle; dominant-baseline: central; fill: #0A0E1F; }
.hm-pt { transform-box: fill-box; transform-origin: center; animation: hmPop .5s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes hmPop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
.heat-legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.heat-legend li { display: flex; align-items: center; gap: 6px; }
.heat-legend .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--hm); }

.ai-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ai-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.ai-name { font-weight: 600; }
.ai-val { font-size: 22px; font-weight: 700; margin: 4px 0; }
.ai-draft { border: 1px solid var(--brand-4); border-radius: 12px; padding: 10px 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ai-mark { color: var(--brand-4); font-weight: 700; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.checks li::before { display: inline-block; width: 20px; font-weight: 700; }
.checks li.ok::before { content: "✓"; color: var(--ok); }
.checks li.no::before { content: "✗"; color: var(--danger); }
.tasks { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.tasks li.done .task-head b { text-decoration: line-through; color: var(--text-2); }
.task-head { display: flex; gap: 8px; align-items: center; cursor: pointer; margin-bottom: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 16px 0; }
.stat { padding: 14px; }
.stat-val { font-size: 22px; font-weight: 700; }
.admin-stats { grid-template-columns: repeat(4, 1fr); }
.stat-link { color: inherit; text-decoration: none; display: block; }
.stat-link:hover { border-color: var(--accent); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input, .filters select { flex: 1 1 160px; min-width: 0; }
.wrap { overflow-wrap: anywhere; word-break: break-word; }
.num-input { width: 120px; max-width: 100%; }
.mt { margin-top: 14px; }
.card.empty ol.steps { text-align: left; margin: 8px auto 16px; max-width: 460px; }
.code-box { font-family: ui-monospace, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .ai-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .score-card { align-items: flex-start; }
}
.invoice-box { max-width: 520px; }

.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-google .g-logo { flex: none; }
.btn-google[hidden] { display: none; }
