/* OODA Fitness — mobile-first */
:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel-2: #1f2731;
  --border: #2a313c;
  --text: #e6edf3;
  --muted: #8b949e;
  --primary: #2da44e;
  --primary-2: #238636;
  --danger: #f85149;
  --warn: #d29922;
  --good: #2ea043;
  --info: #58a6ff;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 80px;
}

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; letter-spacing: 0.06em; }
.logout { margin: 0; }

.container { max-width: 720px; margin: 0 auto; padding: 16px; }
.page-title { font-size: 22px; margin: 4px 0 16px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px;
}
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat .value { font-size: 28px; font-weight: 700; }
.stat .sub { color: var(--muted); font-size: 12px; }

.quick-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .quick-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.quick { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--panel-2); border-radius: var(--radius); }
.quick h3 { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

input, select, button, textarea {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--info); outline-offset: -1px; }

button { cursor: pointer; }
.primary { background: var(--primary); border-color: var(--primary-2); color: white; font-weight: 600; }
.primary:hover { background: var(--primary-2); }
.ghost { background: transparent; border-color: var(--border); }
.danger { background: transparent; border-color: var(--danger); color: var(--danger); }

.add-row { display: grid; gap: 8px; grid-template-columns: 1fr; position: relative; }
.add-row.stacked { grid-template-columns: 1fr; }
.row3 { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.row4 { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .row4 { grid-template-columns: repeat(4, 1fr); } }

label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
label input { color: var(--text); }

.login { max-width: 360px; margin: 40px auto; }
.login h1 { margin-top: 0; }
.login form { display: flex; flex-direction: column; gap: 8px; }
.error { color: var(--danger); margin: 0 0 8px; }

.suggestions { list-style: none; padding: 0; margin: 0; }
.suggestions li {
  border-left: 3px solid var(--border);
  padding: 8px 10px;
  margin: 6px 0;
  background: var(--panel-2);
  border-radius: 4px;
  font-size: 14px;
}
.suggestions li.good { border-left-color: var(--good); }
.suggestions li.warn { border-left-color: var(--warn); }
.suggestions li.info { border-left-color: var(--info); }
.suggestions li .area { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 6px; }

.meal-section { margin-bottom: 14px; }
.meal-section h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 10px 0 6px; }
.entry {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  padding: 8px 10px; background: var(--panel-2); border-radius: 8px; margin-bottom: 6px;
  font-size: 14px;
}
.entry .meta { color: var(--muted); font-size: 12px; }
.entry .del { background: transparent; border: 0; color: var(--danger); padding: 4px 8px; width: auto; }

.suggest {
  list-style: none; padding: 0; margin: 0;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  max-height: 200px; overflow-y: auto; z-index: 5;
}
.suggest li { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 14px; }
.suggest li:hover, .suggest li.hover { background: var(--panel); }
.suggest:empty { display: none; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.06em; }
table.data td button { padding: 4px 6px; width: auto; background: transparent; border: 0; color: var(--danger); }

.workout-day { margin-bottom: 14px; }
.workout-day h3 { margin: 10px 0 6px; font-size: 13px; color: var(--muted); }
.set-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  background: var(--panel-2); padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; font-size: 14px;
}
.set-row .meta { color: var(--muted); font-size: 12px; }

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--panel);
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(6, 1fr);
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  text-align: center; padding: 12px 4px;
  color: var(--muted); text-decoration: none;
  font-size: 12px;
  border-top: 2px solid transparent;
}
.bottomnav a.active { color: var(--text); border-top-color: var(--primary); }

/* Chart container — fixes Chart.js sizing on mobile */
.chart-wrap { position: relative; width: 100%; height: 220px; }
.chart-wrap canvas { max-width: 100% !important; }
@media (min-width: 560px) { .chart-wrap { height: 280px; } }

/* ============= PLAN PAGE ============= */
.hidden { display: none !important; }

