:root {
    --bg: #f6f3ee;
    --card: #ffffff;
    --ink: #1f2933;
    --muted: #65727f;
    --line: #e4ddd3;
    --brand: #8b3f2f;
    --brand-strong: #6f2f24;
    --brand-soft: #f3ded8;
    --green: #1f8a5b;
    --green-soft: #e4f6ed;
    --yellow: #a46a00;
    --yellow-soft: #fff2c7;
    --red: #b33131;
    --red-soft: #ffe2e2;
    --blue: #2b668f;
    --blue-soft: #e4f0f8;
    --shadow: 0 18px 45px rgba(66, 43, 28, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(139, 63, 47, 0.14), transparent 34rem),
        var(--bg);
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input,
select,
textarea {
    font: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(228, 221, 211, 0.9);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink);
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 14px;
    background: var(--brand);
    color: white;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(139, 63, 47, 0.22);
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.nav a {
    display: inline-flex;
    padding: 0.62rem 0.82rem;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 650;
}

.nav a:hover {
    background: var(--brand-soft);
    color: var(--brand-strong);
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.hero,
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.hero {
    min-height: 220px;
    align-items: center;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 0.95;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
}

h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.lead {
    color: var(--muted);
    font-size: 1.12rem;
    max-width: 720px;
}

.eyebrow {
    color: var(--brand);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    margin-bottom: 0.75rem;
}

.muted {
    color: var(--muted);
}

.note-line {
    max-width: 52rem;
    margin-bottom: 0;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.plan-card,
.edit-day-card,
.employee-day-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card {
    padding: clamp(1rem, 2vw, 1.35rem);
    margin-bottom: 1rem;
}

.card.accent {
    background: linear-gradient(145deg, var(--brand-soft), white 62%);
}

.card-head,
.plan-head,
.edit-day-title,
.employee-day-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.messages {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.message {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: white;
    font-weight: 650;
}

.message.success { background: var(--green-soft); color: var(--green); border-color: rgba(31, 138, 91, 0.25); }
.message.warning { background: var(--yellow-soft); color: var(--yellow); border-color: rgba(164, 106, 0, 0.25); }
.message.danger { background: var(--red-soft); color: var(--red); border-color: rgba(179, 49, 49, 0.25); }
.message.info { background: var(--blue-soft); color: var(--blue); border-color: rgba(43, 102, 143, 0.25); }

.form-stack,
.inline-form,
.assign-form,
.availability-form {
    display: grid;
    gap: 0.9rem;
}

.inline-form {
    grid-template-columns: 1.2fr 1fr 1fr auto;
    align-items: end;
}

label {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.72rem 0.8rem;
    color: var(--ink);
    background: #fffefa;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(139, 63, 47, 0.55);
    box-shadow: 0 0 0 4px rgba(139, 63, 47, 0.12);
}

textarea {
    min-height: 86px;
    resize: vertical;
}

.copy-field {
    min-width: 280px;
    font-size: 0.82rem;
    color: var(--muted);
    background: #faf8f5;
}

.split,
.form-grid,
.employee-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.form-grid {
    grid-template-columns: 1.2fr 1fr 0.7fr 0.7fr;
}

.form-grid.compact-grid {
    grid-template-columns: 1fr 0.7fr 0.7fr;
}

.form-grid .wide,
.employee-inputs .wide {
    grid-column: 1 / -1;
}

.btn,
.icon-btn {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
    background: #f1ede6;
    padding: 0.82rem 1rem;
    min-height: 2.7rem;
}

.btn:hover,
.icon-btn:hover {
    text-decoration: none;
    filter: brightness(0.98);
}

.btn:disabled,
.icon-btn:disabled,
input:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.btn.primary {
    color: white;
    background: var(--brand);
    box-shadow: 0 12px 22px rgba(139, 63, 47, 0.22);
}

.btn.ghost {
    background: transparent;
    border: 1px solid var(--line);
}

.btn.small {
    min-height: 2.1rem;
    padding: 0.5rem 0.72rem;
    font-size: 0.82rem;
}

.icon-btn {
    width: 2rem;
    height: 2rem;
    min-height: 0;
    padding: 0;
    font-size: 1.35rem;
    color: var(--red);
    background: var(--red-soft);
}

.danger-text {
    color: var(--red);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    padding: 1.25rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card span {
    display: block;
    font-size: 2.4rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.stat-card small {
    color: var(--muted);
    font-weight: 700;
}

.badges,
.plan-counts,
.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.actions.end {
    justify-content: flex-end;
}

.name-edit-form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 13rem;
}

.name-edit-form input {
    min-width: 8rem;
    padding-block: 0.55rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.76rem;
    padding: 0.35rem 0.62rem;
    background: #efebe3;
    color: var(--muted);
}

.badge.success { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--yellow-soft); color: var(--yellow); }
.badge.danger { background: var(--red-soft); color: var(--red); }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.neutral { background: #efebe3; color: var(--muted); }

.day-list,
.planning-list,
.employee-day-list,
.availability-list,
.assignment-list,
.hours-list,
.history-list {
    display: grid;
    gap: 0.75rem;
}

.day-list.compact {
    gap: 0.55rem;
}

.day-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffefa;
}

.day-row span,
.edit-day-title span,
.employee-day-head span,
.assignment-row span,
.availability-row span {
    display: block;
    color: var(--muted);
    margin-top: 0.15rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.85rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 0.2rem;
}

tr.inactive {
    opacity: 0.58;
}

tr.selected-row {
    background: rgba(139, 63, 47, 0.08);
}

.row-link {
    color: var(--ink);
}

.row-link:hover {
    color: var(--brand);
    text-decoration: none;
}

code {
    display: inline-flex;
    padding: 0.25rem 0.45rem;
    border-radius: 8px;
    background: #f1ede6;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink);
    font-size: 0.95rem;
}

.checkline input {
    width: auto;
}

.weekday-fieldset {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.85rem;
    background: rgba(255, 254, 250, 0.72);
}

.weekday-fieldset legend {
    padding: 0 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.weekday-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.75rem;
}

.weekday-option {
    min-height: 2.25rem;
}

.small-check {
    font-size: 0.85rem;
}

.edit-day-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding: 1rem;
}

.edit-day-card.closed {
    opacity: 0.58;
}

.edit-day-form {
    display: grid;
    gap: 0.75rem;
}

.plan-card {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.date-pill {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-weight: 900;
    margin-bottom: 0.55rem;
}

.plan-head h2 {
    margin-bottom: 0.25rem;
}

.plan-head p {
    margin-bottom: 0.2rem;
    color: var(--muted);
}

.plan-columns {
    margin-top: 1.2rem;
    align-items: start;
}

.staffing-overview {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.2rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fffefa;
}

.staffing-head,
.staffing-axis,
.staffing-row {
    display: grid;
    grid-template-columns: 7rem minmax(14rem, 1fr);
    gap: 0.8rem;
    align-items: center;
}

.staffing-head {
    display: flex;
    justify-content: space-between;
}

.staffing-head h3 {
    margin-bottom: 0;
}

.staffing-head span {
    justify-self: end;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.staffing-axis {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.staffing-axis span:first-child {
    grid-column: 2;
}

.staffing-axis span:last-child {
    grid-column: 2;
    justify-self: end;
}

.staffing-label {
    color: var(--ink);
    font-weight: 900;
}

.staffing-track {
    position: relative;
    height: 3rem;
    min-width: 14rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(90deg, rgba(228, 221, 211, 0.9) 1px, transparent 1px) 0 0 / calc(100% / var(--timeline-hours, 4)) 100%,
        #f4f1ec;
}

.staffing-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0.7rem;
    overflow: hidden;
    padding: 0 0.5rem;
    color: #45230d;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.staffing-segment strong,
.staffing-segment small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.staffing-segment small {
    font-weight: 800;
    opacity: 0.82;
}

.staffing-level-0 {
    background: transparent;
}

.staffing-level-1 {
    background: #ffd85c;
}

.staffing-level-2 {
    background: #ffb23f;
}

.staffing-level-3 {
    background: #f2772f;
    color: white;
}

.staffing-level-4 {
    background: #d83b2d;
    color: white;
}

.staffing-level-5 {
    background: #961f1f;
    color: white;
}

.print-only {
    display: none;
}

.day-print-roster {
    margin-top: 1rem;
}

.day-print-roster h3 {
    margin-bottom: 0.65rem;
}

.day-print-roster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.day-print-roster-item {
    min-height: 3.1rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffefa;
}

.day-print-roster-item strong,
.day-print-roster-item span {
    display: block;
}

.day-print-roster-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-print-roster-item span {
    margin-top: 0.18rem;
    color: var(--muted);
    font-weight: 850;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.timeline-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #faf8f5;
}

.timeline-head,
.timeline-axis {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.timeline-head h3 {
    margin-bottom: 0;
}

.timeline-head span,
.timeline-axis {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.timeline-track {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.timeline-axis {
    padding-left: 8rem;
}

.timeline-lane {
    display: grid;
    grid-template-columns: 7.25rem minmax(14rem, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-height: 2.55rem;
}

.timeline-label {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-bar-wrap {
    position: relative;
    height: 2.35rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(228, 221, 211, 0.8) 1px, transparent 1px) 0 0 / calc(100% / var(--timeline-hours, 4)) 100%,
        #fffefa;
}

.timeline-bar {
    position: absolute;
    top: 0.28rem;
    bottom: 0.28rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 2.6rem;
    overflow: hidden;
    padding: 0 0.55rem;
    border-radius: 10px;
    color: white;
    font-size: 0.74rem;
    font-weight: 850;
    white-space: nowrap;
}

.timeline-bar strong,
.timeline-bar small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-bar small {
    opacity: 0.88;
    font-weight: 750;
}

.timeline-available {
    background: var(--green);
}

.timeline-maybe {
    background: var(--yellow);
}

.timeline-assigned {
    background: var(--blue);
}

.availability-row,
.assignment-row,
.hours-row,
.history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.78rem 0.9rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fffefa;
}

.availability-row em,
.availability-row small,
.assignment-row small,
.hours-row small,
.history-row small {
    display: block;
    color: var(--muted);
    margin-top: 0.2rem;
    font-style: normal;
}

.hours-entry-form {
    grid-template-columns: 0.85fr 0.6fr 0.6fr 0.6fr 0.6fr 1.15fr auto;
}

.manager-add-hours-form {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: 16px;
    background: #faf8f5;
}

.form-hint {
    margin: 0.9rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.month-filter {
    display: flex;
    align-items: end;
    gap: 0.55rem;
}

.month-filter label {
    min-width: 11rem;
}

.month-archive {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.month-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fffefa;
    color: var(--ink);
    font-weight: 850;
}

.month-chip:hover,
.month-chip.active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    text-decoration: none;
}

.employee-month-list {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.employee-month-list h3 {
    margin-bottom: 0.65rem;
}

.print-actions {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.summary-strip div {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffefa;
}

.summary-strip span {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 900;
}

.summary-strip small,
.history-row span,
.hours-row span {
    display: block;
    color: var(--muted);
}

.hours-row > span {
    color: var(--brand-strong);
    font-size: 1.15rem;
    font-weight: 900;
    white-space: nowrap;
}

.hours-row-pause-warning {
    border-color: rgba(109, 63, 179, 0.28);
    background: #f1e9ff;
}

.hours-row-overlimit {
    border-color: rgba(179, 49, 49, 0.28);
    background: var(--red-soft);
}

.work-warning-note {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
}

.work-warning-note.pause {
    background: rgba(109, 63, 179, 0.12);
    color: #6d3fb3;
}

.work-warning-note.overlimit {
    background: rgba(179, 49, 49, 0.12);
    color: var(--red);
}

.manager-adjusted-note {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.3rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: rgba(164, 106, 0, 0.1);
    color: var(--yellow);
    font-size: 0.74rem;
    font-weight: 850;
}

.history-actor {
    color: var(--ink);
    font-weight: 900;
}

.history-actor.manager {
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    background: var(--yellow-soft);
    color: var(--yellow);
}

.hours-row-editable {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.entry-edit-panel {
    grid-column: 1 / -1;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(228, 221, 211, 0.7);
}

.entry-edit-panel summary {
    cursor: pointer;
    color: var(--brand);
    font-size: 0.86rem;
    font-weight: 900;
}

.hours-edit-form {
    display: grid;
    grid-template-columns: 0.65fr 0.65fr 0.65fr 0.65fr 1.2fr auto;
    gap: 0.65rem;
    align-items: end;
    margin-top: 0.75rem;
}

.history-panel {
    margin-top: 1rem;
    border-top: 1px solid var(--line);
    padding-top: 0.9rem;
}

.history-panel summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 900;
}

.history-list {
    margin-top: 0.85rem;
    max-height: 108rem;
    overflow-y: auto;
    padding-right: 0.3rem;
    overscroll-behavior: contain;
}

.history-row {
    align-items: flex-start;
    justify-content: flex-start;
    background: #faf8f5;
    box-shadow: none;
}

.status-available {
    border-color: rgba(31, 138, 91, 0.22);
    background: var(--green-soft);
}

.status-maybe {
    border-color: rgba(164, 106, 0, 0.22);
    background: var(--yellow-soft);
}

.status-unavailable {
    border-color: rgba(179, 49, 49, 0.18);
    background: var(--red-soft);
}

.status-open {
    background: #f4f1ec;
}

.plan-columns .quiet-list {
    gap: 0.4rem;
}

.plan-columns .availability-list,
.plan-columns .assignment-list {
    max-height: calc((3.1rem * 5) + (0.4rem * 4));
    overflow-y: auto;
    padding-right: 0.25rem;
    overscroll-behavior: contain;
}

.plan-columns .quiet-list .availability-row,
.plan-columns .quiet-list .assignment-row {
    min-height: 3.1rem;
    padding: 0.52rem 0.65rem;
    border-radius: 10px;
    border-color: rgba(228, 221, 211, 0.8);
    background: rgba(255, 254, 250, 0.72);
    box-shadow: none;
}

.plan-columns .quiet-list .availability-row strong,
.plan-columns .quiet-list .assignment-row strong {
    font-size: 0.92rem;
}

.plan-columns .quiet-list .availability-row span,
.plan-columns .quiet-list .assignment-row span,
.plan-columns .quiet-list .availability-row small,
.plan-columns .quiet-list .availability-row em,
.plan-columns .quiet-list .assignment-row small {
    margin-top: 0.05rem;
    font-size: 0.82rem;
}

.plan-columns .quiet-list .availability-row.status-available {
    border-left: 4px solid rgba(31, 138, 91, 0.55);
    background: rgba(228, 246, 237, 0.38);
}

.plan-columns .quiet-list .availability-row.status-maybe {
    border-left: 4px solid rgba(164, 106, 0, 0.5);
    background: rgba(255, 242, 199, 0.38);
}

.plan-columns .quiet-list .availability-row.status-unavailable {
    border-left: 4px solid rgba(179, 49, 49, 0.42);
    background: rgba(255, 226, 226, 0.3);
}

.plan-columns .quiet-list .availability-row.status-open {
    border-left: 4px solid rgba(101, 114, 127, 0.28);
    background: rgba(244, 241, 236, 0.45);
}

.assign-form {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: #faf8f5;
}

.employee-day-card {
    padding: 1rem;
}

.employee-inputs {
    grid-template-columns: 1fr 0.7fr 0.7fr 1.4fr;
    margin-top: 0.9rem;
}

.sticky-save {
    position: sticky;
    bottom: 1rem;
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.empty {
    text-align: center;
    padding: 2rem 1rem;
}

.empty h2,
.empty h3 {
    margin-bottom: 0.4rem;
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1rem 2rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--muted);
}

.legal-text pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font: inherit;
    line-height: 1.65;
    color: var(--ink);
}

@media (max-width: 900px) {
    .topbar,
    .hero,
    .page-head,
    .card-head,
    .plan-head,
    .day-row,
    .edit-day-title,
    .employee-day-head {
        align-items: stretch;
        flex-direction: column;
    }

    .grid.two,
    .stats,
    .inline-form,
    .hours-entry-form,
    .hours-edit-form,
    .timeline-grid,
    .form-grid,
    .form-grid.compact-grid,
    .weekday-grid,
    .employee-inputs,
    .split {
        grid-template-columns: 1fr;
    }

    .edit-day-card {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.4rem;
    }

    .nav {
        width: 100%;
    }

    .nav a {
        flex: 1 1 auto;
        justify-content: center;
    }

    .copy-field {
        min-width: 220px;
    }

    .sticky-save {
        justify-content: stretch;
    }

    .sticky-save .btn {
        width: 100%;
    }

    .staffing-overview {
        overflow-x: auto;
    }

    .timeline-panel {
        overflow-x: auto;
    }

    .month-filter {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .print-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .summary-strip {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        margin: 12mm;
    }

    body {
        background: white;
    }

    .topbar,
    .site-footer,
    .messages,
    .no-print {
        display: none !important;
    }

    .container {
        width: 100%;
        padding: 0;
    }

    body.print-single-day .planning-list {
        display: block;
    }

    body.print-single-day .plan-card {
        display: none;
    }

    body.print-single-day .plan-card.print-target {
        display: block;
    }

    .page-head,
    .card,
    .plan-card {
        box-shadow: none;
    }

    .plan-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border-color: #d8d2c8;
        border-radius: 10px;
    }

    .plan-columns {
        display: none;
    }

    .print-only {
        display: block;
    }

    .staffing-overview {
        border-color: #d8d2c8;
        border-radius: 10px;
        background: white;
    }

    .staffing-track {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .staffing-segment,
    .day-print-roster-item {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .day-print-roster-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .card {
        break-inside: avoid;
        border-color: #d8d2c8;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}
