/* ========================================
   TEMP MAIL — zig.ai Style
   Monochrome + Green | Dual Theme
   ======================================== */

/* === DARK (default) === */
:root,
:root[data-theme="dark"] {
  --bg-base: #0a0a0a;
  --bg-card: #111111;
  --bg-surface: #161616;
  --bg-input: #0d0d0d;
  --bg-hover: #1f1f1f;

  --border: #1f1f1f;
  --border-hv: #2e2e2e;
  --border-focus: #22c55e;

  --accent: #22c55e;
  --accent-hv: #16a34a;
  --accent-tint: rgba(34, 197, 94, 0.1);
  --accent-tint-2: rgba(34, 197, 94, 0.05);

  --red: #ef4444;
  --red-tint: rgba(239, 68, 68, 0.08);
  --red-border: rgba(239, 68, 68, 0.15);
  --amber: #f59e0b;
  --amber-tint: rgba(245, 158, 11, 0.08);
  --amber-border: rgba(245, 158, 11, 0.15);

  --text-primary: #fafafa;
  --text-secondary: #a3a3a3;
  --text-muted: #525252;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.3);

  --bg-glow: radial-gradient(ellipse 60% 40% at 20% 0%, rgba(34,197,94,0.04), transparent 60%),
             radial-gradient(ellipse 50% 40% at 80% 100%, rgba(34,197,94,0.025), transparent 60%);
  --dot-grid: radial-gradient(circle, rgba(255,255,255,0.025) 1px, transparent 1px);
  --dot-size: 24px;

  --iframe-bg: #fff;
}

/* === LIGHT === */
:root[data-theme="light"] {
  --bg-base: #ffffff;
  --bg-card: #ffffff;
  --bg-surface: #f5f5f5;
  --bg-input: #fafafa;
  --bg-hover: #ebebeb;

  --border: #e5e5e5;
  --border-hv: #d4d4d4;
  --border-focus: #16a34a;

  --accent: #16a34a;
  --accent-hv: #15803d;
  --accent-tint: rgba(22, 163, 74, 0.08);
  --accent-tint-2: rgba(22, 163, 74, 0.04);

  --red: #dc2626;
  --red-tint: rgba(220, 38, 38, 0.06);
  --red-border: rgba(220, 38, 38, 0.15);
  --amber: #d97706;
  --amber-tint: rgba(217, 119, 6, 0.07);
  --amber-border: rgba(217, 119, 6, 0.18);

  --text-primary: #0a0a0a;
  --text-secondary: #525252;
  --text-muted: #a3a3a3;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.06);

  --bg-glow: radial-gradient(ellipse 60% 40% at 20% 0%, rgba(22,163,74,0.03), transparent 60%),
             radial-gradient(ellipse 50% 40% at 80% 100%, rgba(22,163,74,0.02), transparent 60%);
  --dot-grid: radial-gradient(circle, rgba(0,0,0,0.025) 1px, transparent 1px);
  --dot-size: 24px;

  --iframe-bg: #fff;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--bg-glow);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--dot-grid);
  background-size: var(--dot-size) var(--dot-size);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* === Animated Background Orbs === */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  will-change: transform;
  animation: orbFloat 18s ease-in-out infinite;
}

:root[data-theme="light"] .orb {
  opacity: 0.08;
}

.orb-1 {
  width: 340px;
  height: 340px;
  background: var(--accent);
  top: -8%;
  right: -5%;
  animation-delay: 0s;
}

.orb-2 {
  width: 280px;
  height: 280px;
  background: var(--accent);
  bottom: -10%;
  left: -6%;
  animation-delay: -6s;
  animation-duration: 22s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: var(--accent);
  top: 40%;
  left: 55%;
  animation-delay: -12s;
  animation-duration: 26s;
  opacity: 0.08;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 25px) scale(0.95); }
  75% { transform: translate(15px, 35px) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
}

