:root {
  --bg-page: #eceff5;
  --surface: #ffffff;
  --surface-muted: #f2f5f9;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-light: #dbe2ea;

  /* Logo ranglari bilan mos keladigan aniq chegaralar (light mode) */
  --border-accent: rgba(22, 163, 74, 0.32);
  --border-accent-blue: rgba(37, 99, 235, 0.24);
  --border-strong: rgba(37, 99, 235, 0.45);

  --accent-indigo: #5b4ce8;
  --credit-orange-start: #f97316;
  --credit-orange-end: #ea580c;

  --brand-green: #16a34a;
  --brand-blue: #0ea5e9;

  --purple-soft: #f3f0ff;
  --purple-text: #7c3aed;
  --orange-soft: #fff4ed;
  --orange-text: #ea580c;
  --gold-soft: #fef9e6;
  --gold-text: #c68a00;
  --mint-soft: #e9f9f0;
  --mint-text: #16a34a;

  --nav-height: 68px;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
}

body.dark-theme {
  --bg-page: #0f172a;
  --surface: #1e293b;
  --surface-muted: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-light: #334155;
  --border-accent: rgba(34, 197, 94, 0.35);
  --border-accent-blue: rgba(59, 130, 246, 0.32);
  --border-strong: rgba(59, 130, 246, 0.5);

  --purple-soft: rgba(139, 92, 246, 0.18);
  --purple-text: #c4b5fd;
  --orange-soft: rgba(249, 115, 22, 0.18);
  --orange-text: #fdba74;
  --gold-soft: rgba(234, 179, 8, 0.16);
  --gold-text: #fde047;
  --mint-soft: rgba(34, 197, 94, 0.18);
  --mint-text: #86efac;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* TUZATMA: .menu-row-card / .warning-banner / .cert-file-chip kabi
   display'li klasslar hidden atributini yengib qo'yardi. Endi ishonchli. */
[hidden] {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + 24px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 16px 20px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.card-box {
  background-color: var(--surface);
  border: 1px solid var(--border-accent-blue);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
  margin-bottom: 14px;
}

.page-header {
  margin-bottom: 16px;
}

.page-main-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==================== BOSH SAHIFA ==================== */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.user-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-pill);
  background-color: #e6ecf8;
  color: #2f56b0;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar--lg {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

.greeting-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.welcome-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.25;
}

.user-name {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.btn-new-essay {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: var(--accent-indigo);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(91, 76, 232, 0.25);
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.credit-card {
  background: linear-gradient(135deg, var(--credit-orange-start) 0%, var(--credit-orange-end) 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 22px;
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.22);
}

.credit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.credit-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}

.sparkle-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.credit-rate-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.credit-balance-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
}

.credit-number {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.credit-unit {
  font-size: 17px;
  font-weight: 500;
  opacity: 0.95;
}

.credit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-credit-action {
  background-color: #ffffff;
  color: #ea580c;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-credit-action svg {
  width: 17px;
  height: 17px;
}

.quick-actions-section {
  margin-bottom: 18px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.quick-card {
  background-color: var(--surface);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.03);
}

.quick-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-icon-circle svg {
  width: 26px;
  height: 26px;
}

.quick-icon-circle--purple {
  background-color: var(--purple-soft);
  color: var(--purple-text);
}

.quick-icon-circle--orange {
  background-color: var(--orange-soft);
  color: var(--orange-text);
}

.quick-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.quick-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
}

.quick-pill--purple {
  background-color: var(--purple-soft);
  color: var(--purple-text);
}

.quick-pill--orange {
  background-color: var(--orange-soft);
  color: var(--orange-text);
}

.menu-list-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-row-card {
  width: 100%;
  background-color: var(--surface);
  border: 1px solid var(--border-accent-blue);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.03);
}

.menu-row-card--expert-promo {
  background-color: var(--gold-soft);
  border-color: #f6e7b2;
}

.menu-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.menu-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-icon-box svg {
  width: 22px;
  height: 22px;
}

.menu-icon-box--purple {
  background-color: var(--purple-soft);
  color: var(--purple-text);
}

.menu-icon-box--gold {
  background-color: #f9ebb8;
  color: var(--gold-text);
}

.menu-icon-box--mint {
  background-color: var(--mint-soft);
  color: var(--mint-text);
}

