/* =============================================
   TEMP MAIL - Modern CSS
   ============================================= */

/* --- CSS Variables (Light Theme) --- */
:root {
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f2f5;
  --bg-card: #ffffff;
  --bg-hover: #f0f2f5;

  --text-primary: #1a1d26;
  --text-secondary: #5f6577;
  --text-muted: #9298a8;
  --text-inverse: #ffffff;

  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: #eef2ff;
  --accent-glow: rgba(99, 102, 241, 0.15);

  --success: #22c55e;
  --success-bg: #f0fdf4;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --info: #3b82f6;

  --border: #e2e5ee;
  --border-light: #eef0f5;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d27;
  --bg-tertiary: #23263a;
  --bg-card: #1e2030;
  --bg-hover: #262940;

  --text-primary: #e8eaf0;
  --text-secondary: #9298a8;
  --text-muted: #5f6577;
  --text-inverse: #0f1117;

  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-light: #1e1f3a;
  --accent-glow: rgba(129, 140, 248, 0.12);

  --success-bg: #0f2419;
  --danger-bg: #2a1215;
  --warning-bg: #261e0f;

  --border: #2a2e42;
  --border-light: #1e2030;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.35);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* --- Header --- */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.logo i {
  color: var(--accent);
  font-size: 1.4rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* --- Hero Section --- */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* --- Email Create Card --- */
.email-create-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 580px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.create-section {
  text-align: center;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.section-label i {
  color: var(--accent);
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Custom Email Form --- */
.custom-email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.email-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  transition: border-color var(--transition);
}

.email-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-wrapper {
  flex: 1;
  position: relative;
}

.email-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 36px 12px 14px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.email-input::placeholder {
  color: var(--text-muted);
}

.validation-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  display: none;
}

.validation-icon.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: block;
  animation: spin 0.6s linear infinite;
}

.validation-icon.valid::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--success);
}

.validation-icon.invalid::after {
  content: '\f00d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--danger);
}

.validation-icon.warning::after {
  content: '\f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--warning);
}

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

.at-symbol {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.domain-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  min-width: 160px;
  transition: border-color var(--transition);
}

.domain-select:focus {
  border-color: var(--accent);
}

/* --- Validation Status --- */
.validation-status {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0 4px;
  min-height: 22px;
  text-align: left;
  transition: all var(--transition);
}

.validation-status.success {
  color: var(--success);
}

.validation-status.error {
  color: var(--danger);
}

.validation-status.warning {
  color: var(--warning);
}

.validation-status .suggestions {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.validation-status .suggestions span {
  color: var(--accent);
  cursor: pointer;
  margin: 0 4px;
}

.validation-status .suggestions span:hover {
  text-decoration: underline;
}

/* --- Email Preview --- */
.email-preview {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
  min-height: 24px;
}

.email-preview .highlight {
  color: var(--accent);
  font-weight: 600;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius-md);
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-secondary:hover:not(:disabled) {
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* --- Inbox Section --- */
.inbox-section {
  padding: 24px 0 60px;
}

/* --- Email Bar --- */
.email-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.email-bar-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.email-address-display {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.email-address-display i {
  font-size: 1rem;
}

.copy-feedback {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--success);
  opacity: 0;
  transition: opacity var(--transition);
}

.copy-feedback.show {
  opacity: 1;
}

.email-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge-timer {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-timer.expiring {
  background: var(--danger-bg);
  color: var(--danger);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.badge-count {
  background: var(--accent-light);
  color: var(--accent);
}

.email-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Search Bar --- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.search-bar:focus-within {
  border-color: var(--accent);
}

.search-bar i {
  color: var(--text-muted);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

/* --- Inbox Container --- */
.inbox-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 300px;
}

.inbox-container.split {
  grid-template-columns: 340px 1fr;
}

/* --- Empty Inbox --- */
.empty-inbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.empty-icon i {
  font-size: 2rem;
  color: var(--accent);
}

.empty-inbox h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.empty-inbox p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.loading-dots {
  display: flex;
  gap: 6px;
  margin-top: 20px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* --- Inbox List Items --- */
.email-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition);
}

.email-item:hover {
  background: var(--bg-hover);
}

.email-item.unread {
  background: var(--accent-light);
}

.email-item.unread .email-item-subject {
  font-weight: 700;
}

.email-item.active {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
}

.email-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.email-item-content {
  flex: 1;
  min-width: 0;
}

.email-item-from {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-item-subject {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.email-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.unread-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

/* --- Email Reader Panel --- */
.email-reader {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: 600px;
  overflow: hidden;
}

.reader-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.reader-subject {
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.reader-from {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.reader-from i {
  color: var(--accent);
  font-size: 1.2rem;
}

.reader-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.reader-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.reader-body iframe {
  width: 100%;
  border: none;
  min-height: 300px;
}

/* --- Features Section --- */
.features {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 36px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.feature-icon i {
  font-size: 1.3rem;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.footer-brand i {
  color: var(--accent);
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.3s ease-out;
  font-size: 0.88rem;
  font-weight: 500;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast.warning { border-left: 3px solid var(--warning); }

.toast i {
  font-size: 1rem;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.info i { color: var(--info); }
.toast.warning i { color: var(--warning); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.toast.removing {
  animation: slideOut 0.3s ease-in forwards;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .email-create-card {
    padding: 24px 18px;
  }

  .email-input-group {
    flex-direction: column;
    gap: 0;
    padding: 8px;
  }

  .at-symbol {
    display: none;
  }

  .domain-select {
    width: 100%;
    min-width: auto;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .email-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .email-bar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .inbox-container.split {
    grid-template-columns: 1fr;
  }

  .email-reader {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .email-address-display {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 36px 0 24px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 14px;
  }

  .email-create-card {
    padding: 20px 14px;
  }
}

/* =============================================
   ADMIN PANEL STYLES
   ============================================= */

/* --- Admin Layout --- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 50;
}

.admin-sidebar .logo {
  padding: 0 20px;
  margin-bottom: 30px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

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

.admin-nav-link.active {
  background: var(--accent-light);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.admin-nav-link i {
  width: 20px;
  text-align: center;
}

.admin-main {
  flex: 1;
  margin-left: 240px;
  padding: 30px;
  max-width: 1200px;
}

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

.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Admin Tables --- */
.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 12px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.admin-table tr:hover td {
  background: var(--bg-hover);
}

.admin-table .mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
}

/* --- Status Badges --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.active {
  background: var(--success-bg);
  color: var(--success);
}

.status-badge.inactive {
  background: var(--danger-bg);
  color: var(--danger);
}

.status-badge.primary {
  background: var(--accent-light);
  color: var(--accent);
}

/* --- Admin Forms --- */
.admin-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

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

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* --- Login Page --- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-card .logo {
  justify-content: center;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.login-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.login-card .form-group {
  text-align: left;
}

.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: none;
}

/* --- Responsive Admin --- */
@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }

  .admin-main {
    margin-left: 0;
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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