:root {
  --bg: #0f1420;
  --panel: #171e2e;
  --panel-2: #1e2637;
  --line: #2b3548;
  --ink: #eef2f9;
  --muted: #9aa8bf;
  --accent: #5aa9ff;
  --day: #ffb347;
  --night: #8b8bff;
  --ok: #3ddc97;
  --warn: #ff6b6b;
  --lunch: #3ddc97;
  --short: #5aa9ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 10% -10%, #1b2436 0%, var(--bg) 60%);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 64px; }

header.top {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  justify-content: space-between; margin-bottom: 22px;
}

h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -0.02em; }
.sub { color: var(--muted); font-size: 14px; margin: 0; }

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

button, .btn {
  font: inherit; font-size: 14px; cursor: pointer;
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 13px; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: #06121f; border-color: var(--accent); font-weight: 600; }
input[type="date"] {
  font: inherit; font-size: 14px; background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}

/* One-click reminder: opens the owner's mail app with that person's reminder
   written and addressed to them. The dashed version shows while an address is missing. */
button.remind.missing {
  font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: transparent; color: var(--muted); border: 1px dashed var(--line);
  border-radius: 10px; padding: 8px 13px; cursor: pointer;
}
button.remind.missing:hover { color: var(--ink); border-color: var(--accent); background: transparent; }
button.remind.missing.compact { font-size: 12.5px; padding: 6px 10px; }

/* Team addresses — typed once in the owner's browser, used by the reminder buttons. */
.addr-grid { display: flex; flex-direction: column; gap: 8px; }
.addr-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
}
.addr-row .who { min-width: 180px; font-weight: 600; font-size: 14px; }
.addr-row .who .t { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.addr-row input {
  flex: 1; min-width: 200px; font: inherit; font-size: 14px;
  background: #131a28; color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px;
}
.addr-row input:focus { outline: none; border-color: var(--accent); }
.addr-row .ok { font-size: 12px; color: var(--muted); min-width: 80px; text-align: right; }
.addr-row .ok.on { color: var(--ok); }
.addr.todo { color: var(--warn); }

a.remind {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--accent); color: #06121f; border: 1px solid var(--accent);
  border-radius: 10px; padding: 8px 13px; display: inline-block; text-decoration: none;
}
a.remind:hover { filter: brightness(1.08); }
a.remind.compact { font-size: 12.5px; padding: 6px 10px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 18px 14px; margin-bottom: 18px;
}
.card h2 { font-size: 17px; margin: 0 0 2px; display: flex; align-items: center; gap: 8px; }
.card .hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.pill {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.pill.day { color: var(--day); border-color: #4a3a1c; background: #241d0f; }
.pill.night { color: var(--night); border-color: #33335c; background: #171731; }
.pill.ok { color: var(--ok); border-color: #1d4a37; background: #10251c; }
.pill.bad { color: var(--warn); border-color: #4d2222; background: #261212; }

.person { padding: 12px 0; border-top: 1px solid var(--line); }
.person:first-of-type { border-top: 0; }
.person-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.person-head .name { font-weight: 600; }
.person-head .meta { color: var(--muted); font-size: 13px; }
.person-head .spacer { flex: 1; }
.person-head .actions { display: flex; gap: 6px; }
.person-head .actions a, .person-head .actions button { font-size: 12.5px; padding: 6px 10px; }

.timeline {
  position: relative; height: 34px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  display: flex;
}
.seg { position: relative; height: 100%; border-right: 1px solid rgba(0,0,0,.35); }
.seg.work { background: repeating-linear-gradient(45deg, #202a3d, #202a3d 6px, #232e43 6px, #232e43 12px); }
.seg.lunch { background: linear-gradient(180deg, #3ddc97, #2ab07a); }
.seg.short { background: linear-gradient(180deg, #5aa9ff, #3d82d6); }
.seg span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #04121f; font-weight: 700; white-space: nowrap; overflow: hidden;
}
.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 4px; }

.break-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px 6px 10px; font-size: 13px; cursor: pointer; user-select: none;
}
.chip input { accent-color: var(--ok); }
.chip .t { color: var(--muted); font-size: 12px; }
.chip.done { border-color: #2c6d52; background: #14291f; color: #b9f0d7; }
.chip.done .t { color: #7fbfa0; }

table.queue { width: 100%; border-collapse: collapse; font-size: 14px; }
table.queue th, table.queue td { text-align: left; padding: 9px 8px; border-top: 1px solid var(--line); }
table.queue th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; border-top: 0; }
table.queue td.when { white-space: nowrap; color: var(--muted); }
table.queue td.act { text-align: right; white-space: nowrap; }
table.queue tr.past { opacity: .45; }

.rules { list-style: none; padding: 0; margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.rules li { padding: 4px 0 4px 22px; position: relative; }
.rules li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); }

.foot { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 24px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #10251c; color: #b9f0d7; border: 1px solid #2c6d52;
  padding: 10px 16px; border-radius: 999px; font-size: 13.5px; opacity: 0;
  transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

.queue td.link { max-width: 200px; }
.queue td.link .addr { font-size: 12px; color: var(--muted); word-break: break-all; }

@media (max-width: 620px) {
  h1 { font-size: 23px; }
  .person-head .actions { width: 100%; }
  table.queue th:nth-child(3), table.queue td:nth-child(3) { display: none; }
}