.menu-row-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.menu-row-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.menu-row-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.wallet-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.menu-chevron {
  font-size: 22px;
  color: #9ca3af;
  line-height: 1;
  flex-shrink: 0;
}

.wallet-arrow-circle {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background-color: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==================== MAVZULAR SAHIFASI ==================== */
.topics-header {
  margin-bottom: 18px;
}

.topics-total-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background-color: var(--surface);
  border: 1.5px solid var(--border-accent-blue);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 42px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}

.search-input:focus {
  border-color: var(--brand-green);
}

.topic-section {
  margin-bottom: 22px;
}

.topic-section.is-empty {
  display: none;
}

.category-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.category-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.category-badge--purple {
  background: var(--purple-soft);
  color: var(--purple-text);
}

.category-badge--orange {
  background: var(--orange-soft);
  color: #d97706;
}

.category-badge--blue {
  background: #e0f2fe;
  color: var(--brand-blue);
}

.category-title {
  font-size: 17px;
  font-weight: 800;
}

.category-title--purple {
  color: var(--purple-text);
}

.category-title--orange {
  color: #d97706;
}

.category-title--blue {
  color: var(--brand-blue);
}

.category-count {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.category-count--purple {
  background: var(--purple-soft);
  color: var(--purple-text);
}

.category-count--orange {
  background: var(--orange-soft);
  color: #d97706;
}

.category-count--blue {
  background: #e0f2fe;
  color: var(--brand-blue);
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topic-card {
  width: 100%;
  background-color: var(--surface);
  border: 1px solid var(--border-accent-blue);
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  padding: 15px 14px 15px 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topic-card--exam {
  border-left-color: var(--purple-text);
}

.topic-card--probable {
  border-left-color: #f59e0b;
}

.topic-card--other {
  border-left-color: var(--brand-blue);
}

.topic-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.topic-card-text {
  font-size: 14px;
  line-height: 1.48;
  color: var(--text-primary);
  font-weight: 500;
}

.topic-card-arrow {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
}

.topic-meta-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 9px;
}

.meta-pill--count-exam {
  background: var(--purple-soft);
  color: var(--purple-text);
}

.meta-pill--count-probable {
  background: var(--orange-soft);
  color: #d97706;
}

.meta-pill--count-other {
  background: #e0f2fe;
  color: #0284c7;
}

.meta-pill--exam-info {
  background: var(--surface-muted);
  color: var(--text-primary);
}

/* ==================== EKSPERTLAR BO'LIMI ==================== */
.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
}

.filter-pill {
  border: 1px solid var(--border-accent-blue);
  background-color: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill.is-active {
  background-color: var(--brand-green);
  color: #ffffff;
  border-color: var(--brand-green);
}

/* Admin tablari kesilib qolmasligi uchun */
#adminTabsPills {
  flex-wrap: wrap;
  overflow: visible;
}

#adminTabsPills .filter-pill {
  flex: 1 1 auto;
  text-align: center;
}

.experts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.expert-card {
  background-color: var(--surface);
  border: 1px solid var(--border-accent-blue);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
}

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

.expert-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.expert-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--purple-soft);
  color: var(--purple-text);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.expert-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.expert-spec {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.tariff-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.tariff-tag--start {
  background: #e0f2fe;
  color: #0284c7;
}

.tariff-tag--pro {
  background: #fef9c3;
  color: #ca8a04;
}

.tariff-tag--premium {
  background: #ffedd5;
  color: #ea580c;
}

.expert-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background-color: var(--surface-muted);
  margin-bottom: 12px;
  font-size: 13px;
}

.expert-rating-stars {
  color: #f59e0b;
  font-weight: 700;
}

.expert-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.expert-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.btn-select-expert {
  background-color: var(--brand-green);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ==================== PROFIL BO'LIMI ==================== */
.profile-tg-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-tg-main {
  flex: 1;
  min-width: 0;
}

.profile-fullname {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.profile-username {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-soft-sm {
  border: 1px solid var(--border-accent-blue);
  background: var(--surface-muted);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-tg-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 12px;
  border-top: 1.5px solid var(--border-strong);
}

.tg-meta-item {
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}

.tg-meta-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.tg-meta-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  min-width: 0;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
}

.stat-value--green {
  color: var(--brand-green);
}

.stat-value--orange {
  color: #ea580c;
}

.btn-sm {
  padding: 9px 12px;
  font-size: 13px;
}

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

.card-box-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.pill-count {
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-muted);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  text-align: center;
  white-space: nowrap;
}

.pill-count--mint {
  background: var(--mint-soft);
  color: var(--mint-text);
}

.card-muted-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 10px;
}

