:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card-2: #243349;
  --primary: #2563eb;
  --primary-d: #1d4ed8;
  --green: #16a34a;
  --green-l: #86efac;
  --red: #fca5a5;
  --red-d: #7f1d1d;
  --muted: #94a3b8;
  --text: #e2e8f0;
  --border: #334155;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

.app { max-width: 560px; margin: 0 auto; padding: 0 14px 96px; }
.hidden { display: none !important; }

/* Header */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15,23,42,0.95); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; border-bottom: 1px solid var(--border);
}
header.top h1 { font-size: 18px; margin: 0; letter-spacing: 0.2px; }
header.top .who { font-size: 13px; color: var(--muted); }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin: 14px 0;
}
.card h2 { margin: 0 0 10px; font-size: 16px; }
.card h3 { margin: 14px 0 6px; font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

/* Buttons & inputs — ≥44px tap targets */
button, .btn {
  font: inherit; cursor: pointer; border: none; border-radius: 10px;
  padding: 12px 16px; min-height: 44px; background: var(--primary); color: #fff;
  font-weight: 600;
}
button:hover { background: var(--primary-d); }
button.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.ghost:hover { background: var(--card-2); }
button.sm { min-height: 38px; padding: 8px 12px; font-size: 14px; }
button.danger { background: #b91c1c; }
button.success { background: var(--green); }

input, select, textarea {
  font: inherit; width: 100%; padding: 12px; min-height: 44px;
  background: var(--card-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px;
}
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }

/* Bottom nav */
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; background: var(--card); border-top: 1px solid var(--border);
  max-width: 560px; margin: 0 auto;
}
nav.tabs button {
  flex: 1; background: transparent; color: var(--muted); border-radius: 0;
  font-size: 11px; font-weight: 600; padding: 8px 2px; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
nav.tabs button .ic { font-size: 20px; }
nav.tabs button.active { color: #fff; }
nav.tabs button.active .ic { filter: drop-shadow(0 0 6px var(--primary)); }

/* Pills / badges */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; background: var(--card-2); color: var(--muted);
  border: 1px solid var(--border);
}
.pill.team { background: rgba(37,99,235,0.18); color: #93c5fd; border-color: #1e3a8a; }
.pill.green { background: rgba(22,163,74,0.18); color: var(--green-l); border-color: #14532d; }

/* Conflict banner — impossible to miss */
.conflict {
  background: rgba(127,29,29,0.35); border: 1px solid #b91c1c; color: var(--red);
  border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-weight: 600;
  display: flex; gap: 8px; align-items: flex-start;
}
.conflict .ic { font-size: 18px; }

/* Member toggle list (for announcement) */
.member-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  margin: 6px 0; background: var(--card-2);
}
.member-toggle.off { opacity: 0.45; }
.member-toggle .name { font-weight: 600; }
.toggle {
  width: 50px; height: 30px; border-radius: 999px; background: #475569;
  position: relative; transition: background .15s; flex: none;
}
.toggle.on { background: var(--green); }
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; transition: left .15s;
}
.toggle.on::after { left: 23px; }

/* Announcement preview — the focal point */
.announce {
  background: #0b1220; border: 1px solid var(--primary); border-radius: var(--radius);
  padding: 14px; white-space: pre-wrap; font-size: 15px; line-height: 1.55;
  margin: 10px 0;
}

/* Date nav */
.datenav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.datenav .date { text-align: center; }
.datenav .date .big { font-size: 18px; font-weight: 700; }

/* Schedule rows */
.sched-row { border-bottom: 1px solid var(--border); padding: 12px 0; }
.sched-row:last-child { border-bottom: none; }
.sched-row .date { font-weight: 700; }

/* Login */
.login-wrap { min-height: 80vh; display: flex; align-items: center; }
.login-wrap .card { width: 100%; }

.toast {
  position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #04230f; padding: 12px 18px; border-radius: 10px;
  font-weight: 700; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.4);
}

ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 6px 0; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.chk { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; }
.chk input { width: 24px; height: 24px; min-height: 24px; flex: none; }
