/* Speaker Portal — vanilla CSS. White, calm, big tap targets. */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --line: #e8e6df;
  --text: #2a2a28;
  --muted: #7a7a72;
  --accent: #4a6fa5;
  --accent-text: #ffffff;
  --warn: #b27a18;
  --warn-bg: #fff8e8;
  --error: #b3261e;
  --success: #1f7a4d;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  font-weight: 600;
  letter-spacing: 0.2px;
}
.navlinks {
  flex: 1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.navlinks a {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--muted);
}
.navlinks a.active {
  color: var(--text);
  background: #f1efe8;
}

.linklike {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95em;
  padding: 4px 8px;
}
.linklike:hover { color: var(--text); }

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.foot {
  text-align: center;
  color: var(--muted);
  padding: 24px 16px 40px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 1.05em;
  font-weight: 600;
  margin: 0 0 6px;
}
.card-sub {
  color: var(--muted);
  font-size: 0.9em;
  margin: 0 0 16px;
}

input, textarea, button, select {
  font: inherit;
  color: inherit;
}
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  outline: none;
  margin-bottom: 12px;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.15);
}
.input.ot { letter-spacing: 0.4em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.1em; text-align: center; }

label.field {
  display: block;
  font-size: 0.85em;
  color: var(--muted);
  margin-bottom: 4px;
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  font-weight: 500;
  min-height: 44px;
}
.btn:hover { filter: brightness(0.95); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.ghost {
  background: var(--surface);
  color: var(--accent);
}
.btn.danger {
  background: var(--surface);
  border-color: var(--error);
  color: var(--error);
}
.btn.block { width: 100%; }
.btn.small { padding: 8px 12px; min-height: 32px; font-size: 0.9em; }

.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.spacer { flex: 1; }

.muted { color: var(--muted); }
.right { text-align: right; }
.center { text-align: center; }

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid #f1d99e;
  margin-bottom: 16px;
  font-size: 0.95em;
}
.alert.error { background: #fbebea; color: var(--error); border-color: #f1c1bd; }
.alert.ok { background: #ebf5ef; color: var(--success); border-color: #b9e0c8; }

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: none; }

.duty-date { font-weight: 600; }
.duty-meta { color: var(--muted); font-size: 0.9em; margin-top: 2px; }
.duty-centre { font-size: 0.95em; }

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8em;
  background: #eef0ee;
  color: var(--muted);
}
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.ok { background: #e6f3ec; color: var(--success); }

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 8px 0;
}
.kv dt { color: var(--muted); font-size: 0.9em; }
.kv dd { margin: 0; }

dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
  color: var(--text);
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
dialog::backdrop { background: rgba(20, 20, 18, 0.4); }

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.tab {
  background: none;
  border: 0;
  padding: 10px 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

@media (max-width: 480px) {
  .navlinks a { padding: 4px 6px; font-size: 0.9em; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { padding-top: 8px; }
}