.sub-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-row-item {
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 10px 12px;
  /* GRID: chap ustun qisqaradi, o'ng ustun (status) doim ichida qoladi */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  overflow: hidden;
}

.sub-row-item > div:first-child {
  min-width: 0;
}

.sub-row-item > strong {
  justify-self: end;
  text-align: right;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Status rangli min-pill ko'rinishida */
.sub-row-status {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sub-row-status span {
  font-weight: 500;
  color: var(--text-secondary);
  margin-right: 4px;
}

.sub-row-status.is-done {
  color: var(--mint-text);
  background: var(--mint-soft);
}

.sub-row-status.is-pending {
  color: var(--gold-text);
  background: var(--gold-soft);
}

.essay-checker-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
}

.essay-checker-chip.is-ai {
  color: var(--purple-text);
  background: var(--purple-soft);
}

.essay-checker-chip.is-expert {
  color: var(--gold-text);
  background: var(--gold-soft);
}

.sub-row-title {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sub-row-meta {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: normal;
  overflow-wrap: anywhere;
}

.referral-link-row {
  display: flex;
  gap: 8px;
}

.referral-input {
  flex: 1;
  min-width: 0;
  background: var(--surface-muted);
  border: 1px solid var(--border-accent-blue);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-primary);
}

.btn-copy-ref {
  background: var(--accent-indigo);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.mt-10 {
  margin-top: 10px;
}

.mb-10 {
  margin-bottom: 10px;
}

.theme-switch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.theme-segmented {
  display: inline-flex;
  background: var(--surface-muted);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  flex-shrink: 0;
}

.theme-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.theme-btn.is-active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.expert-apply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.star-gold {
  color: #eab308;
  font-size: 18px;
  line-height: 1;
}

/* ==================== SHIKOYAT VA TAKLIFLAR ==================== */
.feedback-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.back-link-btn {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
}

.feedback-main-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-primary);
}

.feedback-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.feedback-card {
  padding: 18px 16px;
}

.select-float-group {
  position: relative;
  margin-bottom: 14px;
}

.select-float-label {
  position: absolute;
  top: -8px;
  left: 12px;
  background-color: var(--surface);
  color: var(--brand-green);
  font-size: 11.5px;
  font-weight: 600;
  padding: 0 6px;
  z-index: 2;
}

.feedback-select {
  width: 100%;
  background-color: var(--surface);
  color: var(--text-primary);
  border: 1.5px solid var(--brand-green);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  min-width: 0;
}

.feedback-textarea-wrap {
  margin-bottom: 16px;
}

.feedback-textarea {
  width: 100%;
  background-color: var(--surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border-accent-blue);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.feedback-textarea:focus {
  border-color: var(--brand-green);
}

.char-counter {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-lavender-submit {
  width: 100%;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  background-color: #c4b5fd;
  cursor: not-allowed;
  transition: background-color 0.2s ease;
}

.btn-lavender-submit.is-ready {
  background-color: #7c3aed;
  cursor: pointer;
}

/* ==================== EKSPERT BO'LISH UCHUN ARIZA ==================== */
.apply-section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.apply-field {
  margin-bottom: 14px;
}

.apply-field--last {
  margin-bottom: 0;
}

.apply-field-label {
  display: block;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.apply-input {
  width: 100%;
  background-color: var(--surface);
  border: 1.5px solid var(--border-accent-blue);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
}

.apply-input:focus {
  border-color: var(--brand-green);
}

.apply-field-note {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.42;
  color: var(--text-secondary);
}

.dashed-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  cursor: pointer;
  text-align: center;
  margin-top: 10px;
}

.dashed-upload-box--green {
  border: 1.5px dashed var(--brand-green);
  background-color: var(--surface);
}

.dashed-upload-box--gray {
  border: 1.5px dashed var(--border-light);
  background-color: var(--surface);
}

.dashed-upload-icon {
  font-size: 26px;
  line-height: 1;
  color: var(--text-secondary);
}

.dashed-upload-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.file-preview-box {
  position: relative;
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-accent-blue);
  max-height: 220px;
}

.file-preview-box img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.cert-file-chip {
  margin-top: 12px;
  background-color: var(--surface-muted);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}

.cert-file-chip span {
  overflow-wrap: anywhere;
}

.chip-remove-btn {
  border: none;
  background: #ef4444;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-submit-app {
  padding: 15px 16px;
  font-size: 16px;
  margin-top: 4px;
}

/* ==================== 4 BOSQICHLI EKSPERT OQIMI ==================== */
.flow-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  min-width: 0;
}

