:root {
    --color-primary: #2c5f6f;
    --color-primary-dark: #1e4450;
    --color-accent: #e8a33d;
    --color-bg: #f7f5f2;
    --color-border: #ddd6cc;
    --color-text: #262322;
}

* { box-sizing: border-box; }

html, body {
    overflow-x: hidden;
}
html.modal-open, body.modal-open {
    overflow: hidden;
    height: 100%;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
    font-size: 16px;
}

/* Form controls and buttons don't inherit body font-size by default in
   most browsers — without this, inputs/buttons render noticeably
   smaller than the surrounding text. */
input, textarea, select, button {
    font-family: inherit;
    font-size: 1rem;
}
button {
    cursor: pointer;
}
input[type="date"], input[type="time"] {
    font-size: 1.15rem;
    padding: .65rem .6rem;
    min-height: 2.75rem;
}
.time-field-group { display: flex; align-items: center; gap: .4rem; margin-top: .2rem; }
.time-field-group input[type="time"] { margin-top: 0; flex: 1; }
.time-clear {
    flex-shrink: 0;
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: #eee;
    color: #666;
    font-size: 1.1rem;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.time-clear:hover { background: #e0d8d0; color: var(--color-text); }

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--color-primary-dark);
    border-bottom: 1px solid var(--color-primary-dark);
}
.site-header .logo { font-weight: 700; font-size: 1.25rem; color: white; text-decoration: none; }
.site-header nav { display: flex; align-items: center; }
.site-header nav a { margin-left: 1.5rem; color: #e8f0f2; text-decoration: none; }
.site-header nav a:hover { color: var(--color-accent); }

.nav-dropdown { position: relative; margin-left: 1.5rem; }
.nav-dropdown summary {
    color: #e8f0f2;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: " \25BE"; font-size: .75rem; }
.nav-dropdown:hover summary, .nav-dropdown[open] summary { color: var(--color-accent); }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + .6rem);
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    min-width: 180px;
    padding: .4rem 0;
    z-index: 500;
}
.nav-dropdown-menu a {
    display: block;
    margin-left: 0;
    padding: .5rem 1rem;
    color: var(--color-text) !important;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--color-bg); color: var(--color-primary) !important; }

main { max-width: 1100px; margin: 0 auto; padding: 2rem; }
main.main-wide { max-width: 1600px; }

