/* SmurfSkins Mail — dark mail viewer */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300..800&family=Geist+Mono:wght@300..600&display=swap');

:root {
  --bg: #0a0c10;
  --surface: #11141b;
  --surface-2: #161a23;
  --surface-3: #1c2130;
  --hover: #1a1f2b;
  --border: #232838;
  --border-strong: #2f364a;
  --text: #e8ebf2;
  --text-muted: #8a93a8;
  --text-dim: #5b6377;

  --accent: #4a9eff;
  --accent-hover: #66adff;
  --accent-soft: rgba(74, 158, 255, 0.12);
  --accent-border: rgba(74, 158, 255, 0.32);

  --success: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --riot: #eb0029;

  --row-h: 76px;
  --radius: 10px;
  --radius-sm: 6px;

  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.4);

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body, #root {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

body {
  overflow: hidden;
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
}

::selection { background: var(--accent-soft); color: var(--accent-hover); }

/* ---------- Scrollbars ---------- */
.scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.scroll::-webkit-scrollbar { width: 10px; }
.scroll::-webkit-scrollbar-track { background: transparent; }
.scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border: 3px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}
.scroll::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: padding-box; }

/* ============================================================ */
/* LOGIN                                                         */
/* ============================================================ */

.login-shell {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  height: 100%;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(74, 158, 255, 0.08), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(235, 0, 41, 0.05), transparent 55%),
    var(--bg);
}

.login-art {
  position: relative;
  border-right: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
}

.login-art-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 30% 50%, black 0%, transparent 70%);
  opacity: 0.45;
  pointer-events: none;
}

.login-art-glow {
  position: absolute;
  width: 480px; height: 480px;
  left: -120px; top: 30%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.login-art-content { position: relative; z-index: 1; }

.login-brandline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.login-tagline {
  margin-top: 120px;
  max-width: 460px;
}
.login-tagline .eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.login-tagline h1 {
  font-size: 42px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.login-tagline p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  max-width: 420px;
}

.login-art-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card h2 {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.login-card .lead {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 32px;
}
.login-error {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.28);
  color: #fda4a4;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin: 0 0 16px;
}

.field {
  display: block;
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
}
.field input::placeholder { color: var(--text-dim); }
.field input:hover { border-color: var(--border-strong); }
.field input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface-2);
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 24px;
  font-size: 13px;
}
.field-row .remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.field-row .remember input { accent-color: var(--accent); }
.field-row a {
  color: var(--accent);
  text-decoration: none;
}
.field-row a:hover { color: var(--accent-hover); }

.btn-primary {
  width: 100%;
  padding: 13px 16px;
  background: var(--accent);
  color: #001428;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { cursor: progress; opacity: 0.85; }
.btn-primary .spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(0,20,40,0.25);
  border-top-color: #001428;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-footnote {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.login-footnote a { color: var(--accent); text-decoration: none; }

.login-help {
  margin-top: 28px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.login-help .badge {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================ */
/* INBOX                                                         */
/* ============================================================ */

.app {
  display: grid;
  grid-template-columns: 420px 1fr;
  grid-template-rows: 60px 1fr;
  grid-template-areas:
    "topbar topbar"
    "list   reader";
  height: 100vh;
  background: var(--bg);
}
.app.dense { --row-h: 60px; }
.app.dense .msg-row { padding: 10px 18px; }
.app.dense .msg-subject { font-size: 13px; }
.app.dense .msg-preview { display: none; }

/* ---------- Top bar ---------- */
.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar-alias {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}
.topbar-alias-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.topbar-alias-email {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
}
.topbar-signout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font-size: 12.5px;
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s, background 0.1s;
}
.topbar-signout:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--hover);
}

.list-pane { grid-area: list; }
.reader { grid-area: reader; }

/* ---------- Left rail ---------- */
.rail {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
}
.rail-brand {
  padding: 18px 18px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.rail-section {
  padding: 14px 12px 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.rail-nav {
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  user-select: none;
}
.rail-item .ic { display: flex; opacity: 0.85; }
.rail-item:hover { background: var(--hover); color: var(--text); }
.rail-item.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
}
.rail-item.active .ic { opacity: 1; }
.rail-item .count {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-dim);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.rail-item.active .count {
  color: var(--accent-hover);
  background: rgba(74,158,255,0.18);
}

.alias-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}
.alias-row:hover { background: var(--hover); }
.alias-row.active {
  background: var(--surface-2);
}
.alias-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.alias-info { min-width: 0; flex: 1; }
.alias-label {
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.alias-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
}
.alias-email {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alias-row .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}
.alias-row.active .count {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.rail-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.rail-foot .avatar {
  width: 30px; height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4a9eff, #2563eb);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.rail-foot .who { flex: 1; min-width: 0; }
.rail-foot .who-name { font-size: 13px; color: var(--text); }
.rail-foot .who-email {
  font-family: var(--mono); font-size: 11px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rail-foot button {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  border-radius: var(--radius-sm); padding: 5px 6px; cursor: pointer;
  display: flex; align-items: center;
}
.rail-foot button:hover { color: var(--text); border-color: var(--border-strong); }

/* ---------- Message list pane ---------- */
.list-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
}

.list-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.list-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.list-head h2 .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
}
.list-search {
  margin-top: 12px;
  position: relative;
}
.list-search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}
.list-search input::placeholder { color: var(--text-dim); }
.list-search input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.list-search .ic {
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim);
  display: flex;
  pointer-events: none;
}
.list-search kbd {
  position: absolute;
  right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

.list-rows {
  flex: 1;
  overflow-y: auto;
}

.msg-row {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  align-items: flex-start;
  transition: background 0.08s;
}
.msg-row:hover { background: var(--hover); }
.msg-row.selected {
  background: var(--accent-soft);
}
.msg-row.selected::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
}