.back-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: none;
  background-color: var(--surface-muted);
  color: var(--text-primary);
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.flow-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 0 2px;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 62px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background-color: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-circle.is-active,
.step-circle.is-done {
  background-color: var(--brand-green);
  color: #ffffff;
}

.step-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.step-label.is-active,
.step-label.is-done {
  color: var(--text-primary);
  font-weight: 700;
}

.step-line {
  flex: 1;
  height: 2px;
  background-color: var(--surface-muted);
  margin-top: 15px;
}

.step-line.is-done {
  background-color: var(--brand-green);
}

.tariff-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.tariff-card {
  width: 100%;
  background-color: var(--surface);
  border: 1.5px solid var(--border-accent-blue);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
}

.tariff-card.is-selected {
  border-color: #2563eb;
}

.tariff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tariff-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tariff-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.tariff-icon--start {
  background: #e0f2fe;
  color: #0284c7;
}

.tariff-icon--pro {
  background: #fef9c3;
  color: #ca8a04;
}

.tariff-icon--premium {
  background: #ffedd5;
  color: #ea580c;
}

.tariff-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.tariff-price {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.tariff-price--start {
  background: #0ea5e9;
  color: #ffffff;
}

.tariff-price--pro {
  background: #eab308;
  color: #ffffff;
}

.tariff-price--premium {
  background: #ef4444;
  color: #ffffff;
}

.tariff-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.step2-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.45;
}

.btn-outline-green {
  background-color: var(--surface);
  color: var(--brand-green);
  border: 2px solid var(--brand-green);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  min-width: 0;
}

.topic-box-card {
  margin-top: 16px;
  margin-bottom: 22px;
  background-color: var(--surface);
  border: 1.5px solid var(--border-accent-blue);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.topic-box-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.topic-textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.48;
  color: var(--text-primary);
  background: transparent;
}

.topic-source-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.flow-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.btn-primary-green {
  background-color: var(--brand-green);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  min-width: 0;
  box-shadow: 0 0 0 1.5px var(--border-accent), 0 6px 14px rgba(22, 163, 74, 0.18);
}

.btn-full {
  width: 100%;
}

.upload-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.uploaded-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.uploaded-grid:empty {
  display: none;
}

.uploaded-thumb {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-accent-blue);
  background: #111827;
  aspect-ratio: 4 / 3;
}

.uploaded-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.remove-photo-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(17, 24, 39, 0.78);
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.photo-badge-index {
  position: absolute;
  bottom: 6px;
  left: 8px;
  background: rgba(17, 24, 39, 0.75);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed var(--border-light);
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  cursor: pointer;
  margin-bottom: 18px;
}

.upload-camera-icon {
  width: 30px;
  height: 30px;
  color: var(--text-secondary);
}

.upload-dropzone-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.summary-card,
.payment-card {
  background-color: var(--surface);
  border: 1px solid var(--border-accent-blue);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
  margin-bottom: 14px;
}

.summary-heading,
.payment-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}

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

.summary-label {
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.summary-tariff-badge {
  background-color: #2563eb;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.summary-topic-block {
  margin-bottom: 14px;
  min-width: 0;
}

.summary-topic-text {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.48;
  color: var(--text-primary);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.summary-value,
.summary-price-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  text-align: right;
}

.summary-balance-value {
  font-size: 15px;
  font-weight: 800;
  color: #ef4444;
  white-space: nowrap;
}

.summary-balance-value.is-enough {
  color: var(--brand-green);
}

.confirm-thumb-wrap {
  width: 150px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-accent-blue);
  margin-bottom: 14px;
}

