:root {
    --green: #0f3d2e;
    --green-soft: #e9f1ee;
    --ink: #1f2933;
    --muted: #717b86;
    --line: #e8ecef;
    --page: #f6f8f7;
    --white: #ffffff;
    --shadow: 0 18px 48px rgba(20, 35, 31, .08);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    overflow-x: hidden;
}

body.theme-administration {
    --green: #7a1f1f;
    --green-soft: #f4eaea;
    --shadow: 0 18px 48px rgba(70, 24, 24, .08);
}

body.theme-haccp {
    --green: #123f63;
    --green-soft: #eaf1f6;
    --shadow: 0 18px 48px rgba(18, 63, 99, .08);
}

body.theme-reservations {
    --green: #0f5f5a;
    --green-soft: #e8f4f3;
    --shadow: 0 18px 48px rgba(15, 95, 90, .08);
}

body.theme-superadmin {
    --green: #051530;
    --green-soft: #edf3fb;
    --page: #f6f8fb;
    --shadow: 0 18px 48px rgba(5, 21, 48, .08);
}

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

img,
svg,
video {
    max-width: 100%;
}

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

textarea {
    resize: vertical;
}

.shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: var(--white);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 750;
    font-size: 20px;
    min-width: 0;
    width: 100%;
}

.brand.has-logo {
    display: block;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: var(--green);
    color: var(--white);
    font-weight: 800;
}

.brand-logo {
    display: block;
    height: auto;
    max-height: 70px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
    width: 100%;
}

.brand.default-logo .brand-logo {
    max-height: 54px;
}

.login-logo {
    max-height: 82px;
    width: min(100%, 290px);
}

.nav {
    display: grid;
    gap: 8px;
    margin-top: 34px;
    align-content: start;
    flex: 1;
}

.area-switcher {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-top: 24px;
    padding: 12px;
}

.area-switcher label {
    display: grid;
    gap: 8px;
}