.msg-body { min-width: 0; }
.msg-head-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.msg-from {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.msg-alias-chip {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-muted);
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.msg-subject {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.msg-preview {
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.msg-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}
.msg-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border-radius: 3px;
}
.msg-tag.verification { background: rgba(74,158,255,0.14); color: #7cb8ff; }
.msg-tag.security     { background: rgba(248,113,113,0.14); color: #fda4a4; }
.msg-tag.reset        { background: rgba(251,191,36,0.14); color: #fcd34d; }
.msg-tag.newsletter   { background: rgba(138,147,168,0.14); color: var(--text-muted); }
.msg-tag.support      { background: rgba(74,222,128,0.14); color: #86efac; }

.list-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ---------- Reader pane ---------- */
.reader {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}
.reader-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-dim);
}
.reader-empty .glyph {
  width: 56px; height: 56px;
  border-radius: 14px;
  border: 1px dashed var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
}
.reader-empty h3 {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}
.reader-empty p {
  margin: 0;
  font-size: 13px;
}

.reader-head {
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
}
.reader-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.reader-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s, background 0.1s;
}
.reader-action:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}
.reader-action.starred { color: var(--warn); border-color: rgba(251,191,36,0.3); }
.reader-action.spacer { margin-left: auto; border: none; cursor: default; padding: 0; }
.reader-action.spacer:hover { background: transparent; }

.reader-subject {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 14px;
}

.reader-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.reader-meta .avatar {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  color: var(--text);
}
.reader-meta .avatar.riot { background: var(--riot); color: #fff; border-color: var(--riot); }
.reader-meta .avatar.steam { background: #1b2838; color: #c7d5e0; }
.reader-meta .avatar.epic { background: #313131; color: #fff; }

.reader-from { min-width: 0; }
.reader-from .name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.reader-from .name .verified {
  color: var(--accent);
  display: flex;
}
.reader-from .email {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.reader-from .to {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.reader-from .to .alias {
  font-family: var(--mono);
  color: var(--text);
}
.reader-time {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
}

.reader-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 48px;
}
.reader-body-inner {
  max-width: 640px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}
.reader-body-inner p { margin: 0 0 16px; }
.reader-body-inner p.lead { color: var(--text); font-size: 15px; }
.reader-body-inner h3 {
  font-size: 14px;
  margin: 24px 0 10px;
  letter-spacing: 0;
}
.reader-body-inner a { color: var(--accent); text-decoration: none; }
.reader-body-inner a:hover { text-decoration: underline; }
.reader-body-inner .muted { color: var(--text-muted); }
.reader-body-inner ul { padding-left: 18px; color: var(--text-muted); margin: 0 0 16px; }
.reader-body-inner ul li { margin-bottom: 6px; }

.code-card {
  margin: 22px 0;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  text-align: center;
}
.code-card .code-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.code-card .code {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.code-card .code span {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 4px 10px;
  min-width: 42px;
}
.code-card .expires {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}
.code-card .copy-btn {
  margin-top: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.code-card .copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.code-card .copy-btn.copied { color: var(--success); border-color: rgba(74,222,128,0.3); }

.alert-card {
  margin: 22px 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.22);
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text);
}
.alert-card .ic { color: var(--danger); flex-shrink: 0; margin-top: 1px; }
.alert-card .a-title { font-weight: 600; margin-bottom: 4px; }
.alert-card .a-body { color: var(--text-muted); line-height: 1.5; }

.details-grid {
  margin: 22px 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  font-size: 13px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.details-grid dt {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.details-grid dd {
  margin: 0;
  color: var(--text);
}
.details-grid dd.mono { font-family: var(--mono); }

.reader-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: #001428;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.reader-cta:hover { background: var(--accent-hover); }
.reader-cta.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.reader-cta.secondary:hover { background: var(--surface); }

.reader-signature {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.reader-signature .small {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 14px;
  line-height: 1.55;
}

.news-hero {
  margin: 0 0 24px;
  height: 180px;
  border-radius: var(--radius);
  background:
    radial-gradient(600px 200px at 40% 50%, rgba(74,158,255,0.25), transparent 60%),
    linear-gradient(135deg, #0e1830, #1a0e30);
  border: 1px solid var(--border);
  display: flex; align-items: flex-end;
  padding: 18px 22px;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ============================================================ */
/* SHARED                                                        */
/* ============================================================ */
.logomark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset, 0 2px 8px rgba(74,158,255,0.25);
}
.logomark svg { color: #fff; }

.wordmark {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark .light {
  color: var(--text-muted);
  font-weight: 400;
}

/* tweaks override hook for accent */
[data-accent="riot"] {
  --accent: #eb0029;
  --accent-hover: #ff2649;
  --accent-soft: rgba(235, 0, 41, 0.13);
  --accent-border: rgba(235, 0, 41, 0.35);
}
[data-accent="gold"] {
  --accent: #d4a14a;
  --accent-hover: #e9b85f;
  --accent-soft: rgba(212, 161, 74, 0.13);
  --accent-border: rgba(212, 161, 74, 0.4);
}

/* The HTML `hidden` attribute must beat element selectors like `.reader { display: flex }`. */
[hidden] { display: none !important; }

/* Reader pane wrapper — holds all message readers, JS toggles which is visible. */
.reader-pane {
  grid-area: reader;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--bg);
}
.reader-pane > .reader,
.reader-pane > .reader-empty {
  flex: 1;
  min-height: 0;
}

/* Real-email body rendering. */
.reader-body-text {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  color: var(--text);
}
.reader-html-frame {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

/* responsive guard for small viewports */
@media (max-width: 1100px) {
  .app { grid-template-columns: 360px 1fr; }
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
