/* ReviewsPortal 2026 UI */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg: #f4efe7;
  --bg-alt: #efe6d8;
  --surface: rgba(255, 251, 245, 0.84);
  --surface-strong: #fffaf2;
  --surface-ink: #182028;
  --surface-ink-2: #232d36;
  --surface-soft: #f7f1e7;
  --border: rgba(42, 56, 68, 0.12);
  --border-strong: rgba(42, 56, 68, 0.22);
  --shadow: 0 18px 40px rgba(49, 41, 30, 0.08);
  --shadow-lg: 0 26px 60px rgba(34, 29, 22, 0.14);
  --text: #182028;
  --text-muted: #64707b;
  --text-faint: #8f98a1;
  --primary: #176b5e;
  --primary-dark: #0f5449;
  --primary-soft: rgba(23, 107, 94, 0.1);
  --accent: #d96c3f;
  --accent-soft: rgba(217, 108, 63, 0.12);
  --success: #20785a;
  --success-soft: rgba(32, 120, 90, 0.12);
  --warning: #b67817;
  --warning-soft: rgba(182, 120, 23, 0.12);
  --danger: #bb4d37;
  --danger-soft: rgba(187, 77, 55, 0.12);
  --info: #3d6d96;
  --info-soft: rgba(61, 109, 150, 0.12);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --sidebar-w: 300px;
  --topbar-h: 84px;
  --transition: 180ms ease;

  --c-primary: var(--primary);
  --c-primary-light: var(--primary-soft);
  --c-success: var(--success);
  --c-warning: var(--warning);
  --c-danger: var(--danger);
  --c-info: var(--info);
  --c-text: var(--text);
  --c-text-muted: var(--text-muted);
  --c-text-faint: var(--text-faint);
  --c-surface: var(--surface);
  --c-surface2: var(--surface-soft);
  --c-border: var(--border);
  --c-border-light: var(--border-strong);
  --c-r1: #b54838;
  --c-r2: #c96a37;
  --c-r3: #c68f1f;
  --c-r4: #549353;
  --c-r5: #17815f;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 108, 63, 0.15), transparent 26%),
    radial-gradient(circle at top right, rgba(23, 107, 94, 0.16), transparent 28%),
    linear-gradient(180deg, #f7f1e8 0%, #f4efe7 45%, #eee6da 100%);
  line-height: 1.55;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-layout {
  position: relative;
  display: flex;
  min-height: 100vh;
}

.app-layout::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.45), transparent 24%),
    linear-gradient(315deg, rgba(255,255,255,0.3), transparent 22%);
}

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  inset: 20px auto 20px 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0)),
    linear-gradient(180deg, #182028 0%, #1e2830 100%);
  box-shadow: 0 24px 60px rgba(18, 22, 28, 0.34);
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo-icon,
.auth-logo-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, #1d8e7d 0%, #176b5e 55%, #c9693f 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.sidebar-logo-text,
.auth-logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.sidebar-logo-text { color: #fff8f1; font-size: 1.18rem; }
.sidebar-logo-sub { color: rgba(235, 241, 247, 0.62); font-size: 0.78rem; margin-top: 2px; }

.sidebar-nav { padding: 18px 10px; flex: 1; }

.nav-section-label,
.nav-section-title {
  padding: 14px 16px 8px;
  color: rgba(235, 241, 247, 0.48);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 3px 8px;
  padding: 12px 14px;
  color: rgba(241, 245, 247, 0.78);
  border-radius: 16px;
  transition: background var(--transition), transform var(--transition), color var(--transition);
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  transform: translateX(2px);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  inset: 8px auto 8px 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f3b37a, #d96c3f);
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.nav-badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(217, 108, 63, 0.18);
  color: #ffd9ca;
  font-size: 0.72rem;
  font-weight: 800;
}

.sidebar-footer,
.sidebar-bottom {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user,
.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
}

.user-avatar {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #d96c3f, #f2ab65);
  color: #fff;
  font-weight: 800;
}

.user-info { flex: 1; min-width: 0; }
.user-name { color: #fff; font-size: 0.95rem; font-weight: 700; }
.user-role { color: rgba(235, 241, 247, 0.54); font-size: 0.78rem; }

.main-content {
  margin-left: calc(var(--sidebar-w) + 40px);
  width: calc(100% - var(--sidebar-w) - 40px);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--topbar-h);
  margin: 20px 20px 0 0;
  padding: 18px 24px;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 28px;
  background: rgba(255, 251, 245, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar-breadcrumb { flex: 1; min-width: 0; }
.topbar-title,
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.04em;
}
.topbar-title { font-size: 1.45rem; font-weight: 700; }
.topbar-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(23, 107, 94, 0.12);
  background: rgba(23, 107, 94, 0.09);
  color: var(--primary-dark);
  font-weight: 700;
}

.balance-chip.low {
  border-color: rgba(187, 77, 55, 0.12);
  background: rgba(187, 77, 55, 0.1);
  color: #9f3d2b;
}

.page-content {
  padding: 22px 20px 34px 0;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.page-title { font-size: clamp(1.8rem, 2.4vw, 2.6rem); font-weight: 700; }
.page-subtitle { color: var(--text-muted); font-size: 0.96rem; max-width: 720px; }

.hero-panel,
.card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel::before,
.card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
}

.hero-panel {
  padding: 28px;
  margin-bottom: 20px;
  background:
    radial-gradient(circle at top right, rgba(217, 108, 63, 0.16), transparent 28%),
    radial-gradient(circle at 12% 8%, rgba(23, 107, 94, 0.16), transparent 24%),
    rgba(255, 251, 245, 0.82);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(24, 32, 40, 0.06);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-grid,
.content-grid-2,
.content-grid-3 {
  display: grid;
  gap: 20px;
}

.hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr); align-items: stretch; }
.content-grid-2 { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); }
.content-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 14px;
}

