:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5f6f7a;
  --line: #d9e1e6;
  --panel: #ffffff;
  --page: #f4f7f9;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}

a { color: var(--accent-dark); }

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.content {
  width: min(960px, calc(100% - 32px));
  margin: 32px auto;
}

.panel {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.panel.wide {
  width: 100%;
  margin-top: 18px;
}

h1, h2 { margin: 0 0 14px; }

p { line-height: 1.5; }

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
}

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 11px 14px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: #24343d;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.address {
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8fafb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

/* ── Dashboard shell ── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidenav {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 0 20px;
}

.sidenav-brand {
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0 20px 24px;
  color: var(--accent-dark);
  letter-spacing: -.01em;
}

.sidenav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.sidenav-links li { margin: 2px 8px; }

.navlink {
  display: block;
  padding: 9px 14px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.navlink:hover { background: var(--page); color: var(--ink); }
.navlink.active { background: var(--accent); color: #fff; font-weight: 700; }
.navlink.active:hover { background: var(--accent-dark); }

.sidenav-footer {
  padding: 0 20px;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 32px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.linkbutton {
  background: transparent;
  color: var(--accent-dark);
  padding: 0;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.rowlink {
  color: inherit;
  text-decoration: none;
}

.rowlink:hover {
  color: var(--accent-dark);
}

.linkitem {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.break {
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-width: 48px;
  justify-content: center;
  border-radius: 6px;
  padding: 4px 8px;
  background: #fff4cc;
  color: #6f4d00;
  font-weight: 800;
}

.notes {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.label-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.label-button {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #f3f4f6;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.label-button.phish { background: #ffe9e7; color: #b42318; }
.label-button.phish[aria-pressed="true"] { background: #b42318; color: #fff; }
.label-button.scam  { background: #fff0e6; color: #c2410c; }
.label-button.scam[aria-pressed="true"]  { background: #c2410c; color: #fff; }
.label-button.spam  { background: #fefce8; color: #854d0e; }
.label-button.spam[aria-pressed="true"]  { background: #d97706; color: #fff; }
.label-button.legit { background: #e6fffa; color: var(--accent-dark); }
.label-button.legit[aria-pressed="true"] { background: var(--accent); color: #fff; }