.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: 2.4rem; margin-bottom: .5rem; }
.hero h1 .accent { color: var(--color-accent); }
.hero .subhead { font-size: 1.15rem; max-width: 640px; margin: 0 auto 1rem; color: #555; }
.hero .since-line { font-size: .9rem; color: #888; margin-bottom: 2rem; }
.cta-row { display: flex; gap: 1rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.trust-badges { display: flex; gap: 1.5rem; justify-content: center; margin-top: 1.25rem; font-size: .9rem; color: #556; flex-wrap: wrap; }
.trust-badges span { white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1.5rem; border-radius: 6px; text-decoration: none; font-weight: 600; border: none; line-height: 1.4; text-align: center; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: white; color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn-danger { background: #a13c3c; color: white; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

.unlock-card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.unlock-card-header h1 { margin: 0; font-size: 1.4rem; }
.unlock-card-header .btn-link { white-space: nowrap; font-size: .85rem; }
.btn-demo { background: var(--color-accent); color: #3a2a08; border: 1px solid #c98a2c; }
.btn-demo:hover { background: #dc9530; }

.screenshots { text-align: center; padding: 1rem 0 2rem; }
.screenshots h2 { font-size: 1.75rem; }
.screenshots-intro { color: #666; margin-bottom: 1.5rem; }

.screenshots .demo-preview {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border-radius: 8px;
    overflow: hidden;
}
.screenshots .demo-preview .employee-name { min-width: 8em; text-align: left; }
.screenshots .demo-preview .entry-cell { min-width: 7em; }
.screenshots-scroll { overflow-x: auto; }
.screenshot-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}
.screenshot-grid figure { margin: 0; background: white; border: 1px solid var(--color-border); border-radius: 10px; padding: .75rem; }
.screenshot-grid img { width: 100%; height: auto; border-radius: 6px; display: block; }
.screenshot-grid figcaption { font-size: .85rem; color: #555; margin-top: .6rem; text-align: left; }
.screenshot-cta { margin-top: 1.5rem; }
@media (max-width: 760px) {
    .screenshot-grid { grid-template-columns: 1fr; }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}
.feature-card {
    background: #eae7e2;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
}
.feature-card h3 {
    margin: 0 0 .6rem;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.feature-card p { margin: 0; color: #555; font-size: .92rem; line-height: 1.55; }
.feature-dot {
    flex-shrink: 0;
    width: 9px; height: 9px;
    border-radius: 50%;
    display: inline-block;
}
.feature-dot-1 { background: #6b7d5f; }
.feature-dot-2 { background: var(--color-primary); }
.feature-dot-3 { background: var(--color-accent); }
.feature-dot-4 { background: var(--color-primary-dark); }
.feature-dot-5 { background: #8a6d4f; }
.feature-dot-6 { background: #5c7a8a; }

.feature-card-wide {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 1.5rem;
}
.feature-card-wide-icon {
    flex-shrink: 0; width: 3.5rem; height: 3.5rem; border-radius: 12px;
    background: var(--color-accent); color: var(--color-primary-dark);
    display: flex; align-items: center; justify-content: center;
}
.feature-card-wide-text h3 { display: flex; align-items: center; gap: .6rem; }
@media (max-width: 640px) {
    .feature-card-wide { flex-direction: column; align-items: flex-start; }
}

.back-to-home-link { margin: 0 0 1rem; font-size: .9rem; text-align: left; }
.back-to-home-link a { color: #777; text-decoration: none; }
.back-to-home-link a:hover { color: var(--color-primary); text-decoration: underline; }

.coming-soon-badge {
    display: inline-block; margin-bottom: 1rem;
    background: var(--color-accent); color: var(--color-primary-dark);
    font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
    padding: .3rem .85rem; border-radius: 999px;
}
.screenshots .coming-soon-badge { margin-top: 2.5rem; }

.step-number {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: .9rem;
}
.step-number-1 { background: #6b7d5f; }
.step-number-2 { background: var(--color-primary); }
.step-number-3 { background: var(--color-accent); }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.pricing { text-align: center; padding: 3rem 1rem; }
.features { text-align: center; }
.features h2 { font-size: 1.75rem; margin-bottom: 3rem; }

.pricing h2 { font-size: 1.75rem; margin-bottom: 3rem; }
.price-callout { text-align: center; font-size: 1.1rem; color: #444; margin-bottom: 1.5rem; }
.price-callout-amount { font-size: 2.5rem; font-weight: 800; color: var(--color-primary-dark); vertical-align: middle; margin-right: .25rem; }
.pricing .faq { max-width: 700px; margin: 0 auto; text-align: left; }
.pricing .faq h2 { text-align: center; }
.faq-list p { margin: 0 0 1.5rem; color: #333; font-size: .98rem; line-height: 1.65; }
.faq-list p strong { color: var(--color-primary); display: block; margin-bottom: .25rem; font-size: 1.02rem; }

.week-schedule .week-nav {
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    text-align: center;
    font-size: 1.75rem;
}
.week-schedule .week-nav .arrow { font-size: 1.75rem; text-decoration: none; color: var(--color-primary); }
.week-schedule .week-nav .arrow:hover { color: var(--color-primary-dark); }
.week-schedule .week-nav-date { min-width: 14em; }

.toolbar-buttons-row { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 .75rem; }

@media (min-width: 641px) {
    .toolbar-buttons-row { margin-bottom: 1.5rem; }
}

.menu-toggle-btn {
    display: flex; align-items: center; gap: .4rem;
    width: fit-content; margin: 0;
    padding: .5rem 1rem; border: 1px solid var(--color-border); border-radius: 999px;
    background: white; color: var(--color-primary-dark); font-size: .9rem; font-weight: 600; cursor: pointer;
}
.menu-toggle-btn:hover { background: #f3f1ec; }

.side-menu-overlay {
    display: none; position: fixed; inset: 0; z-index: 60;
    background: rgba(0,0,0,0); justify-content: flex-end;
    transition: background-color .2s ease;
}
.side-menu-overlay.open { background: rgba(0,0,0,.35); }
.side-menu-panel {
    width: 80vw; min-width: 280px; height: 100%; background: white;
    box-shadow: -4px 0 16px rgba(0,0,0,.12);
    padding: 1.25rem; overflow-y: auto;
    transform: translateX(100%); transition: transform .2s ease;
    display: flex; flex-direction: column;
}
@media (min-width: 641px) {
    .side-menu-panel { width: 40vw; }
}
.side-menu-overlay.open .side-menu-panel { transform: translateX(0); }
.side-menu-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.side-menu-header h2 { margin: 0; font-size: 1.15rem; }
.side-menu-close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: #888; }
.side-menu-close:hover { color: var(--color-text); }

.extras-category { margin-bottom: 1.5rem; }
.extras-category:last-child { margin-bottom: 0; }
.extras-category-title { margin: 0 0 .6rem; font-size: .8rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .04em; }
.extras-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.extras-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
    padding: 1.6rem .75rem; border: 1px solid var(--color-border); border-radius: 12px;
    background: #faf8f4; cursor: pointer; text-align: center;
    text-decoration: none; color: inherit;
}
.extras-card:hover { background: #f3f1ec; border-color: var(--color-primary); }
.extras-card-icon { display: inline-flex; color: var(--color-primary-dark); }
.extras-card-label { font-size: 1rem; font-weight: 600; color: var(--color-primary-dark); }

.side-menu-subview { display: flex; flex-direction: column; }
.side-menu-back {
    align-self: flex-start; margin-bottom: 1rem; padding: 0;
    border: none; background: none; color: var(--color-primary); font-size: .9rem; font-weight: 600; cursor: pointer;
}
.side-menu-back:hover { color: var(--color-primary-dark); }

.dashboard-stats-row { display: flex; gap: .6rem; margin-bottom: 1.25rem; }
.dashboard-stat-card {
    flex: 1; background: #faf8f4; border: 1px solid var(--color-border); border-radius: 8px;
    padding: .75rem .5rem; text-align: center;
}
.dashboard-stat-number { margin: 0; font-size: 1.4rem; font-weight: 700; color: var(--color-primary-dark); }
.dashboard-stat-label { margin: .2rem 0 0; font-size: .7rem; color: #888; text-transform: uppercase; letter-spacing: .02em; }

.dashboard-subheading { margin: 0 0 .6rem; font-size: .95rem; color: var(--color-primary-dark); }
.dashboard-subheading-note { font-size: .78rem; font-weight: 400; color: #888; }
.dashboard-job-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.dashboard-job-item { border: 1px solid var(--color-border); border-radius: 8px; padding: .65rem .8rem; }
.dashboard-job-title { margin: 0; font-weight: 600; font-size: .92rem; color: var(--color-primary-dark); }
.dashboard-job-meta { margin: .2rem 0 0; font-size: .82rem; color: #777; }
.dashboard-empty { color: #888; font-size: .9rem; }
.dashboard-bar-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.5rem; }
.dashboard-bar-row {
    display: flex; align-items: center; justify-content: space-between;
    border: 1px solid var(--color-border); border-radius: 8px; padding: .6rem .8rem;
    font-size: .9rem; color: var(--color-primary-dark);
}
.dashboard-bar-row-busiest { background: #fff4e0; border-color: var(--color-accent); font-weight: 700; }
.dashboard-bar-count { color: #777; font-weight: 400; }
.dashboard-bar-row-busiest .dashboard-bar-count { color: #7a6a2a; font-weight: 700; }

.side-menu-back-to-calendar {
    display: block; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--color-border);
    text-align: center; font-weight: 600; color: var(--color-primary);
}
.side-menu-back-to-calendar:hover { color: var(--color-primary-dark); }

@media (max-width: 600px) {
    main { padding: 1rem; }
    .hero { padding: 1.5rem 1rem; }
    .screenshots { padding-top: .5rem; }
    .week-schedule .week-nav { gap: .5rem .75rem; flex-wrap: wrap; }
    .week-schedule .week-nav-date { min-width: 0; font-size: 1.2rem; font-weight: 700; }
}
.location-heading { font-size: 1.3rem; margin: 2rem 0 .25rem; color: var(--color-primary-dark); }
.location-heading:first-of-type { margin-top: 0; }
.location-heading-editable { cursor: pointer; }
.location-heading-editable:hover { text-decoration: underline; }
.location-heading-row { display: flex; align-items: center; gap: .6rem; margin: 2rem 0 .25rem; }
.location-heading-row:first-of-type { margin-top: 0; }
.location-heading-row .location-heading { margin: 0; }
.location-delete-btn {
    background: none; border: none; color: #a13c3c; font-size: 1.2rem;
    line-height: 1; cursor: pointer; padding: 0 .25rem; opacity: .6;
}
.location-delete-btn:hover { opacity: 1; }
.location-date-range { color: #777; font-size: .9rem; margin: 0 0 .75rem; }
.manage-links { font-size: .9rem; color: #777; margin: 0 0 1.25rem; }

.add-buttons-row { margin-top: 1.5rem; display: flex; gap: 1.5rem; }
.btn-add-link {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    padding: 0;
}
.btn-add-link:hover { color: var(--color-primary-dark); text-decoration: underline; }

table.crew-grid { width: 100%; border-collapse: collapse; background: white; font-size: 1.05rem; }
.crew-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.crew-grid th, table.crew-grid td { border: 1px solid var(--color-border); padding: .9rem 1rem; vertical-align: top; }
table.crew-grid th { background: #efe9e1; text-align: left; font-size: .95rem; }

/* Stacked weekday / day-number / month-year in each day column's
   header. Employee header is centered here too; the employee names in
   the body stay left-aligned via .employee-name's own rules below. */
table.crew-grid thead th { text-align: center; vertical-align: middle; }
table.crew-grid thead .day-name {
    display: block;
    font-size: .8rem;
    font-weight: 400;
    color: #777;
}
table.crew-grid thead .day-number {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    line-height: 1.3;
}
table.crew-grid thead .day-month {
    display: block;
    font-size: .78rem;
    font-weight: 400;
    color: #999;
}
th.today-column .day-name, th.today-column .day-month { color: #7a6a2a; }

/* Belt-and-suspenders for the homepage's demo-preview table
   specifically — same rule as above, just scoped more specifically so
   this can never be affected by anything else touching .demo-preview. */
.screenshots .demo-preview thead .day-name,
.screenshots .demo-preview thead .day-number,
.screenshots .demo-preview thead .day-month {
    display: block;
}

/* Light per-row tint so each employee's line is easy to track across
   the week, cycling through a small palette. Individual cell
   backgrounds (entry badges, today-column highlight) naturally paint
   over this, so it never competes with those. */
table.crew-grid tbody tr:nth-child(6n+1) { background-color: #eef6f3; }
table.crew-grid tbody tr:nth-child(6n+2) { background-color: #f6f1ea; }
table.crew-grid tbody tr:nth-child(6n+3) { background-color: #eef1f6; }
table.crew-grid tbody tr:nth-child(6n+4) { background-color: #f6eef3; }
table.crew-grid tbody tr:nth-child(6n+5) { background-color: #f2f6ea; }
table.crew-grid tbody tr:nth-child(6n+6) { background-color: #eaf4f6; }
table.crew-grid .employee-name { min-width: 11em; font-size: 1.05rem; position: relative; }
table.crew-grid .employee-name small { font-size: .8rem; color: #777; }
table.crew-grid .employee-name-editable { cursor: pointer; transition: background-color .12s; }
table.crew-grid .employee-name-editable:hover { background: #f7f5f2; }

.entry-cell { min-width: 10.5em; cursor: pointer; transition: background-color .12s; position: relative; }
.entry-cell + .entry-cell { margin-top: .5rem; }
.today-column { background: #fff9d6; }
.entry-cell:hover { background: #f7f5f2; }
.entry-cell.past-empty { cursor: default; }
.entry-cell.past-empty:hover { background: none; }
/* Time-collision warning: reddened cell + a small corner icon that
   opens the collision popup. Kept subtle enough not to fight with the
   today-column highlight when both apply to the same cell. */
.entry-cell.has-collision { background: #fbe4e2; }
.entry-cell.has-collision:hover { background: #f8d5d2; }
.collision-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #c0392b;
    color: white;
    font-size: .8rem;
    cursor: pointer;
    z-index: 2;
}
.collision-icon:hover { background: #a93226; }
.modal-box-small { max-width: 420px; }
.collision-list p { margin: .35rem 0; font-size: .9rem; color: #444; }

/* ---- Mobile agenda view -------------------------------------------
   Phones only. Desktop/tablet never see the toggle button and the
   calendar always stays in its normal side-scrolling table layout.
   When switched on, .week-schedule gets an "agenda-mode" class and the
   table is re-flowed (via display overrides, not a re-render) into a
   per-employee vertical list: the week-date bar sticks to the top of
   the screen, and each employee's name sticks below it while you
   scroll through their days — handing off to the next employee's name
   once their block scrolls past, since a sticky element's range is
   bounded by its own row. */
.mobile-view-toggle { display: none; }

@media (max-width: 640px) {
    .mobile-view-toggle {
        display: flex;
        align-items: center;
        gap: .45rem;
        width: fit-content;
        margin: 0;
        padding: .55rem 1rem;
        border: 1px solid var(--color-primary);
        border-radius: 999px;
        background: white;
        color: var(--color-primary);
        font-size: .85rem;
        font-weight: 600;
        cursor: pointer;
    }
    .mobile-view-toggle:hover { background: #f3f6f5; }
    .mobile-view-toggle .mvt-icon { font-size: 1rem; line-height: 1; }

    .week-schedule.agenda-mode .week-nav {
        position: sticky;
        top: 0;
        z-index: 20;
        background: var(--color-bg, #fdfaf6);
        padding: .5rem 0;
        margin: 0 0 .75rem;
    }

    .week-schedule.agenda-mode .crew-grid-scroll { overflow-x: visible; }

    .week-schedule.agenda-mode table.crew-grid {
        display: block;
        width: 100%;
        border: none;
        background: none;
    }
    .week-schedule.agenda-mode table.crew-grid thead { display: none; }
    .week-schedule.agenda-mode table.crew-grid tbody { display: block; }

    /* overflow stays visible here (not hidden) — overflow other than
       visible on an ancestor of a position:sticky element breaks its
       stickiness and can clip/overlap the sticky child against its
       siblings, which is what caused the employee-name bar to collide
       with the first day's content. Rounding is done on the header and
       last cell directly instead of clipping the whole row. */
    .week-schedule.agenda-mode table.crew-grid tr {
        display: block;
        margin-bottom: 1.25rem;
        border: 1px solid var(--color-border);
        border-radius: 10px;
        background: white !important; /* overrides the desktop row-tint palette */
    }

    .week-schedule.agenda-mode table.crew-grid .employee-name {
        display: block;
        position: sticky;
        top: var(--sticky-nav-height, 3.5rem);
        z-index: 10;
        min-width: 0;
        background: var(--color-accent);
        color: var(--color-primary-dark);
        font-weight: 700;
        border: none;
        border-radius: 10px 10px 0 0;
        padding: .7rem 1rem;
    }
    .week-schedule.agenda-mode table.crew-grid .employee-name small {
        display: block;
        margin-top: .3rem;
        color: #3f2f10;
        opacity: .75;
    }
    .week-schedule.agenda-mode table.crew-grid .employee-name-editable:hover { background: var(--color-accent); }
    .week-schedule.agenda-mode table.crew-grid .employee-view-link {
        bottom: 8px; right: 8px;
        width: 1.9em; height: 1.9em;
        background: rgba(255,255,255,.55);
        opacity: 1;
        color: var(--color-primary-dark);
    }
    .week-schedule.agenda-mode table.crew-grid .employee-view-link:hover { background: rgba(255,255,255,.8); }

    .week-schedule.agenda-mode table.crew-grid .entry-cell {
        display: block;
        min-width: 0;
        border: none;
        border-top: 1px solid var(--color-border);
        padding: .75rem 1rem;
    }
    .week-schedule.agenda-mode table.crew-grid tr td.entry-cell:last-child {
        border-radius: 0 0 10px 10px;
    }
    .week-schedule.agenda-mode table.crew-grid .entry-cell::before {
        content: attr(data-day-label);
        display: block;
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .03em;
        color: #888;
        margin-bottom: .35rem;
    }
    .week-schedule.agenda-mode table.crew-grid .entry-cell.today-column::before { color: #7a6a2a; }
    .week-schedule.agenda-mode table.crew-grid .entry-cell + .entry-cell { margin-top: 0; }
}
.entry-badge {
    background: #eaf3f6;
    border: 1px solid #cfe1e6;
    border-radius: 5px;
    padding: .4rem .5rem;
    margin-bottom: .35rem;
    font-size: .92rem;
}
.entry-badge:last-child { margin-bottom: 0; }
.entry-badge .entry-time { display: block; font-size: .78rem; color: #55707a; font-weight: 600; }
.entry-badge .entry-loc { display: block; font-weight: 600; color: #1e4450; }
.entry-empty { color: #b3aca0; font-size: .9rem; }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(38,35,34,.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000; padding: 1rem;
}
.modal-box { background: white; border-radius: 10px; padding: 1.75rem; max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-box label { display: block; margin-bottom: 1rem; font-size: .9rem; color: #444; }
.modal-box label input, .modal-box label textarea {
    display: block; width: 100%; padding: .55rem; border: 1px solid var(--color-border); border-radius: 4px; margin-top: .3rem; font-size: .95rem;
}
.modal-close {
    position: absolute; top: .75rem; right: .9rem; border: none; background: none;
    font-size: 1.5rem; line-height: 1; cursor: pointer; color: #888;
}
.modal-close:hover { color: var(--color-text); }
.modal-title { margin-top: 0; font-size: 1.3rem; }
.modal-title-date { display: inline-block; margin-top: .25rem; font-size: .8em; font-weight: 400; color: #777; }

@media (max-width: 640px) {
    .modal-overlay { padding: 0; align-items: stretch; justify-content: stretch; }
    .modal-box {
        max-width: none;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        padding: calc(1.25rem + env(safe-area-inset-top)) 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    }
    .modal-close { top: calc(1.5rem + env(safe-area-inset-top)); right: 1.25rem; }
}
.modal-projects { display: grid; gap: 1.25rem; }
.project-block, .add-project-block { border: 1px solid var(--color-border); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.project-block-header { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .75rem; }
.project-block-header h3 { margin: 0; }
.project-block h3, .add-project-block h3 { margin: 0 0 .75rem; font-size: 1rem; color: var(--color-primary-dark); }
.project-block label, .add-project-block label { display: block; margin-bottom: .6rem; font-size: .85rem; color: #555; }
.project-block input, .project-block textarea, .add-project-block input, .add-project-block textarea {
    width: 100%; padding: .5rem; border: 1px solid var(--color-border); border-radius: 4px; margin-top: .2rem; font-size: .95rem;
}
.project-block .f-all-day-label { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-weight: 600; color: var(--color-primary-dark); }
.project-block .f-all-day-label input { width: auto; margin-top: 0; }
.project-block .f-time-row.field-disabled { opacity: .5; }
.project-block .f-time-row.field-disabled input { background: #f3f1ec; cursor: not-allowed; }
.repeat-panel { border: 1px dashed var(--color-border); border-radius: 6px; padding: .75rem; margin: -.25rem 0 .75rem; background: #faf8f4; }
.repeat-panel label { margin-bottom: .5rem; }
.repeat-interval-group { display: inline-flex; align-items: center; gap: .4rem; margin-top: .2rem; }
.repeat-interval-group input[type="number"] { width: 4.5em; margin-top: 0; }
.repeat-interval-group .f-repeat-unit { font-size: .85rem; color: #555; }
.repeat-existing-note { background: #f3f1ec; border-radius: 6px; padding: .6rem .75rem; margin-bottom: .75rem; }
.repeat-existing-note .repeat-summary { margin: 0 0 .4rem; font-size: .85rem; color: #444; }

.tag-input { position: relative; border: 1px solid var(--color-border); border-radius: 4px; padding: .4rem; margin-top: .2rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.tag-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag-chip { display: inline-flex; align-items: center; gap: .35rem; background: var(--color-primary); color: white; border-radius: 999px; padding: .25rem .3rem .25rem .65rem; font-size: .85rem; }
.tag-chip-remove { background: rgba(255,255,255,.25); border: none; color: white; width: 18px; height: 18px; border-radius: 50%; line-height: 1; cursor: pointer; font-size: .75rem; }
.tag-chip-remove:hover { background: rgba(255,255,255,.4); }
.tag-search { flex: 1 1 8em; border: none !important; padding: .25rem 0 !important; margin: 0 !important; min-width: 8em; }
.tag-search:focus { outline: none; }
.tag-suggestions { position: absolute; top: 100%; left: 0; right: 0; z-index: 15; background: white; border: 1px solid var(--color-border); border-top: none; border-radius: 0 0 6px 6px; box-shadow: 0 4px 10px rgba(0,0,0,.08); max-height: 12rem; overflow-y: auto; }
.tag-suggestion-item { display: block; width: 100%; text-align: left; padding: .5rem .65rem; border: none; background: none; font-size: .9rem; cursor: pointer; }
.tag-suggestion-item:hover { background: #f3f1ec; }
.btn-link { background: none; border: none; color: #a13c3c; font-size: .85rem; cursor: pointer; padding: 0; text-decoration: underline; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; margin-top: 1.25rem; gap: 1rem; }
.modal-actions .modal-add-project, .modal-actions #add-another-project-btn { margin-right: auto; }
.modal-error { color: #7a1f1f; background: #fbe3e3; padding: .5rem .75rem; border-radius: 6px; margin-top: 1rem; font-size: .9rem; }
.modal-view hr { border: none; border-top: 1px solid var(--color-border); margin: 1rem 0; }
.lock-notice { background: #fbe3e3; border: 1px solid #c98a2c; color: #7a1f1f; }
.preview-fields { margin: 1.25rem 0; }
.preview-fields p { margin: 0 0 .6rem; color: #333; }
.preview-fields strong { color: var(--color-primary-dark); }
.preview-add label { margin-bottom: .9rem; }

.notice-readonly { background: #f2f0eb; border-color: var(--color-border); }
.exit-demo-link { margin: 0 0 1rem; }
.exit-demo-link a { color: #888; font-size: .9rem; text-decoration: none; }
.exit-demo-link a:hover { color: var(--color-primary); }
.try-edit-link { font-weight: 600; }

.field-hint { font-size: .82rem; color: #777; margin-top: -.5rem; margin-bottom: 1rem; }

.password-checklist {
    list-style: none;
    padding: .5rem .75rem;
    margin: 0 0 1rem;
    font-size: .85rem;
    border-radius: 6px;
    transition: background-color .2s;
}
.password-checklist li {
    color: #888;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: .3rem;
    transition: color .15s;
}
.password-checklist li:last-child { margin-bottom: 0; }
.password-checklist li::before {
    content: "\2610"; /* ☐ */
    position: absolute;
    left: 0;
    font-size: 1rem;
}
.password-checklist li.met { color: #2e7d32; }
.password-checklist li.met::before {
    content: "\2611"; /* ☑ */
    color: #2e7d32;
}
.password-checklist.all-met { background: #eaf6ea; }
.private-password-box {
    background: #f7f5f2;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem 1.25rem .25rem;
    margin-bottom: 1.25rem;
}
.private-password-box .field-hint { margin-top: 0; }
.settings-subhead { margin-top: 1.75rem; margin-bottom: .5rem; font-size: 1.05rem; color: var(--color-primary-dark); }
.settings-subhead:first-of-type { margin-top: 0; }

.custom-work { max-width: 640px; margin: 4.5rem auto 0; text-align: center; background: white; border: 1px solid var(--color-border); border-radius: 10px; padding: 2rem; }
.custom-work h3 { margin-top: 0; }
.plain-link { color: var(--color-primary); font-weight: 600; text-decoration: underline; }
.plain-link:hover { color: var(--color-primary-dark); }

.notice { background: #fff4e0; border: 1px solid var(--color-accent); padding: .75rem 1rem; border-radius: 6px; }
.notice-demo { background: #eaf3f6; border-color: var(--color-primary); }
.notice-info { background: #eaf3f6; border-color: var(--color-primary); margin-bottom: 1.5rem; }
.notice-info p { margin: 0; }
.booking-contact-fallback { margin-top: 1.5rem; font-size: .88rem; color: #777; }

.employee-view-link {
    position: absolute; bottom: 4px; right: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.6em; height: 1.6em;
    border-radius: 4px; text-decoration: none; font-size: .9rem;
    color: inherit; opacity: .55;
}
.employee-view-link:hover { opacity: 1; background: rgba(0,0,0,.06); }
.employee-view-banner {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
    background: #eaf3f6; border: 1px solid var(--color-primary); border-radius: 6px;
    padding: .65rem 1rem; margin-bottom: 1rem;
}
.employee-view-label { margin: 0; font-size: .95rem; }
.employee-view-eye { margin-right: .3rem; }
.employee-view-exit { font-size: .85rem; font-weight: 600; white-space: nowrap; }

.employee-summary-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.employee-summary-card {
    flex: 1 1 8rem; background: white; border: 1px solid var(--color-border); border-radius: 8px;
    padding: .85rem 1rem; text-align: center;
}
.employee-summary-period { margin: 0 0 .35rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #888; }
.employee-summary-stat { margin: 0; font-size: 1rem; font-weight: 600; color: var(--color-primary-dark); }
.employee-summary-stat + .employee-summary-stat { font-size: .85rem; font-weight: 400; color: #555; margin-top: .15rem; }
.pending-modal-overlay { z-index: 3000; background: rgba(20, 30, 32, .85); }
.pending-modal-box { max-width: 520px; text-align: left; }
.pending-modal-box h1 { margin-top: 0; font-size: 1.5rem; }
.modal-kicker { text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; color: var(--color-accent); font-weight: 700; margin: 0 0 .25rem; }
.pending-checklist { padding-left: 1.2rem; margin: 1.25rem 0; }
.pending-checklist li { margin-bottom: .6rem; color: #444; }
/* Visual-only: the calendar behind the modal is inert to look at, not
   clickable. The real security boundary is server-side — every write
   endpoint independently rejects unapproved orgs regardless of what
   the client does (see schedule/views.py's needs_approval checks). */
.week-schedule.pending-blocked { pointer-events: none; filter: blur(2px) grayscale(40%); user-select: none; }
.demo-toast {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary-dark);
    color: white;
    padding: .75rem 1.25rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    z-index: 1000;
    max-width: 90vw;
}

.auth-form, .employees, .notice-page { max-width: 420px; margin: 0 auto; background: white; padding: 2rem; border-radius: 8px; border: 1px solid var(--color-border); }
.auth-form h1 { margin-top: 0; }
.auth-form-wide { max-width: 640px; }
.auth-form label, .employees label { display: block; margin-bottom: 1rem; }
.auth-form input, .employees input, .auth-form textarea { width: 100%; padding: .5rem; border: 1px solid var(--color-border); border-radius: 4px; margin-top: .25rem; }

.form-errors { list-style: none; margin: 0 0 1rem; padding: .75rem 1rem; background: #fbe4e2; border: 1px solid #e0a8a2; border-radius: 6px; color: #8a2f24; font-size: .9rem; }
.form-errors li + li { margin-top: .3rem; }

/* --- Booking: picker (2+ bookable employees) --- */
.booking-picker { max-width: 700px; margin: 2rem auto; padding: 0 1rem; }
.booking-picker h1 { margin-bottom: .3rem; }
.booking-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.booking-picker-card {
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    background: white; border: 1px solid var(--color-border); border-radius: 10px;
    padding: 1.5rem 1rem; text-decoration: none; color: inherit; text-align: center;
}
.booking-picker-card:hover { border-color: var(--color-primary); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.booking-picker-avatar {
    width: 3rem; height: 3rem; border-radius: 50%; background: var(--color-accent); color: var(--color-primary-dark);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem;
}
.booking-picker-name { font-weight: 700; color: var(--color-primary-dark); }
.booking-picker-role { font-size: .82rem; color: #777; }

/* --- Booking: the day/time/contact flow --- */
.booking-flow { max-width: 1000px; margin: 2rem auto; padding: 0 1rem; }
.booking-flow h1 { margin-bottom: .5rem; }
.booking-location { margin: 0 0 1rem; color: #666; font-size: .92rem; }
.booking-duration-notes { margin: 0 0 1.5rem; color: #666; font-size: .88rem; font-style: italic; }
.booking-flow-layout { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1.5rem auto 0; max-width: 1000px; text-align: left; }
.booking-calendar-panel {
    flex: 0 0 420px; background: var(--color-primary-dark); color: white;
    border-radius: 12px; padding: 2rem;
}
.booking-calendar-month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.booking-calendar-month-label { font-weight: 700; font-size: 1.3rem; }
.booking-calendar-month-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.3rem; height: 2.3rem; border-radius: 50%;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: white;
    font-size: 1.35rem; line-height: 1; text-decoration: none;
}
.booking-calendar-month-arrow:hover { background: rgba(255,255,255,.2); }
.booking-calendar-month-arrow.disabled { opacity: .3; pointer-events: none; }

.booking-calendar-weekday-row {
    display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;
    font-size: .9rem; color: #a9bac1; margin-bottom: .5rem;
}
.booking-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; }
.booking-calendar-date {
    aspect-ratio: 1; border-radius: 50%; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; color: #6d7f88;
}
.booking-calendar-date.has-availability { background: rgba(255,255,255,.14); color: white; }
.booking-calendar-date.has-availability:hover { background: rgba(255,255,255,.26); }
.booking-calendar-date.selected { background: var(--color-accent); color: var(--color-primary-dark); font-weight: 700; }
.booking-calendar-date.selected:hover { background: var(--color-accent); }
.booking-calendar-date.unavailable { color: #4a5c66; }
.booking-calendar-date.unavailable.selected {
    background: var(--color-accent); color: var(--color-primary-dark); font-weight: 700; cursor: default;
}
.booking-calendar-date.blank { visibility: hidden; }

@media (max-width: 640px) {
    .booking-calendar-panel { flex-basis: 100%; width: 100%; padding: 1.25rem; }
    .booking-calendar-month-label { font-size: 1.1rem; }
    .booking-calendar-month-arrow { width: 2rem; height: 2rem; font-size: 1.15rem; }
    .booking-calendar-date { font-size: .9rem; }
}

.booking-flow-times { flex: 1 1 320px; }
.booking-duration-label { margin: 0 0 .5rem; font-weight: 700; color: var(--color-primary-dark); }
.booking-duration-row { display: flex; gap: .6rem; margin-bottom: 1.5rem; }
.booking-duration-link {
    flex: 1; text-align: center; border: 1px solid var(--color-border); border-radius: 8px; padding: .6rem .5rem;
    text-decoration: none; color: var(--color-primary-dark); font-size: .9rem; max-width: 8rem;
}
.booking-duration-link:hover { border-color: var(--color-primary); }
.booking-duration-link.active { background: #ece7dd; border-color: var(--color-primary-dark); font-weight: 700; }
.booking-duration-link.disabled { opacity: .4; color: #999; cursor: not-allowed; background: #f3f1ec; }

.booking-slot-list { display: flex; flex-direction: column; gap: .6rem; max-width: 20rem; }
.booking-slot-link {
    display: block; border: 1px solid var(--color-border); border-radius: 8px; padding: .7rem 1rem;
    text-decoration: none; color: var(--color-primary-dark); font-size: .95rem; text-align: center;
}
.booking-slot-link:hover { border-color: var(--color-primary); background: #f7f5f2; }
.booking-selected-slot { font-size: 1.05rem; margin-bottom: 1rem; }
.booking-contact-form {
    max-width: 26rem; margin: 0; padding: 1.5rem;
    background: #faf8f4; border: 1px solid var(--color-border); border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.booking-contact-form label { font-weight: 600; color: var(--color-primary-dark); font-size: .9rem; margin-bottom: 1.1rem; }
.booking-contact-form input, .booking-contact-form textarea { background: white; }

/* --- Booking: admin review screen --- */
.booking-admin { max-width: 800px; margin: 2rem auto; padding: 0 1rem; }
.booking-admin-list { display: flex; flex-direction: column; gap: .85rem; margin-top: 1.25rem; }
.booking-admin-item {
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: white; border: 1px solid var(--color-border); border-radius: 10px; padding: 1rem 1.25rem;
}
.booking-admin-item-title { margin: 0; font-weight: 700; color: var(--color-primary-dark); }
.booking-admin-item-meta { margin: .25rem 0 0; color: #555; font-size: .9rem; }
.booking-admin-item-notes { margin: .4rem 0 0; font-style: italic; color: #666; font-size: .88rem; }
.booking-admin-item-email { margin: .4rem 0 0; color: #888; font-size: .85rem; }
.booking-admin-item-status { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.booking-status-pill { padding: .25rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.booking-status-pending_verification { background: #f0ecdf; color: #7a6a2a; }
.booking-status-pending_review { background: #eaf3f6; color: var(--color-primary-dark); }
.booking-status-accepted { background: #e3f0e6; color: #2f6b3f; }
.booking-status-declined { background: #f2e5e3; color: #8a3f33; }
.booking-admin-actions { display: flex; gap: .75rem; }

.form-actions-right { text-align: right; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }
.cta-final { text-align: center; }
.form-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.form-actions .btn { flex: 0 0 auto; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; }
.checkbox-label input { width: auto; }

.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-danger { background: #fbe3e3; color: #7a1f1f; }
.alert-success { background: #eaf6ea; color: #1e5c1e; }

ul.messages { list-style: none; padding: 0 2rem; margin: 1rem auto; max-width: 1100px; }
ul.messages li { padding: .6rem 1rem; border-radius: 6px; margin-bottom: .5rem; background: #e5f5e6; }

.site-footer { text-align: center; padding: 2rem; color: #888; font-size: .85rem; }
.site-footer a { color: #888; }
.site-footer a:hover { color: var(--color-primary); }
.footer-free-line { margin-top: .25rem; color: #aaa; font-size: .8rem; }

.legal-page { max-width: 760px; margin: 0 auto; background: white; padding: 2rem 2.5rem; border-radius: 8px; border: 1px solid var(--color-border); }
.legal-page h2 { margin-top: 2rem; font-size: 1.15rem; color: var(--color-primary-dark); }
.legal-page p { color: #444; }

.idle-warning-box { max-width: 420px; text-align: center; }
.idle-warning-box h2 { margin-top: 0; }
#idle-countdown { font-weight: 700; color: var(--color-primary-dark); }

.inline-form { margin-bottom: 1.5rem; }
.inline-form input, .inline-form select {
    display: block;
    width: 100%;
    padding: .55rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-bottom: .75rem;
}
.inline-form .btn { margin-top: .25rem; }

.booking-screenshot-pair {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    margin: 32px 0 20px;
}

.booking-screenshot {
    flex: 1 1 320px;
    max-width: 460px;
    margin: 0;
}

.booking-screenshot a {
    display: block;
}

.booking-screenshot img {
    display: block;
    width: 100%;
    height: 320px;
    object-fit: contain;
    background: #F5F4EF;
    border-radius: 10px;
    border: 1px solid #E1DFD8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.booking-screenshot img:hover {
    border-color: #2F6F5E;
}

.booking-screenshot figcaption {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.booking-screenshot figcaption strong {
    display: block;
    margin-bottom: 2px;
}

.booking-screenshot figcaption a {
    display: inline;
    margin-top: 4px;
}

@media (max-width: 640px) {
    .booking-screenshot-pair {
        flex-direction: column;
        align-items: center;
    }
    .booking-screenshot {
        max-width: 420px;
        width: 100%;
    }
    .booking-screenshot img {
        height: 260px;
    }
}

/* ============================================================
   Booking overlay chips on the week calendar grid
   ============================================================ */

.entry-badge-open {
    background: #EAF4F1;
    border: 1px dashed #2F6F5E;
    color: #234F42;
}
a.entry-badge-open {
    display: block;
    text-decoration: none;
    cursor: pointer;
}
a.entry-badge-open:hover {
    background: #DDEEE9;
}
div.entry-badge-open.booking-prefill-trigger {
    cursor: pointer;
}
div.entry-badge-open.booking-prefill-trigger:hover {
    background: #DDEEE9;
}
.entry-badge-assigned.booking-prefill-trigger {
    cursor: pointer;
}
.entry-badge-assigned.booking-prefill-trigger:hover {
    filter: brightness(0.97);
}

.entry-badge-pending {
    background: #FBF0E2;
    border: 1px solid #EAC48E;
    color: #8A5A1D;
}

.booking-decide-actions {
    margin-top: 4px;
    display: flex;
    gap: 4px;
}
.booking-decide-btn {
    font-size: 10.5px;
    border-radius: 4px;
    border: 1px solid #EAC48E;
    background: transparent;
    padding: 2px 6px;
    cursor: pointer;
    color: #8A5A1D;
}
.booking-decide-btn:hover {
    background: #F7E4C9;
}
.booking-decide-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
.booking-decide-accept {
    font-weight: 600;
}

/* .entry-badge-assigned reuses whatever the existing default
   .entry-badge look already is — only listed above where it needs a
   rule distinct from that default (the prefill hover state). */

.booking-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    margin: 14px 0 6px;
    padding: 10px 14px;
    background: #FFFFFF;
    border: 1px solid #E1DFD8;
    border-radius: 8px;
    font-size: 12.5px;
    color: #5B655F;
}
.booking-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.booking-legend-swatch {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    flex-shrink: 0;
    display: inline-block;
}
.booking-legend-assigned {
    background: #EAEFF3;
    border: 1px solid #C9D6E2;
}
.booking-legend-open {
    background: #EAF4F1;
    border: 1px dashed #2F6F5E;
}
.booking-legend-pending {
    background: #FBF0E2;
    border: 1px solid #EAC48E;
}

/* ============================================================
   "View as client" toolbar select
   ============================================================ */

.view-as-client-select {
    padding: .5rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--color-primary);
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
}
.view-as-client-select:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* ============================================================
   Client-preview banner (admin's "View as client" mode)
   ============================================================ */

.notice-client-preview {
    background: var(--color-primary-dark);
    color: white;
    border-color: var(--color-primary-dark);
}
.notice-client-preview a {
    color: white;
    text-decoration: underline;
}

/* Django messages framework tags used on manage_hours.html */
.notice-success { background: #eaf3ea; border-color: #6b7d5f; }
.notice-error { background: #f7e6e6; border-color: #a13c3c; }
.notice-warning { background: #fff4e0; border-color: var(--color-accent); }

/* ============================================================
   More menu — Booking category (enable/learn-more states)
   ============================================================ */

.extras-booking-off-copy {
    font-size: .9rem;
    color: #666;
    margin: 0 0 .75rem;
}
.extras-enable-booking-form {
    margin: 0 0 .5rem;
}
.extras-learn-more {
    margin: .75rem 0 0;
    font-size: .85rem;
}
.extras-learn-more a, .extras-booking-off-copy a {
    color: var(--color-primary);
    font-weight: 600;
}

/* ============================================================
   Booking feature marketing page — prose feature section (item D)
   ============================================================ */

.features-prose {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}
.features-prose p {
    color: #444;
    font-size: 1rem;
    line-height: 1.75;
}

/* Small helper text under a page title — used on booking_demo.html
   and manage_hours.html */
.page-sub {
    color: #666;
    font-size: .95rem;
    margin: -.5rem 0 1.25rem;
}

/* Cross-link between the booking widget demo and the calendar demo */
.crosslink {
    text-align: center;
    margin: 0 0 1.5rem;
    font-size: .92rem;
    color: #666;
}
.crosslink a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}
.crosslink a:hover {
    text-decoration: underline;
}

/* ============================================================
   Manage Booking Hours page
   ============================================================ */

.hours-employee-block {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    text-align: left;
}
.hours-employee-block h2 {
    font-size: 1.2rem;
    margin-bottom: .25rem;
}
.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: .9rem;
}
.hours-table th, .hours-table td {
    text-align: left;
    padding: .6rem .5rem;
    border-bottom: 1px solid var(--color-border);
}
.hours-table th {
    color: #888;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.hours-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    max-width: none;
    margin: 0;
    padding: 1.25rem;
    background: #fff;
}
.hours-add-form label {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .85rem;
    color: #555;
}
.hours-add-form input, .hours-add-form select {
    margin: 0;
}

/* ============================================================
   Crew & Employees / Manage Locations roster modals
   ============================================================ */

.modal-ajax-content {
    min-width: 0;
}
.modal-ajax-content .modal-title {
    margin-bottom: 1.5rem;
}

.roster-list {
    max-height: 360px;
    overflow-y: auto;
    margin: 0 0 1.75rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}
.roster-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .95rem 1.15rem;
    border-bottom: 1px solid var(--color-border);
}
.roster-row:last-child {
    border-bottom: none;
}
.roster-row:hover {
    background: #FAFAF8;
}

.roster-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #EAF4F1;
    color: #234F42;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}

.roster-row-main {
    flex: 1;
    min-width: 0;
}
.roster-row-main strong {
    display: block;
    font-size: 1rem;
    line-height: 1.3;
}
.roster-row-detail {
    margin-top: 2px;
}
.roster-row-sub {
    display: inline-block;
    color: #888;
    font-size: .83rem;
}
.roster-row-sub + .roster-row-sub::before {
    content: "\00B7";
    margin: 0 .4rem;
    color: #ccc;
}
.roster-row-email {
    color: #888;
    font-size: .82rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.roster-row-email em {
    color: var(--color-accent, #C97A2B);
    font-style: normal;
}

.roster-add-form {
    max-width: none;
    margin: 0;
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--color-border);
}
.roster-add-form h3 {
    margin: 0 0 1.1rem;
    font-size: 1.05rem;
}
.roster-add-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0 1rem;
}
.roster-add-fields label {
    margin-bottom: 1.1rem;
}
.roster-add-form .btn-primary {
    margin-top: .25rem;
}

/* Standalone left-aligned links above/below the calendar table */
.calendar-top-left-link,
.calendar-bottom-left-link {
    text-align: left;
    margin: 0 0 1rem;
}

.roster-list .dashboard-empty {
    padding: 1.25rem 1.15rem;
    margin: 0;
}

/* Combined row: Crew & Employees / Manage Locations on the left,
   More / view toggle / view-as-client on the right — one line. */
.calendar-top-links-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 0 0 .75rem;
}
.calendar-top-links-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.calendar-top-links-right {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.roster-row-edit {
    cursor: pointer;
}
.roster-row-edit:hover {
    background: #F0F3F1;
}
.roster-row-edit:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

/* Job / Booking mode toggle in the add-entry modal */
.entry-mode-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}
.entry-mode-btn {
    border: none;
    background: white;
    padding: .55rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
}
.entry-mode-btn + .entry-mode-btn {
    border-left: 1px solid var(--color-border);
}
.entry-mode-btn.active {
    background: var(--color-primary);
    color: white;
}
.modal-booking-fields {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.1rem;
}