.plan-hero {
  text-align: center;
  padding: 28px 16px 20px;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
  border-bottom: 1px solid #222;
  margin: -16px -16px 16px;
}
.plan-eyebrow { font-size: 11px; letter-spacing: 6px; color: #666; margin-bottom: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.plan-title {
  font-size: clamp(28px, 6vw, 42px); font-weight: 800; margin: 0 0 6px;
  background: linear-gradient(90deg, #4ade80, #60a5fa, #a78bfa);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  letter-spacing: -1px;
}
.plan-subtitle { font-size: 12px; color: #888; letter-spacing: 2px; }
.plan-stats { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.plan-stat { background: #111; border: 1px solid #222; border-radius: 8px; padding: 10px 16px; text-align: center; min-width: 80px; }
.plan-stat .value { font-size: 17px; font-weight: 700; color: #fff; }
.plan-stat .label { font-size: 10px; color: #555; letter-spacing: 2px; margin-top: 2px; }

.plan-tabs {
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  background: #111; border: 1px solid #222; border-radius: 8px;
  padding: 4px; gap: 2px; margin-top: 18px;
}
.plan-tab {
  background: transparent; color: #666; border: 0; border-radius: 6px;
  padding: 8px 12px; font-weight: 700; font-size: 11px; letter-spacing: 1.5px;
  font-family: ui-monospace, Menlo, Consolas, monospace; cursor: pointer;
  width: auto;
}
.plan-tab.active { background: #fff; color: #000; }

.plan-section, .plan-pane { margin-bottom: 24px; }
.plan-label { font-size: 10px; letter-spacing: 4px; color: #555; margin-bottom: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; }
.plan-label.inline { margin: 0 8px 0 0; display: inline-block; }
.plan-hint { font-size: 11px; color: #555; margin: 4px 0 10px; font-style: italic; }

/* Milestones strip */
.milestones-scroll { overflow-x: auto; padding-bottom: 6px; }
.milestones { display: flex; gap: 8px; min-width: max-content; }
.milestone {
  background: #111; border-radius: 6px; padding: 12px 14px; min-width: 100px; text-align: center;
  border: 1px solid #222; border-top: 3px solid #6b7280;
}
.milestone .date { font-size: 10px; color: #555; margin-bottom: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.milestone .weight { font-size: 16px; font-weight: 700; }
.milestone .stone { font-size: 10px; color: #666; margin-top: 3px; }

/* Phase picker + card */
.phase-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.phase-btn {
  background: #111; color: var(--c); border: 1px solid var(--c);
  border-radius: 6px; padding: 8px 14px; font-weight: 700; font-size: 11px;
  letter-spacing: 2px; font-family: ui-monospace, Menlo, Consolas, monospace;
  cursor: pointer; width: auto;
}
.phase-btn.active { background: var(--c); color: #000; }

.phase-card {
  border: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
  border-radius: 12px; padding: 18px;
}
.phase-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid color-mix(in srgb, var(--c) 15%, transparent);
  padding-bottom: 14px; margin-bottom: 16px;
}
.phase-head .eyebrow { font-size: 10px; color: var(--c); letter-spacing: 4px; font-family: ui-monospace, Menlo, Consolas, monospace; margin-bottom: 4px; }
.phase-head h2 { margin: 0 0 4px; font-size: 24px; font-weight: 800; color: var(--c); }
.phase-head .meta { font-size: 12px; color: #888; }
.phase-bw { text-align: right; }
.phase-bw .label { font-size: 11px; color: #555; }
.phase-bw .value { font-size: 18px; font-weight: 700; color: #fff; }
.phase-bw .rate { font-size: 11px; color: #666; margin-top: 2px; }
.phase-goal {
  background: color-mix(in srgb, var(--c) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 14%, transparent);
  border-radius: 6px; padding: 10px 14px; font-size: 13px; color: #ccc; margin-bottom: 16px;
}
.phase-goal strong { color: var(--c); }
.phase-label { font-size: 10px; letter-spacing: 3px; color: var(--c, #555); margin: 14px 0 10px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.lifts-table-wrap { overflow-x: auto; }
.lifts-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
.lifts-table th { text-align: left; padding: 8px 10px; color: #888; font-weight: 600; font-size: 10px; letter-spacing: 2px; border-bottom: 1px solid color-mix(in srgb, var(--c) 20%, transparent); }
.lifts-table th.hl { color: var(--c); text-align: center; }
.lifts-table td { padding: 9px 10px; border-bottom: 1px solid #1a1a1a; font-size: 12px; }
.lifts-table td.ex { color: #fff; font-weight: 600; }
.lifts-table td.mono { font-family: ui-monospace, Menlo, Consolas, monospace; color: #aaa; text-align: center; }
.lifts-table td.mono.hl { color: var(--c); font-weight: 700; }
.lifts-table td.tip { color: #666; font-size: 11px; }

.phase-focus-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 640px) { .phase-focus-grid { grid-template-columns: 1fr 1fr; } }
.phase-focus { background: #ffffff05; border: 1px solid #ffffff0a; border-radius: 8px; padding: 14px; }
.phase-focus .mono.small { font-size: 12px; color: #777; font-family: ui-monospace, Menlo, Consolas, monospace; margin-bottom: 8px; }
.phase-focus .bullet { font-size: 12px; color: #bbb; padding: 5px 0; border-bottom: 1px solid #ffffff08; line-height: 1.5; }

/* Workout day picker + card */
.day-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
@media (min-width: 480px) { .day-picker { grid-template-columns: repeat(4, 1fr); } }
.day-btn {
  background: #111; border: 1px solid #222; border-radius: 8px; color: #555;
  padding: 10px 6px; text-align: center; cursor: pointer; width: auto;
}
.day-btn .day { font-size: 10px; letter-spacing: 2px; font-family: ui-monospace, Menlo, Consolas, monospace; margin-bottom: 4px; }
.day-btn .label { font-size: 13px; font-weight: 700; }
.day-btn .focus { font-size: 10px; opacity: 0.7; margin-top: 3px; }
.day-btn.active {
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border-color: var(--c); color: var(--c);
}

.workout-card {
  background: #111;
  border: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
  border-left: 4px solid var(--c);
  border-radius: 10px; padding: 18px; margin-bottom: 16px;
}
.workout-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.workout-head .eyebrow { font-size: 10px; color: var(--c); letter-spacing: 4px; font-family: ui-monospace, Menlo, Consolas, monospace; margin-bottom: 4px; }
.workout-head h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: #fff; }
.workout-head .meta { font-size: 13px; color: #888; }
.workout-duration { text-align: right; }
.workout-duration .label { font-size: 11px; color: #555; }
.workout-duration .value { font-size: 17px; font-weight: 700; color: var(--c); }
.workout-warmup, .workout-cooldown {
  margin-top: 12px; background: #ffffff08; border-radius: 6px; padding: 10px 14px;
  font-size: 12px; color: #aaa;
}
.workout-warmup strong, .workout-cooldown strong { color: #fff; }

.exercises { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.exercise-card {
  background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 10px; overflow: hidden;
  display: flex; align-items: stretch;
}
.ex-num {
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--c) 18%, transparent);
  padding: 14px 12px; min-width: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: var(--c);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ex-body { flex: 1; padding: 12px 14px; }
.ex-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.ex-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ex-name { font-size: 14px; font-weight: 700; color: #fff; }
.ex-type {
  font-size: 9px; padding: 2px 6px; border-radius: 4px; letter-spacing: 1px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ex-type.compound { background: #ffffff10; color: #aaa; border: 1px solid #ffffff20; }
.ex-type.isolation { background: #60a5fa15; color: #60a5fa; border: 1px solid #60a5fa33; }
.ex-tip { font-size: 12px; color: #666; font-style: italic; }
.ex-stats { display: flex; gap: 6px; flex-shrink: 0; }
.ex-stats .stat { text-align: center; background: #0a0a0a; border: 1px solid #222; border-radius: 6px; padding: 5px 9px; }
.ex-stats .val { font-size: 13px; font-weight: 700; color: var(--c); font-family: ui-monospace, Menlo, Consolas, monospace; }
.ex-stats .lbl { font-size: 8px; color: #555; letter-spacing: 1px; }
.ex-phase2 {
  margin-top: 8px; font-size: 11px; color: #60a5fa;
  background: #60a5fa0a; border: 1px solid #60a5fa20;
  border-radius: 4px; padding: 4px 8px; display: inline-block;
}
.card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.card-actions button { width: auto; }

/* Meal plan */
.meal-day-toggle { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.meal-day-btn {
  background: #111; color: #666; border: 1px solid var(--c); border-radius: 8px;
  padding: 10px 20px; font-weight: 800; font-size: 12px; letter-spacing: 2px;
  font-family: ui-monospace, Menlo, Consolas, monospace; cursor: pointer; width: auto;
}
.meal-day-btn.active { background: var(--c); color: #000; }

.macro-summary {
  background: #111; border: 1px solid #222; border-radius: 12px; padding: 18px; margin-bottom: 18px;
}
.macro-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.macro {
  text-align: center; background: #0a0a0a;
  border: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
  border-radius: 8px; padding: 10px 8px;
}
.macro .v { font-size: 18px; font-weight: 800; color: var(--c); font-family: ui-monospace, Menlo, Consolas, monospace; }
.macro .v span { font-size: 11px; color: #666; margin-left: 2px; }
.macro .l { font-size: 9px; color: #555; letter-spacing: 2px; margin-top: 2px; }
.macro-note { font-size: 12px; color: #666; font-style: italic; border-top: 1px solid #1a1a1a; padding-top: 10px; }

.meals-list { display: flex; flex-direction: column; gap: 10px; }
.meal-card { background: #111; border: 1px solid #1e1e1e; border-radius: 12px; overflow: hidden; }
.meal-header {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer;
}
.meal-icon { font-size: 22px; flex-shrink: 0; }
.meal-info { flex: 1; min-width: 0; }
.meal-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.meal-title-row .name { font-size: 14px; font-weight: 700; color: #fff; }
.meal-title-row .tag {
  font-size: 9px; padding: 2px 7px; border-radius: 4px; letter-spacing: 1px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
}
.meal-sub { font-size: 12px; color: #555; font-family: ui-monospace, Menlo, Consolas, monospace; }
.meal-quick-macros { flex-shrink: 0; text-align: right; }
.meal-quick-macros .k { font-size: 15px; font-weight: 700; color: #fbbf24; font-family: ui-monospace, Menlo, Consolas, monospace; }
.meal-quick-macros .k span { font-size: 10px; color: #666; }
.meal-quick-macros .p { font-size: 11px; color: #4ade80; font-family: ui-monospace, Menlo, Consolas, monospace; }
.chev { font-size: 16px; color: #444; transition: transform 0.2s; flex-shrink: 0; }

.meal-body { padding: 14px 16px; border-top: 1px solid #1e1e1e; }
.meal-macro-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.meal-macro-row .m {
  background: #0a0a0a; border: 1px solid color-mix(in srgb, var(--c) 15%, transparent);
  border-radius: 6px; padding: 6px 10px; text-align: center; flex: 1;
}
.meal-macro-row .v { font-size: 13px; font-weight: 700; color: var(--c); font-family: ui-monospace, Menlo, Consolas, monospace; }
.meal-macro-row .l { font-size: 8px; color: #555; letter-spacing: 1px; }
.primary-block { background: #0a0a0a; border: 1px solid #1a1a1a; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.primary-label { font-size: 10px; letter-spacing: 3px; color: var(--c); margin-bottom: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.primary-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.primary-block .item { font-size: 13px; color: #bbb; padding: 5px 0; border-bottom: 1px solid #1a1a1a; }
.primary-block .item:last-child { border-bottom: 0; }
.swaps-label { font-size: 10px; letter-spacing: 3px; color: #555; margin-bottom: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.swaps { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .swaps { grid-template-columns: 1fr 1fr; } }
.swap { background: #0a0a0a; border: 1px solid #222; border-radius: 8px; overflow: hidden; }
.swap-head { padding: 10px 12px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #bbb; font-weight: 600; }
.swap-head .plus { font-size: 14px; color: #555; }
.swap-items { padding: 0 12px 10px; border-top: 1px solid #1a1a1a; }
.swap-item { font-size: 12px; color: #888; padding: 4px 0; border-bottom: 1px solid #111; }
.swap-item:last-child { border-bottom: 0; }
.meal-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.meal-actions button { width: auto; flex: 1; min-width: 120px; }

.supplements { background: #111; border: 1px solid #222; border-radius: 10px; padding: 14px 18px; margin-top: 18px; }
.supp { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #1a1a1a; gap: 8px; flex-wrap: wrap; }
.supp:last-child { border-bottom: 0; }
.supp .name { font-size: 13px; font-weight: 600; color: #fff; }
.supp .time { font-size: 11px; color: #555; margin-top: 2px; }
.supp .dose {
  font-size: 13px; font-weight: 700; color: var(--c); font-family: ui-monospace, Menlo, Consolas, monospace;
  background: color-mix(in srgb, var(--c) 10%, transparent);
  padding: 3px 10px; border-radius: 4px;
}

/* Schedule */
.schedule-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 18px; }
.sched-day {
  background: #0a0a0a; border: 1px solid #1a1a1a; border-radius: 8px; padding: 10px 4px; text-align: center;
}
.sched-day.active { background: color-mix(in srgb, var(--c) 10%, transparent); border-color: color-mix(in srgb, var(--c) 30%, transparent); }
.sched-day .day { font-size: 9px; letter-spacing: 1px; color: #444; font-family: ui-monospace, Menlo, Consolas, monospace; margin-bottom: 4px; }
.sched-day .label { font-size: 11px; font-weight: 700; color: #333; }
.sched-day .sub { font-size: 9px; color: #2a2a2a; margin-top: 3px; }
.sched-day.active .day { color: var(--c); }
.sched-day.active .label { color: #fff; }
.sched-day.active .sub { color: #888; }

.rules-card { background: #111; border: 1px solid #222; border-radius: 12px; padding: 18px; }
.rules-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .rules-grid { grid-template-columns: 1fr 1fr; } }
.rule {
  background: #0a0a0a; border: 1px solid #1a1a1a; border-radius: 8px;
  padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start;
}
.rule .icon { font-size: 18px; flex-shrink: 0; }
.rule .text { font-size: 12px; color: #bbb; line-height: 1.5; }

.plan-footer {
  text-align: center; margin: 24px 0 0;
  font-size: 11px; color: #333; letter-spacing: 2px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* Edit modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.modal-body {
  position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; max-width: 720px; width: 100%; max-height: 90vh; display: flex; flex-direction: column;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head button { width: auto; padding: 4px 12px; }
.modal-body textarea {
  flex: 1; min-height: 320px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  background: #0a0a0a; border: 1px solid #222; color: #ddd; padding: 12px; border-radius: 6px;
  white-space: pre; resize: vertical;
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.modal-actions button { width: auto; padding: 8px 18px; }
