:root {
  --bg: #0f1412;
  --panel: #171e1b;
  --line: #2a3530;
  --text: #e8efe9;
  --muted: #9aada3;
  --accent: #3dba7a;
  --accent-dim: #1f6b45;
  --danger: #e07a6a;
  --font: "Segoe UI", "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 400px at 80% -10%, #1d3a2c 0%, transparent 55%),
    radial-gradient(700px 300px at 0% 100%, #14241c 0%, transparent 50%);
  z-index: -1;
}

.top {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 8px;
}
.brand { font-weight: 700; letter-spacing: 0.04em; }
.tag { color: var(--muted); margin: 6px 0 0; font-size: 0.92rem; }

.shell { max-width: 880px; margin: 0 auto; padding: 12px 20px 64px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
}

h1 { margin: 0 0 10px; font-size: 1.6rem; }
.lead { color: var(--muted); line-height: 1.7; margin: 0 0 20px; }

.btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #062214;
  font-weight: 700;
}
.btn.primary:disabled { opacity: 0.6; cursor: wait; }
.btn.ghost { background: #202826; }
.btn.close { float: left; }

.error { color: var(--danger); margin-top: 12px; }

.inbox-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.kicker { color: var(--muted); margin: 0 0 8px; font-size: 0.85rem; }
.address-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.address-row strong { font-size: 1.15rem; word-break: break-all; }
.copy-ok { color: var(--accent); margin: 8px 0 0; }
.timer-box {
  background: #101714;
  border: 1px solid var(--accent-dim);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  min-width: 140px;
}
.timer-box span { display: block; color: var(--muted); font-size: 0.8rem; }
.timer-box time { font-size: 1.8rem; font-variant-numeric: tabular-nums; }

.inbox-title { font-weight: 700; margin-bottom: 12px; }
.empty { color: var(--muted); margin: 8px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #121916;
}
.list li:hover { border-color: var(--accent-dim); }
.list .sub { color: var(--muted); font-size: 0.88rem; margin-top: 6px; }

[hidden] {
  display: none !important;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: none;
  place-items: center;
  padding: 16px;
  z-index: 20;
}
.overlay:not([hidden]) {
  display: grid;
}
.viewer {
  width: min(920px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.meta { display: grid; gap: 8px; margin: 16px 0; }
.meta div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
dt { color: var(--muted); }
dd { margin: 0; word-break: break-word; }
.body-label { margin: 12px 0 8px; color: var(--muted); }
iframe.mail-frame {
  width: 100%;
  min-height: 360px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.text-body {
  white-space: pre-wrap;
  background: #101714;
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
}
