/* ==========================================================================
   Journey International Calendar — design system
   One stylesheet, no framework. Tokens first, then layout, then components.
   ========================================================================== */

:root {
    /* Journey International — taken from the logo: the deep brown of the
       wordmark and the burnt orange of the location pin. Everything neutral
       is warmed to sit with them; cool greys read as dirty next to brown. */
    --brand:       #4A2318;   /* wordmark brown */
    --brand-deep:  #341710;   /* darker, for gradients and the sidebar */
    --brand-soft:  #6B3A28;   /* nav hover / active */
    --accent:      #C8571E;   /* the pin */
    --accent-deep: #A54414;
    --accent-soft: #FBEADF;

    --ink:         #341710;
    --ink-2:       #5C4034;
    --muted:       #857066;
    --faint:       #AC9A90;

    --line:        #EBE3DD;
    --line-strong: #D9CBC2;
    --bg:          #F7F3F0;
    --surface:     #ffffff;
    --surface-2:   #FBF8F6;

    --ok:          #1F7A4C;
    --ok-bg:       #ECF7F1;
    --warn:        #96660C;
    --warn-bg:     #FBF3E3;
    --danger:      #B02A1F;
    --danger-bg:   #FCEDEB;
    --info:        #2A5F8F;
    --info-bg:     #EDF3F9;

    --r-sm: 5px;
    --r:    8px;
    --r-lg: 12px;

    --shadow-sm: 0 1px 2px rgba(74, 35, 24, .07);
    --shadow:    0 1px 3px rgba(74, 35, 24, .11), 0 1px 2px rgba(74, 35, 24, .07);
    --shadow-lg: 0 10px 30px rgba(74, 35, 24, .14);

    --sidebar-w: 246px;
    --topbar-h:  60px;

    --font: "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.5rem; letter-spacing: -.01em; }
h2 { font-size: 1.16rem; }
h3 { font-size: 1rem; }
p  { margin: 0 0 .75rem; }

hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }

/* ---------------------------------------------------------------- layout -- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--brand);
    color: #E3D6CE;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar__brand {
    padding: 18px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.sidebar__brand a { color: #fff; text-decoration: none; display: block; }
.logo { display: block; width: auto; max-width: 100%; height: auto; }
.sidebar__sub {
    font-size: .68rem; color: #C0A99C; margin-top: 6px;
    letter-spacing: .16em; text-transform: uppercase; padding-left: 2px;
}

.sidebar__group { padding: 14px 12px 4px; }
.sidebar__label {
    font-size: .66rem; text-transform: uppercase; letter-spacing: .09em;
    color: #B09A8D; padding: 0 8px 6px; font-weight: 600;
}

.nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin-bottom: 1px;
    border-radius: var(--r-sm);
    color: #E3D6CE; font-size: .885rem; text-decoration: none;
    transition: background .12s, color .12s;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav a.is-active { background: var(--brand-soft); color: #fff; font-weight: 600; }
.nav a.is-active .nav__icon { opacity: 1; }
.nav__icon { width: 17px; text-align: center; opacity: .75; font-size: .95rem; flex: 0 0 17px; }
.nav__badge {
    margin-left: auto; background: var(--accent); color: #fff;
    font-size: .68rem; font-weight: 700; border-radius: 20px; padding: 1px 7px;
}

.sidebar__foot {
    margin-top: auto; padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, .09);
    font-size: .73rem; color: #B09A8D;
}

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 14px;
    padding: 0 22px;
    position: sticky; top: 0; z-index: 30;
}
.topbar__title { font-weight: 650; font-size: .98rem; margin-right: auto; }
.topbar__title small { display: block; font-weight: 400; color: var(--muted); font-size: .74rem; }

.searchbox { position: relative; }
.searchbox input {
    width: 210px; padding: 7px 11px 7px 30px;
    border: 1px solid var(--line); border-radius: 20px;
    background: var(--surface-2); font-size: .84rem; font-family: inherit;
}
.searchbox input:focus { outline: 2px solid rgba(200, 87, 30, .22); background: #fff; }
.searchbox::before {
    content: "⌕"; position: absolute; left: 11px; top: 50%; transform: translateY(-52%);
    color: var(--faint); font-size: 1rem;
}

.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--brand); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700; flex: 0 0 32px;
}

.content { padding: 22px; flex: 1 1 auto; }
.content--wide { max-width: none; }

.page-head {
    display: flex; align-items: flex-start; gap: 16px;
    flex-wrap: wrap; margin-bottom: 18px;
}
.page-head__text { min-width: 0; }
.page-head h1 { margin-bottom: 2px; }
.page-head__sub { color: var(--muted); font-size: .88rem; }
.page-head__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ----------------------------------------------------------------- cards -- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}
.card__head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card__head h2, .card__head h3 { margin: 0; }
.card__head .spacer { margin-left: auto; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }
.card__foot {
    padding: 12px 18px; border-top: 1px solid var(--line);
    background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg);
    font-size: .85rem;
}

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }

@media (max-width: 1100px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--sidebar, .grid--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .grid--2, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ----------------------------------------------------------------- stats -- */

