:root {
  color-scheme: light dark;
  --bg: #f7f5f2;
  --card: #ffffff;
  --text: #1c1c1c;
  --muted: #6b6b6b;
  --border: #e2ddd5;
  --accent: #0f6b4e;
  --accent-hover: #0a5540;
  --error: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --card: #212325;
    --text: #f0efec;
    --muted: #a3a09a;
    --border: #34363a;
    --accent: #3ecf8e;
    --accent-hover: #63dba6;
    --error: #ff6b64;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 24px 16px 60px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
.wrap { max-width: 520px; margin: 0 auto; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 24px; font-size: 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.mosque-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.mosque-row:last-child { border-bottom: none; }
.mosque-name { font-weight: 600; }
.mosque-addr { color: var(--muted); font-size: 0.95rem; }
.mosque-row a { color: var(--accent); text-decoration: none; font-size: 1rem; margin-left: 10px; white-space: nowrap; }
.mosque-row a:hover { text-decoration: underline; }
label { display: block; font-size: 0.95rem; color: var(--muted); margin: 12px 0 4px; }
input[type="text"], input[type="password"], input[type="time"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1.05rem;
}
/* Scoped to .btn (not a bare `button` selector) — a bare element selector here previously
   matched EVERY <button> on every page that loads this shared stylesheet, not just admin.html's
   own login/save buttons it was written for. That's the same root cause as the leaked
   `button:hover` green tap-flash on the Favorites segmented control (see index.html's comment
   on .segment:hover): this one leaked `margin-top: 18px` onto .segment, .reorder-toggle, and
   the reorder ▲▼ buttons, silently eating into their fixed-height rows and pushing their
   content down with no room left for centering. */
.btn {
  margin-top: 18px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.5; cursor: default; }
.msg { margin-top: 12px; font-size: 0.95rem; }
.msg.error { color: var(--error); }
.msg.ok { color: var(--accent); }
.freshness { color: var(--muted); font-size: 0.95rem; margin: 10px 0 8px; }
.times-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.times-grid .full { grid-column: 1 / -1; }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.back:hover { color: var(--text); }
.source { color: var(--muted); font-size: 0.85rem; margin-top: 10px; }

/* Shared nav row — a primary pill + secondary pill, used on index.html and future pages. */
.nav-links { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.nav-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
}
.nav-btn:hover { background: var(--accent-hover); }
.nav-btn.secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.nav-btn.secondary:hover { color: var(--text); border-color: var(--muted); }