.confirm-thumb-wrap img {
  width: 100%;
  display: block;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 4px;
  cursor: pointer;
}

.payment-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  border: 2px solid #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-option input:checked + .radio-dot {
  border-color: var(--brand-green);
}

.payment-option input:checked + .radio-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-green);
}

.payment-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.payment-option-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.warning-banner {
  background-color: #fef3c7;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.warning-banner--compact {
  padding: 12px;
  margin-bottom: 12px;
}

.warning-icon {
  color: #f59e0b;
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
}

.warning-text {
  font-size: 14px;
  line-height: 1.45;
  color: #78350f;
  font-weight: 500;
}

.btn-submit-pay {
  background-color: #cbd5e1;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  cursor: not-allowed;
}

.btn-submit-pay.is-ready {
  background-color: var(--brand-green);
  cursor: pointer;
}

/* Pastki navigatsiya */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: var(--surface);
  border-top: 1.5px solid var(--border-strong);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 20;
}

.nav-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}

.nav-item svg {
  width: 21px;
  height: 21px;
}

.nav-item.is-active {
  color: var(--brand-green);
  font-weight: 600;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal-card {
  width: 100%;
  max-width: 390px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-card h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

.modal-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.payment-modal-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
}

.input-group input {
  border: 1px solid var(--border-accent-blue);
  background: var(--surface-muted);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 15px;
  outline: none;
}

.btn-modal-submit {
  width: 100%;
  background-color: var(--accent-indigo);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #111827;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== AI MEZON NATIJA KARTALARI ==================== */
.report-header-card {
  background: var(--surface);
  border: 1px solid var(--border-accent-blue);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.report-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  min-width: 0;
}

/* TUZATMA: ichki matn kengligi 0 dan boshlanishi kerak, aks holda badge kadrdan chiqadi */
.report-top-row > div,
.adm-expert-info {
  min-width: 0;
}

.report-top-row .sub-row-meta,
.adm-expert-info .sub-row-meta {
  white-space: normal;
  overflow-wrap: anywhere;
}

.status-badge-green {
  background: var(--mint-soft);
  color: var(--mint-text);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  white-space: nowrap;
}

.essay-dark-preview {
  background: #0b0d12;
  color: #f3f4f6;
  border-radius: 16px;
  padding: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-line;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.score-summary-box {
  background: var(--mint-soft);
  border: 1px solid var(--border-accent-blue);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.score-big-number {
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-green);
}

.grade-chip-green {
  border: 1.5px solid var(--brand-green);
  color: var(--brand-green);
  background: var(--surface);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-top: 6px;
}

.criteria-group-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.criteria-row-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.criteria-row-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.criteria-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.criteria-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.criteria-score-pill {
  border: 1.5px solid var(--brand-green);
  color: var(--brand-green);
  background: var(--mint-soft);
  font-size: 12.5px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.criteria-comment {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.strengths-box {
  background: var(--mint-soft);
  border: 1px solid var(--border-accent-blue);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
}

.strengths-title {
  color: var(--brand-green);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}

.improve-box {
  background: var(--gold-soft);
  border: 1px solid var(--border-accent-blue);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
}

.improve-title {
  color: #d97706;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}

.feedback-bullet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.word-counter-bar {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
}

.word-counter-bar.warn {
  background: var(--gold-soft);
  color: var(--gold-text);
  border: 1px solid rgba(234, 179, 8, 0.28);
}

.word-counter-bar.ok {
  background: var(--mint-soft);
  color: var(--mint-text);
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.progress-track {
  width: 100%;
  height: 7px;
  background: var(--surface-muted);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--brand-green);
  border-radius: var(--radius-pill);
  transition: width 0.25s ease;
}

/* ==================== FULL SCREEN IMAGE VIEWER ====================
   Scroll (desktop), pinch (mobile), drag, double-click, +/- tugmalar.
   Zoom faqat rasm bor paytda ko'rinadi (keraksiz paytda chiqmaydi). */
.img-viewer-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 12, 20, 0.97);
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
}

.img-viewer-modal.is-open {
  display: flex;
}

.img-viewer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #111827;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.img-viewer-title {
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.img-viewer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.img-viewer-btn,
.img-viewer-close {
  background: #273249;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.img-viewer-btn:active,
.img-viewer-close:active {
  transform: scale(0.94);
}

.img-viewer-close {
  background: #ef4444;
  border-color: #ef4444;
  font-size: 12px;
}

.img-viewer-zoom-label {
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 700;
  min-width: 42px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.img-viewer-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  padding: 12px;
}

.img-viewer-canvas {
  max-width: 92%;
  max-height: 86%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  cursor: grab;
  border-radius: 6px;
}

.img-viewer-canvas.is-dragging {
  cursor: grabbing;
}

.img-viewer-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  border-radius: 8px;
}

.img-viewer-empty {
  color: #cbd5e1;
  font-size: 15px;
  text-align: center;
}

.img-viewer-hint {
  padding: 10px 14px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==================== ADMIN PANEL STRUKTURASI ==================== */
.adm-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.adm-stat-card {
  margin-bottom: 0 !important;
  min-width: 0;
  overflow: hidden;
}

.adm-tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.adm-tab-btn {
  flex: 1 0 auto;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.adm-tab-btn.is-active {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.adm-expert-card {
  overflow: hidden;
}

#adminTabPending .card-box {
  overflow: hidden;
}

.adm-view-cert-btn {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
}

.audio-record-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  border: 1px solid var(--border-accent-blue);
}

.audio-record-timer {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}

.audio-record-timer::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-green);
}

.audio-record-timer.is-recording {
  color: #ef4444;
}

.audio-record-timer.is-recording::before {
  background: #ef4444;
  animation: audioPulse 1s ease-in-out infinite;
}

@keyframes audioPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

.audio-preview-wrap {
  margin-top: 14px;
}

.audio-preview-wrap .audio-player {
  width: 100%;
}

.audio-delete-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35);
}

/* Zamonaviy audio player (natijada) */
.audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border-accent-blue);
  border-radius: var(--radius-pill);
  padding: 12px 16px;
  margin-top: 12px;
}

