:root {
  --bg-deep: #040b11;
  --bg-radial: #07222d;
  --card-bg: rgba(9, 20, 30, 0.82);
  --card-bg-strong: rgba(11, 25, 38, 0.94);
  --card-border: rgba(45, 212, 191, 0.14);
  --card-border-bright: rgba(34, 211, 238, 0.35);
  --text-main: #e6f3f8;
  --text-muted: #8aa3b8;
  --text-dim: #5c768c;
  --cyan: #22d3ee;
  --cyan-dark: #0095ff;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #f43f5e;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-glow: 0 14px 45px rgba(0, 14, 24, 0.65), 0 0 30px rgba(34, 211, 238, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 22% 18%, rgba(8, 76, 97, 0.38) 0%, transparent 48%),
    radial-gradient(circle at 82% 80%, rgba(14, 52, 82, 0.32) 0%, transparent 50%),
    linear-gradient(160deg, #03090f 0%, #05131c 50%, #030910 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.mono {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

.hidden {
  display: none !important;
}

/* Top Navigation */
.topbar {
  max-width: 1060px;
  margin: 0 auto;
  padding: 16px 20px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.brand-link:hover {
  text-decoration: none;
  color: var(--cyan);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  box-shadow: 0 0 12px var(--cyan);
}

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

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(12, 30, 44, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-pill:hover {
  text-decoration: none;
  border-color: var(--cyan);
  background: rgba(16, 42, 62, 0.95);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.15);
}

/* Main Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 20px 48px;
}

.container.wide {
  max-width: 1120px;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 10px auto 26px;
  text-align: left;
  flex-wrap: wrap;
}

.hero-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(17, 45, 65, 0.9), rgba(7, 19, 30, 0.95));
  border: 1px solid rgba(34, 211, 238, 0.3);
  display: grid;
  place-items: center;
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  background: rgba(15, 41, 56, 0.9);
  border: 1px solid rgba(45, 212, 191, 0.25);
  color: #67e8f9;
  margin-bottom: 8px;
}

.hero-badge .tag-pro {
  background: linear-gradient(90deg, #06b6d4, #10b981);
  color: #03131b;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.hero-title {
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #f8fafc;
}

.hero-title .accent {
  background: linear-gradient(90deg, #22d3ee, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Search / Address Bar */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(12px);
}

.inbox-form {
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.input-wrap {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  background: rgba(4, 11, 18, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: var(--radius-md);
  padding: 4px 10px 4px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.input-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-size: 15px;
  padding: 9px 6px;
}

.input-wrap input::placeholder {
  color: var(--text-dim);
}

.domain-select {
  background: rgba(13, 33, 49, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: var(--cyan);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary {
  background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
  color: #031521;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 26px rgba(34, 211, 238, 0.48);
  filter: brightness(1.06);
}

.btn-ghost {
  background: rgba(15, 34, 49, 0.85);
  color: var(--text-main);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(20, 46, 66, 0.95);
}

.btn-danger {
  background: rgba(127, 29, 49, 0.32);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(159, 18, 57, 0.45);
  border-color: rgba(251, 113, 133, 0.55);
}

.btn-dev {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
}

.btn-dev:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.25);
}

/* Recent Mailboxes Strip */
.recent-strip {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 26, 39, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.16);
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.recent-chip:hover,
.recent-chip.active {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Live Status Bar */
.status-bar {
  margin-top: 16px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(6, 39, 43, 0.78), rgba(8, 23, 35, 0.9));
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 14px;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGlow 2s infinite;
  flex-shrink: 0;
}

.pulse-dot.paused {
  background: var(--amber);
  animation: none;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.live-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #34d399;
  text-transform: uppercase;
}

.active-address {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-all;
  cursor: pointer;
}

.active-address:hover {
  color: var(--cyan);
}

.status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Inbox Container */
.inbox-panel {
  margin-top: 16px;
  min-height: 250px;
  padding: 18px;
}

.empty-state {
  min-height: 215px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}

.hourglass {
  font-size: 36px;
  margin-bottom: 12px;
  animation: gentleSpin 3.6s ease-in-out infinite;
}

@keyframes gentleSpin {
  0%,
  100% {
    transform: rotate(-8deg) scale(1);
  }
  50% {
    transform: rotate(8deg) scale(1.06);
  }
}

.empty-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--cyan);
}

.empty-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Message Cards */
.message-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg-card {
  background: rgba(6, 15, 24, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.18s ease;
}

.msg-card:hover {
  border-color: rgba(34, 211, 238, 0.36);
}

.msg-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  cursor: pointer;
}

.msg-meta {
  min-width: 0;
  flex: 1 1 280px;
}

.msg-subject {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}

.msg-submeta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.msg-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.otp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(16, 185, 129, 0.18));
  border: 1px solid rgba(34, 211, 238, 0.48);
  color: #67e8f9;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.otp-pill:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.32), rgba(16, 185, 129, 0.28));
  transform: translateY(-1px);
}

.otp-pill small {
  font-size: 10px;
  letter-spacing: 0.4px;
  font-weight: 700;
  color: #a5f3fc;
  text-transform: uppercase;
}

.msg-body-wrap {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 14px 16px 16px;
  background: rgba(3, 9, 15, 0.72);
}

.body-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tab-group {
  display: inline-flex;
  background: rgba(11, 25, 38, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  padding: 2px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
}

.tab-btn.active {
  background: rgba(34, 211, 238, 0.18);
  color: var(--cyan);
}

.email-iframe {
  width: 100%;
  min-height: 260px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: #ffffff;
}

.email-text {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  background: rgba(8, 18, 28, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #dbeafe;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 360px;
  overflow: auto;
}

/* Admin Dashboard Specifics */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card {
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: #f8fafc;
}

.kpi-value.cyan {
  color: var(--cyan);
}

.panel-section {
  padding: 18px;
  margin-bottom: 18px;
}

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

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}

.field-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.field-input {
  width: 100%;
  background: rgba(4, 11, 18, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.field-input:focus {
  border-color: var(--cyan);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: middle;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

tr:hover td {
  background: rgba(16, 40, 58, 0.28);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.badge-muted {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.2);
}

.login-box {
  max-width: 420px;
  margin: 56px auto;
  padding: 28px 24px;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 999;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(9, 27, 40, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #f0f9ff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 28px;
}

@media (max-width: 640px) {
  .hero {
    justify-content: flex-start;
  }
  .inbox-form {
    padding: 10px;
  }
  .btn-primary {
    width: 100%;
  }
}
