:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --text: #1c2b27;
  --muted: #62736e;
  --line: #dde5e2;
  --accent: #0f766e;
  --accent-soft: #e0f2ef;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn-soft: #fff4e0;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }
h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 1rem; }
main.wrap { padding-block: 1.25rem 3rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.empty { color: var(--muted); font-style: italic; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-block: .75rem; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.brand-mark { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 6px; background: var(--accent); color: #fff; margin-right: .3rem; }
nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
nav a { text-decoration: none; font-weight: 500; }
.footer { color: var(--muted); font-size: .85rem; padding-block: 1rem 2rem; }

.inline { display: inline; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 500; cursor: pointer; padding: 0; }

.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; padding: .5rem 1rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--accent); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.card-accent { background: var(--accent-soft); border-color: #b5ded7; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.meta { display: flex; justify-content: space-between; margin: .5rem 0 0; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.narrow { max-width: 420px; margin: 2rem auto; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.hero p { margin-top: -.5rem; }
.steps { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.25rem; counter-reset: step; }
.steps li { counter-increment: step; font-size: .85rem; padding: .25rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.steps li::before { content: counter(step) ". "; }
.steps li.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.steps li.done { color: var(--accent); border-color: #b5ded7; }

.date-strip { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; }
.date-chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 3.6rem; padding: .4rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--text); font-size: .8rem; }
.date-chip strong { font-size: 1.15rem; }
.date-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .75rem 0; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .5rem; }
.slot { display: block; text-align: center; padding: .55rem; border: 1px solid #b5ded7; border-radius: 8px; background: var(--surface); color: var(--accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.slot:hover { background: var(--accent); color: #fff; }
.slots .empty { grid-column: 1 / -1; }

.form .field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .9rem; }
.form label { font-weight: 600; font-size: .9rem; }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); max-width: 100%; }
textarea { width: 100%; }
.form input, .form select { width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #99d5cb; border-color: var(--accent); }
.has-error input, .has-error textarea { border-color: var(--danger); }
.error { color: var(--danger); }

.alert { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid var(--line); background: var(--surface); }
.alert-success { background: var(--accent-soft); border-color: #b5ded7; }
.alert-error { background: var(--danger-soft); border-color: #f5c2bd; color: var(--danger); }

dl { margin: 0; }
dt { font-weight: 600; font-size: .85rem; color: var(--muted); }
dd { margin: 0 0 .6rem; }
dl.cols { display: grid; grid-template-columns: 8rem 1fr; gap: .2rem 1rem; }
dl.cols dd { margin: 0 0 .4rem; }
@media (max-width: 500px) { dl.cols { grid-template-columns: 1fr; } }

.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge-checked_in { background: #e3ecff; color: #1d4ed8; }
.badge-completed { background: #e7f6e7; color: #1e7b34; }
.badge-no_show { background: var(--warn-soft); color: #9a5b00; }
.badge-cancelled { background: #eee; color: #666; text-decoration: line-through; }

.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }
.nav-buttons { display: flex; gap: .4rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.stats { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }

.schedule { display: grid; gap: 1rem; }
.schedule-week { grid-template-columns: repeat(7, minmax(170px, 1fr)); overflow-x: auto; }
.day-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; min-width: 0; }
.day-col.today { border-color: var(--accent); }
.day-head { border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.prac-block { margin-bottom: 1rem; }
.prac-block h4 { margin: .25rem 0 .4rem; font-size: .9rem; }
.appt { display: grid; gap: .1rem; padding: .5rem .6rem; margin-bottom: .4rem; border-left: 4px solid var(--accent); background: #f8fbfa; border-radius: 6px; text-decoration: none; color: var(--text); font-size: .88rem; }
.appt:hover { background: var(--accent-soft); }
.appt .time { font-weight: 700; }
.appt .what { color: var(--muted); }
.appt .badge { justify-self: start; }
.appt.status-cancelled { opacity: .55; border-left-color: #aaa; }
.appt.status-no_show { border-left-color: #d97706; }
.appt.status-completed { border-left-color: #1e7b34; }
.appt.status-checked_in { border-left-color: #1d4ed8; }
.timeoff { font-size: .8rem; background: repeating-linear-gradient(45deg, #f3f3f3, #f3f3f3 6px, #e9e9e9 6px, #e9e9e9 12px); padding: .3rem .5rem; border-radius: 6px; margin-bottom: .4rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { background: #f0f4f3; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.note { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .6rem; }
.note p { margin: 0 0 .2rem; }