/* === Theme Toggle === */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hv);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* === App Container === */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* === Landing Page Layout === */
.landing {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

/* === Hero === */
.hero {
  text-align: center;
  margin-bottom: 64px;
}

.hero-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-title {
  font-family: 'Inter', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero-title .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
  font-weight: 400;
}

.hero-form {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}

.hero-form .input-field {
  flex: 1;
}

.hero-form .btn-primary {
  width: auto;
  padding: 14px 24px;
  white-space: nowrap;
}

.hero-stats {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-stats .stat-sep {
  margin: 0 8px;
  opacity: 0.5;
}

/* === Big Stats Row === */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 64px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.big-stat {
  flex: 1;
  text-align: center;
  padding: 0 20px;
  position: relative;
}

.big-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border);
}

.big-stat-value {
  font-family: 'Inter', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.big-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* === Features Grid === */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 48px;
}

.feature-cell {
  background: var(--bg-base);
  padding: 28px 24px;
  transition: background 0.2s ease;
}

.feature-cell:hover {
  background: var(--bg-surface);
}

.feature-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.feature-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === Quick Actions === */
.quick-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 60px;
}

.quick-actions .btn {
  width: auto;
  flex: 1;
  max-width: 240px;
}

/* === Landing Footer === */
.landing-footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.landing-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* === Card (app pages) === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  animation: fadeIn 0.4s ease;
}

.card.wide {
  max-width: 800px;
}

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

/* === App page wrapper (centered) === */
.app-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 24px;
}

.app-page.center {
  align-items: center;
}

/* === Typography (app) === */
.page-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* === Icon === */
.icon-svg {
  display: inline-flex;
  vertical-align: middle;
  flex-shrink: 0;
}

/* === Divider === */
.divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

/* === Status Bar === */
.status-bar {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

/* === Input === */
.input-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.input-field {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.input-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-tint-2);
}

.select-field {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a3a3a3' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.at-symbol {
  font-size: 1rem;
  color: var(--text-muted);
  padding-bottom: 12px;
  font-weight: 600;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hv);
}

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