.audio-play-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--brand-green);
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-track {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
}

.audio-progress {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand-green), var(--brand-blue));
  transition: width 0.2s linear;
}

.audio-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.expert-level {
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  background: var(--surface-muted);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.expert-identity .expert-level {
  display: inline-flex;
  margin-top: 6px;
}

.expert-level.is-new {
  background: var(--mint-soft);
  color: var(--mint-text);
  border: 1px solid rgba(22, 163, 74, 0.22);
}

.expert-level.is-experienced {
  background: var(--purple-soft);
  color: var(--purple-text);
  border: 1px solid rgba(124, 58, 237, 0.22);
}

.expert-level.is-head {
  background: var(--gold-soft);
  color: var(--gold-text);
  border: 1px solid rgba(234, 179, 8, 0.28);
}

.adm-tariff-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.adm-tariff-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.adm-tariff-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-green);
}

.adm-expert-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.adm-expert-info {
  flex: 1;
}

.adm-expert-meta {
  font-size: 12px;
  color: #6b7280;
  word-break: break-word;
  margin-top: 3px;
}

.adm-expert-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.adm-expert-controls .feedback-select {
  flex: 1;
  min-width: 0;
}

.adm-expert-controls .btn-primary-green {
  flex-shrink: 0;
  width: auto;
  padding: 10px 16px;
}

/* ==================== KOMPYUTER / TELEFON MOSLASHUV ==================== */
@media (min-width: 760px) {
  body {
    padding: 28px 0 calc(var(--nav-height) + 28px);
    background: #e9edf4;
  }

  body.dark-theme {
    background: #070c16;
  }

  .app-container {
    background: var(--bg-page);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
    padding: 26px 22px 28px;
    min-height: calc(100vh - 56px);
  }

  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  .toast {
    bottom: calc(var(--nav-height) + 24px);
  }
}

@media (max-width: 360px) {
  .app-container {
    padding: 14px 12px 18px;
  }

  .credit-actions,
  .quick-grid,
  .profile-stats-grid,
  .flow-actions-row {
    gap: 8px;
  }

  .btn-new-essay {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* ==================== LOADER / OFFLINE / ANIMATIONS ==================== */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.app-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loader-card {
  text-align: center;
  padding: 24px;
}

.app-logo-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--brand-green), var(--brand-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.25);
  animation: logoPulse 1.6s ease-in-out infinite;
}