.card-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-body { padding: 0 22px 22px; }

.stats-grid,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  padding: 20px;
  min-height: 162px;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.3)),
    rgba(255, 251, 245, 0.76);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -26px;
  bottom: -24px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(24, 32, 40, 0.04);
}

.stat-icon {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  margin-bottom: 18px;
}

.stat-icon.blue { background: var(--info-soft); color: var(--info); }
.stat-icon.green { background: var(--success-soft); color: var(--success); }
.stat-icon.yellow { background: var(--warning-soft); color: var(--warning); }
.stat-icon.purple { background: var(--accent-soft); color: var(--accent); }
.stat-icon.red { background: var(--danger-soft); color: var(--danger); }

.stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; letter-spacing: -0.06em; }
.stat-label { color: var(--text-muted); font-size: 0.88rem; font-weight: 700; margin-top: 4px; }
.stat-sub,
.stat-trend { color: var(--text-muted); font-size: 0.84rem; margin-top: 10px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,0.58);
}

table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 15px 16px;
  background: rgba(24, 32, 40, 0.03);
  color: var(--text-faint);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 16px;
  border-bottom: 1px solid rgba(24, 32, 40, 0.06);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.46); }

.td-muted { color: var(--text-muted); }
.td-name { font-weight: 700; }
.td-sub { color: var(--text-faint); font-size: 0.84rem; margin-top: 3px; }

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: #926316; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-secondary,
.badge-muted { background: rgba(24, 32, 40, 0.07); color: var(--text-muted); }
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }

