:root {
    color-scheme: light;
    --navy: #0d3040;
    --ink: #173742;
    --muted: #4d6974;
    --ocean: #096a75;
    --ocean-dark: #07545c;
    --aqua: #e1f5f3;
    --surface: #f3f8fa;
    --line: #d8e5ea;
    --white: #fff;
    --danger: #9c2529;
    --radius: 16px;
    font: 16px/1.6 Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); }
a { color: var(--ocean-dark); }
a, button, summary { -webkit-tap-highlight-color: transparent; }
button, input, select, summary { font: inherit; }
button, select, summary { cursor: pointer; }
button, .button, summary, input, select { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--white); padding: 8px 13px; }
button, .button, summary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
button:hover, .button:hover, summary:hover { background: var(--aqua); }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid #218a9d; outline-offset: 3px; }
.primary { background: var(--ocean); color: var(--white); border-color: var(--ocean); font-weight: 700; }
.primary:hover { background: var(--ocean-dark); }
.shell { display: grid; grid-template-columns: 228px minmax(0,1fr); min-height: 100dvh; }
.sidebar { background: var(--navy); color: var(--white); padding: 25px 16px; display: flex; flex-direction: column; gap: 34px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 700; }
.mark { background: #bdeae7; color: #103c4a; border-radius: 13px; width: 42px; height: 42px; display: grid; place-items: center; font-size: 23px; }
.brand small { color: inherit; opacity: .82; }
nav { display: grid; gap: 8px; }
nav a { display: flex; align-items: center; gap: 10px; color: #d9eff3; min-height: 46px; padding: 8px 12px; border-radius: 10px; text-decoration: none; }
nav a:hover, nav a[aria-current] { background: #235363; color: var(--white); }
.logout { margin-block-start: auto; }
.logout button { background: transparent; color: #d9eff3; border-color: #527482; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--white); border-bottom: 1px solid var(--line); padding: 14px clamp(16px,3vw,44px); }
.section-name { font-weight: 700; }
.branch, .inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); }
.content { padding: 28px clamp(16px,3vw,44px) 48px; max-width: 1600px; margin: auto; display: grid; gap: 22px; }
.heading, .panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px,4vw,40px); line-height: 1.35; margin: 4px 0 7px; }
h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.heading p, small, .empty { color: var(--muted); }
.heading .eyebrow { color: var(--ocean-dark); font-size: .88rem; font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.metric, .panel { border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.metric { display: grid; align-content: start; justify-items: start; gap: 9px; padding: 17px; color: var(--muted); }
.metric strong { font-size: 32px; line-height: 1.1; color: var(--ink); }
.glyph { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--aqua); color: var(--ocean-dark); }
.dashboard { display: grid; grid-template-columns: minmax(0,2fr) minmax(235px,1fr); align-items: start; gap: 16px; }
.panel-head { min-height: 66px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 10px; padding: 12px 18px; flex-wrap: wrap; }
.row + .row { border-top: 1px solid var(--line); }
.row-detail { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
small { display: block; font-size: .83rem; }
.time { font-weight: 700; color: var(--ocean-dark); font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; background: #eaf0f4; color: #355160; font-size: .82rem; }
.confirmed, .attended, .accepted { background: var(--aqua); color: var(--ocean-dark); }
.booked, .pending { background: #fff0d7; color: #775017; }
.cancelled, .missed, .declined { background: #fce8e8; color: var(--danger); }
.actions { position: relative; }
.actions summary { list-style: none; }
.actions summary::-webkit-details-marker { display: none; }
.actions summary::after { content: '⌄'; }
.menu { position: absolute; inset-inline-end: 0; z-index: 2; display: grid; gap: 4px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px #12374425; }
.menu button { justify-content: flex-start; }
.empty { padding: 30px 18px; }
.form-panel form, .login .panel { padding: 20px; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-block: 12px 18px; }
.fields label, .login label { display: grid; gap: 5px; min-width: 0; align-content: start; }
input, select { max-width: 100%; }
.error { color: var(--danger); font-size: .9rem; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--aqua); }
.notice.error { background: #fce8e8; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login .panel { width: min(100%,420px); }
.login form { display: grid; gap: 14px; }
@media (max-width: 1120px) { .dashboard { grid-template-columns: 1fr; } }
@media (max-width: 790px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { padding: 12px 16px; gap: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; }
    nav { grid-column: 1/-1; grid-row: 2; grid-template-columns: repeat(4,minmax(0,1fr)); }
    nav a { justify-content: center; text-align: center; padding: 6px 2px; font-size: .85rem; }
    nav svg { display: none; }
    .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 490px) {
    .fields { grid-template-columns: 1fr; }
    .panel-head, .row { padding-inline: 12px; }
    .top { align-items: flex-start; }
    .content { padding-top: 20px; }
    .menu { position: static; box-shadow: none; }
}