.btn-secondary:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-hv);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-danger {
  background: var(--red-tint);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-small {
  padding: 7px 12px;
  font-size: 0.78rem;
  width: auto;
  border-radius: 6px;
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn-group .btn {
  flex: 1;
}

/* === Email Badge === */
.email-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  margin: 0 auto 20px;
  word-break: break-all;
}

/* === Email List === */
.email-counter {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.email-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

.email-list::-webkit-scrollbar { width: 5px; }
.email-list::-webkit-scrollbar-track { background: transparent; }
.email-list::-webkit-scrollbar-thumb { background: var(--border-hv); border-radius: 4px; }

.email-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  animation: fadeIn 0.3s ease;
}

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

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

.email-dot.read {
  background: var(--text-muted);
}

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

.email-from {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-subject {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-preview {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-time {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-align: right;
  white-space: nowrap;
}

.otp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding: 2px 9px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.otp-badge:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.otp-badge:active {
  transform: scale(0.96);
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  margin-bottom: 14px;
  color: var(--text-muted);
  opacity: 0.5;
  display: flex;
  justify-content: center;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

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

/* === Refresh indicator === */
.refresh-indicator {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.7rem;
  z-index: 100;
}

.refresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

/* === OTP Banner === */
.otp-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--amber-tint);
  border: 1px solid var(--amber-border);
  border-left: 3px solid var(--amber);
  border-radius: 10px;
  margin-bottom: 20px;
  animation: otpPop 0.3s ease;
}

@keyframes otpPop {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.otp-icon {
  flex-shrink: 0;
  color: var(--amber);
}

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

.otp-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.otp-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.otp-copy-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber-border);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.otp-copy-btn:hover {
  background: var(--amber-tint);
  border-color: var(--amber);
}

/* === Email Detail === */
.detail-header {
  margin-bottom: 20px;
}

.detail-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.detail-label {
  flex-shrink: 0;
  width: 60px;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-value {
  color: var(--text-primary);
  word-break: break-all;
}

.detail-body {
  margin-top: 20px;
  padding: 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 140px;
}

.detail-body iframe {
  width: 100%;
  min-height: 300px;
  border: none;
  border-radius: 6px;
  background: var(--iframe-bg);
}

.detail-body-text {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* === Breadcrumb === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* === Info Box (403) === */
.info-box {
  text-align: center;
  padding: 32px 20px;
}

.info-box-icon {
  margin-bottom: 14px;
  color: var(--amber);
  display: flex;
  justify-content: center;
}

.info-box-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.info-box-text {
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

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

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.admin-brand-icon {
  color: var(--accent);
}

.admin-brand-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  font-family: 'Inter', sans-serif;
  position: relative;
}

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

.admin-nav-item.active {
  background: var(--bg-surface);
  color: var(--accent);
}

.admin-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.admin-nav-icon {
  flex-shrink: 0;
}

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

.admin-content {
  flex: 1;
  padding: 32px 36px;
  max-width: 920px;
  overflow-x: hidden;
}

.admin-header {
  margin-bottom: 28px;
}

.admin-header-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.admin-header-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* === Stat Cards (premium) === */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  transition: all 0.2s ease;
}

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

.stat-card-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--accent);
  opacity: 0.7;
}

.stat-card-value {
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* === Tabs === */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* === Data Table === */
.data-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  font-size: 0.84rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:nth-child(even) {
  background: var(--bg-surface);
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.table-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.table-actions {
  display: flex;
  gap: 4px;
}

.table-scroll {
  max-height: 400px;
  overflow-y: auto;
}

.table-scroll::-webkit-scrollbar { width: 5px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--border-hv); border-radius: 4px; }

/* === Search Box === */
.search-box {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-tint-2);
}

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

/* === Form Card === */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.form-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* === Generated Result === */
.generated-result {
  margin-top: 14px;
  padding: 16px;
  background: var(--accent-tint-2);
  border: 1px solid var(--accent-tint);
  border-radius: 10px;
}

.generated-result-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.generated-emails {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
}

.generated-emails::-webkit-scrollbar { width: 4px; }
.generated-emails::-webkit-scrollbar-thumb { background: var(--border-hv); border-radius: 4px; }

.generated-email-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg-input);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

/* === Icon button === */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--text-muted);
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.icon-btn.danger:hover {
  background: var(--red-tint);
  color: var(--red);
}

/* === Chart === */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  margin-bottom: 16px;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-wrap {
  width: 100%;
  max-width: 40px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  width: 100%;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint);
  border-radius: 6px 6px 0 0;
  position: relative;
  min-height: 4px;
  transition: height 0.4s ease;
  overflow: hidden;
}

.chart-bar:hover {
  background: var(--accent);
  opacity: 0.8;
}

.chart-bar-otp {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  border-radius: 6px 6px 0 0;
  min-height: 2px;
}

.chart-bar-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

.chart-bar-value {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-total {
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint);
}

.legend-otp {
  background: var(--accent);
}

/* === DNS Box === */
.dns-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 16px;
}

.dns-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dns-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-input);
  padding: 10px 12px;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.8;
}

/* === Skeleton === */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-hover) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-item {
  height: 68px;
  margin-bottom: 8px;
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 11px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  z-index: 1000;
  transition: transform 0.25s ease;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: var(--accent);
  color: var(--accent);
}

.toast.error {
  border-color: var(--red);
  color: var(--red);
}

/* === Mobile Sidebar Toggle === */
.admin-mobile-bar {
  display: none;
}

/* === Responsive === */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }

  .admin-nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
  }

  .admin-nav-item {
    white-space: nowrap;
    padding: 8px 12px;
  }

  .admin-nav-item.active::before {
    display: none;
  }

  .admin-sidebar-footer {
    display: none;
  }

  .admin-content {
    padding: 20px 16px;
  }

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

  .stats-row {
    flex-direction: column;
    gap: 20px;
  }

  .big-stat:not(:last-child)::after {
    display: none;
  }

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

  .hero-form {
    flex-direction: column;
  }

  .quick-actions {
    flex-direction: column;
  }

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

  .landing {
    padding: 60px 16px 40px;
  }
}
