:root {
    color-scheme: light;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #182829;
    background: #f4f6f2;
    font-size: 15px;
    --ink: #182829;
    --muted: #526564;
    --brand: #135b51;
    --line: #dbe4dd;
    --surface: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; }
a { color: var(--brand); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.55; }
:focus-visible { outline: 3px solid #1d8671; outline-offset: 3px; }

.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; justify-self: start; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #f7ffef; font-size: 1.5rem; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; }
.brand small { color: var(--muted); margin-top: 1px; }
.landing { background: #edf3e9; }
.landing-header { max-width: 1180px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 3rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.landing-header > a:last-child { text-decoration: none; font-weight: 650; }
.landing-main { max-width: 1180px; margin: auto; padding: clamp(2rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem) 3rem; }
.landing-intro { max-width: 760px; }
.landing-intro h1 { max-width: 14ch; font-size: clamp(2.65rem, 7vw, 5.85rem); line-height: 1; letter-spacing: -.065em; }
.landing-intro > p { max-width: 44ch; margin: 1.15rem 0 1.5rem; font-size: clamp(1rem, 2.5vw, 1.3rem); color: var(--muted); }
.landing-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(1.75rem, 6vw, 4.5rem); }
.landing-modes section { min-width: 0; padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid #d4e0d5; border-radius: 18px; background: #f9fcf6; }
.landing-modes h2 { margin: .65rem 0 .3rem; font-size: 1.3rem; }
.landing-modes p { color: var(--muted); }
.mode-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #e3efe5; color: var(--brand); font-size: 1.45rem; }

.workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; min-width: 0; height: 100vh; padding: 1.4rem 1.05rem; display: flex; flex-direction: column; gap: 1.45rem; background: #f9fbf7; border-right: 1px solid var(--line); }
.switcher label { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .85rem; }
.switcher > div { display: flex; gap: .35rem; }
.switcher select { min-width: 0; }
.switcher .button { flex: 0 0 auto; padding-inline: .65rem; }
.nav { display: grid; gap: .3rem; }
.nav a, .profile-link { border-radius: 9px; color: var(--ink); padding: .72rem .8rem; text-decoration: none; font-weight: 600; }
.nav a:hover, .profile-link:hover { background: #ebf2e9; }
.nav a[aria-current], .profile-link[aria-current] { background: #dceee3; color: #104d41; }
.profile-link { margin-top: auto; display: flex; align-items: center; gap: .6rem; min-width: 0; overflow-wrap: anywhere; }
.profile-link img, .avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; object-fit: cover; }
.avatar { display: grid; place-items: center; color: var(--brand); background: #dceee3; }
.main { width: 100%; max-width: 1460px; margin: 0 auto; padding: clamp(1rem, 3.4vw, 3rem); }
.topline { margin-bottom: 1.35rem; }
.topline h1 { font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.13; letter-spacing: -.04em; overflow-wrap: anywhere; }
.topline p { color: var(--muted); margin-bottom: .25rem; overflow-wrap: anywhere; }
.mid-dot { padding-inline: .25rem; }
.grid, .stats, .gallery { display: grid; gap: 1rem; margin-bottom: 1rem; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 152px), 1fr)); }
.stat, .panel, .asset { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.stat { padding: .95rem 1.15rem; }
.stat span { display: block; color: var(--muted); font-size: .9rem; }
.stat strong { display: block; margin-top: .35rem; font-size: clamp(1.2rem, 2.15vw, 1.8rem); line-height: 1.2; overflow-wrap: anywhere; }
.panel { padding: clamp(.95rem, 2.25vw, 1.5rem); margin-bottom: 1rem; }
.grid .panel { margin: 0; }
.panel h2 { margin-bottom: .72rem; font-size: 1.22rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.panel > p { margin-bottom: .85rem; color: var(--muted); }
.panel > p:last-child { margin-bottom: 0; }

.fields { display: grid; gap: .78rem; align-items: end; }
.fields .button { justify-self: start; }
.fields.inline { display: flex; flex-wrap: wrap; align-items: end; }
.fields.inline .field { flex: 1 1 150px; }
.field { display: grid; min-width: 0; gap: .35rem; }
.field > span { color: var(--muted); font-size: .86rem; font-weight: 550; }
input:not([type="hidden"]), select { width: 100%; min-height: 42px; padding: .55rem .68rem; border: 1px solid #cbd8d0; border-radius: 8px; background: white; color: var(--ink); }
input[type="file"] { padding: .42rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 42px; padding: .55rem .85rem; border: 1px solid transparent; border-radius: 8px; color: var(--ink); background: white; font-weight: 650; text-align: center; text-decoration: none; }
.button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.button.primary:hover { background: #104a41; }
.button.secondary { background: #f5f9f5; border-color: #c7d8cb; color: #214c43; }
.button.secondary:hover, .button.quiet:hover { background: #eaf3eb; }
.button.quiet { color: var(--muted); }
.button.danger, .negative { color: #8d342a; }
.positive { color: #135b51; }
.notice { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 9px; border: 1px solid; }
.notice.error, .landing-intro > .notice.error { color: #78251e; border-color: #ecd0cc; background: #fcecea; }
.notice.success { color: #155343; border-color: #c3e4d1; background: #e9f6ed; }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; }
.control-form { display: flex; flex-wrap: wrap; align-items: end; gap: .45rem; }
.control-form input[type="text"] { max-width: 10rem; }
.control-form input[type="number"] { max-width: 5.35rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
td, th { padding: .7rem .65rem; border-bottom: 1px solid var(--line); }
th { font-size: .85rem; color: var(--muted); font-weight: 650; }
td:last-child, th:last-child { white-space: nowrap; text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
.records { display: grid; gap: .65rem; }
.record { border: 1px solid var(--line); border-radius: 11px; padding: .92rem; }
.record-main { display: flex; align-items: start; justify-content: space-between; gap: .55rem; }
.record-main h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.record-main p, .muted, .record-meta { color: var(--muted); }
.record-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: .55rem 0; font-size: .9rem; }
.record-details { margin-top: .7rem; }
.record-details summary { cursor: pointer; color: var(--brand); font-weight: 650; }
.record-details form { margin-top: .7rem; }
.filter { margin-bottom: .75rem; }
.status { display: inline-flex; align-items: center; border-radius: 999px; font-size: .78rem; line-height: 1.2; font-weight: 700; padding: .35rem .62rem; color: #3a5450; background: #eef2ef; }
.status.confirmed, .status.open { color: #694b10; background: #fbf1d6; }
.status.checked_in, .status.paid { color: #1e5d4a; background: #dff2e7; }
.status.cancelled { color: #864138; background: #f7e7e4; }
.pill-list, .line-items { padding: 0; list-style: none; }
.pill-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; }
.pill-list li { padding: .35rem .6rem; border-radius: 8px; background: #edf3ee; overflow-wrap: anywhere; }
.line-items { margin: .6rem 0; }
.line-items li { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.line-items li > span:first-child { margin-right: auto; }
.profile-panel { max-width: 680px; }
.gallery { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.asset { overflow: hidden; }
.asset a { display: block; }
.asset img, .asset video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #e6eee7; }
.asset video { background: #1a2929; }
.asset > div { padding: .65rem .75rem; }
.asset p { overflow-wrap: anywhere; }
.asset small { color: var(--muted); }

@media (max-width: 860px) {
    .workspace { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: static; height: auto; padding: .8rem 1rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .65rem; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar .brand { grid-column: 1; grid-row: 1; }
    .sidebar .profile-link { grid-column: 2; grid-row: 1; justify-self: end; }
    .switcher, .nav { grid-column: 1 / -1; }
    .nav { display: flex; overflow-x: auto; gap: .35rem; padding: .25rem; }
    .nav a { flex: 0 0 auto; }
}
@media (max-width: 530px) {
    .two, .landing-modes { grid-template-columns: 1fr; }
    .fields.inline { display: grid; grid-template-columns: minmax(0, 1fr); }
    .profile-link span:last-child { display: block; max-width: 19ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
