/* ==========================================================================
   Ulendo Studio Bookings
   Brand: orange #F07C00 on charcoal #2E3338
   ========================================================================== */

:root {
    --brand: #F07C00;
    --brand-dark: #C96700;
    --brand-soft: #FFF3E6;
    --ink: #2E3338;
    --ink-soft: #5A646E;
    --ink-faint: #8B96A2;
    --line: #E3E8ED;
    --line-strong: #CBD3DB;
    --surface: #FFFFFF;
    --canvas: #F5F7F9;
    --sidebar: #23282D;
    --sidebar-hover: #31383E;

    --green: #1B9E5A;
    --green-soft: #E6F6ED;
    --amber: #C98A00;
    --amber-soft: #FFF6E0;
    --red: #D6453D;
    --red-soft: #FDECEB;
    --blue: #2E75CC;
    --blue-soft: #EAF2FD;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 4px 12px rgba(16, 24, 32, .05);
    --shadow-lg: 0 8px 28px rgba(16, 24, 32, .14);
    --sidebar-width: 232px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: .82rem; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt0 { margin-top: 0; }
.mt1 { margin-top: .5rem; }
.mt2 { margin-top: 1rem; }
.mt3 { margin-top: 1.5rem; }
.mb0 { margin-bottom: 0 !important; }
.mb2 { margin-bottom: 1rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }

/* ---------------------------------------------------------------- shell */

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background: var(--sidebar);
    color: #C6CDD4;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    padding: 1.1rem 1.1rem .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-brand img { width: 118px; display: block; }
.sidebar-brand span {
    display: block;
    margin-top: .45rem;
    font-size: .72rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #8A939C;
}

.sidebar-nav { padding: .6rem; overflow-y: auto; flex: 1; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .65rem;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: #C6CDD4;
    font-size: .92rem;
    text-decoration: none;
}
.sidebar-nav a:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.sidebar-nav a.active { background: var(--brand); color: #fff; font-weight: 600; }
.sidebar-nav a .ico { width: 18px; text-align: center; opacity: .9; flex: 0 0 18px; }
.sidebar-nav .nav-group {
    padding: .9rem .65rem .35rem;
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6E7882;
}
.sidebar-nav .pill {
    margin-left: auto;
    background: var(--brand);
    color: #fff;
    border-radius: 20px;
    padding: 0 .45rem;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.4;
}
.sidebar-nav a.active .pill { background: rgba(255, 255, 255, .28); }

.sidebar-foot {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: .75rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.sidebar-foot .avatar { flex: 0 0 32px; }
.sidebar-foot .who { min-width: 0; flex: 1; }
.sidebar-foot .who strong { display: block; color: #EDF1F4; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot .who span { font-size: .74rem; color: #8A939C; }
.sidebar-foot button {
    background: none;
    border: 0;
    color: #8A939C;
    cursor: pointer;
    padding: .3rem;
    font-size: .95rem;
    border-radius: var(--radius-sm);
}
.sidebar-foot button:hover { background: var(--sidebar-hover); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: .85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar h1 { margin: 0; font-size: 1.2rem; }
.topbar .spacer { flex: 1; }
.topbar-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.menu-toggle { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--ink); padding: 0 .25rem; }

.content { padding: 1.5rem; max-width: 1400px; width: 100%; }

/* ---------------------------------------------------------------- cards */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.card-head {
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { flex: 1; }
.card-body { padding: 1.1rem; }
.card-body.tight { padding: .6rem; }
.card-foot { padding: .75rem 1.1rem; border-top: 1px solid var(--line); background: #FAFBFC; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* ---------------------------------------------------------------- stats */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .95rem 1.1rem;
    box-shadow: var(--shadow);
}
.stat .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.stat .value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-top: .15rem; }
.stat .foot { font-size: .8rem; color: var(--ink-soft); }
.stat.accent { border-left: 3px solid var(--brand); }

/* ---------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .5rem .9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    font-size: .9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { background: #F2F5F7; text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #B93A33; border-color: #B93A33; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: #EDF1F4; }
.btn-sm { padding: .3rem .6rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------------------------------------------------------- forms */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.field .hint { font-size: .78rem; color: var(--ink-faint); }
.field .error-text { font-size: .8rem; color: var(--red); font-weight: 500; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], input[type="time"], input[type="search"],
input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: .5rem .65rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(240, 124, 0, .16);
}
input.has-error, select.has-error { border-color: var(--red); }
textarea { min-height: 90px; resize: vertical; }
input[type="color"] { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }

.check { display: flex; align-items: flex-start; gap: .5rem; font-size: .9rem; cursor: pointer; }
.check input { margin-top: .2rem; flex: 0 0 auto; }

.form-actions {
    display: flex;
    gap: .6rem;
    align-items: center;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.form-actions .spacer { flex: 1; }

.filter-bar {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    align-items: flex-end;
}
.filter-bar .field { min-width: 140px; }
.filter-bar .field.grow { flex: 1; min-width: 200px; }

.segment { display: inline-flex; background: #EDF1F4; border-radius: var(--radius-sm); padding: 2px; }
.segment a {
    padding: .32rem .7rem;
    border-radius: 4px;
    font-size: .85rem;
    color: var(--ink-soft);
    text-decoration: none;
}
.segment a.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
    text-align: left;
    padding: .6rem .75rem;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-faint);
    border-bottom: 1px solid var(--line);
    background: #FAFBFC;
    white-space: nowrap;
}
table.data td { padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #FAFBFC; }
table.data td.actions { text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------------- badges */

.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .15rem .5rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.badge-pending   { background: var(--amber-soft); color: #8A5D00; border-color: #F0DDB0; }
.badge-confirmed { background: var(--green-soft); color: #10693B; border-color: #BFE5CE; }
.badge-completed { background: var(--blue-soft);  color: #1C5296; border-color: #C2D9F5; }
.badge-cancelled { background: #F0F2F4;           color: #6B7681; border-color: var(--line); }
.badge-no_show   { background: var(--red-soft);   color: #9E2A24; border-color: #F5C6C3; }
.badge-neutral   { background: #F0F2F4;           color: var(--ink-soft); border-color: var(--line); }
.badge-brand     { background: var(--brand-soft); color: var(--brand-dark); border-color: #F8D8B4; }
.badge-admin     { background: #EDE7F6; color: #5B3FA6; border-color: #D6C9EF; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 8px; }

.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .74rem;
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    flex: 0 0 auto;
}
.avatar-sm { width: 24px; height: 24px; font-size: .64rem; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { margin-left: -7px; border: 2px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------------------------------------------------------------- alerts */

.alert {
    padding: .7rem .9rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: .9rem;
    border: 1px solid;
    display: flex;
    gap: .6rem;
    align-items: flex-start;
}
.alert-success { background: var(--green-soft); border-color: #BFE5CE; color: #10693B; }
.alert-error   { background: var(--red-soft);   border-color: #F5C6C3; color: #9E2A24; }
.alert-warning { background: var(--amber-soft); border-color: #F0DDB0; color: #8A5D00; }
.alert-info    { background: var(--blue-soft);  border-color: #C2D9F5; color: #1C5296; }
.alert ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.alert .alert-icon { flex: 0 0 auto; font-size: 1rem; line-height: 1.3; }

.empty { padding: 2.25rem 1rem; text-align: center; color: var(--ink-faint); }
.empty .big { font-size: 1.9rem; display: block; margin-bottom: .4rem; opacity: .55; }
.empty p { margin: .2rem 0 .8rem; }

/* ---------------------------------------------------------------- calendar: shared */

.cal-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.cal-toolbar h2 { margin: 0; font-size: 1.15rem; min-width: 190px; }
.cal-toolbar .spacer { flex: 1; }

.legend { display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-size: .78rem; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }

/* month grid */
.cal-month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal-month-head, .cal-month-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-month-head div {
    padding: .5rem;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-faint);
    text-align: center;
    background: #FAFBFC;
    border-bottom: 1px solid var(--line);
}
.cal-day {
    min-height: 118px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: .3rem;
    position: relative;
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: #FAFBFC; }
.cal-day.today { background: var(--brand-soft); }
.cal-day.closed { background: repeating-linear-gradient(45deg, #FAFBFC, #FAFBFC 8px, #F1F4F6 8px, #F1F4F6 16px); }
.cal-day .num { font-size: .8rem; color: var(--ink-soft); font-weight: 600; display: flex; align-items: center; gap: .3rem; }
.cal-day.out .num { color: var(--ink-faint); font-weight: 400; }
.cal-day.today .num { color: var(--brand-dark); }
.cal-day .num .add {
    margin-left: auto;
    opacity: 0;
    color: var(--ink-faint);
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
}
.cal-day:hover .num .add { opacity: 1; }
.cal-day .closure { font-size: .68rem; color: var(--red); font-weight: 600; }

.chip {
    display: block;
    padding: .2rem .35rem;
    margin-top: .18rem;
    border-radius: 4px;
    font-size: .74rem;
    line-height: 1.28;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-left: 3px solid rgba(0, 0, 0, .22);
}
.chip:hover { text-decoration: none; filter: brightness(1.08); }
.chip .t { font-weight: 700; opacity: .95; }
.chip.is-pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.22) 0 5px, transparent 5px 10px); }
.chip.is-cancelled { opacity: .5; text-decoration: line-through; }
.chip-more { font-size: .7rem; color: var(--ink-soft); display: block; padding: .15rem .3rem; }

/* week / day time grid */
.cal-grid {
    display: grid;
    grid-template-columns: 54px repeat(var(--cols, 7), minmax(0, 1fr));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.cal-grid .corner { border-bottom: 1px solid var(--line); background: #FAFBFC; }
.cal-grid .colhead {
    padding: .45rem .5rem;
    text-align: center;
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
    background: #FAFBFC;
    font-size: .8rem;
}
.cal-grid .colhead .dow { color: var(--ink-faint); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.cal-grid .colhead .dnum { font-weight: 700; font-size: 1.05rem; }
.cal-grid .colhead.today .dnum { color: var(--brand-dark); }
.cal-grid .colhead a { color: inherit; }

.cal-gutter { position: relative; border-right: 1px solid var(--line); }
.cal-gutter .hour {
    height: var(--hour-height, 52px);
    font-size: .7rem;
    color: var(--ink-faint);
    text-align: right;
    padding-right: .35rem;
    transform: translateY(-.5em);
}
.cal-col { position: relative; border-left: 1px solid var(--line); }
.cal-col .hourline { height: var(--hour-height, 52px); border-bottom: 1px dotted var(--line); }
.cal-col.today { background: #FFFCF7; }
.cal-col.closed-day { background: repeating-linear-gradient(45deg, #FAFBFC, #FAFBFC 8px, #F1F4F6 8px, #F1F4F6 16px); }

.event {
    position: absolute;
    border-radius: 5px;
    padding: .18rem .3rem;
    font-size: .72rem;
    line-height: 1.22;
    color: #fff;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
    border-left: 3px solid rgba(0, 0, 0, .25);
}
.event:hover { text-decoration: none; filter: brightness(1.08); z-index: 5; }
.event .who { opacity: .9; font-size: .68rem; }
.event.is-pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.22) 0 5px, transparent 5px 10px); }
.event .buffer-note { opacity: .75; font-size: .65rem; }

.timeoff-band {
    position: absolute;
    left: 2px; right: 2px;
    background: repeating-linear-gradient(45deg, rgba(214,69,61,.10) 0 6px, rgba(214,69,61,.04) 6px 12px);
    border: 1px dashed rgba(214, 69, 61, .35);
    border-radius: 4px;
    font-size: .65rem;
    color: #9E2A24;
    padding: .1rem .25rem;
    pointer-events: none;
}

/* agenda list */
.agenda-day { margin-bottom: 1.25rem; }
.agenda-day > h3 {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-faint);
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.agenda-day > h3 .today-tag { background: var(--brand); color: #fff; border-radius: 20px; padding: 0 .45rem; font-size: .68rem; }
.agenda-item {
    display: flex;
    gap: .85rem;
    padding: .7rem .25rem;
    border-bottom: 1px solid var(--line);
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}
.agenda-item:hover { background: #FAFBFC; text-decoration: none; }
.agenda-item .when { flex: 0 0 92px; font-size: .85rem; font-weight: 600; }
.agenda-item .when small { display: block; font-weight: 400; color: var(--ink-faint); }
.agenda-item .what { flex: 1; min-width: 0; }
.agenda-item .what .line1 { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.agenda-item .what .line2 { font-size: .82rem; color: var(--ink-soft); margin-top: .15rem; }
.agenda-item .type-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }

/* ---------------------------------------------------------------- booking detail */

.detail-head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.detail-head .ref { font-size: .8rem; color: var(--ink-faint); letter-spacing: .04em; }
.detail-head h1 { margin: .1rem 0 .3rem; }

.kv { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: .5rem .75rem; font-size: .9rem; }
.kv dt { color: var(--ink-faint); font-size: .84rem; }
.kv dd { margin: 0; }

.money-row { display: flex; justify-content: space-between; padding: .35rem 0; font-size: .92rem; }
.money-row.total { border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .6rem; font-weight: 700; }
.money-row.owing { color: var(--red); }
.money-row.settled { color: var(--green); }

.crew-row { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.crew-row:last-child { border-bottom: 0; }
.crew-row .name { font-weight: 500; }
.crew-row .role { font-size: .78rem; color: var(--ink-faint); }

.crew-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .5rem; }
.crew-option {
    display: flex;
    align-items: center;
    gap: .55rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: .45rem .55rem;
    cursor: pointer;
    background: var(--surface);
}
.crew-option:hover { border-color: var(--brand); }
.crew-option.selected { border-color: var(--brand); background: var(--brand-soft); }
.crew-option input { flex: 0 0 auto; }
.crew-option .who { flex: 1; min-width: 0; }
.crew-option .who strong { display: block; font-size: .88rem; font-weight: 600; }
.crew-option .who input[type="text"] { padding: .15rem .3rem; font-size: .76rem; margin-top: .15rem; }

.timeline { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.timeline li { padding: .45rem 0 .45rem .9rem; border-left: 2px solid var(--line); position: relative; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -5px; top: .78rem;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--line-strong);
}
.timeline li .meta { color: var(--ink-faint); font-size: .78rem; }

/* ---------------------------------------------------------------- misc */

.pager { display: flex; gap: .4rem; align-items: center; justify-content: center; padding: .5rem; flex-wrap: wrap; }
.pager a, .pager span { padding: .3rem .6rem; border-radius: var(--radius-sm); font-size: .85rem; }
.pager a { border: 1px solid var(--line-strong); color: var(--ink); }
.pager .current { background: var(--ink); color: #fff; font-weight: 600; }

.bar { height: 8px; background: #EDF1F4; border-radius: 20px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 20px; }

.copy-row { display: flex; gap: .4rem; }
.copy-row input { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: .78rem; }

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(160deg, #23282D 0%, #2E3338 45%, #3A3027 100%);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 1.9rem;
}
.auth-card .logo { text-align: center; margin-bottom: 1.25rem; }
.auth-card .logo img { width: 150px; }
.auth-card h1 { font-size: 1.2rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--ink-soft); font-size: .88rem; margin-bottom: 1.25rem; }
.auth-foot { text-align: center; margin-top: 1rem; font-size: .85rem; }

.conflict-panel { margin-top: 1rem; }
.conflict-panel:empty { display: none; }

/* ---------------------------------------------------------------- print */

.print-sheet { max-width: 900px; margin: 0 auto; padding: 2rem; background: #fff; }
.print-sheet .sheet-head { display: flex; align-items: flex-start; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: .9rem; margin-bottom: 1.25rem; }
.print-sheet .sheet-head img { width: 130px; }
.print-slot { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .85rem; margin-bottom: .85rem; page-break-inside: avoid; }
.print-slot .slot-head { display: flex; gap: .75rem; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: .4rem; margin-bottom: .5rem; }
.print-slot .slot-head .time { font-size: 1.05rem; font-weight: 700; }

@media print {
    .no-print { display: none !important; }
    body { background: #fff; font-size: 12px; }
    .print-sheet { padding: 0; max-width: none; }
    .print-slot { border-color: #999; }
    a { color: #000; text-decoration: none; }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
    .grid-side, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform .18s ease;
        box-shadow: var(--shadow-lg);
    }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(16, 24, 32, .45);
        z-index: 55;
    }
    .menu-toggle { display: block; }
    .content { padding: 1rem; }
    .topbar { padding: .7rem 1rem; }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .cal-day { min-height: 84px; }
    .agenda-item .when { flex-basis: 74px; font-size: .8rem; }
}

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .stat { padding: .7rem .8rem; }
    .stat .value { font-size: 1.35rem; }
    .topbar h1 { font-size: 1.05rem; }
    .cal-month-head div { font-size: .62rem; padding: .35rem .1rem; }
    .cal-day { min-height: 66px; padding: .15rem; }
    .chip { font-size: .64rem; padding: .12rem .22rem; }
}
