:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #24312c;
  --muted: #67736e;
  --line: #dde3df;
  --accent: #406d60;
  --accent-strong: #31564b;
  --soft: #e9f0ed;
  --danger-bg: #fff0ee;
  --danger: #8d352c;
  --success-bg: #edf6f0;
  --success: #2f6545;
  --shadow: 0 12px 34px rgba(43, 58, 52, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: var(--accent-strong); }
.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 28px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; letter-spacing: -.03em; text-decoration: none; color: var(--text); font-size: 1.15rem; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a, .link-button { color: var(--muted); text-decoration: none; font: inherit; font-weight: 650; }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; background: transparent; cursor: pointer; padding: 8px; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 34px auto 60px; }
.hero, .card, .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.hero { padding: clamp(24px, 5vw, 52px); margin-bottom: 22px; }
.hero h1, .page-heading h1, .auth-card h1 { margin: 4px 0 10px; letter-spacing: -.035em; line-height: 1.08; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.25rem); max-width: 760px; }
.eyebrow { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--accent); }
.muted, .help { color: var(--muted); }
.help { font-size: .9rem; margin: -4px 0 2px; }
.compact-copy { color: var(--muted); font-size: .88rem; line-height: 1.55; }
.grid { display: grid; gap: 22px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 24px; }
.card h2 { margin-top: 0; }
.card.narrow { max-width: 620px; margin: 60px auto; }
.metric-card { display: flex; flex-direction: column; }
.metric-card .button { margin-top: auto; }
.metric { display: block; font-size: 3rem; line-height: 1; font-weight: 850; color: var(--accent); }
.auth-card { width: min(460px, 100%); margin: 8vh auto 0; padding: 32px; }
.form-stack { display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; }
input, select { width: 100%; border: 1px solid #cbd5d0; border-radius: 11px; padding: 12px 13px; background: #fff; color: var(--text); font: inherit; }
input:focus, select:focus { outline: 3px solid rgba(64,109,96,.18); border-color: var(--accent); }
button, .button { min-height: 44px; border-radius: 11px; padding: 10px 16px; font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:disabled { cursor: not-allowed; opacity: .5; }
.primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.primary:hover:not(:disabled) { background: var(--accent-strong); }
.secondary { border: 1px solid var(--line); background: var(--soft); color: var(--accent-strong); }
.full-width { width: 100%; }
.notice { border-radius: 11px; padding: 12px 14px; margin-bottom: 18px; border: 1px solid transparent; }
.notice.success { background: var(--success-bg); color: var(--success); border-color: #cfe3d5; }
.notice.error { background: var(--danger-bg); color: var(--danger); border-color: #f0cbc5; }
.page-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.page-heading p:last-child { margin-bottom: 0; max-width: 780px; }
.clean-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.clean-list li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.clean-list li span { color: var(--muted); font-size: .9rem; }
.setup-grid { align-items: start; }
.step-number { width: 32px; height: 32px; display: grid; place-items: center; margin: 0 0 14px; border-radius: 999px; background: var(--soft); color: var(--accent-strong); font-weight: 850; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.management-grid { margin-top: 22px; align-items: start; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin: 3px 0 0; }
.record-list { display: grid; gap: 12px; }
.record-card { border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: #fff; }
.record-main { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.record-main span { color: var(--muted); font-size: .88rem; text-align: right; }
.editor { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.editor summary { cursor: pointer; color: var(--accent-strong); font-weight: 750; }
.compact-form { margin-top: 14px; gap: 12px; }
.danger-zone { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e5c3bd; }
.danger-button { width: 100%; border: 1px solid #e5b9b1; background: var(--danger-bg); color: var(--danger); }
.assignments-card { margin-top: 22px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th, .data-table td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.table-action { text-align: right !important; }
.text-danger { min-height: auto; padding: 6px 8px; border: 0; background: transparent; color: var(--danger); }
.next-step-card { margin-top: 22px; }
.footer { text-align: center; color: var(--muted); padding: 24px 16px 36px; font-size: .85rem; }
@media (max-width: 980px) {
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 16px; align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 14px; }
  .nav { width: 100%; flex-wrap: wrap; gap: 10px; }
  .shell { width: min(100% - 20px, 1180px); margin-top: 20px; }
  .grid.two, .grid.four { grid-template-columns: 1fr; }
  .card, .auth-card { padding: 20px; border-radius: 15px; }
  .clean-list li, .record-main { align-items: flex-start; flex-direction: column; gap: 3px; }
  .record-main span { text-align: left; }
}
