/* Palette pulled directly from DeskHubIcon.svg, not approximated:
   background #0d0d0d, steel blue #83a0cb, crimson #a61c3c, rose #cc7b8e.
   Deliberately fixed dark — this is a brand identity, not a light/dark
   preference, so it doesn't follow system color-scheme. */
:root {
  --bg: #0d0d0d;
  --card: #1a1a1a;
  --card-alt: #151515;
  --border: #2a2a2a;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --rose: #cc7b8e;
  --blue: #83a0cb;
  --accent: #a61c3c;
  --accent-hover: #c23c56;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 3rem;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

header h1 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--text);
  letter-spacing: 0.01em;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

#user-label { font-size: 0.8rem; color: var(--muted); }

.error-banner {
  background: #2a1216;
  color: #ff9ba8;
  border-bottom: 1px solid var(--accent);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

#signed-out-view {
  padding: 3rem 1.25rem;
  text-align: center;
}

.signin-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
}

#signed-out-view p { color: var(--text); }

.signin-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -0.4rem;
}

.tabs {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  border: 1px solid var(--border);
  background: var(--card-alt);
  color: var(--muted);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tab-panel { padding: 1rem 1.25rem; }

.quick-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.quick-add input,
.quick-add select,
.quick-add textarea {
  flex: 1 1 140px;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}

.quick-add textarea {
  flex-basis: 100%;
  resize: vertical;
}

.quick-add input::placeholder,
.quick-add textarea::placeholder { color: var(--muted); }

.quick-add input:focus,
.quick-add select:focus,
.quick-add textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.quick-add button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.quick-add button:active { background: var(--accent-hover); }

.quick-add button:disabled {
  opacity: 0.6;
  cursor: default;
}

.hide-completed {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.hide-completed input { accent-color: var(--accent); }

.record-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.row.done .title { text-decoration: line-through; color: var(--muted); }

.row-main {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
}

.row-main input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.row .title {
  font-weight: 500;
  color: var(--text);
  overflow-wrap: anywhere;
}

.row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.row .meta {
  font-size: 0.85rem;
  color: var(--rose);
  overflow-wrap: anywhere;
}

.row .toggle {
  accent-color: var(--accent);
}

.row-tappable {
  cursor: pointer;
}

.checklist-detail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.back-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
}

.checklist-detail-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.sign-out {
  padding: 1.5rem 1.25rem;
  display: flex;
  justify-content: center;
}
