:root {
  color-scheme: dark;
  --bg: #08110d;
  --card: #101b16;
  --card-2: #14231c;
  --line: #26382f;
  --text: #f4f8f5;
  --muted: #9bb0a4;
  --green: #45d483;
  --green-dark: #153f2a;
  --amber: #f2b84b;
  --red: #ff6b6b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 0%, rgba(69, 212, 131, .13), transparent 30rem),
    var(--bg);
  color: var(--text);
}

button { font: inherit; }

.shell {
  display: flex;
  flex-direction: column;
  width: min(100% - 32px, 560px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 4px 18px;
}

.brand img { border-radius: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 1.55rem; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 1.3rem; letter-spacing: -.025em; }

.eyebrow, .label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.card {
  margin-bottom: 12px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(20, 35, 28, .95), rgba(12, 23, 17, .98));
  box-shadow: 0 18px 60px rgba(0, 0, 0, .2);
}

.status-heading, .section-heading { display: flex; align-items: center; gap: 13px; }
.status-dot { width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px rgba(155, 176, 164, .12); }
.status-dot.valid { background: var(--green); box-shadow: 0 0 0 5px rgba(69, 212, 131, .12); }
.status-dot.warning { background: var(--amber); box-shadow: 0 0 0 5px rgba(242, 184, 75, .12); }
.status-dot.danger { background: var(--red); box-shadow: 0 0 0 5px rgba(255, 107, 107, .12); }
.status-message { margin: 12px 0 15px; color: var(--muted); line-height: 1.4; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin: 0 0 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--line); }
.facts div { min-width: 0; padding: 12px; background: var(--card); }
.facts dt { margin-bottom: 5px; color: var(--muted); font-size: .76rem; }
.facts dd { overflow: hidden; margin: 0; font-size: .9rem; font-weight: 650; text-overflow: ellipsis; }

.notice { margin: 0 0 12px; padding: 11px 12px; border: 1px solid rgba(242, 184, 75, .35); border-radius: 13px; background: rgba(242, 184, 75, .08); color: #f7d998; font-size: .82rem; line-height: 1.4; }
.button-row { display: flex; gap: 10px; }
button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 13px; cursor: pointer; font-weight: 750; transition: transform .15s ease, opacity .15s ease; }
button:active { transform: translateY(1px); }
button:disabled { cursor: wait; opacity: .55; }
.primary { width: 100%; background: var(--green); color: #04130a; }
.secondary { background: #e8f6ed; color: #0b1a12; }
.ghost { border: 1px solid var(--line); background: transparent; color: var(--text); }
.status-card .secondary { width: 100%; margin-top: 10px; }
.flash { position: fixed; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); left: 14px; z-index: 10; max-width: 540px; margin: 0 auto; padding: 13px 16px; border: 1px solid rgba(69, 212, 131, .25); border-radius: 13px; background: #153f2a; box-shadow: 0 14px 40px rgba(0, 0, 0, .45); color: #baf1cf; line-height: 1.4; }
.flash.error { background: rgba(255, 107, 107, .12); color: #ffaaaa; }
.hidden { display: none !important; }
footer { margin-top: auto; padding: 8px 4px 0; color: #718379; font-size: .72rem; text-align: center; }

@media (max-width: 820px) {
  .shell {
    width: calc(100% - 20px);
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .brand {
    gap: 10px;
    margin: 0 2px 11px;
  }

  .brand img { width: 38px; height: 38px; border-radius: 11px; }
  h1 { font-size: 1.25rem; }
  h2 { font-size: 1.1rem; }
  .eyebrow, .label { font-size: .62rem; }

  .card {
    margin-bottom: 9px;
    padding: 14px;
    border-radius: 18px;
  }

  .status-heading, .section-heading { gap: 10px; }
  .status-message { margin: 9px 0 11px; font-size: .82rem; line-height: 1.35; }
  .status-card > .status-message { display: none; }

  .facts {
    margin-bottom: 12px;
    border-radius: 13px;
  }

  .facts div { padding: 9px; }
  .facts dt { margin-bottom: 3px; font-size: .64rem; }
  .facts dd { font-size: .75rem; line-height: 1.25; white-space: normal; }

  button { min-height: 46px; padding: 0 12px; border-radius: 12px; font-size: .88rem; }
  .button-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 8px; }
  .button-row button { width: 100%; }
  .notification-card .status-message { margin-bottom: 10px; }
  footer { display: none; }
}

@media (max-height: 700px) and (max-width: 820px) {
  .brand .eyebrow { display: none; }
  .brand { margin-bottom: 8px; }
  .card { padding: 12px; }
  .notification-card .status-message { display: none; }
}
