:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1e2528;
  --muted: #6c7378;
  --line: #dcd7cd;
  --accent: #146c6c;
  --accent-2: #c25b38;
  --green: #2f7d54;
  --red: #b6423a;
  --shadow: 0 18px 45px rgba(30, 37, 40, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 292px 1fr; }
.sidebar { background: #202729; color: #f8f5ef; padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: #e4b363; color: #202729; font-weight: 800; }
h1, h2, h3, p { margin: 0; }
.brand h1 { font-size: 22px; }
.brand p, .quiet { color: #c9cbc8; }
.nav-tabs { display: grid; gap: 8px; }
.tab { text-align: left; border: 1px solid rgba(255,255,255,.12); background: transparent; color: #f8f5ef; padding: 12px 14px; border-radius: 8px; }
.tab.active { background: #f8f5ef; color: #202729; }
.status-panel { border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 16px; display: grid; gap: 10px; }
.status-panel strong { font-size: 42px; }
.progress { height: 10px; background: rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: #e4b363; }
.primary, .secondary, .success, .danger, .icon-btn { border: 0; border-radius: 8px; padding: 11px 14px; font-weight: 700; }
.primary { background: var(--accent); color: white; }
.secondary { background: #e8e3d8; color: var(--ink); }
.success { background: var(--green); color: white; }
.danger { background: var(--red); color: white; }
.full { width: 100%; }
.hidden { display: none !important; }
.small { font-size: 13px; }
.phone-sync { border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 14px; display: grid; gap: 8px; }
.phone-sync p:last-child { color: #c9cbc8; font-size: 13px; line-height: 1.45; }
.workspace { padding: 28px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 16px; }
.eyebrow { text-transform: uppercase; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0; }
.sidebar .eyebrow { color: #d9cda9; }
.clock { font-size: 32px; font-weight: 800; color: var(--accent); }
.view { display: none; }
.view.active { display: block; }
.morning-note, .calendar-note, .panel, .task-form { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.morning-note { padding: 20px; display: grid; gap: 14px; margin-bottom: 18px; }
.calendar-note { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 16px; align-items: center; margin-bottom: 18px; }
.calendar-note p:last-child { color: var(--muted); line-height: 1.5; }
textarea, input, select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 700; font-size: 14px; }
.task-layout { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 18px; align-items: start; }
.task-form { padding: 18px; display: grid; gap: 14px; }
.two-col, .score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel { padding: 18px; min-height: 360px; }
.panel.wide { max-width: 980px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.panel-head select { max-width: 220px; }
.task-list, .goal-list, .timeline { display: grid; gap: 10px; }
.task-item, .goal-item, .review-item { border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 8px; padding: 14px; display: grid; gap: 10px; background: #fffdf9; }
.task-item.done { border-left-color: var(--green); opacity: .82; }
.task-item.missed { border-left-color: var(--red); opacity: .82; }
.item-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.meta { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions button { padding: 8px 10px; }
.calendar-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 16px; }
.icon-btn { width: 44px; height: 44px; background: #fff; border: 1px solid var(--line); font-size: 26px; padding: 0; }
.week-grid, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.labels { margin-bottom: 8px; color: var(--muted); font-weight: 800; text-align: center; }
.day-cell { min-height: 118px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; align-content: start; gap: 6px; }
.day-cell.muted { opacity: .45; }
.day-number { font-weight: 800; }
.calendar-task { font-size: 12px; padding: 5px 7px; border-radius: 6px; background: #e9f2f1; color: #174f4f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-item { border-left-color: var(--accent-2); }
.review-form { display: grid; gap: 13px; margin-bottom: 18px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; background: #eee8db; color: var(--ink); font-size: 12px; font-weight: 800; }
.modal { position: fixed; inset: 0; background: rgba(20, 25, 26, .54); display: grid; place-items: center; padding: 20px; z-index: 10; }
.modal.hidden { display: none; }
.modal-box { width: min(520px, 100%); background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.22); display: grid; gap: 14px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }
@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .task-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .workspace, .sidebar { padding: 18px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .calendar-note { grid-template-columns: 1fr; }
  .two-col, .score-row { grid-template-columns: 1fr; }
  .week-grid, .calendar-grid { gap: 4px; }
  .day-cell { min-height: 86px; padding: 7px; }
  .calendar-task { font-size: 11px; }
}
