/* Общий стиль кабинетов: «Заказы» и «Партнёрский кабинет» */
:root {
  --c-accent: #2aa3e0;
  --c-accent-2: #38bdf8;
  --c-violet: #8b5cf6;
  --c-card: rgba(20, 20, 28, 0.72);
  --c-line: rgba(255, 255, 255, 0.08);
}

/* Шапка: стеклянная полоса как на балансе */
.cab-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 10, 16, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Заголовок страницы */
.cab-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; text-align: left; }
.cab-title { font: 700 clamp(24px, 4vw, 32px)/1.15 'Unbounded', sans-serif; color: #fff; letter-spacing: -0.02em; }
.cab-title .accent { background: linear-gradient(90deg, #a78bfa, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cab-sub { margin-top: 6px; font-size: 0.875rem; color: #9ca3af; }
.cab-live {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px;
  border-radius: 999px;
  font-size: 0.75rem; color: #6ee7b7;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  white-space: nowrap;
}
.cab-live i { width: 7px; height: 7px; border-radius: 999px; background: #34d399; animation: cabPulse 1.8s ease-in-out infinite; }
@keyframes cabPulse { 50% { opacity: 0.35; } }

/* Карточки */
.cabinet-card,
.glass-card,
.glass-card-gradient {
  background: var(--c-card) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-line) !important;
  border-radius: 20px !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 24px 60px -30px rgba(0, 0, 0, 0.85);
}
.cabinet-card:hover { border-color: rgba(255, 255, 255, 0.12) !important; }
.glass-card-gradient::before {
  background: linear-gradient(135deg, rgba(42, 163, 224, 0.55), rgba(139, 92, 246, 0.25) 50%, rgba(42, 163, 224, 0.1)) !important;
}

/* Заголовок секции с иконкой */
.cab-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cab-section-title h2 { font: 600 1.0625rem/1.3 'Unbounded', sans-serif; color: #fff; margin: 0; }
.cab-ico {
  width: 34px; height: 34px; flex: none;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.cab-ico svg { width: 18px; height: 18px; }
.cab-ico-blue   { color: #7dd3fc; background: linear-gradient(135deg, rgba(42, 163, 224, 0.32), rgba(42, 163, 224, 0.1)); }
.cab-ico-violet { color: #c4b5fd; background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(139, 92, 246, 0.1)); }
.cab-ico-green  { color: #6ee7b7; background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(16, 185, 129, 0.1)); }
.cab-ico-amber  { color: #fcd34d; background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(245, 158, 11, 0.1)); }
.cab-ico-pink   { color: #f9a8d4; background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(236, 72, 153, 0.1)); }

/* Плитки статистики */
.cab-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (max-width: 640px) { .cab-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
.cab-stat { padding: 14px; text-align: left; }
.cab-stat .cab-ico { width: 30px; height: 30px; border-radius: 9px; margin-bottom: 10px; }
.cab-stat .cab-ico svg { width: 16px; height: 16px; }
.cab-stat-label { font-size: 0.6875rem; color: #7c8190; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.cab-stat-value { margin-top: 2px; font: 600 clamp(18px, 3.2vw, 24px)/1.2 'Unbounded', sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .cab-stat { padding: 12px 10px; } .cab-stat-label { font-size: 0.5625rem; letter-spacing: 0.03em; } }

/* Кнопки */
.cab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px;
  border-radius: 14px;
  font-weight: 600; font-size: 0.9375rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.cab-btn-primary { color: #fff; background: linear-gradient(135deg, #8b5cf6, #06b6d4); box-shadow: 0 12px 28px -14px rgba(139, 92, 246, 0.9); }
.cab-btn-primary:hover { transform: translateY(-1px); }
.cab-btn-ghost { color: #e5e7eb; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.cab-btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }
.btn-glow { background: linear-gradient(135deg, #8b5cf6, #06b6d4) !important; box-shadow: 0 12px 28px -14px rgba(139, 92, 246, 0.9); }
.btn-glow:hover { transform: translateY(-1px) !important; box-shadow: 0 16px 34px -14px rgba(139, 92, 246, 1) !important; }

/* Поля */
.cab-input,
#ref-link, #promo-input, #withdraw-affiliate-id, #withdraw-card {
  height: 48px;
  border-radius: 14px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#ref-link:focus, #promo-input:focus, #withdraw-affiliate-id:focus, #withdraw-card:focus { border-color: var(--c-accent) !important; box-shadow: 0 0 0 3px rgba(42, 163, 224, 0.15) !important; }

/* Статусы заказов */
.status-queue, .status-running, .status-done, .status-partial, .status-cancelled {
  display: inline-flex !important; align-items: center; gap: 6px;
  border-radius: 999px !important;
  padding: 4px 10px !important;
  font-weight: 600 !important;
}
.status-queue::before, .status-running::before, .status-done::before, .status-partial::before, .status-cancelled::before {
  content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor;
}
.status-running::before { animation: cabPulse 1.4s ease-in-out infinite; }
.status-queue     { color: #fcd34d !important; background: rgba(245, 158, 11, 0.12) !important; }
.status-running   { color: #7dd3fc !important; background: rgba(42, 163, 224, 0.14) !important; }
.status-done      { color: #6ee7b7 !important; background: rgba(16, 185, 129, 0.13) !important; }
.status-partial   { color: #fdba74 !important; background: rgba(249, 115, 22, 0.13) !important; }
.status-cancelled { color: #9ca3af !important; background: rgba(107, 114, 128, 0.16) !important; }

/* Прогресс */
.progress-track, .progress-bar-track { background: rgba(255, 255, 255, 0.07) !important; border-radius: 999px !important; overflow: hidden; }
.progress-fill, .progress-bar-fill {
  position: relative;
  background: linear-gradient(90deg, #2aa3e0, #8b5cf6) !important;
  border-radius: 999px !important;
}
.progress-fill::after, .progress-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  background-size: 50% 100%; background-repeat: no-repeat;
  animation: cabStripe 2.2s linear infinite;
}
@keyframes cabStripe { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { .progress-fill::after, .progress-bar-fill::after, .cab-live i, .status-running::before { animation: none; } }

/* Таблицы */
#orders-wrap table thead tr, .cab-table thead tr { border-color: var(--c-line) !important; }
#orders-wrap table th, .cab-table th { color: #7c8190 !important; font-size: 0.6875rem; letter-spacing: 0.06em; }
.order-row { border-color: rgba(255, 255, 255, 0.05) !important; }
.order-row:hover { background: rgba(255, 255, 255, 0.025) !important; }
#orders-cards .cabinet-card { padding: 16px !important; }
.btn-refill { border-radius: 10px !important; border-color: rgba(42, 163, 224, 0.35) !important; background: rgba(42, 163, 224, 0.12) !important; color: #7dd3fc !important; }
.btn-support { border-radius: 10px !important; }

/* Пустое состояние */
.cab-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 20px 32px; }
.cab-empty-ico {
  width: 64px; height: 64px; border-radius: 20px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #7dd3fc;
  background: radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.35), rgba(42, 163, 224, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.cab-empty-ico svg { width: 30px; height: 30px; }
.cab-empty-title { font-weight: 600; font-size: 1.0625rem; color: #fff; }
.cab-empty-text { max-width: 22rem; font-size: 0.875rem; color: #9ca3af; margin-bottom: 14px; }

/* Плашка гарантии */
.cab-guarantee {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  text-align: left;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(52, 211, 153, 0.22);
}
.cab-guarantee b { display: block; color: #fff; font-weight: 600; }
.cab-guarantee span { display: block; font-size: 0.8125rem; color: #9ca3af; margin-top: 2px; }
.cab-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 420px) { .cab-actions { grid-template-columns: 1fr; } }

/* Партнёрка: уровни */
.cab-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 768px) { .cab-levels { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cab-level {
  position: relative;
  padding: 12px 10px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.2s, background 0.2s;
}
.cab-level-name { font-size: 0.75rem; font-weight: 700; color: #e5e7eb; }
.cab-level-pct { margin-top: 4px; font: 600 1.25rem/1 'Unbounded', sans-serif; color: #7dd3fc; }
.cab-level-from { margin-top: 6px; font-size: 0.6875rem; color: #6b7280; }
.cab-level.is-current { border-color: var(--c-accent); background: rgba(42, 163, 224, 0.1); box-shadow: 0 0 0 1px var(--c-accent) inset; }
.cab-level.is-current::after {
  content: 'Вы здесь';
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.5625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: #fff; background: var(--c-accent);
  white-space: nowrap;
}

/* Партнёрка: блок реф-ссылки */
.cab-ref { padding: 22px !important; }
.cab-ref-earn { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cab-ref-earn p { font-size: 0.8125rem; color: #9ca3af; }
.cab-ref-earn strong { color: #fff; }
.modal-backdrop { background: rgba(5, 5, 8, 0.72) !important; }

/* Ссылки «на главную» в шапке */
.back-link { color: #9ca3af; }
#orders-cards .cabinet-card { background: rgba(255, 255, 255, 0.03) !important; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 16px !important; }
.cab-aff-stats { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 10px; }
@media (max-width: 768px) { .cab-aff-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; } .cab-aff-stats > * { padding: 12px !important; } }
.cab-level-from { white-space: nowrap; }

/* Компьютер: заголовок страницы по центру */
@media (min-width: 640px) {
  .cab-head { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; margin-bottom: 24px; }
}
