/* =========================================================
   VPS User Renewal Manager - Design System & Modern Aesthetics
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Color Palette - Cyber Dark (Default) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-card-hover: rgba(23, 33, 53, 0.95);
  --bg-input: rgba(15, 23, 42, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);

  /* Primary Accent & Glow */
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-violet: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Typography */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  /* UI Tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow-cyan: 0 0 25px -5px rgba(6, 182, 212, 0.35);
  --shadow-glow-blue: 0 0 25px -5px rgba(59, 130, 246, 0.35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.theme-light {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-input: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(0, 0, 0, 0.15);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.14) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.14) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
}

/* App Container */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

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

.brand-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-blue);
  color: white;
}

.brand-icon svg {
  width: 28px;
  height: 28px;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cf-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(246, 130, 31, 0.15);
  color: #f6821f;
  border: 1px solid rgba(246, 130, 31, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.brand-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  outline: none;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.5);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -3px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

.btn-tg {
  background: linear-gradient(135deg, #0088cc, #29b6f6);
  color: white;
  box-shadow: 0 4px 14px -3px rgba(0, 136, 204, 0.4);
}

.btn-tg:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-renew-quick {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.4);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
}

.btn-renew-quick:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-1px);
}

.btn-icon-only {
  padding: 8px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.btn-icon-only:hover {
  color: var(--text-main);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Stats Overview Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: var(--transition);
}

.stat-card.stat-total::before { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.stat-card.stat-warning::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.stat-urgent::before { background: linear-gradient(90deg, #ef4444, #f43f5e); }
.stat-card.stat-cost::before { background: linear-gradient(90deg, #10b981, #34d399); }

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

.stat-card.stat-total .stat-icon { color: #60a5fa; background: rgba(59, 130, 246, 0.12); }
.stat-card.stat-warning .stat-icon { color: #fbbf24; background: rgba(245, 158, 11, 0.12); }
.stat-card.stat-urgent .stat-icon { color: #f87171; background: rgba(239, 68, 68, 0.12); }
.stat-card.stat-cost .stat-icon { color: #34d399; background: rgba(16, 185, 129, 0.12); }

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.stat-subtext {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Control Bar (Search, Filters, Sort) */
.controls-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.search-wrapper {
  position: relative;
  flex: 1 1 280px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 42px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* User-Centric Grid */
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 22px;
}

/* User Card - USER IS THE HERO */
.user-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.user-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.5);
}

/* User Card Hero Header: Large Avatar & User Name */
.user-card-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.user-info-main {
  flex: 1;
  min-width: 0;
}

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

.user-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-sub-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.badge-success {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(244, 63, 94, 0.14);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-neutral {
  background: rgba(156, 163, 175, 0.12);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.2);
}

/* User Machine & Asset Info Box */
.user-asset-box {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.asset-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}

.asset-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.asset-value {
  font-weight: 500;
  color: var(--text-main);
  text-align: right;
}

.asset-price-highlight {
  font-family: var(--font-heading);
  color: #34d399;
  font-size: 1.15rem;
  font-weight: 700;
}

.user-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-link-pill:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* Expiry Countdown Box */
.user-expiry-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.expiry-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.countdown-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.countdown-text.status-critical { color: #f43f5e; }
.countdown-text.status-warning { color: #f59e0b; }
.countdown-text.status-normal { color: #10b981; }

.renewal-carryover-tag {
  font-size: 0.74rem;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* Card Action Bar */
.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.action-btn-renew {
  flex: 1;
  justify-content: center;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

.empty-state svg {
  width: 56px;
  height: 56px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transform: scale(0.95) translateY(10px);
  transition: var(--transition);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-backdrop.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-label span.required {
  color: #f43f5e;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.form-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Renewal Preview Alert Box */
.renewal-preview-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 16px;
}

.renewal-preview-title {
  font-weight: 600;
  color: #10b981;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.renewal-preview-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateX(0);
}

.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #f43f5e; }
.toast-info { border-left: 4px solid #3b82f6; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-container {
    padding: 16px 12px 40px;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .user-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Telegram 2FA Security Login Overlay & Components
   ========================================================= */

.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInAuth 0.3s ease-out;
}

@keyframes fadeInAuth {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), var(--shadow-glow-blue);
  padding: 34px 28px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #8b5cf6);
}

.auth-shield-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25);
}

.auth-header h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.auth-hint-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0, 136, 204, 0.08);
  border: 1px solid rgba(0, 136, 204, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 20px 0 16px;
  text-align: left;
}

.auth-hint-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-hint-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-hint-text strong {
  color: #38bdf8;
  display: block;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.auth-send-btn {
  width: 100%;
  justify-content: center;
  padding: 11px 16px;
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.auth-input-group {
  text-align: left;
  margin-bottom: 14px;
}

.otp-input-field {
  width: 100%;
  height: 56px;
  background: var(--bg-input);
  border: 2px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 12px;
  text-align: center;
  outline: none;
  transition: var(--transition);
}

.otp-input-field:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input {
  cursor: pointer;
}

.auth-submit-btn {
  width: 100%;
  height: 46px;
  font-size: 0.96rem;
  font-weight: 600;
  justify-content: center;
  gap: 8px;
}

.auth-emergency-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.auth-link-text {
  background: none;
  border: none;
  color: var(--accent-amber);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.auth-link-text:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.modal-tab {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.modal-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.modal-tab.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.modal-lg {
  max-width: 650px;
}

/* Switch Toggle (iOS style) */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-highlight);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.switch-toggle input:checked + .switch-slider {
  background-color: #10b981;
}

.switch-toggle input:checked + .switch-slider:before {
  transform: translateX(22px);
}

/* Security Card Box inside Modal */
.security-card-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

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

.security-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.security-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-card-title h4 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.security-card-title p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.security-warning-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #fbbf24;
  line-height: 1.45;
}

.modal-header-icon-tg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-notice-box {
  background: rgba(0, 136, 204, 0.08);
  border: 1px solid rgba(0, 136, 204, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 14px;
}