.area-switcher span {
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.area-switcher select {
    appearance: none;
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%230f3d2e' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 18px;
    border-color: rgba(15, 61, 46, .14);
    border-radius: 12px;
    color: var(--ink);
    font-weight: 750;
    min-height: 42px;
    padding: 9px 42px 9px 12px;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.area-switcher select:focus {
    border-color: rgba(15, 61, 46, .38);
    box-shadow: 0 0 0 4px rgba(15, 61, 46, .08);
    outline: none;
}

.theme-administration .area-switcher select {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%237a1f1f' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    border-color: rgba(122, 31, 31, .18);
}

.theme-administration .area-switcher select:focus {
    border-color: rgba(122, 31, 31, .42);
    box-shadow: 0 0 0 4px rgba(122, 31, 31, .08);
}

.theme-haccp .area-switcher select {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23123f63' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    border-color: rgba(18, 63, 99, .18);
}

.theme-haccp .area-switcher select:focus {
    border-color: rgba(18, 63, 99, .42);
    box-shadow: 0 0 0 4px rgba(18, 63, 99, .08);
}

.theme-reservations .area-switcher select {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%230f5f5a' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    border-color: rgba(15, 95, 90, .18);
}

.theme-reservations .area-switcher select:focus {
    border-color: rgba(15, 95, 90, .42);
    box-shadow: 0 0 0 4px rgba(15, 95, 90, .08);
}

.theme-superadmin .area-switcher select {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23051530' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    border-color: rgba(5, 21, 48, .18);
}

.theme-superadmin .area-switcher select:focus {
    border-color: rgba(5, 21, 48, .42);
    box-shadow: 0 0 0 4px rgba(5, 21, 48, .08);
}

.nav a {
    border-radius: 12px;
    color: var(--muted);
    padding: 12px 14px;
}

.nav a:hover,
.nav a.active {
    background: var(--green-soft);
    color: var(--green);
}

.nav-divider {
    border-top: 1px solid var(--line);
    display: block;
    margin: 12px 0 4px;
}

.sidebar-logout {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 16px;
}

.sidebar-logout-button {
    align-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--green);
    cursor: pointer;
    display: inline-flex;
    font-weight: 750;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    width: 100%;
}

.sidebar-logout-button:hover {
    background: var(--green-soft);
}

.main {
    min-width: 0;
    padding: 24px 32px 48px;
}

.mobile-bar,
.mobile-menu-button,
.mobile-menu-backdrop {
    display: none;
}

.topbar {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.list-toolbar {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.list-search-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    width: min(100%, 560px);
}

.list-search {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    max-width: 360px;
    padding: 14px 20px;
    width: 100%;
}

.list-search::placeholder {
    color: var(--muted);
}

.topbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.avatar {
    display: inline-grid;
    place-items: center;
    background: var(--green-soft);
    color: var(--green);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-weight: 750;
}

.notification-link {
    align-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--green);
    display: inline-flex;
    font-weight: 800;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    position: relative;
}

.notification-link strong {
    background: var(--green);
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    min-width: 20px;
    padding: 2px 6px;
    text-align: center;
}

.page-head {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-head > div {
    min-width: 0;
}

.eyebrow {
    color: var(--green);
    font-weight: 700;
    margin: 0 0 6px;
}

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

h1 {
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1;
    margin-bottom: 8px;
}

h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

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

.btn {
    align-items: center;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
}

.btn:disabled {
    cursor: wait;
    opacity: .72;
}

.button-spinner {
    animation: spin .75s linear infinite;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    display: inline-block;
    height: 16px;
    width: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-primary {
    background: var(--green);
    color: var(--white);
}

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

.btn-danger {
    background: #fde8e8;
    border: 1px solid rgba(138, 31, 31, .18);
    color: #8a1f1f;
}

.icon-button {
    font-size: 20px;
    font-weight: 850;
    min-height: 42px;
    padding: 0;
    width: 42px;
}

.danger-zone {
    align-items: center;
    border-color: rgba(138, 31, 31, .18);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.btn-wide {
    width: 100%;
}

.metrics {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.metric,
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.metric {
    display: grid;
    gap: 14px;
    padding: 22px;
}

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

.metric strong {
    color: var(--green);
    font-size: 34px;
}

.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-grid {
    align-items: stretch;
}

.card {
    padding: 22px;
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.card-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

.section-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.reservation-hours-section {
    display: grid;
    gap: 14px;
}

.reservation-day-tabs {
    display: grid;
    gap: 14px;
}

.reservation-day-tab-list {
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    border-radius: 18px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 8px;
}

.reservation-day-tab {
    background: transparent;
    border: 0;
    border-radius: 14px;
    color: var(--muted);
    cursor: pointer;
    display: grid;
    gap: 3px;
    min-height: 58px;
    padding: 8px;
    text-align: center;
}

.reservation-day-tab span {
    color: inherit;
    font-size: 14px;
    font-weight: 850;
}

.reservation-day-tab small {
    color: inherit;
    font-size: 11px;
    font-weight: 800;
}

.reservation-day-tab.is-active {
    background: var(--green);
    color: var(--white);
}

.reservation-day-tab:not(.is-active):hover {
    background: var(--green-soft);
    color: var(--green);
}

.reservation-day-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
    padding: 18px;
}

.reservation-day-card[hidden] {
    display: none;
}

.reservation-day-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
}

.reservation-day-head strong {
    color: var(--green);
    font-size: 22px;
}

.reservation-day-head p {
    margin: 4px 0 0;
}

.reservation-day-state {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.reservation-day-state > span:not(.reservation-toggle) {
    background: var(--green-soft);
    border-radius: 999px;
    color: var(--green);
    font-size: 12px;
    font-weight: 850;
    padding: 6px 10px;
}

.reservation-toggle {
    align-items: center;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--green);
    cursor: default;
    display: inline-flex;
    gap: 8px;
    padding: 0;
}

button.reservation-toggle {
    cursor: pointer;
}

button.reservation-toggle:disabled {
    opacity: .72;
}

.reservation-toggle i,
.reservation-toggle strong {
    pointer-events: none;
}

.reservation-toggle i {
    background: #d9dee6;
    border-radius: 999px;
    display: inline-flex;
    height: 26px;
    position: relative;
    width: 50px;
}

.reservation-toggle i::after {
    background: #7f8b9a;
    border-radius: 999px;
    content: "";
    height: 20px;
    left: 4px;
    position: absolute;
    top: 3px;
    transition: transform .18s ease, background .18s ease;
    width: 20px;
}

.reservation-toggle strong {
    font-size: 15px;
    font-weight: 850;
}

.reservation-toggle.is-open i::after {
    background: var(--green);
    transform: translateX(22px);
}

.reservation-toggle.is-closed {
    color: var(--muted);
}

.reservation-day-empty {
    align-items: center;
    background: #f9fbfa;
    border: 1px dashed var(--line);
    border-radius: 14px;
    display: flex;
    min-height: 58px;
    padding: 12px;
}

.reservation-day-slots {
    display: grid;
    gap: 10px;
}

.reservation-day-slot {
    align-items: center;
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.reservation-day-slot div {
    display: grid;
    gap: 3px;
}

.reservation-day-slot strong {
    color: var(--ink);
}

.reservation-day-slot span {
    color: var(--muted);
    font-size: 14px;
}

.reservation-day-form {
    align-items: end;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    padding-top: 14px;
}

.reservation-day-form label {
    color: var(--ink);
    display: grid;
    font-weight: 800;
    gap: 8px;
}

.reservation-day-form input {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    font-size: 16px;
    min-height: 46px;
    padding: 0 12px;
    width: 100%;
}

.reservation-day-form .btn {
    min-height: 46px;
}

.row-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.pill {
    background: var(--green-soft);
    border: 1px solid rgba(15, 61, 46, .12);
    border-radius: 999px;
    color: var(--green);
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
    white-space: nowrap;
}

.icon-pill {
    align-items: center;
    border-color: rgba(15, 61, 46, .16);
    cursor: pointer;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.icon-pill svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 17px;
}

.icon-pill-danger {
    background: #fde8e8;
    border-color: rgba(153, 27, 27, .18);
    color: #991b1b;
}

.row-actions form {
    margin: 0;
}

.text-link {
    color: var(--green);
    font-weight: 800;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.pill.deadline-green {
    background: #e9f1ee;
    border-color: rgba(15, 61, 46, .18);
    color: #0f3d2e;
}

.pill.deadline-yellow {
    background: #fff5d6;
    border-color: rgba(128, 96, 0, .18);
    color: #806000;
}

.pill.pill-warning {
    background: #fff5d6;
    border-color: rgba(128, 96, 0, .18);
    color: #806000;
}

.pill.success {
    background: #e9f1ee;
    border-color: rgba(15, 61, 46, .18);
    color: #0f3d2e;
}

.pill.danger {
    background: #fde8e8;
    border-color: rgba(153, 27, 27, .18);
    color: #991b1b;
}

.pill.deadline-red {
    background: #fde8e8;
    border-color: rgba(153, 27, 27, .18);
    color: #991b1b;
}

.public-booking-page {
    background: linear-gradient(180deg, #f5faf9 0%, #ffffff 100%);
}

.public-booking-shell {
    margin: 0 auto;
    max-width: 760px;
    padding: 28px 16px 64px;
}

.public-booking-head {
    margin-bottom: 18px;
    padding: 4px 2px;
}

.public-booking-head h1 {
    font-size: clamp(34px, 9vw, 54px);
    letter-spacing: 0;
}

.booking-stepper {
    display: grid;
    gap: 14px;
}

.booking-progress {
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 8px;
    position: sticky;
    top: 10px;
    z-index: 4;
}

.booking-progress span {
    align-items: center;
    border-radius: 12px;
    color: var(--muted);
    display: flex;
    font-size: 13px;
    font-weight: 800;
    justify-content: center;
    min-height: 38px;
    padding: 0 8px;
    text-align: center;
}

.booking-progress span.is-active {
    background: var(--green);
    color: var(--white);
}

.booking-progress span.is-complete {
    background: var(--green-soft);
    color: var(--green);
}

.booking-step-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.booking-step-card[hidden] {
    display: none;
}

.booking-step-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.booking-step-heading > span {
    color: var(--green);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.booking-step-heading h2 {
    font-size: clamp(26px, 7vw, 36px);
    line-height: 1.04;
    margin: 0;
}

.booking-step-form,
.booking-form-grid {
    display: grid;
    gap: 14px;
}

.booking-field {
    color: var(--ink);
    display: grid;
    font-weight: 800;
    gap: 8px;
}

.booking-field input,
.booking-field select,
.booking-field textarea {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    font-size: 16px;
    min-height: 54px;
    padding: 0 15px;
    width: 100%;
}

.booking-field textarea {
    min-height: 100px;
    padding-top: 14px;
}

.booking-field input:focus,
.booking-field textarea:focus {
    border-color: rgba(15, 61, 46, .36);
    box-shadow: 0 0 0 4px rgba(15, 61, 46, .08);
    outline: none;
}

.booking-counter {
    align-items: stretch;
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    min-height: 58px;
    overflow: hidden;
}

.booking-counter button {
    background: var(--white);
    border: 0;
    color: var(--green);
    cursor: pointer;
    font-size: 24px;
    font-weight: 850;
}

.booking-counter input {
    background: transparent;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    border-right: 1px solid var(--line);
    font-size: 22px;
    font-weight: 850;
    text-align: center;
}

.booking-main-action {
    margin-top: 4px;
}

.booking-calendar-head {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 46px 1fr 46px;
    margin-bottom: 14px;
    text-align: center;
}

.booking-calendar-head strong {
    font-size: 20px;
}

.booking-calendar-head .btn {
    font-size: 26px;
    font-weight: 850;
    min-height: 46px;
    padding: 0;
}

.booking-calendar-form {
    display: grid;
    gap: 10px;
}

.booking-calendar-weekdays,
.booking-calendar-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.booking-calendar-weekdays span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-align: center;
}

.booking-calendar-empty {
    min-height: 64px;
}

.booking-calendar-day {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    cursor: pointer;
    display: grid;
    gap: 3px;
    min-height: 68px;
    padding: 9px 4px;
    text-align: center;
}

.booking-calendar-day strong {
    font-size: 20px;
}

.booking-calendar-day small {
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
}

.booking-calendar-day.today {
    border-color: rgba(15, 61, 46, .34);
}

.booking-calendar-day.selected,
.booking-calendar-day:hover:not(:disabled) {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
}

.booking-calendar-day.selected small,
.booking-calendar-day:hover:not(:disabled) small {
    color: var(--white);
}

.booking-calendar-day:disabled {
    background: #f1f3f3;
    color: #a2abb3;
    cursor: not-allowed;
    opacity: .78;
}

.booking-calendar-day:disabled small {
    color: #a2abb3;
}

.booking-slots {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.booking-slot {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 16px;
    cursor: pointer;
    display: grid;
    gap: 4px;
    min-height: 82px;
    padding: 16px;
}

.booking-slot input {
    position: absolute;
    opacity: 0;
}

.booking-slot:has(input:checked) {
    background: var(--green-soft);
    border-color: rgba(15, 61, 46, .28);
    box-shadow: 0 0 0 4px rgba(15, 61, 46, .06);
    color: var(--green);
}

.booking-slots.needs-selection {
    animation: nudge .2s ease-in-out 2;
}

@keyframes nudge {
    50% {
        transform: translateX(4px);
    }
}

.booking-slot.disabled {
    cursor: not-allowed;
    opacity: .48;
}

.booking-slot span {
    font-size: 21px;
    font-weight: 850;
}

.booking-slot small {
    color: var(--muted);
}

.public-cancel-form {
    border-top: 1px solid var(--line);
    margin-top: 22px;
    padding-top: 18px;
}

.booking-step-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1.4fr;
    margin-top: 18px;
}

.booking-summary {
    background: var(--green-soft);
    border: 1px solid rgba(15, 61, 46, .12);
    border-radius: 14px;
    color: var(--green);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

.booking-summary span,
.booking-summary strong {
    background: var(--white);
    border-radius: 999px;
    padding: 6px 10px;
}

.booking-empty-state {
    background: #f9fbfa;
    border: 1px dashed var(--line);
    border-radius: 16px;
    padding: 18px;
}

.bars {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(12, minmax(42px, 1fr));
    height: 240px;
    overflow-x: auto;
    padding-top: 20px;
}

.mobile-hours-title,
.mobile-month-hours {
    display: none;
}

.bar-item {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-rows: 24px 1fr 20px;
    height: 100%;
    min-width: 42px;
    text-align: center;
}

.bar-value {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.bar-track {
    align-items: end;
    background: #f0f4f2;
    border-radius: 12px 12px 4px 4px;
    display: flex;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

.bar-fill {
    background: linear-gradient(180deg, var(--green), #204f40);
    border-radius: 12px 12px 4px 4px;
    display: block;
    min-height: 4px;
    width: 100%;
}

.bar-item strong {
    color: var(--muted);
    font-size: 12px;
}

.quick-actions,
.list {
    display: grid;
    gap: 12px;
}

.quick,
.list-item,
.mini-card {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
}

.mini-card {
    display: grid;
    gap: 6px;
}

.mini-card span,
.course-check small,
.course-extra span {
    color: var(--muted);
    font-size: 13px;
}

.quick.primary {
    background: var(--green);
    color: var(--white);
}

.table {
    display: grid;
    min-width: 0;
}

.table-row {
    align-items: center;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 14px;
    grid-template-columns: 1.2fr 1fr 1fr auto;
    min-width: 0;
    padding: 14px 0;
}

.table-row > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.is-filtered-out {
    display: none !important;
}

.table-row:first-child {
    border-top: 0;
}

.table-row.four {
    grid-template-columns: 1.4fr .8fr .8fr 1.4fr;
}

.table-row.five {
    grid-template-columns: 1.2fr 1fr .9fr .8fr auto;
}

.table-row.six {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto;
}

.settings-table {
    margin-top: 18px;
}

.document-preview {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: block;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
    width: 100%;
}

.document-reader {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    height: min(72vh, 820px);
    margin-bottom: 18px;
    overflow: auto;
}

.document-reader.compact {
    height: 520px;
}

.document-reader iframe {
    border: 0;
    display: block;
    height: 1200px;
    min-height: 100%;
    width: 100%;
}

.read-confirmation {
    background: var(--green-soft);
    border: 1px solid rgba(15, 61, 46, .12);
    border-radius: 14px;
    padding: 16px;
}

.read-confirmation:not(.is-readable) {
    background: #f9fbfa;
}

.target-panel[hidden] {
    display: none;
}

.recipe-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-card-image,
.recipe-hero-image {
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
}

.recipe-hero-image {
    max-height: 360px;
}

.recipe-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-meta.large {
    gap: 12px;
    margin: 18px 0 24px;
}

.recipe-meta span {
    background: var(--green-soft);
    border-radius: 999px;
    padding: 6px 10px;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-builder,
.recipe-builder-list {
    display: grid;
    gap: 12px;
}

.recipe-section-head {
    margin-top: 18px;
}

.recipe-builder-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(90px, .8fr) minmax(90px, .8fr) minmax(180px, 1.6fr) minmax(150px, 1.4fr) auto;
}

.recipe-step-row {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.recipe-scale-controls {
    align-items: center;
    background: var(--green-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    gap: 10px;
    margin-top: 18px;
    padding: 10px;
}

.recipe-scale-controls > div {
    display: grid;
    min-width: 92px;
}

.recipe-scale-controls strong {
    font-size: 26px;
}

.recipe-steps {
    display: grid;
    gap: 12px;
    padding-left: 24px;
}

.recipe-steps li {
    line-height: 1.55;
}

.recipe-detail h2 {
    margin-top: 26px;
}

.recipe-page-form,
.recipe-form {
    display: grid;
    gap: 18px;
}

.recipe-form-section {
    display: grid;
    gap: 18px;
}

.recipe-form-section .form-grid {
    margin-top: 0;
}

.recipe-add-row {
    display: flex;
    justify-content: flex-start;
}

.recipe-combobox {
    display: grid;
    gap: 8px;
    min-width: 0;
    position: relative;
}

.recipe-chip-editor {
    align-items: center;
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 48px;
    padding: 7px;
    position: relative;
}

.recipe-chip-editor:focus-within {
    border-color: rgba(18, 63, 99, .35);
    box-shadow: 0 0 0 4px rgba(18, 63, 99, .08);
}

.recipe-chip-editor input {
    background: transparent;
    border: 0;
    box-shadow: none;
    flex: 1 1 220px;
    min-height: 32px;
    min-width: 160px;
    padding: 4px;
}

.recipe-chip-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-chip {
    align-items: center;
    background: var(--green-soft);
    border: 1px solid rgba(18, 63, 99, .14);
    border-radius: 999px;
    color: var(--green);
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 6px;
    min-height: 32px;
    padding: 5px 8px 5px 10px;
}

.recipe-chip button {
    align-items: center;
    background: rgba(18, 63, 99, .1);
    border: 0;
    border-radius: 999px;
    color: var(--green);
    cursor: pointer;
    display: inline-flex;
    font-size: 15px;
    font-weight: 900;
    height: 20px;
    justify-content: center;
    padding: 0;
    width: 20px;
}

.recipe-suggestions {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(20, 35, 31, .12);
    display: grid;
    gap: 4px;
    left: 0;
    max-height: 260px;
    overflow: auto;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
}

.recipe-suggestions[hidden] {
    display: none;
}

.recipe-suggestion,
.recipe-suggestion-empty {
    background: #fbfcfc;
    border: 0;
    border-radius: 9px;
    color: var(--ink);
    display: grid;
    gap: 2px;
    padding: 10px;
    text-align: left;
    width: 100%;
}

.recipe-suggestion {
    cursor: pointer;
}

.recipe-suggestion:hover,
.recipe-suggestion:focus {
    background: var(--green-soft);
    outline: none;
}

.recipe-suggestion span,
.recipe-suggestion-empty span {
    color: var(--muted);
    font-size: 13px;
}

.recipe-suggestion-empty a {
    color: var(--green);
    font-weight: 850;
    margin-top: 4px;
}

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

.muted.compact {
    font-size: 13px;
    margin: 0;
}

.recipe-import-list {
    display: grid;
    gap: 14px;
}

.recipe-import-row {
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1.4fr) minmax(160px, .8fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(100px, .55fr) minmax(100px, .55fr);
    padding: 14px;
}

.recipe-import-row .wide {
    grid-column: 1 / -1;
}

.document-pages {
    display: grid;
    gap: 22px;
}

.document-page {
    margin: 0;
}

.document-page figcaption {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.selectable-pages .document-page figcaption {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.compact-check {
    color: #991b1b;
    font-size: 13px;
    font-weight: 800;
    text-transform: none;
}

.amount-field {
    display: grid;
    gap: 10px;
}

.amount-field input[data-pos-amount-input] {
    font-weight: 800;
}

.amount-missing-check {
    color: var(--muted);
    justify-content: flex-start;
}

.amount-field.amount-is-missing input[data-pos-amount-input] {
    background: #f2f4f4;
    color: var(--muted);
}

.quick-document-list {
    display: grid;
    gap: 10px;
}

.quick-document-row {
    align-items: end;
    background: #f7faf9;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, .8fr) auto;
    padding: 12px;
}

.quick-document-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-preview-modal {
    min-width: min(900px, calc(100vw - 28px));
}

.document-preview-frame {
    background: #f4f7f6;
    border: 1px solid var(--line);
    border-radius: 14px;
    min-height: 60vh;
    overflow: hidden;
}

.document-preview-frame iframe,
.document-preview-frame img {
    border: 0;
    display: block;
    height: 60vh;
    object-fit: contain;
    width: 100%;
}

.bulk-drop-form {
    display: grid;
    gap: 18px;
}

.bulk-drop-area {
    align-items: center;
    background: #f7faf9;
    border: 1px dashed rgba(15, 61, 46, .35);
    border-radius: 18px;
    cursor: pointer;
    display: grid;
    gap: 8px;
    justify-items: center;
    min-height: 220px;
    padding: 28px;
    text-align: center;
}

.bulk-drop-area span {
    color: var(--green);
    font-size: 22px;
    font-weight: 900;
    text-transform: none;
}

.bulk-drop-area small {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    text-transform: none;
}

.bulk-drop-area input {
    max-width: 420px;
}

.bulk-document-workspace {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(320px, .9fr) minmax(0, 1.4fr);
}

.bulk-document-list {
    display: grid;
    gap: 10px;
}

.bulk-document-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(18, 38, 32, .06);
    overflow: hidden;
}

.bulk-document-item summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    list-style: none;
    padding: 16px;
}

.bulk-document-item summary::-webkit-details-marker {
    display: none;
}

.bulk-document-item summary strong {
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bulk-document-item summary span {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.bulk-document-item.is-done {
    opacity: .56;
}

.bulk-document-item > .text-link,
.bulk-assignment-form {
    margin: 0 16px 16px;
}

.bulk-document-preview {
    min-height: calc(100vh - 220px);
    position: sticky;
    top: 18px;
}

.bulk-document-preview iframe {
    background: #f4f7f6;
    border: 1px solid var(--line);
    border-radius: 14px;
    height: min(76vh, 820px);
    width: 100%;
}

.legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

.filter-card {
    margin-bottom: 18px;
}

.filter-actions {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.time-entry-edit-form {
    display: contents;
}

.time-entry-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.pagination {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 16px;
}

.pagination-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    color: var(--muted);
    font-size: 14px;
}

.announcement-list {
    display: grid;
    gap: 14px;
}

.announcement-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.announcement-item.unread {
    border-color: rgba(15, 61, 46, .24);
    background: var(--green-soft);
}

.announcement-body {
    line-height: 1.6;
    white-space: pre-line;
}

.announcement-actions {
    align-items: center;
    display: flex;
    justify-content: flex-end;
}

.btn.disabled {
    opacity: .45;
    pointer-events: none;
}

.period-switcher {
    align-items: center;
    display: flex;
    gap: 12px;
}

.period-title {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    display: grid;
    min-width: 220px;
    padding: 10px 16px;
    text-align: center;
}

.period-title strong {
    color: var(--green);
    font-size: 18px;
}

.period-title span {
    color: var(--muted);
    font-size: 13px;
}

.attendance-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: space-between;
    margin: -8px 0 18px;
}

.attendance-card {
    padding: 0;
}

.attendance-scroll {
    overflow-x: auto;
}

.attendance-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 920px;
    width: 100%;
}

.attendance-table th,
.attendance-table td {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 14px 12px;
    text-align: center;
    white-space: nowrap;
}

.attendance-table thead th {
    background: #f9fbfa;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.attendance-table thead th span,
.attendance-table .employee-col span {
    display: block;
    font-size: 12px;
    font-weight: 650;
}

.attendance-table thead th strong {
    color: var(--ink);
    display: block;
    font-size: 18px;
    margin-top: 4px;
}

.attendance-table .employee-col {
    left: 0;
    min-width: 220px;
    position: sticky;
    text-align: left;
    z-index: 1;
}

.attendance-table tbody .employee-col {
    background: var(--white);
}

.attendance-table thead .employee-col {
    background: #f9fbfa;
    z-index: 2;
}

.attendance-table th.today {
    background: var(--green-soft);
    color: var(--green);
}

.attendance-table td.has-hours {
    color: var(--green);
    font-weight: 800;
}

.attendance-table td.rest-cell {
    background: #f9fbfa;
    color: var(--muted);
    font-weight: 800;
}

.attendance-table td.absence-cell {
    font-weight: 900;
}

.attendance-table td.absence-vacation {
    background: #e9f1ee;
    color: #0f3d2e;
}

.attendance-table td.absence-leave {
    background: #fff5d6;
    color: #806000;
}

.attendance-table td.absence-sick {
    background: #fde8e8;
    color: #8a1f1f;
}

.attendance-table td.absence-other {
    background: #eef2f7;
    color: #394452;
}

.attendance-table td.availability-cell {
    background:
        linear-gradient(135deg, transparent 49%, rgba(153, 27, 27, .45) 50%, transparent 51%),
        #fff;
    color: #991b1b;
    font-weight: 900;
    overflow: hidden;
    position: relative;
}

.attendance-table td.availability-cell::before,
.attendance-table td.availability-cell::after {
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.attendance-table td.availability-lunch::before {
    background: linear-gradient(135deg, rgba(220, 38, 38, .28) 0 49%, transparent 50%);
}

.attendance-table td.availability-dinner::after {
    background: linear-gradient(135deg, transparent 50%, rgba(220, 38, 38, .28) 51% 100%);
}

.attendance-table .total-cell {
    background: var(--green-soft);
    color: var(--green);
    font-weight: 900;
}

.shifts-table {
    min-width: 980px;
}

.shift-time-input {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--green);
    font: inherit;
    font-weight: 850;
    max-width: 96px;
    padding: 9px 8px;
    text-align: center;
}

.shift-time-group {
    align-items: center;
    display: inline-grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(82px, 1fr));
    justify-content: center;
}

.shift-time-input:focus {
    border-color: var(--green);
    outline: 2px solid rgba(15, 61, 46, .12);
}

.shift-block-marker,
.shift-availability-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    min-width: 28px;
    position: relative;
    z-index: 1;
}

.shift-block-marker {
    margin-bottom: 4px;
}

.shift-block-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.shift-availability-badge {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(153, 27, 27, .22);
    border-radius: 999px;
    color: #991b1b;
    margin-right: 6px;
    padding: 5px 7px;
    vertical-align: middle;
}

.form-stack,
.form-grid {
    display: grid;
    gap: 16px;
}

.settings-form {
    display: grid;
    gap: 18px;
}

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

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

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

.field-note {
    align-self: end;
    margin: 0;
}

.is-disabled-field {
    opacity: .68;
}

.is-disabled-field input,
.is-disabled-field select,
.is-disabled-field textarea {
    background: #f2f4f4;
}

.field-with-action {
    display: grid;
    gap: 10px;
}

.field-with-action .btn {
    align-self: end;
    justify-content: center;
}

.checkbox-line {
    align-items: center;
    display: flex;
    gap: 10px;
}

.checkbox-line input {
    width: auto;
}

.permission-groups {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.permission-group {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
}

.permission-group h3 {
    color: var(--green);
    margin: 0 0 12px;
}

.permission-options {
    display: grid;
    gap: 10px;
}

.location-picker {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.privacy-box {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 10px;
    max-height: 260px;
    overflow: auto;
    padding: 14px;
}

.privacy-box h2,
.privacy-box h3,
.privacy-box p {
    margin: 0;
}

.privacy-box h2 {
    color: var(--ink);
    font-size: 17px;
}

.privacy-box h3 {
    color: var(--green);
    font-size: 14px;
    margin-top: 6px;
}

.privacy-box p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.privacy-accept {
    justify-content: start;
}

label {
    color: var(--muted);
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 650;
}

.integration-provider-field-hidden {
    display: none !important;
}

.field-label {
    color: var(--muted);
    display: block;
    font-size: 14px;
    font-weight: 650;
    margin-bottom: 8px;
}

input,
select,
textarea {
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    font-size: 16px;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

.enhanced-input,
.enhanced-select {
    background-color: #fbfcfc;
    border-color: var(--line);
}

.enhanced-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--green) 50%),
        linear-gradient(135deg, var(--green) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
    padding-right: 36px;
}

input:focus,
select:focus,
textarea:focus,
.enhanced-input:focus,
.enhanced-select:focus {
    border-color: rgba(18, 63, 99, .35);
    box-shadow: 0 0 0 4px rgba(18, 63, 99, .08);
    outline: none;
}

input[type="file"] {
    color: transparent;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    background: var(--green-soft);
    border: 1px solid rgba(15, 61, 46, .14);
    border-radius: 10px;
    color: var(--green);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    margin-right: 0;
    min-height: 34px;
    padding: 6px 12px;
}

.delivery-photo-uploader {
    display: grid;
    gap: 14px;
}

.delivery-photo-pages {
    display: grid;
    gap: 12px;
}

.delivery-photo-page {
    align-items: center;
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr auto;
    padding: 14px;
}

.delivery-photo-page strong {
    color: var(--ink);
    display: block;
    font-size: 15px;
}

.delivery-photo-page span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-top: 2px;
}

.delivery-photo-page.has-photo {
    background: var(--green-soft);
    border-color: rgba(15, 61, 46, .2);
}

.delivery-photo-page.has-photo span {
    color: var(--green);
    font-weight: 800;
}

.delivery-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.delivery-photo-actions .btn {
    cursor: pointer;
    min-height: 40px;
}

.delivery-photo-actions .btn-danger {
    padding-inline: 12px;
}

.delivery-photo-input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.haccp-address-book {
    display: grid;
    gap: 22px;
}

.haccp-expiring-card {
    margin-bottom: 22px;
}

.haccp-section-block {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.section-title-row {
    align-items: end;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.haccp-letter-group {
    display: grid;
    gap: 10px;
    grid-template-columns: 44px minmax(0, 1fr);
}

.haccp-letter {
    align-self: start;
    background: var(--green);
    border-radius: 50%;
    color: var(--white);
    display: grid;
    font-weight: 850;
    height: 36px;
    place-items: center;
    position: sticky;
    top: 20px;
    width: 36px;
}

.haccp-label-list {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.haccp-label-row {
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: inherit;
    cursor: pointer;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 18px 20px;
    text-align: left;
    width: 100%;
}

.haccp-label-row:last-child {
    border-bottom: 0;
}

.haccp-label-row:hover {
    background: #fbfcfc;
}

.haccp-label-row strong {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
}

.haccp-label-row small {
    color: var(--muted);
    display: block;
    font-size: 13px;
}

.haccp-label-row em {
    color: var(--green);
    flex: 0 0 auto;
    font-size: 13px;
    font-style: normal;
    font-weight: 850;
}

.haccp-row-badges {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.haccp-row-badges .traceability-flag {
    background: var(--green);
    border-radius: 999px;
    color: var(--white);
    padding: 4px 8px;
}

.traceability-list {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.traceability-list.compact {
    box-shadow: none;
}

.traceability-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 16px;
}

.traceability-row:last-child {
    border-bottom: 0;
}

.traceability-head {
    background: #f8faf9;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(110px, 1fr)) minmax(180px, auto);
    text-transform: uppercase;
}

.traceability-row-main {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(110px, 1fr));
    padding: 0;
    text-align: left;
    width: 100%;
}

.traceability-row-main.is-static {
    cursor: default;
}

.traceability-row-main strong {
    color: var(--green);
    overflow-wrap: anywhere;
}

.traceability-row-main span {
    color: var(--muted);
    font-weight: 750;
}

.traceability-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.traceability-row.is-depleted {
    background: #f3f5f4;
    color: #8a9490;
}

.traceability-row.is-depleted .traceability-row-main strong,
.traceability-row.is-depleted .traceability-row-main span {
    color: #8a9490;
}

.traceability-dashboard-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 16px;
}

.traceability-dashboard-row:last-child {
    border-bottom: 0;
}

.traceability-dashboard-head {
    background: #f8faf9;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    grid-template-columns: minmax(220px, 1.4fr) minmax(110px, 1fr) minmax(110px, 1fr) minmax(220px, auto);
    text-transform: uppercase;
}

.traceability-dashboard-main {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1.4fr) minmax(110px, 1fr) minmax(110px, 1fr);
}

.traceability-dashboard-main strong {
    color: var(--green);
    overflow-wrap: anywhere;
}

.traceability-dashboard-main span {
    color: var(--muted);
    font-weight: 750;
}

.haccp-preview-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: 230px minmax(0, max-content);
    margin-top: 20px;
}

.haccp-preview-controls {
    align-content: start;
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.haccp-preview-controls form {
    display: grid;
}

.haccp-toggle-list {
    display: grid;
    gap: 8px;
    margin: 4px 0;
}

.haccp-label-preview {
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 4px;
    color: #111827;
    min-height: 0;
    padding: 5mm;
    width: 80mm;
}

.haccp-label-date {
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 4mm;
    text-align: left;
}

.haccp-label-depleted {
    border: 1px solid #6b7280;
    color: #374151;
    font-size: 12px;
    font-weight: 850;
    margin-bottom: 3mm;
    padding: 2mm;
    text-transform: uppercase;
}

.haccp-label-preview h3 {
    font-size: 24px;
    line-height: 1.08;
    margin: 0 0 3mm;
    overflow-wrap: anywhere;
}

.haccp-label-preview dl {
    display: grid;
    gap: 2.5mm;
    margin: 0;
}

.haccp-label-preview dl > div {
    display: grid;
    gap: 1mm;
    grid-template-columns: 1fr;
}

.haccp-label-preview dl > div[hidden] {
    display: none !important;
}

.haccp-label-preview dt {
    color: #111827;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.haccp-label-preview dd {
    font-size: 14px;
    line-height: 1.35;
    margin: 0;
    overflow-wrap: anywhere;
}

.haccp-label-qr {
    align-items: center;
    border-top: 1px solid #111827;
    display: flex;
    gap: 3mm;
    justify-content: flex-start;
    margin-top: 4mm;
    padding-top: 3mm;
}

.haccp-label-qr img {
    height: 22mm;
    width: 22mm;
}

.haccp-label-qr span {
    color: #111827;
    font-size: 12px;
    font-weight: 850;
    max-width: 78px;
    text-transform: uppercase;
}

.haccp-photo-strip {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.haccp-photo-button {
    background: transparent;
    border: 0;
    color: var(--green);
    cursor: pointer;
    display: grid;
    flex: 0 0 150px;
    gap: 6px;
    padding: 0;
    text-align: left;
}

.haccp-photo-button img {
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 12px;
    object-fit: cover;
    width: 100%;
}

.haccp-photo-strip > img {
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 12px;
    flex: 0 0 150px;
    object-fit: cover;
}

.haccp-photo-button span {
    font-size: 12px;
    font-weight: 850;
    padding-left: 2px;
}

.haccp-photo-modal {
    max-width: min(960px, calc(100vw - 28px));
}

.haccp-photo-preview {
    border: 1px solid var(--line);
    border-radius: 14px;
    display: block;
    margin-top: 18px;
    max-height: min(72vh, 820px);
    object-fit: contain;
    width: 100%;
}

.public-label-page {
    min-height: 100vh;
}

.public-label-shell {
    margin: 0 auto;
    max-width: 860px;
    padding: 28px 16px;
}

.public-label-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.public-label-card h1 {
    margin-bottom: 20px;
}

.public-label-card h2 {
    margin: 24px 0 12px;
}

.haccp-public-photos {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.haccp-public-photos a {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.haccp-public-photos img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

.wide {
    grid-column: 1 / -1;
}

.check {
    align-items: center;
    display: flex;
    gap: 10px;
}

.check-card {
    align-self: end;
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 14px;
    min-height: 52px;
    padding: 14px;
}

.check input {
    min-height: auto;
    width: auto;
}

.check-list,
.course-checks,
.course-extra {
    display: grid;
    gap: 10px;
}

.horizontal-section,
.employee-training-section {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.horizontal-scroll {
    display: grid;
    gap: 14px;
    grid-auto-columns: minmax(280px, 360px);
    grid-auto-flow: column;
    overflow-x: auto;
    padding-bottom: 6px;
}

.company-course-card {
    align-items: start;
    display: grid;
    gap: 14px;
    min-height: 220px;
}

.course-title {
    color: var(--green);
    font-size: 24px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.company-course-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.employee-training-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.employee-training-card {
    display: grid;
    gap: 14px;
}

.compact-details {
    grid-template-columns: 80px 1fr;
}

.course-check {
    align-items: center;
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 10px;
    grid-template-columns: 30px 1fr auto;
    padding: 12px;
}

.course-check.done {
    background: var(--green-soft);
}

.course-check.done strong {
    color: var(--green);
}

.course-check.missing strong {
    color: var(--muted);
}

.course-extra {
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 14px;
}

.management-grid {
    margin-top: 18px;
}

.role-editor-list {
    display: grid;
    gap: 12px;
}

.role-editor {
    grid-template-columns: minmax(180px, .8fr) 1fr auto;
    align-items: end;
}

.roles-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    margin: -8px 0 18px;
}

.role-course-list {
    display: grid;
    gap: 10px;
}

.role-course-row {
    align-items: center;
    grid-template-columns: 1fr auto;
}

.role-course-editor {
    align-items: end;
}

.role-course-edit {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, .8fr) auto;
}

.role-course-create {
    align-items: end;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, .8fr) auto;
    margin-top: 16px;
    padding-top: 16px;
}

.course-autocomplete {
    display: grid;
    gap: 8px;
    position: relative;
}

.course-autocomplete-options {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(18, 38, 32, .14);
    display: grid;
    gap: 4px;
    left: 0;
    max-height: 240px;
    overflow: auto;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% - 4px);
    z-index: 20;
}

.course-autocomplete-options[hidden] {
    display: none;
}

.course-autocomplete-options button {
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 10px 12px;
    text-align: left;
}

.course-autocomplete-options button:hover {
    background: var(--green-soft);
    color: var(--green);
}

.alert.compact {
    margin: 0;
    padding: 10px 12px;
}

.alert.compact p {
    margin: 0;
}

.alert.compact p + p {
    margin-top: 4px;
}

.compact-grid {
    gap: 10px;
}

.bulk-assignment-form .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
    .bulk-assignment-form .compact-grid {
        grid-template-columns: 1fr;
    }
}

.modal {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(20, 35, 31, .24);
    max-width: min(820px, calc(100vw - 28px));
    padding: 0;
    width: 100%;
}

.modal::backdrop {
    background: rgba(17, 24, 39, .38);
}

.modal-panel {
    padding: 22px;
}

.modal-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.modal-head h2 {
    margin-bottom: 0;
}

.modal-close {
    background: var(--green-soft);
    border: 0;
    border-radius: 50%;
    color: var(--green);
    cursor: pointer;
    font-size: 22px;
    height: 38px;
    line-height: 1;
    width: 38px;
}

.details {
    display: grid;
    gap: 10px;
    grid-template-columns: 130px 1fr;
}

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

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.overlap-choice-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.overlap-choice-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 12px;
    padding: 16px;
}

.overlap-choice-card strong {
    color: var(--text);
    font-size: 20px;
}

.schedule-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.schedule-grid label {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
}

.inline-form {
    display: inline;
}

.request-actions,
.form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.request-actions {
    grid-column: span 2;
}

.form-section-title {
    border-top: 1px solid var(--line);
    color: var(--green);
    font-weight: 800;
    margin-top: 8px;
    padding-top: 18px;
}

.request-section {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-section[hidden] {
    display: none;
}

.checkbox-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.checkbox-row label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.copy-code {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--green);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    padding: 7px 10px;
    text-align: center;
    width: fit-content;
}

.copy-code.copied {
    background: var(--green-soft);
}

.payroll-preview {
    display: grid;
    gap: 10px;
}

.payroll-row {
    align-items: center;
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr minmax(180px, 260px);
    padding: 12px;
}

.company-card {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.company-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-body {
    --green: #051530;
    --green-soft: #edf3fb;
    --ink: #0b172a;
    --page: #f4f7fb;
    --shadow: 0 22px 70px rgba(5, 21, 48, .12);
    align-items: center;
    background:
        radial-gradient(circle at 20% 12%, rgba(5, 21, 48, .08), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, var(--page) 100%);
    display: grid;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    background: var(--white);
    border: 1px solid rgba(5, 21, 48, .08);
    border-radius: 24px;
    box-shadow: var(--shadow);
    margin: auto;
    max-width: 440px;
    padding: 34px;
    width: 100%;
}

.login-brand {
    margin-bottom: 28px;
}

.login-brand.has-logo {
    display: block;
}

.alert {
    background: var(--green-soft);
    border: 1px solid rgba(5, 21, 48, .14);
    border-radius: 12px;
    color: var(--green);
    margin-bottom: 16px;
    padding: 12px;
}

.mobile-wrap {
    display: grid;
    min-height: calc(100vh - 130px);
    place-items: center;
}

.phone {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 36px;
    box-shadow: var(--shadow);
    max-width: 420px;
    padding: 24px;
    width: 100%;
}

.phone-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.phone-head h1 {
    font-size: 28px;
}

.month {
    color: var(--muted);
    margin: 24px 0 12px;
}

.italy-clock {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 20px;
    display: grid;
    gap: 4px;
    margin: 0 0 14px;
    padding: 16px;
    text-align: center;
}

.italy-clock span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.italy-clock strong {
    color: var(--green);
    font-size: 32px;
}

.hours-card {
    background: var(--green-soft);
    border-radius: 24px;
    display: grid;
    gap: 8px;
    padding: 28px;
    text-align: center;
}

.hours-card strong {
    color: var(--green);
    font-size: 58px;
    line-height: 1;
}

.status-card {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 18px;
    font-weight: 750;
    margin: 16px 0;
    padding: 16px;
    text-align: center;
}

.clock-button {
    background: var(--green);
    border: 0;
    border-radius: 22px;
    color: var(--white);
    cursor: pointer;
    font-size: 24px;
    font-weight: 800;
    min-height: 86px;
    width: 100%;
}

.gps-line {
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.summary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
    margin: 16px 0;
}

.summary-grid .mini-card strong {
    color: var(--green);
    font-size: 20px;
}

.recent-list {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 18px;
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding: 16px;
}

.recent-list h2 {
    margin-bottom: 2px;
}

.recent-list div {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.recent-list span {
    color: var(--muted);
}

.mini-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 18px;
}

.mini-grid a {
    background: #f9fbfa;
    border: 1px solid var(--line);
    border-radius: 18px;
    font-weight: 700;
    padding: 18px;
    text-align: center;
}

.empty-state {
    margin: 10vh auto;
    max-width: 520px;
    text-align: center;
}

@media (max-width: 1000px) {
    .recipe-builder-row,
    .recipe-step-row {
        grid-template-columns: 1fr;
    }

    .recipe-builder-row .icon-button,
    .recipe-step-row .icon-button {
        width: 100%;
    }

    .recipe-scale-controls {
        width: 100%;
    }

    .recipe-chip-editor input {
        flex-basis: 100%;
    }

    .recipe-submit-actions,
    .recipe-add-row {
        align-items: stretch;
        flex-direction: column;
    }

    .recipe-submit-actions .btn,
    .recipe-add-row .btn {
        width: 100%;
    }

    .recipe-import-row {
        grid-template-columns: 1fr;
    }

    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        bottom: 0;
        box-shadow: 18px 0 48px rgba(20, 35, 31, .18);
        display: flex;
        left: 0;
        max-width: min(84vw, 320px);
        overflow-y: auto;
        padding: 22px 18px;
        position: fixed;
        top: 0;
        touch-action: pan-y;
        transform: translateX(-110%);
        transition: transform .22s ease;
        width: 320px;
    }

    .main {
        padding: 14px 14px 38px;
        width: 100%;
    }

    html.mobile-menu-open,
    body.mobile-menu-open {
        overflow: hidden;
        overscroll-behavior: none;
    }

    .mobile-menu-open .sidebar {
        transform: translateX(0);
    }

    .mobile-menu-backdrop {
        background: rgba(17, 24, 39, .34);
        border: 0;
        bottom: 0;
        display: block;
        left: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 0;
        transition: opacity .2s ease;
        z-index: 20;
    }

    .mobile-menu-open .mobile-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-bar {
        align-items: center;
        background: rgba(246, 248, 247, .92);
        backdrop-filter: blur(14px);
        display: flex;
        gap: 12px;
        justify-content: space-between;
        margin: -14px -14px 18px;
        padding: 12px 14px;
        position: sticky;
        top: 0;
        z-index: 15;
    }

    .mobile-brand {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .mobile-brand .brand-logo {
        max-height: 48px;
        max-width: 190px;
    }

    .mobile-brand span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-actions {
        align-items: center;
        display: flex;
        flex: 0 0 auto;
        gap: 8px;
        margin-left: auto;
    }

    .mobile-notification-link {
        align-items: center;
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--green);
        display: inline-flex;
        height: 42px;
        justify-content: center;
        min-width: 42px;
        padding: 0 10px;
        position: relative;
    }

    .mobile-notification-link svg {
        fill: none;
        height: 20px;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 2.2;
        width: 20px;
    }

    .mobile-notification-link strong {
        background: var(--green);
        border: 2px solid var(--white);
        border-radius: 999px;
        color: var(--white);
        font-size: 10px;
        line-height: 1;
        min-width: 18px;
        padding: 2px 4px;
        position: absolute;
        right: -4px;
        text-align: center;
        top: -4px;
    }

    .mobile-avatar {
        flex: 0 0 auto;
        height: 42px;
        width: 42px;
    }

    .mobile-menu-button {
        align-items: center;
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: 12px;
        cursor: pointer;
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        height: 42px;
        justify-content: center;
        padding: 0;
        transition: background .2s ease, border-color .2s ease;
        width: 42px;
    }

    .mobile-menu-button span {
        background: var(--green);
        border-radius: 999px;
        display: block;
        height: 2px;
        transition: transform .2s ease, opacity .2s ease, width .2s ease;
        width: 18px;
    }

    .mobile-menu-button span:nth-child(2) {
        width: 14px;
    }

    .mobile-menu-open .mobile-menu-button {
        background: var(--green-soft);
        border-color: rgba(15, 61, 46, .16);
    }

    .mobile-menu-open .mobile-menu-button span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-open .mobile-menu-button span:nth-child(2) {
        opacity: 0;
        transform: translateX(4px);
    }

    .mobile-menu-open .mobile-menu-button span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }

    .sidebar .brand {
        margin-right: 42px;
    }

    .nav {
        gap: 6px;
        margin-top: 24px;
    }

    .nav a {
        min-height: 46px;
        padding: 13px 14px;
    }

    .metrics,
    .grid,
    .form-grid,
    .schedule-grid,
    .overlap-choice-grid,
    .reservation-day-form,
    .employee-training-grid,
    .role-editor,
    .role-course-edit,
    .role-course-row,
    .role-course-create,
    .quick-document-row,
    .bulk-document-workspace {
        grid-template-columns: 1fr;
    }

    .reservation-day-tab-list {
        display: flex;
        overflow-x: auto;
        padding: 6px;
        scroll-snap-type: x proximity;
    }

    .reservation-day-tab {
        flex: 0 0 122px;
        scroll-snap-align: start;
    }

    .bulk-document-preview {
        min-height: auto;
        position: static;
    }

    .bulk-document-preview iframe {
        height: 70vh;
    }

    .span-2,
    .span-3,
    .wide {
        grid-column: auto;
    }

    .page-head,
    .topbar,
    .list-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .topbar {
        display: none;
        margin-bottom: 18px;
    }

    .topbar.has-impersonation {
        display: flex;
    }

    .topbar.has-impersonation .avatar,
    .topbar.has-impersonation .notification-link {
        display: none;
    }

    .topbar-actions,
    .company-actions,
    .form-actions,
    .request-actions,
    .settings-actions,
    .filter-actions,
    .time-entry-actions {
        justify-content: stretch;
    }

    .topbar-actions > *,
    .topbar-actions form,
    .company-actions > *,
    .form-actions > *,
    .request-actions > *,
    .settings-actions > *,
    .filter-actions > *,
    .time-entry-actions > * {
        min-width: 0;
    }

    .topbar-actions .btn,
    .company-actions .btn,
    .form-actions .btn,
    .request-actions .btn,
    .settings-actions .btn,
    .filter-actions .btn,
    .time-entry-actions .btn {
        width: 100%;
    }

    .list-search {
        max-width: none;
    }

    .list-search-form {
        justify-content: stretch;
        width: 100%;
    }

    .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .table-row,
    .table-row.four,
    .table-row.five,
    .table-row.six {
        align-items: start;
        grid-template-columns: 1fr;
        padding: 16px 0;
    }

    .permission-groups {
        grid-template-columns: 1fr;
    }

    .card,
    .metric {
        border-radius: 14px;
        padding: 16px;
    }

    .metric {
        gap: 8px;
    }

    .metric strong {
        font-size: 28px;
    }

    .metric-hours {
        display: none;
    }

    .desktop-hours-title,
    .monthly-bars {
        display: none;
    }

    .mobile-hours-title {
        display: inline;
    }

    .mobile-month-hours {
        align-items: center;
        background: var(--green-soft);
        border-radius: 18px;
        display: grid;
        gap: 8px;
        min-height: 150px;
        padding: 24px;
        text-align: center;
    }

    .mobile-month-hours strong {
        color: var(--green);
        font-size: 56px;
        line-height: 1;
    }

    .mobile-month-hours span {
        color: var(--muted);
        font-weight: 700;
    }

    h1 {
        font-size: 34px;
        line-height: 1.05;
    }

    .btn {
        min-height: 46px;
    }

    .details,
    .compact-details,
    .request-section,
    .payroll-row,
    .course-check {
        grid-template-columns: 1fr;
    }

    .details dt {
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .details dd {
        margin-bottom: 6px;
    }

    .horizontal-scroll {
        grid-auto-columns: minmax(82vw, 1fr);
    }

    .period-switcher,
    .attendance-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .period-switcher .btn,
    .attendance-toolbar .btn {
        width: 100%;
    }

    .period-title {
        min-width: 0;
    }

    .attendance-card {
        overflow: hidden;
        padding: 0;
    }

    .attendance-scroll {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .attendance-table {
        min-width: 860px;
        width: max-content;
    }

    .attendance-table .employee-col {
        left: auto;
        min-width: 190px;
        position: static;
    }

    .attendance-table th,
    .attendance-table td {
        padding: 12px 10px;
    }

    .phone {
        border: 0;
        border-radius: 22px;
        box-shadow: none;
        padding: 18px;
    }

    .mobile-wrap {
        min-height: auto;
        place-items: stretch;
    }

    .clock-button {
        min-height: 76px;
    }

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

    .haccp-letter-group {
        gap: 8px;
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .haccp-letter {
        height: 30px;
        top: 72px;
        width: 30px;
    }

    .haccp-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 16px;
    }

    .traceability-head {
        display: none;
    }

    .traceability-dashboard-head {
        display: none;
    }

    .traceability-row,
    .traceability-row-main,
    .traceability-dashboard-row,
    .traceability-dashboard-main {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .traceability-actions {
        justify-content: stretch;
    }

    .traceability-actions .btn,
    .traceability-actions form {
        width: 100%;
    }

    .haccp-preview-layout {
        grid-template-columns: 1fr;
    }

    .haccp-label-preview {
        min-height: 0;
        padding: 16px;
    }

    .haccp-label-preview h3 {
        font-size: 24px;
    }

    .haccp-label-preview dl > div {
        grid-template-columns: 1fr;
    }

    .delivery-photo-page {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .delivery-photo-actions {
        justify-content: stretch;
    }

    .delivery-photo-actions .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .main {
        padding-inline: 10px;
    }

    .mobile-bar {
        margin-inline: -10px;
        padding-inline: 10px;
    }

    .login-body {
        padding: 12px;
        place-items: center;
    }

    .login-card {
        border-radius: 18px;
        max-width: none;
        padding: 22px;
        width: min(100%, calc(100vw - 24px));
    }

    .card,
    .metric {
        padding: 14px;
    }

    .attendance-card {
        padding: 0;
    }

    .avatar {
        height: 42px;
        width: 42px;
    }

    .notification-link,
    .topbar-actions form,
    .topbar-actions .btn {
        flex: 1 1 auto;
    }

    .topbar-actions {
        width: 100%;
    }

    .modal {
        max-width: calc(100vw - 16px);
    }

    .modal-panel {
        padding: 16px;
    }

    .public-booking-shell {
        padding: 18px 10px 40px;
    }

    .public-booking-head h1 {
        font-size: 38px;
    }

    .booking-progress {
        border-radius: 14px;
        gap: 5px;
        padding: 6px;
        top: 6px;
    }

    .booking-progress span {
        font-size: 12px;
        min-height: 34px;
        padding-inline: 5px;
    }

    .booking-step-card {
        border-radius: 16px;
        padding: 18px;
    }

    .booking-step-heading h2 {
        font-size: 30px;
    }

    .booking-calendar-weekdays,
    .booking-calendar-grid {
        gap: 5px;
    }

    .booking-calendar-empty {
        min-height: 58px;
    }

    .booking-calendar-day {
        border-radius: 12px;
        min-height: 58px;
        padding: 7px 2px;
    }

    .booking-calendar-day strong {
        font-size: 18px;
    }

    .booking-calendar-day small {
        font-size: 9px;
    }

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

    .booking-slot {
        min-height: 78px;
        padding: 14px;
    }

    .booking-step-actions {
        grid-template-columns: 1fr;
    }

    .booking-step-actions .btn {
        width: 100%;
    }
}

@media print {
    @page {
        margin: 0;
    }

    body:has(.is-printing-label) * {
        visibility: hidden;
    }

    .is-printing-label,
    .is-printing-label *,
    .is-printing-label [data-printable-label],
    .is-printing-label [data-printable-label] * {
        visibility: visible;
    }

    .is-printing-label {
        border: 0;
        box-shadow: none;
        inset: 0;
        max-width: none;
        padding: 0;
        position: fixed;
        width: 100%;
    }

    .is-printing-label .modal-panel {
        padding: 0;
    }

    .is-printing-label .modal-head,
    .is-printing-label .haccp-preview-controls,
    .is-printing-label .haccp-photo-strip {
        display: none;
    }

    .is-printing-label .haccp-preview-layout {
        display: block;
        margin: 0;
    }

    .is-printing-label .haccp-label-preview {
        border: 0;
        box-shadow: none;
        margin: 0;
        page-break-inside: avoid;
        padding: 3mm;
        width: 80mm;
    }
}
