:root {
  --bg: #eef6ff;
  --bg-strong: #d8ebff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --ink: #10345b;
  --muted: #5d7ea1;
  --line: rgba(91, 161, 227, 0.22);
  --accent: #1677ff;
  --accent-2: #39baf4;
  --accent-3: #0f5fc8;
  --success: #0f9f6e;
  --danger: #d6456f;
  --shadow: 0 20px 50px rgba(27, 82, 144, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(57, 186, 244, 0.28), transparent 26%),
    radial-gradient(circle at 100% 0%, rgba(22, 119, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #f7fbff 0%, #edf6ff 46%, #e7f2ff 100%);
}

.site-glow {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(32px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.site-glow-left {
  left: -10rem;
  top: -8rem;
  background: rgba(57, 186, 244, 0.36);
}

.site-glow-right {
  right: -10rem;
  top: 8rem;
  background: rgba(22, 119, 255, 0.22);
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 26px 20px;
  background:
    linear-gradient(180deg, rgba(13, 69, 135, 0.98), rgba(14, 93, 177, 0.92)),
    radial-gradient(circle at top, rgba(255,255,255,0.14), transparent 30%);
  color: #f4f9ff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.brand {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: white;
  background:
    linear-gradient(135deg, #8de0ff, #49bfff 52%, #1f7dff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 24px rgba(17, 65, 121, 0.35);
}

.brand-kicker {
  display: block;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  color: #bfe8ff;
  font-weight: 800;
}

.brand h1, .hero h2, .panel h2, .panel h3, .card h4 {
  margin: 0;
}

.brand h1 {
  margin-top: 4px;
  font-size: 28px;
}

.brand-copy {
  margin: 12px 0 0;
  color: rgba(244, 249, 255, 0.82);
  font-size: 14px;
  line-height: 1.5;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav a,
.ghost,
.actions a {
  transition: .2s ease;
}

.nav a,
.ghost {
  color: #f8fcff;
  text-decoration: none;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  font-weight: 600;
}

.nav a:hover,
.ghost:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.12);
}

.ghost {
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.ghost.danger {
  color: #fff;
  background: linear-gradient(135deg, #e6678d, #d6456f);
  border: none;
}

.content {
  padding: 22px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.hero,
.panel,
.login-card,
.card,
.stat {
  backdrop-filter: blur(16px);
}

.hero,
.panel,
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.hero,
.panel {
  padding: 22px;
}

.hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(234, 246, 255, 0.92)),
    linear-gradient(135deg, rgba(57,186,244,0.08), rgba(22,119,255,0.10));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.stat {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(227, 241, 255, 0.88));
  border: 1px solid rgba(87, 159, 231, 0.2);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}

.stat strong {
  font-size: 28px;
  color: var(--accent-3);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: 0 10px 24px rgba(56, 115, 182, 0.08);
}

.stack {
  display: grid;
  gap: 14px;
  max-width: 780px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}

input,
select,
button,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.96);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(22, 119, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

button {
  background: linear-gradient(135deg, var(--accent), #46c3ff);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(22, 119, 255, 0.22);
}

button:hover {
  transform: translateY(-1px);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(91, 161, 227, 0.16);
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-card {
  width: min(480px, 100%);
  padding: 28px;
}

.alert {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(214, 69, 111, 0.1);
  border: 1px solid rgba(214, 69, 111, 0.18);
  color: #7a2141;
  margin: 12px 0;
}

.alert.success {
  background: rgba(15, 159, 110, 0.12);
  border-color: rgba(15, 159, 110, 0.18);
  color: #0d6d4d;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
}

.plain-list li {
  margin-bottom: 10px;
}

.inset {
  margin-top: 16px;
}

.file-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(57, 186, 244, 0.14);
  color: var(--accent-3);
  font-size: 11px;
  font-weight: 800;
  margin-right: 8px;
}

.upload-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(91, 161, 227, 0.14);
}

.upload-row form {
  margin: 0;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.actions a {
  text-decoration: none;
  color: var(--accent-3);
  font-size: 13px;
  font-weight: 700;
}

.actions a:hover {
  color: var(--accent);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.style-card {
  text-align: left;
  min-height: 210px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 10px 24px rgba(56, 115, 182, 0.08);
}

.style-card.active {
  border-color: rgba(22, 119, 255, 0.55);
  box-shadow: 0 14px 30px rgba(22, 119, 255, 0.16);
}

.style-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.style-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.style-badge.standard {
  background: rgba(57, 186, 244, 0.14);
  color: var(--accent-3);
}

.style-badge.premium {
  background: rgba(214, 69, 111, 0.12);
  color: #ad2f57;
}

.style-preview {
  display: block;
  width: 100%;
  height: 96px;
  border-radius: 16px;
  border: 1px solid rgba(91, 161, 227, 0.12);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.style-preview::after {
  content: "";
  position: absolute;
  inset: 0;
}

.style-editorial_british {
  background:
    linear-gradient(90deg, #f8f8f8 0 52%, #d6d6d6 52% 100%);
}

.style-editorial_british::after {
  background:
    linear-gradient(90deg, transparent 51%, #c42828 51.7%, transparent 52.5%),
    linear-gradient(180deg, transparent 18%, #111 18% 22%, transparent 22%),
    linear-gradient(180deg, transparent 34%, #111 34% 39%, transparent 39%);
}

.style-editorial_navy {
  background:
    linear-gradient(90deg, #f9fbfd 0 52%, #d9e3ef 52% 100%);
}

.style-editorial_navy::after {
  background:
    linear-gradient(90deg, transparent 51%, #244c77 51.7%, transparent 52.5%),
    linear-gradient(180deg, transparent 18%, #0f1720 18% 22%, transparent 22%),
    linear-gradient(180deg, transparent 34%, #244c77 34% 39%, transparent 39%);
}

.style-editorial_luxe {
  background:
    linear-gradient(90deg, #fbf7ef 0 52%, #e7dcc2 52% 100%);
}

.style-editorial_luxe::after {
  background:
    linear-gradient(90deg, transparent 51%, #b9852f 51.7%, transparent 52.5%),
    linear-gradient(180deg, transparent 18%, #16110a 18% 22%, transparent 22%),
    linear-gradient(180deg, transparent 34%, #16110a 34% 39%, transparent 39%);
}

.style-atlas_light {
  background: linear-gradient(135deg, #f7fbff, #e5eef7);
}

.style-atlas_light::after {
  background:
    linear-gradient(90deg, transparent 16%, #5f87aa 16% 18%, transparent 18%),
    linear-gradient(180deg, transparent 18%, #17314d 18% 22%, transparent 22%),
    linear-gradient(180deg, transparent 34%, #8eb0cc 34% 64%, transparent 64%);
}

.style-school_bright {
  background: linear-gradient(135deg, #ffffff, #d9f1ff);
}

.style-school_bright::after {
  background:
    radial-gradient(circle at 18% 20%, #39baf4 0 12px, transparent 13px),
    linear-gradient(180deg, transparent 18%, #1f7dff 18% 22%, transparent 22%),
    linear-gradient(180deg, transparent 38%, #1677ff 38% 42%, transparent 42%);
}

.style-university_formal {
  background: linear-gradient(135deg, #ffffff, #edf3f8);
}

.style-university_formal::after {
  background:
    linear-gradient(180deg, transparent 16%, #13385f 16% 21%, transparent 21%),
    linear-gradient(180deg, transparent 34%, #365d88 34% 38%, transparent 38%),
    linear-gradient(180deg, transparent 49%, #bcc9d6 49% 51%, transparent 51%);
}

.style-business_pitch {
  background: linear-gradient(135deg, #f5faff, #dcecff);
}

.style-business_pitch::after {
  background:
    linear-gradient(180deg, transparent 16%, #114b96 16% 21%, transparent 21%),
    linear-gradient(180deg, transparent 52%, #1f7dff 52% 80%, transparent 80%),
    linear-gradient(90deg, transparent 56%, #39baf4 56% 60%, transparent 60%);
}

.style-premium_midnight {
  background: linear-gradient(135deg, #0f172a, #172554);
}

.style-premium_midnight::after {
  background:
    linear-gradient(180deg, transparent 16%, #f8fafc 16% 21%, transparent 21%),
    linear-gradient(180deg, transparent 36%, #4cc9f0 36% 40%, transparent 40%),
    linear-gradient(90deg, transparent 68%, #4cc9f0 68% 71%, transparent 71%);
}

.style-clean_card {
  background: linear-gradient(135deg, #ffffff, #f4f8fd);
}

.style-clean_card::after {
  background:
    linear-gradient(180deg, transparent 14%, #1677ff 14% 17%, transparent 17%),
    linear-gradient(180deg, transparent 34%, #cfdced 34% 64%, transparent 64%);
}

.style-split_modern {
  background: linear-gradient(90deg, #eef6ff 0 46%, #c9e7ff 46% 100%);
}

.style-split_modern::after {
  background:
    linear-gradient(180deg, transparent 18%, #0f5fc8 18% 22%, transparent 22%),
    linear-gradient(180deg, transparent 36%, #39baf4 36% 40%, transparent 40%);
}

.style-image_full {
  background:
    linear-gradient(135deg, #c9def8, #9fc2ea);
}

.style-image_full::after {
  background:
    linear-gradient(90deg, rgba(9, 14, 26, 0.7) 0 38%, transparent 38%),
    linear-gradient(90deg, transparent 8%, #facc15 8% 10%, transparent 10%);
}

.style-desc,
.style-fit {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.style-fit {
  margin-top: 8px;
  color: var(--ink);
  font-weight: 600;
}

.file-checklist {
  display: grid;
  gap: 10px;
}

.file-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.96);
}

.file-check-item input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  box-shadow: none;
}

.file-check-item span {
  word-break: break-word;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 20px;
}

.wizard-step {
  min-height: 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}

.wizard-step.active {
  background: linear-gradient(135deg, var(--accent), #46c3ff);
  color: #fff;
  box-shadow: 0 12px 24px rgba(22, 119, 255, 0.22);
}

.wizard-step.done {
  background: rgba(15, 159, 110, 0.12);
  color: #0d6d4d;
  border-color: rgba(15, 159, 110, 0.2);
}

.wizard-panel {
  display: none;
  gap: 14px;
}

.wizard-panel.active {
  display: grid;
}

.wizard-panel-head {
  display: grid;
  gap: 4px;
}

.wizard-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 4px;
}

.wizard-actions .ghost,
.wizard-actions button[type="submit"] {
  width: auto;
  min-width: 140px;
  text-align: center;
}

.wizard-hint-card {
  margin-top: 4px;
}

.wizard-summary {
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(91, 161, 227, 0.14);
}

.summary-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.summary-row span {
  color: var(--muted);
  font-weight: 700;
}

.summary-row strong {
  text-align: right;
}

/* ------------------------------------------------------------------ tema */

/* Telegram Mini App foydalanuvchi temasi bilan ochiladi. Yorug' panelni
   qorong'i Telegram ustida ko'rsatish ko'zni qamashtiradi, shuning uchun
   palitra tizim temasiga ham, Telegram temasiga ham moslashadi. */
:root { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root:not(.tg-light) {
    --bg: #0f1b2a;
    --bg-strong: #13233a;
    --panel: rgba(21, 35, 54, 0.92);
    --panel-strong: #16263c;
    --ink: #e8f2ff;
    --muted: #9db6d4;
    --line: rgba(120, 170, 220, 0.22);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root.tg-dark {
  --bg: #0f1b2a;
  --bg-strong: #13233a;
  --panel: rgba(21, 35, 54, 0.92);
  --panel-strong: #16263c;
  --ink: #e8f2ff;
  --muted: #9db6d4;
  --line: rgba(120, 170, 220, 0.22);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 0% 0%, rgba(57, 186, 244, 0.16), transparent 26%),
      radial-gradient(circle at 100% 0%, rgba(22, 119, 255, 0.12), transparent 24%),
      linear-gradient(180deg, #0d1826 0%, #0f1b2a 46%, #101f31 100%);
  }
}

:root.tg-dark body {
  background:
    radial-gradient(circle at 0% 0%, rgba(57, 186, 244, 0.16), transparent 26%),
    radial-gradient(circle at 100% 0%, rgba(22, 119, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #0d1826 0%, #0f1b2a 46%, #101f31 100%);
}

@media (prefers-color-scheme: dark) {
  input, select, textarea { background: rgba(12, 22, 36, 0.9); }
  .card, .stat { background: rgba(20, 34, 52, 0.85); }
}

:root.tg-dark input,
:root.tg-dark select,
:root.tg-dark textarea { background: rgba(12, 22, 36, 0.9); }

:root.tg-dark .card,
:root.tg-dark .stat { background: rgba(20, 34, 52, 0.85); }

/* ------------------------------------------------------- katta ekranlar */

.content {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

@media (min-width: 1440px) {
  .shell { grid-template-columns: 320px minmax(0, 1fr); }
  .content { padding: 32px; gap: 22px; }
}

/* Yon panel uzun sahifada ham ko'rinib tursin — ilgari kontent bilan
   birga aylanib ketardi va navigatsiyaga qaytish uchun tepaga
   ko'tarilish kerak edi. */
@media (min-width: 1101px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
}

@media (max-width: 1000px) {
  /* Besh ustun 1000px dan pastda maydonlarni siqib qo'yardi */
  .grid-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -------------------------------------------------------------- planshet */

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
  }

  /* Yon panel mobil ekranda ustunning yarmini egallardi: brend, to'rtta
     havola, balans va chiqish tugmasi — kontentga yetguncha shularning
     hammasini aylantirish kerak edi. Endi u ixcham yuqori panel. */
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top));
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  .sidebar .brand {
    flex: 1 1 auto;
    padding: 6px 10px;
    border-radius: 14px;
    background: transparent;
    border: none;
  }

  .brand-copy { display: none; }

  .brand h1 { font-size: 18px; }

  .brand-logo {
    width: 34px;
    height: 34px;
    font-size: 16px;
    border-radius: 12px;
  }

  .brand-mark { gap: 10px; }

  /* Havolalar bitta qatorda, yon tomonga suriladi */
  .nav {
    order: 3;
    flex: 1 0 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav::-webkit-scrollbar { display: none; }

  .nav a {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 14px;
  }

  .sidebar .panel.inset {
    order: 2;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
  }

  .sidebar .panel.inset strong { display: none; }
  .sidebar .panel.inset p { margin: 0; }

  .sidebar form[action="/logout"] { width: auto; }

  .sidebar .ghost {
    width: auto;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
  }

  .site-glow { display: none; }
}

/* ---------------------------------------------------------------- telefon */

@media (max-width: 760px) {
  .content {
    padding: 14px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    gap: 14px;
  }

  .hero,
  .panel,
  .login-card {
    padding: 16px;
    border-radius: 20px;
  }

  .grid-form,
  .two-col {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .upload-row {
    flex-direction: column;
  }

  .wizard-steps {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 12px 0 16px;
  }

  .wizard-steps::-webkit-scrollbar { display: none; }

  .wizard-step {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
  }

  .wizard-actions {
    flex-direction: column;
  }

  .wizard-actions .ghost,
  .wizard-actions button[type="submit"] {
    width: 100%;
  }
}

@media (max-width: 620px) {
  /* Jadval telefonda 640px eniga cho'zilib, yon tomonga surilardi va
     ustun nomlari ko'rinmay qolardi. Har qator alohida kartaga aylanadi,
     ustun nomi esa katak yoniga chiqadi (data-label). */
  .table,
  .table thead,
  .table tbody,
  .table tr,
  .table th,
  .table td {
    display: block;
  }

  .table { min-width: 0; }

  .table thead { display: none; }

  .table tr {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,0.5);
  }

  .table td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border-bottom: none;
    text-align: right;
  }

  .table td + td { border-top: 1px solid var(--line); }

  .table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
    text-align: left;
  }

  .table td:empty { display: none; }

  /* Amal ustunidagi havolalar tor ekranda o'ralib tushsin */
  .table td.actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .stats-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    align-items: center;
  }

  /* iOS 16px dan kichik shriftli maydonga bosilganda sahifani kattalashtiradi */
  .nav a,
  .ghost,
  input,
  select,
  button,
  textarea {
    font-size: 16px;
    min-height: 46px;
  }

  .nav a,
  .sidebar .ghost {
    min-height: 38px;
  }
}

/* Mini App Telegram ID ni o'zi to'ldiradi — maydon tahrirlanmasligi
   ko'rinib tursin. */
input.locked {
  opacity: .75;
  cursor: not-allowed;
}


/* Buyurtma holati — matn o'rniga rangli belgi, ro'yxatda ko'z bilan
   ajratish oson bo'lsin. */
.status-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(93, 126, 161, 0.14);
  color: var(--muted);
}

.status-chip.status-done {
  background: rgba(15, 159, 110, 0.16);
  color: #0d6d4d;
}

.status-chip.status-processing {
  background: rgba(22, 119, 255, 0.16);
  color: var(--accent-3);
}

.status-chip.status-failed {
  background: rgba(214, 69, 111, 0.16);
  color: #a92f54;
}

.status-chip.status-awaiting_payment {
  background: rgba(240, 165, 0, 0.18);
  color: #8a5b00;
}


/* Alert ichidagi havola tugma ko'rinishida — lekin yon panel tugmalari
   kabi butun enni egallamasin. */
.ghost.inline-link {
  display: inline-block;
  width: auto;
  color: var(--ink);
  border-color: var(--line);
  background: rgba(22, 119, 255, 0.08);
  text-decoration: none;
}