.stat {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 15px 16px; box-shadow: var(--shadow-sm);
}
.stat__label {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); font-weight: 650;
}
.stat__value { font-size: 1.75rem; font-weight: 700; line-height: 1.15; margin-top: 3px; letter-spacing: -.02em; }
.stat__hint { font-size: .78rem; color: var(--faint); }
.stat--accent { border-top: 3px solid var(--accent); }

/* --------------------------------------------------------------- buttons -- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8px 15px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r);
    background: var(--surface); color: var(--ink);
    font-size: .87rem; font-weight: 600; font-family: inherit;
    cursor: pointer; text-decoration: none;
    transition: background .12s, border-color .12s, transform .06s;
    white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn--danger { background: #fff; border-color: #E8B6B0; color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: rgba(74, 35, 24, .06); }
.btn--sm { padding: 5px 10px; font-size: .79rem; border-radius: var(--r-sm); }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- forms --- */

.field { margin-bottom: 14px; }
.field > label, .label {
    display: block; font-size: .79rem; font-weight: 650;
    color: var(--ink-2); margin-bottom: 5px;
}
.field__hint { font-size: .77rem; color: var(--muted); margin-top: 4px; }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=time], input[type=number], input[type=month], input[type=search],
select, textarea {
    width: 100%; padding: 8px 11px;
    border: 1px solid var(--line-strong); border-radius: var(--r);
    font-size: .9rem; font-family: inherit; color: var(--ink);
    background: var(--surface);
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 87, 30, .16);
}
textarea { min-height: 86px; resize: vertical; }
input[type=color] {
    width: 46px; height: 34px; padding: 2px; border: 1px solid var(--line-strong);
    border-radius: var(--r); background: #fff; cursor: pointer;
}

.check { display: flex; align-items: flex-start; gap: 9px; font-size: .87rem; cursor: pointer; }
.check input { margin-top: 3px; flex: 0 0 auto; }
.check span small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; }

.form-row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .form-row, .form-row--3 { grid-template-columns: minmax(0, 1fr); } }

.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { width: auto; min-width: 130px; }

fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 16px; }
legend { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 6px; }

/* --------------------------------------------------------------- alerts --- */

