/* ============ TempMail — shared styles ============ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0e1116;
  --surface: #161b22;
  --surface-2: #1d232c;
  --border: #2a323d;
  --text: #e8edf3;
  --text-dim: #8b96a5;
  --accent: #3ddc97;
  --accent-ink: #062d1e;
  --danger: #ff6b6b;
  --warn: #ffc857;
  --shadow: 0 8px 30px rgba(0,0,0,.45);
  --radius: 14px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}
[data-theme="light"] {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --border: #dde3ea;
  --text: #101418;
  --text-dim: #5b6570;
  --accent: #0e9f6e;
  --accent-ink: #ffffff;
  --shadow: 0 8px 30px rgba(16,24,40,.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); line-height: 1.55;
  transition: background .25s ease, color .25s ease;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

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

/* ---- Header ---- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site .inner { display: flex; align-items: center; gap: 22px; height: 62px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; color: var(--text); }
.logo .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
nav.main { display: flex; gap: 18px; margin-left: auto; align-items: center; }
nav.main a { color: var(--text-dim); font-weight: 500; font-size: 14.5px; }
nav.main a:hover, nav.main a.active { color: var(--text); text-decoration: none; }

.theme-toggle {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; width: 40px; height: 40px; cursor: pointer; font-size: 17px;
  display: grid; place-items: center; transition: transform .15s ease;
}
.theme-toggle:hover { transform: rotate(18deg); }

/* ---- Buttons & inputs ---- */
.btn {
  font-family: var(--body); font-weight: 600; font-size: 14.5px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 11px 18px; border-radius: 10px; cursor: pointer;
  transition: transform .1s ease, background .15s ease;
}
.btn:hover { background: var(--border); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, select {
  font-family: var(--body); font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 14px; border-radius: 10px; width: 100%;
}
input:focus, select:focus { border-color: var(--accent); outline: none; }
label.field { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}

/* ---- Mailing-label hero (signature) ---- */
.label-card {
  position: relative; background: var(--surface);
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, var(--border));
  border-radius: 18px; padding: 30px 28px; box-shadow: var(--shadow);
}
.label-card::before {
  content: 'TEMP • MAIL • EXPRESS';
  position: absolute; top: 14px; right: 18px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  color: var(--text-dim); border: 1px solid var(--border);
  padding: 4px 8px; border-radius: 6px; transform: rotate(3deg);
}
.label-eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em; color: var(--text-dim); text-transform: uppercase; margin-bottom: 10px; }
.address-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.address {
  font-family: var(--mono); font-weight: 600; font-size: clamp(18px, 3.4vw, 30px);
  color: var(--accent); word-break: break-all;
}
.address.placeholder { color: var(--text-dim); font-weight: 400; }

/* ---- Inbox ---- */
.msg-row { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s ease; }
.msg-row:hover { background: var(--surface-2); }
.msg-row.unread .msg-subject { font-weight: 600; }
.msg-row.unread::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 8px; flex: none; }
.msg-meta { font-size: 12.5px; color: var(--text-dim); }
.msg-subject { font-size: 15px; }
.otp-chip {
  font-family: var(--mono); font-weight: 600; font-size: 13px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px; padding: 3px 10px; margin-left: auto; align-self: center; white-space: nowrap;
}
.empty-state { text-align: center; padding: 46px 20px; color: var(--text-dim); }
.empty-state .icon { font-size: 34px; margin-bottom: 8px; }

/* ---- Utility ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.mono { font-family: var(--mono); }
.dim { color: var(--text-dim); }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; margin: 0 0 10px; }
h2 { font-size: 22px; margin: 0 0 12px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--surface); border: 1px solid var(--accent); color: var(--text);
  padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; transition: all .25s ease; z-index: 100; font-size: 14.5px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.badge { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-dim); }
.badge.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge.err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; color: var(--text-dim); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }

/* ---- Docs ---- */
.endpoint { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px; overflow: hidden; background: var(--surface); }
.endpoint-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface-2); }
.method { font-family: var(--mono); font-weight: 600; font-size: 12.5px; padding: 4px 10px; border-radius: 7px; }
.method.get { background: color-mix(in srgb, #4dabf7 22%, transparent); color: #4dabf7; }
.method.post { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.endpoint-path { font-family: var(--mono); font-size: 14.5px; }
.endpoint-body { padding: 16px 18px; }
pre.code {
  background: #0b0e13; color: #d7e0ea; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
}
[data-theme="light"] pre.code { background: #101418; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

footer.site { border-top: 1px solid var(--border); margin-top: 60px; padding: 26px 0; color: var(--text-dim); font-size: 13.5px; }