.mp-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.mp-wildberries { background: rgba(175, 71, 163, 0.12); color: #8a287e; }
.mp-ozon { background: rgba(54, 120, 214, 0.12); color: #255ea8; }
.mp-yandex_market { background: rgba(214, 146, 38, 0.14); color: #956512; }
.mp-yandex_business { background: rgba(232, 39, 45, 0.1); color: #b91c1c; }
.mp-avito,
.mp-sber_market,
.mp-sbermarket { background: rgba(41, 132, 89, 0.12); color: #1f7a53; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 800;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #1d8e7d, #176b5e);
  box-shadow: 0 12px 24px rgba(23, 107, 94, 0.18);
}

.btn-primary:hover { background: linear-gradient(135deg, #176b5e, #0f5449); }
.btn-success { background: linear-gradient(135deg, #2e9367, #20785a); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #d89b32, #b67817); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #d96d54, #bb4d37); color: #fff; }

.btn-secondary,
.btn-outline {
  border-color: var(--border);
  background: rgba(255,255,255,0.52);
  color: var(--text);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover { background: rgba(24, 32, 40, 0.05); color: var(--text); }
.btn-sm { min-height: 36px; padding: 8px 12px; font-size: 0.83rem; }
.btn-lg { min-height: 48px; padding: 12px 20px; }
.btn-icon { width: 36px; min-width: 36px; padding: 0; }
.btn:disabled,
.btn.loading { opacity: 0.6; pointer-events: none; transform: none; }
.w-full,
.w-100 { width: 100%; }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(24, 32, 40, 0.1);
  border-radius: 14px;
  background: rgba(255,255,255,0.65);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-control:focus {
  border-color: rgba(23, 107, 94, 0.36);
  box-shadow: 0 0 0 4px rgba(23, 107, 94, 0.1);
  background: rgba(255,255,255,0.86);
}

.form-control::placeholder { color: #97a0a8; }
textarea.form-control { min-height: 112px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-hint { margin-top: 6px; color: var(--text-muted); font-size: 0.82rem; }
.form-error { margin-top: 6px; color: var(--danger); font-size: 0.82rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.input-group { display: flex; gap: 10px; }
.input-group .form-control { flex: 1; }

.toggle-label,
.form-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toggle {
  appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(24, 32, 40, 0.16);
  position: relative;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.toggle:checked { background: var(--primary); }
.toggle:checked::after { transform: translateX(18px); }

.progress { height: 8px; background: rgba(24, 32, 40, 0.08); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1d8e7d, #176b5e); }
.progress-bar.success { background: linear-gradient(90deg, #2e9367, #20785a); }
.progress-bar.warning { background: linear-gradient(90deg, #d89b32, #b67817); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 31, 0.34);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 28px;
  background: rgba(255, 251, 245, 0.94);
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.98);
  transition: transform var(--transition);
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 980px; }

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
}

.modal-header { border-bottom: 1px solid var(--border); }
.modal-footer { border-top: 1px solid var(--border); justify-content: flex-end; }
.modal-title { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.02em; }
.modal-body { padding: 22px; }

.modal-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.58);
  color: var(--text-muted);
}

.toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(255, 251, 245, 0.9);
  box-shadow: var(--shadow-lg);
  animation: toastIn 180ms ease;
}

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

.tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.tab-btn {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
}

.tab-btn.active {
  border-color: rgba(23, 107, 94, 0.16);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.page-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
  color: var(--text);
  font-weight: 800;
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  color: var(--text-muted);
  font-weight: 700;
}

.compact-pagination .page-btn.nav {
  font-size: 18px;
  line-height: 1;
}

.chat-day-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
}

.chat-day-separator span {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(24, 32, 40, 0.06);
  border-radius: 999px;
  padding: 3px 10px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar-panel {
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 22px;
  background: rgba(255, 251, 245, 0.72);
  box-shadow: var(--shadow);
}

.balance-card,
.balance-widget {
  min-width: 0;
  min-height: 100%;
  padding: 28px;
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(242, 171, 101, 0.35), transparent 32%),
    linear-gradient(135deg, #162028 0%, #1d3842 52%, #176b5e 100%);
  box-shadow: 0 20px 42px rgba(19, 31, 38, 0.28);
}

.balance-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.72; font-weight: 800; }
.balance-amount { margin-top: 14px; font-family: 'Space Grotesk', sans-serif; font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -0.08em; line-height: 1; overflow-wrap: anywhere; }
.balance-amount.low { color: #ffd7cf; }
.balance-currency { opacity: 0.65; margin-right: 8px; }
.balance-footer,
.balance-tariff { margin-top: 16px; color: rgba(255,255,255,0.8); font-size: 0.92rem; }
.balance-footer { display: grid; gap: 4px; }

.dashboard-billing-stack {
  display: grid;
  gap: 16px;
  align-self: start;
  align-content: start;
}

.dashboard-billing-stack .balance-card {
  min-height: 0;
}

.rating-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rating-bar-label { width: 30px; color: var(--text-muted); font-size: 0.84rem; font-weight: 800; }
.rating-bar-track { flex: 1; height: 10px; border-radius: 999px; background: rgba(24, 32, 40, 0.08); overflow: hidden; }
.rating-bar-fill { height: 100%; border-radius: 999px; }
.rating-bar-count { width: 36px; text-align: right; color: var(--text-muted); font-size: 0.84rem; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 108, 63, 0.22), transparent 24%),
    radial-gradient(circle at 78% 18%, rgba(23, 107, 94, 0.25), transparent 22%),
    linear-gradient(145deg, #1a2026 0%, #23313c 42%, #102821 100%);
}

.auth-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.auth-card,
.auth-side {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 32px;
  backdrop-filter: blur(20px);
}

.auth-card {
  padding: 36px;
  background: rgba(255, 251, 245, 0.96);
  box-shadow: 0 24px 60px rgba(10, 14, 18, 0.28);
}

.auth-side {
  position: relative;
  overflow: hidden;
  padding: 38px;
  background:
    radial-gradient(circle at top right, rgba(242, 171, 101, 0.22), transparent 26%),
    radial-gradient(circle at left center, rgba(23, 107, 94, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  color: #f8f0e7;
}

.auth-side::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 180px;
  height: 180px;
  border-radius: 40px;
  transform: rotate(28deg);
  background: rgba(255,255,255,0.06);
}

.auth-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.auth-logo-sub { color: var(--text-muted); font-size: 0.9rem; }
.auth-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; letter-spacing: -0.05em; margin-bottom: 8px; }
.auth-sub { color: var(--text-muted); margin-bottom: 24px; }
.auth-side-title { font-family: 'Space Grotesk', sans-serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 0.95; letter-spacing: -0.06em; margin: 24px 0 16px; }
.auth-side-copy { max-width: 540px; color: rgba(248, 240, 231, 0.76); font-size: 1rem; }

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.auth-metric {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.auth-metric-value { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.05em; }
.auth-metric-label { margin-top: 4px; color: rgba(248, 240, 231, 0.7); font-size: 0.84rem; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 16px;
  border: 1px solid transparent;
}

.alert-success { background: var(--success-soft); color: var(--success); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: #926316; }
.alert-info { background: var(--info-soft); color: var(--info); }

.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 2rem; opacity: 0.65; margin-bottom: 10px; }
.empty-state-title { color: var(--text); font-weight: 800; font-size: 1rem; margin-bottom: 6px; }
.empty-state-sub,
.empty-state p,
.empty-state-desc { color: var(--text-muted); font-size: 0.92rem; }

.spinner {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.spinner.dark {
  border-color: rgba(23, 107, 94, 0.16);
  border-top-color: var(--primary);
}

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

.stars { display: inline-flex; gap: 3px; }
.star { color: rgba(24, 32, 40, 0.12); }
.star.filled { color: #d18f1e; }

.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.ms-auto { margin-left: auto; }
.mono { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.03em; }
.chart-wrap { position: relative; height: 280px; }

.settings-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
}

.settings-nav {
  position: sticky;
  top: calc(var(--topbar-h) + 36px);
  align-self: start;
}

.settings-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  text-align: left;
}

.settings-nav-item:hover,
.settings-nav-item.active {
  background: var(--primary-soft);
  border-color: rgba(23, 107, 94, 0.1);
  color: var(--primary-dark);
}

.section-stack {
  display: grid;
  gap: 20px;
}

.section-intro {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
}

.section-intro-copy { max-width: 760px; min-width: 0; flex: 1 1 320px; }
.section-kicker {
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
}

.section-title {
  margin-top: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.section-description { margin-top: 8px; color: var(--text-muted); font-size: 0.96rem; }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-card {
  min-width: 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.56);
  overflow: hidden;
}

.mini-card-label { color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 800; }
.mini-card-value { margin-top: 10px; font-family: 'Space Grotesk', sans-serif; font-size: 1.55rem; font-weight: 700; letter-spacing: -0.05em; line-height: 1.15; overflow-wrap: anywhere; word-break: break-word; }
.mini-card-sub { margin-top: 6px; color: var(--text-muted); font-size: 0.84rem; line-height: 1.4; overflow-wrap: anywhere; }

.company-stats-grid {
  width: min(100%, 520px);
  flex: 1 1 360px;
}

.billing-summary-grid,
.billing-topup-grid,
.tariff-grid {
  display: grid;
  gap: 16px;
}

.billing-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin-bottom: 20px;
}

.billing-topup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.tariff-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tariff-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.tariff-card .card-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.tariff-card-title {
  overflow-wrap: anywhere;
}

.tariff-price {
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.tariff-features {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.tariff-note {
  margin-top: auto;
  padding-top: 16px;
}

.review-snippet,
.response-snippet {
  max-width: 320px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.divider {
  margin: 18px 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(24, 32, 40, 0.08), transparent);
}

@media (max-width: 1180px) {
  .hero-grid,
  .content-grid-2,
  .settings-layout,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .settings-nav { position: static; }
  .stats-grid,
  .stat-grid,
  .content-grid-3,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .sidebar {
    inset: 12px auto 12px 12px;
    transform: translateX(calc(-100% - 22px));
  }

  .sidebar.open { transform: translateX(0); }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .topbar {
    margin: 12px 12px 0;
    min-height: 74px;
  }

  .page-content { padding: 18px 12px 28px; }
  #sidebar-toggle { display: inline-flex !important; }

  .billing-topup-grid,
  .tariff-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .stats-grid,
  .stat-grid,
  .content-grid-3,
  .mini-grid,
  .form-row,
  .auth-metrics {
    grid-template-columns: 1fr;
  }

  .page-title { font-size: 1.8rem; }
  .hero-panel,
  .card,
  .auth-card,
  .auth-side { border-radius: 24px; }
  .topbar { padding: 16px 18px; }
}
