/* ==================== RESET & BASE ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #f8f9fb;
  --bg-white: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #16a34a;
  --accent-light: #22c55e;
  --accent-bg: rgba(22,163,74,0.08);
  --accent-bg-hover: rgba(22,163,74,0.12);
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #16a34a;
  --purple: #7c3aed;
  --purple-bg: rgba(124,58,237,0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-width: 250px;
  --transition: 0.2s ease;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }

/* ====================================================================
   AUTH OVERLAY — Original player design (dark green gradient)
   ==================================================================== */

.auth-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.2), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(16, 185, 129, 0.22), transparent 40%),
    linear-gradient(135deg, #0f3d2e, #0f3d2e 25%, #0c2c24 60%, #0a241c);
  z-index: 999;
}

.auth-overlay.active {
  display: flex;
}

.auth-card {
  width: min(480px, 92vw);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  padding: 1.9rem 2.1rem;
  color: #e7ffee;
  backdrop-filter: blur(14px);
  text-align: center;
}

.auth-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 0.9rem;
}

.auth-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-subtitle {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #d8f7e4;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 14px;
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.auth-tab:hover:not(.active) {
  color: #fff;
}

.auth-form {
  display: none;
  flex-direction: column;
  text-align: left;
}

.auth-form.active {
  display: flex;
}

.auth-label {
  display: block;
  text-align: left;
  font-size: 0.9rem;
  margin: 0.5rem 0 0.2rem;
  color: rgba(255, 255, 255, 0.85);
}

.auth-card input {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border: 2px solid transparent;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.auth-card input:focus {
  outline: none;
  border-color: #22c55e;
}

.password-field {
  position: relative;
  display: flex;
}

.password-field input {
  padding-right: 2.8rem;
  flex: 1;
}

.password-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.3rem;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.password-toggle:hover {
  opacity: 1;
}

.password-requirements {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.5rem 0;
  font-size: 0.8rem;
}

.password-requirements .req {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
}

.password-requirements .req.valid {
  color: #22c55e;
}

.auth-submit {
  margin-top: 1rem;
  width: 100%;
  background: linear-gradient(120deg, #22c55e, #16a34a);
  border: none;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 15px;
  transition: opacity 0.2s, transform 0.2s;
}

.auth-submit:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-error {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #fca5a5;
  min-height: 1.2em;
  text-align: center;
}

/* ====================================================================
   APP LAYOUT — White / Light theme
   ==================================================================== */

.app-layout {
  display: flex;
  height: 100vh;
  background: var(--bg-primary);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 1px 0 8px rgba(0,0,0,0.03);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand-artel {
  color: var(--text-primary);
  font-weight: 600;
}

.brand-fintech {
  color: var(--accent);
  font-weight: 500;
}

.brand-sub-badge {
  display: inline-block;
  width: fit-content;
  font-size: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #334155);
  padding: 3px 12px;
  border-radius: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-logout svg {
  width: 20px;
  height: 20px;
}

.sidebar-logout:hover {
  background: rgba(239,68,68,0.06);
  color: var(--danger);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 36px 44px;
  min-height: 100vh;
  background: var(--bg-primary);
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

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

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.page-header h1 span {
  color: var(--accent);
}

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

.page-subtitle a {
  color: var(--accent);
  text-decoration: underline;
}

/* Welcome Banner */
.welcome-banner {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 44px;
  margin-bottom: 40px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
}

.welcome-banner::before {
  display: none;
}

.welcome-banner::after {
  display: none;
}

.welcome-text {
  position: relative;
  z-index: 1;
}

.welcome-text h1 {
  font-size: 26px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
  line-height: 1.3;
}

.welcome-text h1 span {
  background: linear-gradient(135deg, #7c3aed, #a855f7, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-text p {
  font-size: 15px;
  color: #9ca3af;
  margin: 0;
}

.welcome-decoration {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 45%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M20 180 L80 40 L120 100 L180 20' fill='none' stroke='rgba(124,58,237,0.06)' stroke-width='3'/%3E%3Cpath d='M30 160 L90 60 L130 110 L170 40' fill='none' stroke='rgba(124,58,237,0.03)' stroke-width='2'/%3E%3Ccircle cx='180' cy='20' r='4' fill='rgba(124,58,237,0.06)'/%3E%3Ccircle cx='120' cy='100' r='3' fill='rgba(124,58,237,0.04)'/%3E%3C/svg%3E") no-repeat center center;
  background-size: contain;
  pointer-events: none;
}

/* ==================== MODULES GRID ==================== */
/* Section Labels */
.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.module-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.module-card:not(.disabled):hover {
  transform: translateY(-3px);
}

.module-card.disabled {
  opacity: 0.55;
  cursor: default;
}

.module-card-bg {
  display: none;
}

/* Player card — purple terminal style */
.player-card {
  background: linear-gradient(135deg, #252347, #363280 40%, #4a3a7a 80%, #503a78);
  border: 1px solid rgba(139,92,246,0.2);
  color: #fff;
}

.player-card:hover {
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 12px 40px rgba(88,28,135,0.2);
}

.player-card .module-card-bg {
  display: block;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(139,92,246,0.2) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(168,85,247,0.12) 0%, transparent 40%);
  pointer-events: none;
}

.player-card .module-info h2 {
  color: #fff;
}

.player-card .module-info p {
  color: rgba(255,255,255,0.65);
}

.player-card .module-arrow {
  color: rgba(255,255,255,0.4);
}

.player-card:hover .module-arrow {
  color: #c4b5fd;
}

.module-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

.module-icon svg {
  width: 30px;
  height: 30px;
}

.player-card .module-icon {
  background: rgba(255,255,255,0.1);
  color: #c4b5fd;
  backdrop-filter: blur(4px);
}

.terminal-card .module-icon {
  background: var(--purple-bg);
  color: var(--purple);
}

.module-info {
  flex: 1;
}

.module-info h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.module-info p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.module-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.active-badge {
  background: rgba(196,181,253,0.2);
  color: #e9d5ff;
}

.soon-badge {
  background: rgba(245,158,11,0.1);
  color: var(--warning);
}

.module-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: var(--transition);
}

.module-arrow svg {
  width: 20px;
  height: 20px;
}

.module-card:not(.disabled):hover .module-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ==================== QUICK STATS ==================== */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border-radius: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==================== PROFILE PAGE ==================== */
.profile-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-card-main {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-details h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.profile-email-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-role-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-bg);
  color: var(--accent);
}

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

.profile-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.profile-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.profile-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* Tariff card */
.tariff-card {
  background: linear-gradient(135deg, rgba(22,163,74,0.06), rgba(59,130,246,0.04));
  border: 1px solid rgba(22,163,74,0.15);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.tariff-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.tariff-expires {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.tariff-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tariff-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-primary);
}

.tariff-feature svg {
  color: var(--success);
}

.tariff-feature.disabled-feature {
  color: var(--text-muted);
}

.tariff-feature.disabled-feature svg {
  color: var(--danger);
}

/* Password form */
.password-form .form-row {
  margin-bottom: 14px;
}

.password-form label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.password-form input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.password-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}

.form-message {
  margin-top: 12px;
  font-size: 13px;
  min-height: 18px;
}

.form-message.success {
  color: var(--success);
}

.form-message.error {
  color: var(--danger);
}

/* Sessions */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.session-device {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.session-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.session-current {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 600;
}

.session-revoke {
  background: none;
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.session-revoke:hover {
  background: rgba(239,68,68,0.06);
  border-color: var(--danger);
}

.loading-text {
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px;
}

/* ==================== SETTINGS ==================== */
.settings-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.setting-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(120deg, #22c55e, #16a34a);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(22,163,74,0.2);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(22,163,74,0.25);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: none;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger-outline:hover {
  background: rgba(239,68,68,0.06);
  border-color: var(--danger);
}

/* ==================== SPINNER ==================== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* ==================== RESULTS GRID ==================== */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto auto;
  gap: 20px;
  margin-top: 40px;
}

.results-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.results-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.results-block-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.results-block-header svg {
  color: var(--text-muted);
}

.player-results {
  grid-column: 1;
  grid-row: 1;
  border-left: 3px solid #7c3aed;
}

.player-results .results-block-header svg {
  color: #7c3aed;
}

.rank-block {
  grid-column: 2;
  grid-row: 1 / 3;
  border-left: 3px solid #f59e0b;
  display: flex;
  flex-direction: column;
}

.rank-block .results-block-header svg {
  color: #f59e0b;
}

.demo-results {
  grid-column: 1;
  grid-row: 2;
  border-left: 3px solid #10b981;
}

.demo-results .results-block-header svg {
  color: #10b981;
}

.results-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.result-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.result-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.result-value.profit {
  color: #16a34a;
}

.result-value.loss {
  color: #ef4444;
}

/* Rank display */
.rank-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.rank-position {
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

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

.rank-label span {
  font-weight: 700;
  color: var(--text-primary);
}

.rank-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ==================== TARIFFS PAGE ==================== */
.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.tariff-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tariff-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tariff-plan-header {
  padding: 32px 28px 24px;
  text-align: center;
  position: relative;
}

.tariff-plan-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.guest-plan {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #334155;
}

.student-plan {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
}

.trader-plan {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.tariff-plan-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.tariff-plan-price {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tariff-plan-period {
  font-size: 13px;
  opacity: 0.8;
}

.tariff-plan-popular {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

.tariff-plan-body {
  padding: 24px 28px 28px;
  flex: 1;
}

.tariff-plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tariff-plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.tariff-plan-features li svg {
  flex-shrink: 0;
}

.feature-yes svg {
  color: var(--success);
}

.feature-no svg {
  color: var(--text-muted);
}

.feature-no {
  opacity: 0.5;
}

.tariff-current-note {
  text-align: center;
  padding: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tariff-current-note:empty {
  display: none;
}

/* Role-based stat card styling */
.stat-card.stat-tariff-guest {
  border-left: 3px solid #64748b;
}

.stat-card.stat-tariff-guest .stat-icon {
  background: rgba(100,116,139,0.1);
  color: #64748b;
}

.stat-card.stat-tariff-guest .stat-value {
  color: #64748b;
}

.stat-card.stat-tariff-student {
  border-left: 3px solid #6366f1;
}

.stat-card.stat-tariff-student .stat-icon {
  background: rgba(99,102,241,0.1);
  color: #6366f1;
}

.stat-card.stat-tariff-student .stat-value {
  color: #6366f1;
}

.stat-card.stat-tariff-trader {
  border-left: 3px solid #10b981;
}

.stat-card.stat-tariff-trader .stat-icon {
  background: rgba(16,185,129,0.1);
  color: #10b981;
}

.stat-card.stat-tariff-trader .stat-value {
  color: #10b981;
}

.stat-card.stat-tariff-admin {
  border-left: 3px solid #f59e0b;
}

.stat-card.stat-tariff-admin .stat-icon {
  background: rgba(245,158,11,0.1);
  color: #f59e0b;
}

.stat-card.stat-tariff-admin .stat-value {
  color: #f59e0b;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
    overflow: hidden;
  }

  .sidebar-brand-text,
  .nav-item span,
  .sidebar-logout span {
    display: none;
  }

  .sidebar-brand {
    padding: 16px 10px;
    justify-content: center;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .sidebar-logout {
    justify-content: center;
  }

  .main-content {
    padding: 20px;
  }

  .modules-grid {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .player-results,
  .rank-block,
  .demo-results {
    grid-column: 1;
    grid-row: auto;
  }

  .tariffs-grid {
    grid-template-columns: 1fr;
  }

  .profile-sections {
    grid-template-columns: 1fr;
  }
}