.app-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-loader-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.app-loader-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.app-loader-bar {
  width: 160px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  margin: 18px auto 0;
  overflow: hidden;
}

.app-loader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: var(--radius-pill);
  background: var(--brand-green);
  animation: loaderSlide 1.1s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes loaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.offline-screen {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.offline-screen.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.offline-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.offline-icon {
  font-size: 42px;
  margin-bottom: 10px;
}

.offline-card h2 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.offline-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

/* Sahifalar orasidagi yumshoq o'tishlar */
.view.is-active {
  animation: viewIn 0.3s ease both;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-box {
  animation: cardIn 0.35s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.btn-primary-green,
.btn-outline-green,
.tariff-card,
.topic-card,
.menu-row-card,
.btn-select-expert {
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-primary-green:active,
.btn-outline-green:active,
.btn-select-expert:active,
.tariff-card:active {
  transform: scale(0.97);
}

/* Ekspertga baho berish */
.expert-rate-box {
  text-align: center;
}

.rate-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.rate-star-btn {
  border: none;
  background: transparent;
  color: #f59e0b;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  transition: transform 0.15s ease;
}

.rate-star-btn.is-picked {
  transform: scale(1.18);
}

.rate-star-btn:active {
  transform: scale(0.9);
}

.rate-star-static {
  color: #cbd5e1;
  font-size: 30px;
  line-height: 1;
}

.rate-star-static.is-on {
  color: #f59e0b;
}

/* ==================== AI TEKSHIRUV QISMI ==================== */
.ai-ocr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 10px 34px;
}

.ai-ocr-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--border-accent-blue);
  border-top-color: var(--accent-indigo);
  animation: ocrSpin 0.8s linear infinite;
}

@keyframes ocrSpin {
  to { transform: rotate(360deg); }
}

.ai-ocr-loading p {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #e0f2fe;
  color: #0c4a6e;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.info-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.info-banner strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.info-banner p {
  font-size: 13px;
  line-height: 1.45;
}

.summary-tariff-badge--ai {
  background: var(--purple-soft);
  color: var(--purple-text);
}

.ai-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(248, 250, 252, 0.96);
}

body.dark-theme .ai-loading-overlay {
  background: rgba(15, 23, 42, 0.96);
}

.ai-loading-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-accent-blue);
  border-radius: 28px;
  padding: 28px 22px 0;
  text-align: center;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
  overflow: hidden;
}

.ai-loading-icon {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--accent-indigo), #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 12px 26px rgba(91, 76, 232, 0.3);
}

.ai-loading-card h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.ai-loading-card > p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.ai-loading-progress {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  overflow: hidden;
}

.ai-loading-progress span {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: var(--radius-pill);
  background: var(--accent-indigo);
  transition: width 0.5s ease;
}

.ai-loading-percent {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 10px 0 14px;
}

.ai-loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.ai-loading-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.ai-loading-dots span.is-on {
  background: var(--accent-indigo);
  transform: scale(1.25);
}

.ai-loading-time {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.ai-loading-foot {
  border-top: 1px solid var(--border-light);
  margin: 0 -22px;
  padding: 14px 20px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--surface-muted);
}

/* ==================== TO'LOV MODALI ==================== */
.pay-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.pay-preset-btn {
  border: 1.5px solid var(--border-accent-blue);
  background: var(--surface);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 12px 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.pay-preset-btn.is-active {
  border-color: var(--brand-green);
  background: var(--mint-soft);
  color: var(--brand-green);
}

.pay-preset-btn:active {
  transform: scale(0.96);
}

.pay-provider-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.pay-provider-btn {
  border: 1.5px solid var(--border-accent-blue);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 12px;
  padding: 11px 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.pay-provider-btn.is-active {
  border-color: var(--brand-green);
  background: var(--mint-soft);
  color: var(--brand-green);
}

.pay-provider-btn:active {
  transform: scale(0.96);
}

#confirmPayBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .view.is-active,
  .card-box,
  .app-logo-mark,
  .app-loader-bar span {
    animation: none !important;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* Tug'ilgan sana: uchta aylantirma (scroll) tanlagich */
.birth-date-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1fr;
  gap: 8px;
}

.birth-select {
  width: 100%;
  min-width: 0;
}