.alert {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 12px 15px; border-radius: var(--r);
    border: 1px solid; font-size: .87rem; margin-bottom: 16px;
}
.alert__icon { font-size: 1rem; line-height: 1.3; flex: 0 0 auto; }
.alert--ok     { background: var(--ok-bg);     border-color: #B7E0CB; color: #14603B; }
.alert--error  { background: var(--danger-bg); border-color: #F0C6C0; color: #8C2018; }
.alert--warn   { background: var(--warn-bg);   border-color: #EBD5A4; color: #7A520A; }
.alert--info   { background: var(--info-bg);   border-color: #C3D6E8; color: #234E75; }
.alert a { color: inherit; text-decoration: underline; }
.alert code {
    display: block; margin-top: 6px; padding: 7px 9px; background: rgba(74, 35, 24, .07);
    border-radius: var(--r-sm); font-size: .78rem; word-break: break-all;
}

/* ---------------------------------------------------------------- table --- */

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th {
    text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--muted); font-weight: 700;
    padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2);
    white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .nowrap { white-space: nowrap; }
.table__actions { display: flex; gap: 5px; justify-content: flex-end; }

/* ----------------------------------------------------------------- pills -- */

.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 20px;
    font-size: .72rem; font-weight: 650; line-height: 1.6;
    border: 1px solid transparent; white-space: nowrap;
}
.pill--planned     { background: #F3EDE9; color: #6B564B; border-color: #E7DCD4; }
.pill--in_progress { background: var(--warn-bg); color: var(--warn); border-color: #EBD5A4; }
.pill--completed   { background: var(--ok-bg); color: var(--ok); border-color: #B7E0CB; }
.pill--cancelled   { background: var(--danger-bg); color: var(--danger); border-color: #F0C6C0; }
.pill--high        { background: #FBE9E6; color: #9C2B1D; border-color: #F0C6BE; }
.pill--draft       { background: #F3EDE9; color: #6B564B; border-color: #E7DCD4; }
.pill--published   { background: var(--ok-bg); color: var(--ok); border-color: #B7E0CB; }
.pill--pending     { background: var(--warn-bg); color: var(--warn); border-color: #EBD5A4; }
.pill--accepted    { background: var(--ok-bg); color: var(--ok); border-color: #B7E0CB; }
.pill--declined    { background: var(--danger-bg); color: var(--danger); border-color: #F0C6C0; }
.pill--closed      { background: #F3EDE9; color: var(--muted); border-color: #E7DCD4; }
.pill--invited     { background: var(--info-bg); color: var(--info); border-color: #C3D6E8; }
.pill--active      { background: var(--ok-bg); color: var(--ok); border-color: #B7E0CB; }
.pill--suspended   { background: var(--danger-bg); color: var(--danger); border-color: #F0C6C0; }

.dept-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .78rem; font-weight: 600; color: var(--ink-2);
}
.dept-chip i {
    width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: 0 0 10px;
}
.dept-tag {
    display: inline-block; padding: 2px 8px; border-radius: 20px;
    font-size: .7rem; font-weight: 700; letter-spacing: .02em; color: #fff;
}

/* -------------------------------------------------------------- calendar -- */

.cal {
    border: 1px solid var(--line-strong); border-radius: var(--r-lg);
    overflow: hidden; background: var(--surface);
}
.cal__head {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
    background: var(--surface-2); border-bottom: 1px solid var(--line-strong);
}
.cal__head div {
    padding: 8px 6px; text-align: center;
    font-size: .68rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--muted);
}
.cal__body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }

.cal__day {
    min-height: 122px; border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line); padding: 5px 6px 7px;
    position: relative; display: flex; flex-direction: column; gap: 3px;
}
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day.is-out { background: var(--surface-2); }
.cal__day.is-out .cal__num { color: var(--faint); font-weight: 400; }
.cal__day.is-today { background: #FFF6F0; box-shadow: inset 0 0 0 2px var(--accent); }
.cal__day.is-weekend:not(.is-out) { background: #FDFBFA; }

.cal__daytop { display: flex; align-items: center; gap: 6px; margin-bottom: 1px; }
.cal__num { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.cal__add {
    margin-left: auto; opacity: 0; color: var(--muted); font-size: .95rem;
    line-height: 1; text-decoration: none; padding: 0 3px; border-radius: 4px;
    transition: opacity .12s;
}
.cal__day:hover .cal__add { opacity: 1; }
.cal__add:hover { background: var(--brand); color: #fff; text-decoration: none; }

.evt {
    display: block; font-size: .745rem; line-height: 1.3;
    padding: 3px 6px 3px 8px; border-radius: 4px;
    background: var(--surface-2); color: var(--ink);
    border-left: 3px solid var(--muted);
    text-decoration: none; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.evt:hover { background: #F4EDE8; text-decoration: none; }
.evt time { color: var(--muted); font-weight: 600; margin-right: 3px; font-size: .7rem; }
.evt.is-cancelled { opacity: .55; text-decoration: line-through; }
.evt.is-high { font-weight: 700; }
.evt--ghost {
    background: transparent; border-left-style: dashed; color: var(--muted); font-style: italic;
}
.evt--more { color: var(--muted); font-weight: 650; font-size: .72rem; padding-left: 8px; }

/* Agenda / day list */
.daygroup { border-bottom: 1px solid var(--line); }
.daygroup:last-child { border-bottom: 0; }
.daygroup__head {
    display: flex; align-items: baseline; gap: 10px;
    padding: 10px 18px; background: var(--surface-2);
    font-weight: 700; font-size: .85rem;
    position: sticky; top: var(--topbar-h); z-index: 5;
}
.daygroup__head small { font-weight: 500; color: var(--muted); }
.daygroup__items { padding: 4px 0; }

.item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 11px 18px; border-bottom: 1px solid var(--surface-2);
}
.item:last-child { border-bottom: 0; }
.item:hover { background: var(--surface-2); }
.item__bar { width: 4px; align-self: stretch; border-radius: 3px; flex: 0 0 4px; background: var(--muted); }
.item__body { min-width: 0; flex: 1 1 auto; }
.item__title { font-weight: 650; font-size: .92rem; }
.item__title a { color: inherit; }
.item__meta { font-size: .79rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.item__desc { font-size: .84rem; color: var(--ink-2); margin-top: 4px; }
.item__side { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* ------------------------------------------------------------ empty state -- */

.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty__icon { font-size: 2rem; opacity: .35; margin-bottom: 8px; }
.empty h3 { color: var(--ink-2); }
.empty p { max-width: 440px; margin: 0 auto .9rem; font-size: .88rem; }

/* ------------------------------------------------------------ misc bits --- */

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.tiny  { font-size: .74rem; }
.strong { font-weight: 650; }
.right { text-align: right; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mb-1 { margin-bottom: .5rem; }
.mt-2 { margin-top: 1rem; }  .mb-2 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flex--between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

.divider-label {
    display: flex; align-items: center; gap: 10px;
    font-size: .7rem; text-transform: uppercase; letter-spacing: .09em;
    color: var(--faint); font-weight: 700; margin: 18px 0 10px;
}
.divider-label::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* Planning strip — jump straight into a future month */
.strip {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 10px 14px; margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.strip__label {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); font-weight: 700; flex: 0 0 auto;
}
.strip__months { display: flex; gap: 5px; overflow-x: auto; flex: 1 1 auto; padding-bottom: 2px; }
.strip__cta { flex: 0 0 auto; margin-left: auto; }

.strip__month {
    display: flex; flex-direction: column; align-items: center;
    min-width: 52px; padding: 5px 7px 4px;
    border: 1px solid var(--line); border-radius: var(--r);
    text-decoration: none; color: var(--ink-2); line-height: 1.15;
    transition: border-color .12s, background .12s;
}
.strip__month:hover { text-decoration: none; border-color: var(--brand-soft); background: var(--surface-2); }
.strip__m { font-size: .78rem; font-weight: 700; }
.strip__y { font-size: .6rem; color: var(--faint); }
.strip__n {
    font-size: .7rem; font-weight: 700; color: var(--muted);
    margin-top: 2px; font-variant-numeric: tabular-nums;
}
.strip__month.is-now { border-color: var(--accent); }
.strip__month.is-on  { background: var(--brand); border-color: var(--brand); color: #fff; }
.strip__month.is-on .strip__y, .strip__month.is-on .strip__n { color: #E3D6CE; }
/* A future month with nothing in it is the thing worth spotting. */
.strip__month.is-empty:not(.is-on) { border-style: dashed; border-color: var(--line-strong); }
.strip__month.is-empty:not(.is-on) .strip__n { color: var(--faint); }

.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav__label { font-weight: 700; font-size: .95rem; min-width: 140px; text-align: center; }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a {
    padding: 8px 14px; font-size: .87rem; font-weight: 600; color: var(--muted);
    border-bottom: 2px solid transparent; text-decoration: none; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* Email preview frame in the admin log — isolated so message styles
   cannot leak into the page around them. */
.mail-preview {
    width: 100%; height: 520px; margin-top: 8px;
    border: 1px solid var(--line); border-radius: var(--r);
    background: var(--bg); display: block;
}

.thread {
    padding: 12px 15px; border: 1px solid var(--line); border-radius: var(--r);
    background: var(--surface-2); margin-bottom: 10px;
}
.thread__meta { font-size: .74rem; color: var(--muted); margin-bottom: 4px; }
.thread--mine { background: #FDF2EA; border-color: #F0DAC9; }

.match-card {
    border: 1px solid var(--line); border-radius: var(--r);
    padding: 14px 16px; margin-bottom: 12px; background: var(--surface);
}
.match-card__head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.match-row {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2);
    margin-bottom: 6px; font-size: .85rem;
}
.match-row__side { margin-left: auto; }

.color-swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.color-swatches button {
    width: 26px; height: 26px; border-radius: 6px; border: 2px solid transparent;
    cursor: pointer; padding: 0;
}
.color-swatches button.is-picked { border-color: var(--ink); }

.copy-link {
    display: flex; gap: 6px; align-items: center; margin-top: 8px;
}
.copy-link input { font-size: .78rem; font-family: ui-monospace, Consolas, monospace; }

/* ------------------------------------------------------------- auth page -- */

.auth {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 28px 20px;
    background: linear-gradient(150deg, var(--brand-deep) 0%, var(--brand) 42%, var(--accent) 100%);
}
.auth__card {
    width: 100%; max-width: 410px; background: var(--surface);
    border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.auth__head { padding: 26px 28px 18px; border-bottom: 1px solid var(--line); }
.auth__body { padding: 24px 28px 26px; }
.auth__foot {
    padding: 14px 28px; background: var(--surface-2);
    border-top: 1px solid var(--line); font-size: .82rem; text-align: center; color: var(--muted);
}
.auth__aside { max-width: 410px; margin: 16px auto 0; color: #F0DCCC; font-size: .8rem; text-align: center; }
.auth__aside a { color: #fff; }

/* -------------------------------------------------------------- printing -- */

@media print {
    .sidebar, .topbar, .page-head__actions, .btn, .cal__add, .no-print { display: none !important; }
    .content { padding: 0; }
    .card { border: 0; box-shadow: none; }
    body { background: #fff; font-size: 11px; }
    .cal__day { min-height: 92px; }
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar {
        width: 100%; flex: none; height: auto; position: static;
        flex-direction: row; align-items: center; gap: 8px;
        overflow-x: auto; padding: 0 10px;
    }
    .sidebar__brand { border-bottom: 0; padding: 12px 10px; flex: 0 0 auto; }
    .sidebar__group { padding: 6px 0; flex: 0 0 auto; }
    .sidebar__label, .sidebar__foot { display: none; }
    .nav { display: flex; gap: 4px; }
    .nav a { white-space: nowrap; }
    .searchbox input { width: 140px; }
    .cal__day { min-height: 92px; font-size: .95em; }
}
