:root {
    color-scheme: light;
    font-family: "DM Sans", "Segoe UI", sans-serif;
    color: #172335;
    background: #f3f5f8;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --ink: #172335;
    --muted: #536174;
    --line: #e4e9f0;
    --blue: #315de8;
    --slot-height: 29px;
    --page-title-size: clamp(27px, 3vw, 35px);
    --section-title-size: 17px;
    --subsection-title-size: 14px;
    --body-copy-size: 14px;
    --ui-copy-size: 12px;
    --page-top-space: 10px;
    --page-bottom-space: 10px;
}












* { box-sizing: border-box; }
body { min-width: 360px; margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { color: inherit; }
select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23536174' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 12px;
    line-height: normal;
    cursor: pointer;
}
select:hover:not(:disabled) { border-color: #cbd5e1; }
select:focus-visible { outline: 2px solid rgb(49 93 232 / 18%); outline-offset: 2px; border-color: var(--blue); }
select:disabled { cursor: not-allowed; opacity: .65; }
select option { color: var(--ink); background: #fff; }
.custom-select { position: relative; display: inline-flex; min-width: 0; vertical-align: middle; z-index: 9999999;}
.custom-select-native { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.custom-select-trigger { display: flex; width: 100%; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; overflow: hidden; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.custom-select-trigger::after { width: 12px; height: 12px; flex: 0 0 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23536174' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat; content: ""; }
.custom-select-trigger:hover:not(:disabled) { border-color: #cbd5e1; }
.custom-select-trigger:focus-visible { outline: 2px solid rgb(49 93 232 / 18%); outline-offset: 2px; border-color: var(--blue); }
.custom-select-trigger:disabled { cursor: not-allowed; opacity: .65; }
.custom-select-trigger.is-placeholder { color: var(--muted); }
.custom-select-listbox { position: fixed; z-index: 10000; inset: auto; overflow-y: auto; margin: 0; padding: 5px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; box-shadow: 0 10px 28px rgb(23 35 53 / 18%), 0 2px 6px rgb(23 35 53 / 8%); }
.custom-select-listbox[hidden] { display: none; }
.custom-select-option { min-height: 34px; display: flex; align-items: center; padding: 7px 10px; border-radius: 6px; color: var(--ink); font-size: 13px; line-height: 1.35; cursor: pointer; }
.custom-select-option[aria-selected="true"] { color: #244bc9; background: #eef2ff; font-weight: 700; }
.custom-select-option.is-active, .custom-select-option[aria-selected="true"].is-active { color: #1f43b2; background: #e3eaff; }
.custom-select-option[aria-disabled="true"] { color: #9aa4b2; cursor: not-allowed; }
.app-shell { width: calc(100% - 48px); margin: 0 auto; padding-bottom: 42px; }

.topbar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e6eaf0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 17px Manrope, sans-serif; letter-spacing: -.5px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: white; background: var(--blue); font-size: 18px; }
.brand-light { color: #536174; font-weight: 600; }
.topbar-note { display: flex; align-items: center; gap: 8px; color: #536174; font-size: 13px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #35b77a; box-shadow: 0 0 0 3px #e0f5eb; }
.account-controls { display: flex; align-items: center; gap: 10px; }
.account-controls .secondary-button { height: 34px; }
.account-controls a[aria-current="page"] { border-color: #c7d3fb; color: #2349bf; background: #eef2ff; }
.auth-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 420px); padding: 30px; border: 1px solid #e7ebf1; border-radius: 14px; background: #fff; box-shadow: 0 8px 32px rgb(28 43 66 / 7%); }
.auth-brand { margin-bottom: 16px; }
.auth-card h1 { margin-bottom: 6px; font-size: 26px; }
.auth-description { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.stacked-form { display: grid; gap: 8px; }
.stacked-form .field-label { margin: 5px 0 0; }
.stacked-form input { width: 100%; height: 39px; padding: 0 10px; border: 1px solid #dfe5ed; border-radius: 7px; outline: none; }
.stacked-form input:focus { border-color: #7189ee; box-shadow: 0 0 0 3px rgb(49 93 232 / 10%); }
.auth-submit { min-height: 40px; margin-top: 12px; }
.auth-error { min-height: 16px; margin: 2px 0 0; color: #96353c; font-size: 12px; line-height: 1.5; }
.setup-note { margin: 12px 0 0; color: #536174; font-size: 11px; line-height: 1.5; }

.page-heading, .dashboard-page-heading, .report-page-heading, .settings-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0;
    padding: var(--page-top-space) 0 var(--page-bottom-space);
}
.eyebrow { margin: 0 0 7px; color: #536174; font-size: 11px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Manrope, "Segoe UI", sans-serif; }
h1 { margin-bottom: 5px; font-size: var(--page-title-size); letter-spacing: -1.1px; }
.page-description { margin: 0; color: var(--muted); font-size: var(--body-copy-size); }
.week-controls { display: flex; align-items: center; gap: 10px; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.icon-button:hover, .secondary-button:hover { background: #f7f9fc; border-color: #cdd6e2; }
.icon-button svg, .primary-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.week-label { display: flex; min-width: 130px; flex-direction: column; gap: 2px; text-align: center; }
.week-label strong { font-size: 14px; }
.week-label span { color: var(--muted); font-size: 12px; }
.today-button, .secondary-button { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.secondary-button { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }

.orders-section, .schedule-section, .settings-section { border: 1px solid #e7ebf1; border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgb(28 43 66 / 3%); }
.orders-section { position: sticky; z-index: 10; top: 12px; width: 100%; margin: 0 0 17px; padding: 17px 12px 18px; transition: width .2s ease, margin .2s ease, box-shadow .2s ease; }
.orders-section.is-sticky { width: calc(100% - 24px); margin-right: 12px; margin-left: 12px; }
.orders-section.is-sticky { box-shadow: 0 6px 20px rgb(28 43 66 / 14%); }
.orders-section.is-sticky.is-empty .order-tray { display: none; }
.orders-section.is-sticky.is-empty .section-heading { justify-content: flex-end; }
.orders-section.is-sticky.is-empty .section-heading > div:first-child { display: none; }
.orders-section.is-sticky.is-empty .order-actions { width: 100%; flex: 1 1 auto; }
.orders-empty-sticky-message { margin-right: auto; color: #536174; font-size: 12px; font-weight: 600; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-heading h2 { margin: 0 0 3px; font-size: var(--section-title-size); letter-spacing: -.35px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.order-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.order-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.standard-order-description { margin: -10px 0 17px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.standard-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; max-height: min(55vh, 440px); overflow-y: auto; padding: 2px 3px 4px 2px; }
.standard-product-button { display: flex; min-width: 0; min-height: 76px; align-items: center; gap: 11px; padding: 11px; border: 1px solid #e3e8ef; border-left: 4px solid var(--product-color); border-radius: 9px; background: #fff; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.standard-product-button:hover, .standard-product-button:focus-visible { border-color: var(--product-color); background: #fbfcff; box-shadow: 0 3px 12px rgb(28 43 66 / 8%); outline: none; transform: translateY(-1px); }
.manual-order-option { border-style: dashed; }
.manual-order-option:hover, .manual-order-option:focus-visible { border-style: solid; }
.standard-product-swatch { width: 12px; height: 34px; flex: 0 0 12px; border-radius: 6px; background: var(--product-color); }
.standard-product-copy { display: grid; min-width: 0; gap: 4px; }
.standard-product-copy strong, .standard-product-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standard-product-copy strong { color: #26364b; font-size: 13px; }
.standard-product-copy span { color: #536174; font-size: 11px; }
.standard-product-arrow { margin-left: auto; color: #536174; font-size: 23px; line-height: 1; }
.standard-product-empty { grid-column: 1 / -1; margin: 0; padding: 20px 12px; border: 1px dashed #d9e0e9; border-radius: 9px; color: #536174; font-size: 12px; line-height: 1.5; text-align: center; }
.primary-button { display: inline-flex; min-height: 35px; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); font-size: 12px; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s; }
.primary-button:hover { background: #244bc9; }
.primary-button:active { transform: translateY(1px); }
.order-tray { display: flex; min-height: 32px; align-items: stretch; gap: 9px; overflow-x: auto;}
.orders-section.is-drop-target { border-color: #7189ee; background: #e9edff; }
.order-card { position: relative; display: flex; min-width: 180px; max-width: 235px; flex: 0 0 auto; align-items: center; gap: 10px; padding: 9px 12px; overflow: hidden; border: 1px solid #e8edf2; border-radius: 9px; background: #fbfcfe; cursor: grab; user-select: none; }
.order-card:active { cursor: grabbing; }
.order-card:hover { border-color: #cfd8e5; box-shadow: 0 2px 8px rgb(28 43 66 / 6%); }
.order-swatch { width: 8px; height: 30px; flex: 0 0 auto; border-radius: 6px; background: var(--order-color); }
.order-copy { min-width: 0; }
.order-copy strong, .order-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-copy strong { font-size: 12px; }
.order-copy span { margin-top: 3px; color: #536174; font-size: 11px; }
.order-card { padding-right: 33px; }
.order-status { position: absolute; top: 50%; right: 10px; display: grid; width: 18px; height: 18px; place-items: center; transform: translateY(-50%); border-radius: 50%; font-size: 12px; font-weight: 800; }
.order-status.is-complete { color: #147849; background: #ddf4e7; }
.order-status.is-missing { color: #ab3940; background: #ffeaeb; }
.empty-tray { display: flex; min-height: 12px; align-items: center; color: #a4a4a4; font-size: 12px; }

.schedule-section { padding: 17px 18px 18px; }
.schedule-heading { margin-bottom: 12px; }
.schedule-heading-main { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.schedule-heading-main h2 { margin-bottom: 0; }
.schedule-key { display: flex; align-items: center; gap: 6px; color: #536174; font-size: 11px; }
.schedule-key > span { width: 9px; height: 9px; border-radius: 3px; background: #cceedd; }
.department-filter { display: flex; min-width: 0; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.department-filter-label { color: #536174; font-size: 11px; font-weight: 700; }
.department-filter-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.department-filter-button { min-height: 32px; padding: 0 10px; border: 1px solid #cbd4e5; border-radius: 7px; color: #34445d; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .15s, color .15s, background .15s, box-shadow .15s; }
.department-filter-button:hover { border-color: #93a7e8; color: #2445a7; background: #f8f9ff; }
.department-filter-button.is-active { border-color: #3159c7; color: #fff; background: #3159c7; box-shadow: 0 2px 5px rgb(49 89 199 / 18%); }
.department-filter-button:focus-visible { outline: 3px solid rgb(49 89 199 / 28%); outline-offset: 2px; }
.schedule-key .copy-placement-hint { width: auto; height: auto; margin-left: 10px; color: #244bc9; background: transparent; font-weight: 700; }
.cancel-copy-placement { padding: 4px 8px; border: 1px solid #c7d3fb; color: #2349bf; background: #eef2ff; font-size: 11px; font-weight: 700; cursor: pointer; }
.is-copy-placement-pending .time-slot { cursor: crosshair; }
.is-copy-placement-pending .time-slot:hover { background: transparent; box-shadow: none; }
.schedule-scroll { overflow-x: auto; padding-bottom: 0; scrollbar-width: none; -ms-overflow-style: none; }
.schedule-scroll::-webkit-scrollbar { display: none; }
.schedule-scroll-dock { position: fixed; z-index: 15; right: 0; bottom: 0; left: 0; overflow-x: auto; overflow-y: hidden; background: #f8fafc; box-shadow: 0 -3px 12px rgb(28 43 66 / 10%); scrollbar-color: #8d8d8d #f2f4f8; scrollbar-width: auto; }
.schedule-scroll-dock[hidden] { display: none; }
.schedule-scroll-dock-content { height: 1px; }
.schedule-scroll-dock::-webkit-scrollbar { height: 14px; }
.schedule-scroll-dock::-webkit-scrollbar-track {background: #e9edf3; }
.schedule-scroll-dock::-webkit-scrollbar-thumb { border: 3px solid #e9edf3; background: #98a7bd; }
.schedule-scroll-dock::-webkit-scrollbar-thumb:hover { background: #71829b; }
.machines-grid { display: grid; width: max-content; min-width: 100%; grid-template-columns: repeat(var(--machine-count, 3), 567px); gap: 12px; }
.machine-panel { min-width: 0; overflow: hidden; border: 1px solid #e6eaf0; border-radius: 9px; }
.machine-heading { display: flex; min-height: 41px; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid #e6eaf0; background: #fafbfd; }
.machine-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--machine-color); }
.machine-heading h3 { margin: 0; font: 700 12px Manrope, sans-serif; }
.machine-department { padding: 3px 7px; border-radius: 10px; color: #42536a; background: #eaf0f7; font-size: 10px; font-weight: 700; white-space: nowrap; }
.machine-hours { color: #536174; font-size: 10px; white-space: nowrap; }
.machine-load { margin-left: auto; color: #536174; font-size: 10px; white-space: nowrap; }
.machine-week { border-bottom: 1px solid #e6eaf0; }
.machine-week:last-child { border-bottom: 0; }
.week-heading { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 9px; border-bottom: 1px solid #e6eaf0; background: #f2f2f2; }
.week-machine-meta { display: grid; gap: 2px; }
.week-machine-name { color: #24344a; font: 700 12px Manrope, sans-serif; }
.week-title { display: flex; align-items: center; gap: 6px; }
.week-heading h4 { margin: 0; color: #43536a; font: 700 10px Manrope, sans-serif; }
.current-week-badge { padding: 2px 5px; border-radius: 8px; color: #176b48; background: #e1f4e9; font-size: 8px; font-weight: 700; }
.machine-week.is-current-week .week-heading { background: #dfffe2; }
.week-heading span { color: #536174; font-size: 9px; }
.machine-calendar { display: grid; grid-template-columns: 40px minmax(0, 1fr); }
.time-heading { display: grid; min-height: 39px; place-items: center; border-bottom: 1px solid #e6eaf0; color: #536174; font-size: 9px; font-weight: 700; letter-spacing: .3px; }
.days-heading { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid #e6eaf0; }
.day-heading { display: flex; min-height: 39px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-left: 1px solid #edf0f4; }
.day-heading strong { color: #536174; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.day-heading span { color: #536174; font-size: 9px; }
.day-heading.is-off { background: #f7f8fa; }
.day-heading small { color: #536174; font-size: 8px; }
.time-rail { display: grid; grid-template-rows: repeat(var(--hour-count), var(--slot-height)) auto; }
.time-label { display: flex; align-items: flex-start; justify-content: center; padding-top: 0px; border-bottom: 1px solid #edf0f4; color: #536174; font-size: 10px; font-weight: 600; }
.time-label.is-end { border-bottom: 0; }
.days-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.day-slots { position: relative; display: grid; min-width: 0; grid-template-rows: repeat(var(--hour-count), var(--slot-height)); }
.closed-day { min-height: calc(var(--hour-count) * var(--slot-height)); border-left: 1px solid #edf0f4; background: repeating-linear-gradient(135deg, #fafbfc, #fafbfc 5px, #f5f6f8 5px, #f5f6f8 10px); }
.closed-hour { border-bottom: 1px solid #edf0f4; border-left: 1px solid #edf0f4; background: repeating-linear-gradient(135deg, #fafbfc, #fafbfc 5px, #f5f6f8 5px, #f5f6f8 10px); }
.time-slot { position: relative; z-index: 0; width: 100%; min-width: 0; padding: 0; border: 0; border-bottom: 1px solid #edf0f4; border-left: 1px solid #edf0f4; background: #fff; cursor: pointer; }
.time-slot:hover { background: #f6f8ff; }
.drag-drop-preview { position: absolute; z-index: 3; right: 2px; left: 2px; border: 2px solid #7189ee; border-radius: 5px; background: rgb(113 137 238 / 16%); pointer-events: none; }
.drag-drop-preview.is-invalid { border-color: #d94a54; background: rgb(217 74 84 / 18%); }
.time-slot:focus-visible, .order-card:focus-visible, .booking-card:focus-visible { z-index: 3; outline: 2px solid #315de8; outline-offset: -2px; }
.order-card, .booking-card { touch-action: none; }
.booking-card { position: absolute; z-index: 1; display: flex; flex-direction: column; gap: 3px; padding: 5px 22px 5px 4px; overflow: hidden; border: 1px solid rgb(30 80 59 / 12%); border-left: 3px solid var(--order-edge); border-radius: 5px; color: var(--order-text-color); background: var(--order-color); text-align: left; cursor: grab; user-select: none; }
.booking-card:hover { z-index: 2; filter: saturate(1.08); box-shadow: 0 2px 8px rgb(24 42 63 / 17%); }
.booking-card:active { cursor: grabbing; }
.booking-title { display: -webkit-box; overflow: hidden; font-size: 10px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.booking-detail { overflow: hidden; color: var(--order-text-color); font-size: 9px; line-height: 1.2; text-overflow: ellipsis; }
.booking-extra-info { overflow-wrap: anywhere; white-space: pre-line; }
.booking-status { position: absolute; top: 4px; right: 4px; display: grid; width: 14px; height: 14px; place-items: center; border-radius: 50%; font-size: 10px; font-weight: 800; }
.booking-status.is-complete { color: #147849; background: #ddf4e7; }
.booking-status.is-missing { color: #ab3940; background: #ffeaeb; }
.is-dragging-order { cursor: grabbing; }
.drag-ghost { position: fixed; z-index: 20; pointer-events: none; transform: rotate(-2deg); opacity: .88; box-shadow: 0 10px 26px rgb(22 36 57 / 24%); }
.save-status { min-height: 14px; margin: 9px 2px 0; color: #536174; font-size: 11px; }
.order-dialog { width: min(100% - 32px, 430px); padding: 23px; border: 1px solid #e4e9f0; border-radius: 14px; box-shadow: 0 18px 60px rgb(19 31 49 / 22%); }
.standard-order-dialog { width: min(100% - 32px, 1040px); }
.order-dialog::backdrop { background: rgb(18 28 43 / 36%); backdrop-filter: blur(2px); }
.copy-order-dialog { width: min(100% - 32px, 420px); }
.copy-order-description { margin: 0; color: #536174; font-size: 13px; line-height: 1.5; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.dialog-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.5px; }
.close-dialog { margin-top: 1px; }
.field-label { display: block; margin: 14px 0 6px; color: #47566a; font-size: 12px; font-weight: 700; }
.field-label span { color: #536174; font-weight: 400; }
.production-order-row { display: flex; align-items: center; gap: 12px; }
.order-dialog .production-order-row > input:not([type="color"]) { min-width: 0; flex: 1 1 auto; }
.production-order-confirmation { display: flex; width: fit-content; flex: 0 0 auto; align-items: center; gap: 7px; margin: 0; color: #47566a; font-size: 12px; cursor: pointer; }
.order-dialog input:not([type="color"]), .order-dialog textarea { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid #dfe5ed; border-radius: 7px; outline: none; background: #fff; font: inherit; font-size: 13px; }
.order-dialog .production-order-confirmation input { width: 16px; min-height: 16px; height: 16px; margin: 0; padding: 0; accent-color: #258456; }
.order-dialog .custom-select { width: 100%; }
.order-dialog .custom-select-trigger { min-height: 39px; font-size: 13px; }
.order-dialog textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.order-dialog input:focus, .order-dialog textarea:focus { border-color: #7189ee; box-shadow: 0 0 0 3px rgb(49 93 232 / 10%); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.product-color-note { align-self: end; margin: 0 0 11px; color: #536174; font-size: 11px; }
.color-input:disabled { cursor: not-allowed; opacity: .55; }
.color-input { width: 100%; height: 39px; padding: 4px; border: 1px solid #dfe5ed; border-radius: 7px; background: #fff; cursor: pointer; }
.dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 25px; }
.action-spacer { flex: 1; }
.secondary-button, .dialog-actions .primary-button { height: 37px; padding: 0 13px; font-size: 12px; }
.danger-button { padding: 0; border: 0; color: #bc3d46; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }
.danger-button:hover { color: #91252c; text-decoration: underline; }
.planner-loading-indicator { position: fixed; right: 20px; bottom: 20px; z-index: 6; display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #dce4ee; border-radius: 999px; color: #27364b; background: #fff; box-shadow: 0 4px 16px rgb(26 42 64 / 14%); font-size: 12px; font-weight: 700; }
.planner-loading-indicator[hidden] { display: none; }
.planner-loading-spinner { width: 17px; height: 17px; flex: 0 0 17px; border: 2px solid #d9e2f3; border-top-color: #3159c7; border-radius: 50%; animation: planner-loading-spin .75s linear infinite; }
@keyframes planner-loading-spin { to { transform: rotate(360deg); } }
.toast { position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; max-width: none; padding: 11px 15px calc(11px + env(safe-area-inset-bottom)); transform: translateY(100%); border: 1px solid #dce4ee; border-bottom: 0; border-radius: 9px 9px 0 0; color: #27364b; background: #fff; box-shadow: 0 -6px 25px rgb(26 42 64 / 13%); font-size: 13px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast.is-error { border-color: #f0c6c9; color: #96353c; background: #fff8f8; }
.settings-page { width: 100%; margin: 0; padding: 0 0 42px; }
.settings-page-heading h1 { margin-bottom: 5px; }
.back-button { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 0; border: 0; color: #52637a; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.back-button:hover { color: var(--blue); }
.back-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.settings-nav { position: sticky; top: 10px; z-index: 4; display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; padding: 7px; border: 1px solid #e7ebf1; border-radius: 11px; background: rgb(255 255 255 / 94%); box-shadow: 0 3px 12px rgb(28 43 66 / 3%); backdrop-filter: blur(8px); }
.settings-nav button { min-height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: 7px; color: #52637a; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.settings-nav button:hover { border-color: #dfe5ed; color: var(--blue); background: #f7f9fc; }
.settings-nav .settings-save-button { width: auto; min-height: 34px; flex: 0 0 auto; margin-left: auto; padding: 0 14px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.settings-nav .settings-save-button:disabled { color: #758196; background: #e9edf3; cursor: default; }
.settings-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.settings-section { min-width: 0; scroll-margin-top: 66px; margin-top: 0; padding: 20px; }
.settings-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding-bottom: 13px; border-bottom: 1px solid #edf0f4; }
.settings-section-heading .eyebrow { margin-bottom: 4px; }
.settings-section-heading h2 { margin: 0; font-size: var(--section-title-size); letter-spacing: -.4px; }
.settings-section-heading > p { max-width: 360px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }
.settings-content > #products-management, .settings-content > #machines-management { grid-column: 1 / -1; }
.settings-content > .permissions-note { grid-column: 1 / -1; margin: 0; }
.management-section { margin-top: 0; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.inline-form input:not([type="color"]):not([type="checkbox"]) { min-width: 120px; height: 35px; flex: 1 1 145px; padding: 0 9px; border: 1px solid #dfe5ed; border-radius: 7px; background: #fff; font-size: 12px; }
.inline-form .custom-select { min-width: 120px; height: 35px; flex: 1 1 145px; }
.inline-form .custom-select-trigger { height: 35px; padding-left: 9px; font-size: 12px; }
.inline-form .color-input { width: 45px; height: 35px; flex: 0 0 45px; }
.inline-form .primary-button { min-height: 35px; }
.settings-page .primary-button { width: 140px; min-height: 35px; flex: 0 0 140px; padding: 0 10px; white-space: nowrap; }
.product-inline-form .custom-select { flex: 0 0 85px; }
.department-select { min-width: 160px !important; flex: 1 1 160px !important; }
.machine-inline-form > label, .machine-settings-row > label { display: flex; align-items: center; gap: 5px; color: #657286; font-size: 11px; white-space: nowrap; }
.machine-inline-form > label input, .machine-settings-row > label input { width: 64px; min-width: 0 !important; flex: 0 0 64px !important; }
.weekday-options { display: flex; min-width: 100%; align-items: center; gap: 8px; margin: 0; padding: 5px 7px; border: 1px solid #e6eaf0; border-radius: 7px; }
.weekday-options legend { padding: 0 4px; color: #657286; font-size: 10px; }
.weekday-options label { display: inline-flex; align-items: center; gap: 3px; color: #657286; font-size: 10px; white-space: nowrap; }
.weekday-options input { width: 13px; min-width: 13px; height: 13px; flex: 0 0 13px; margin: 0; padding: 0; }
.management-list { display: grid; gap: 10px; margin-top: 12px; }
.management-row { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #e3e8ef; border-radius: 9px; background: #fff; font-size: 12px; }
.management-row.has-unsaved-changes { border-color: #b8c8fb; background: #fbfcff; }
.management-row > strong { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.management-row > span { color: #536174; font-size: 11px; }
.management-row .machine-indicator, .management-row .product-swatch { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--row-color); }
.product-swatch { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--row-color); }
.management-row .custom-select { height: 29px; max-width: 118px; }
.management-row .custom-select-trigger { height: 29px; padding-left: 8px; font-size: 11px; }
.management-row .danger-button { flex: 0 0 auto; }
.management-row .danger-button:disabled { cursor: not-allowed; opacity: .55; }
.machine-order-button { width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid #dfe5ed; border-radius: 6px; background: #fff; color: #536174; cursor: pointer; font-size: 15px; line-height: 1; }
.machine-order-button:hover:not(:disabled) { border-color: #b8c8fb; background: #f5f7ff; color: #3159c7; }
.machine-order-button:disabled { cursor: not-allowed; opacity: .45; }
.machine-workday-row { display: flex; min-width: 100%; flex: 1 1 100%; align-items: center; gap: 9px; }
.machine-order-controls { display: flex; flex: 0 0 auto; gap: 4px; }
.machine-workday-row > .weekday-options { min-width: 0; flex: 1 1 auto; }
.machine-workday-row > .danger-button { flex: 0 0 auto; margin-left: auto; }
.machine-inline-form { margin-bottom: 14px; padding: 13px; border: 1px solid #e5eaf2; border-radius: 9px; background: #f8faff; }
.product-inline-form, .department-inline-form, .user-inline-form { margin-bottom: 14px; padding: 13px; border: 1px solid #e5eaf2; border-radius: 9px; background: #f8faff; }
#product-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 600px), 1fr)); }
#machine-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 12px; }
.machine-department-group { min-width: 0; padding: 13px; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8faff; }
.machine-department-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 0 2px 9px; border-bottom: 1px solid #e2e8f0; }
.machine-department-heading h3 { margin: 0; color: #26364b; font: 700 14px Manrope, "Segoe UI", sans-serif; }
.machine-department-heading span { color: #64748b; font-size: 11px; }
.machine-department-list { display: grid; gap: 9px; }
.machine-settings-row { display: grid; gap: 12px; padding: 12px; }
.machine-settings-main { display: grid; grid-template-columns: 10px minmax(0, 1fr) minmax(130px, .8fr) auto; align-items: center; gap: 8px; }
.settings-machine-indicator { width: 10px; height: 10px; }
.machine-settings-main > input { min-width: 0; }
.machine-settings-main > .department-select { min-width: 0 !important; max-width: none; width: 100%; flex: 1 1 auto !important; }
.machine-settings-accordion { border-top: 1px solid #edf0f4; }
.machine-settings-accordion summary { padding: 8px 2px 0; color: #52637a; font-size: 11px; font-weight: 700; cursor: pointer; }
.machine-settings-accordion[open] summary { margin-bottom: 10px; }
.machine-settings-hours { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.machine-settings-hours > label { display: flex; align-items: center; gap: 5px; color: #657286; font-size: 11px; white-space: nowrap; }
.machine-settings-hours > label input { width: 58px; min-width: 0; height: 30px; padding: 0 6px; border: 1px solid #dfe5ed; border-radius: 6px; background: #fff; font-size: 12px; }
.machine-settings-hours > .weekday-options { grid-column: 1 / -1; display: flex; min-width: 0; width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 6px 12px; padding: 7px; background: #f8faff; }
.machine-settings-hours > .danger-button { margin-left: 0; }
.product-settings-row { display: grid; gap: 7px; padding: 10px; }
.product-settings-heading { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: center; gap: 9px; }
.product-settings-heading .product-swatch { width: 10px; height: 32px; border-radius: 5px; }
.product-settings-accordion { border-top: 1px solid #edf0f4; }
.product-settings-accordion summary { padding: 7px 2px 0; color: #52637a; font-size: 11px; font-weight: 700; cursor: pointer; }
.product-settings-accordion[open] summary { margin-bottom: 9px; }
.product-settings-fields { display: grid; gap: 9px; }
.product-settings-fields > label, .product-settings-actions > label { display: grid; min-width: 0; gap: 4px; color: #657286; font-size: 10px; font-weight: 700; }
.product-settings-fields input:not([type="color"]), .product-settings-fields textarea { width: 100%; min-width: 0; min-height: 32px; padding: 6px 8px; border: 1px solid #dfe5ed; border-radius: 6px; background: #fff; font: inherit; font-size: 12px; font-weight: 400; }
.product-settings-fields textarea { min-height: 54px; resize: vertical; }
.product-settings-fields .custom-select { width: 100%; min-width: 0; max-width: none; height: 32px; }
.product-settings-fields .custom-select-trigger { height: 32px; padding-left: 8px; font-size: 12px; }
.product-settings-actions { display: grid; grid-template-columns: minmax(120px, 1fr) 125px 58px auto; align-items: end; gap: 8px; }
.product-settings-actions > label { display: grid; gap: 4px; color: #657286; font-size: 10px; font-weight: 700; }
.product-settings-actions .product-article-field,
.product-settings-actions .product-duration-field,
.product-settings-actions .product-color-field { min-width: 0; }
.product-settings-actions .color-input { width: 50px; height: 34px; padding: 3px; border: 1px solid #dfe5ed; border-radius: 6px; background: #fff; }
.product-settings-actions > .danger-button { justify-self: end; }
.product-name-field { display: grid; min-width: 0; gap: 4px; color: #657286; font-size: 10px; font-weight: 700; }
.product-name-field input { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border: 1px solid #dfe5ed; border-radius: 6px; background: #fff; color: #26364b; font-size: 13px; font-weight: 700; }
.settings-row { flex-wrap: wrap; }
.settings-row > input:not([type="color"]) { min-width: 100px; height: 30px; flex: 1 1 120px; padding: 0 7px; border: 1px solid #d3d3d3; border-radius: 6px; background-color: #fff; font-size: 11px; }
.department-settings-row > input { min-width: 160px; }
.department-settings-row > span { flex: 0 0 auto; }
.department-order-controls { display: flex; flex: 0 0 auto; gap: 4px; }
.department-order-controls .machine-order-button { width: 27px; height: 27px; flex-basis: 27px; }
.settings-row > .custom-select { min-width: 100px; height: 30px; flex: 1 1 120px; }
.settings-row > .custom-select .custom-select-trigger { height: 30px; padding-left: 7px; font-size: 11px; }

.settings-row > .color-input { width: 38px; height: 30px; flex: 0 0 38px; }
.settings-row .weekday-options { min-width: auto; flex: 1 1 100%; }
.machine-settings-hours > .weekday-options { min-width: 0; flex: 1 1 auto; }
.management-empty { color: #536174; font-size: 11px; }
.permissions-note { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid #edf0f4; color: #536174; font-size: 11px; line-height: 1.6; }

.machine-dashboard-app { display: flex; height: 100vh; height: 100dvh; min-height: 0; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.machine-dashboard-app > .topbar { flex: 0 0 70px; }
.machine-dashboard-page { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 0; }
.machine-dashboard-page > .dashboard-page-heading { flex: 0 0 auto; align-items: center; gap: 14px; padding: 6px 0; }
.dashboard-heading-copy .eyebrow { margin-bottom: 2px; font-size: 9px; }
.dashboard-heading-copy h1 { margin: 0; font-size: 22px; letter-spacing: -.5px; }
.dashboard-filters { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 12px; margin-right: auto; }
.dashboard-department-filter { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; }
.dashboard-department-label { color: #536174; font-size: 11px; font-weight: 700; }
.dashboard-department-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.dashboard-department-buttons .department-filter-button { min-height: 30px; padding: 0 9px; font-size: 11px; }
.dashboard-machine-filter { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; }
.dashboard-machine-label { color: #536174; font-size: 11px; font-weight: 700; }
.dashboard-machine-buttons { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 5px; }
.dashboard-machine-buttons .department-filter-button { min-height: 30px; padding: 0 9px; font-size: 11px; }
.machine-dashboard-heading .machine-department { font-size: 12px; }
.machine-dashboard-list { display: grid; gap: 18px; }
.machine-dashboard-list { min-height: 0; flex: 1; grid-template-rows: minmax(0, 1fr); }
.machine-dashboard-card { overflow: hidden; border: 1px solid #e4e9f0; border-radius: 11px; background: #fff; box-shadow: 0 2px 8px rgb(28 43 66 / 3%); }
.machine-dashboard-card { display: flex; min-height: 0; flex-direction: column; }
.machine-dashboard-heading { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid #e6eaf0; background: #fafbfd; }
.machine-dashboard-heading h2 { margin: 0; font-size: 20px; }
.machine-dashboard-heading .machine-load { margin-left: auto; }
.machine-dashboard-heading .machine-load, .machine-dashboard-heading .machine-hours { font-size: 14px; }
.machine-dashboard-content { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: 10px; padding: 8px; }
.dashboard-schedule, .dashboard-orders { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.dashboard-schedule h3, .dashboard-orders h3 { margin: 0 0 5px; color: #43536a; font: 700 14px Manrope, sans-serif; }
.dashboard-schedule-scroll { min-height: 0; flex: 1; overflow: hidden; border: 1px solid #e8edf2; border-radius: 7px; }
.dashboard-week-grid { display: grid; width: 100%; height: 100%; min-width: 0; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: 46px minmax(0, 1fr); --dashboard-slot-height: 40px; }
.dashboard-calendar-heading { display: grid; min-height: 46px; place-items: center; border-bottom: 1px solid #e6eaf0; color: #536174; font-size: 9px; font-weight: 700; }
.dashboard-calendar-heading { min-height: 0; }
.dashboard-week-grid > .days-heading { min-width: 0; grid-column: 2; grid-row: 1; }
.dashboard-week-grid > .days-heading .day-heading { min-width: 0; min-height: 0; }
.dashboard-week-grid > .days-heading .day-heading strong { font-size: 13px; }
.dashboard-week-grid > .days-heading .day-heading span { font-size: 12px; }
.dashboard-day-select { display: flex; width: 100%; height: 100%; min-height: 0; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 2px; border: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.dashboard-day-select:hover, .dashboard-day-select[aria-pressed="true"] { background: #eaf3ff; }
.dashboard-day-select[aria-pressed="true"] { box-shadow: inset 0 -3px #4778b8; }
.dashboard-day-select:focus-visible { position: relative; z-index: 2; outline: 2px solid #4778b8; outline-offset: -2px; }
.dashboard-time-rail { display: grid; min-height: 0; grid-column: 1; grid-row: 2; grid-template-rows: repeat(var(--dashboard-slot-count), minmax(0, 1fr)); }
.dashboard-time-label { padding: 4px 3px 0 0; border-bottom: 1px solid #edf0f4; color: #536174; font-size: 11px; text-align: right; }
.dashboard-days-grid { display: grid; min-width: 0; min-height: 0; grid-column: 2; grid-row: 2; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dashboard-day-slots { position: relative; display: grid; min-width: 0; min-height: 0; grid-template-rows: repeat(var(--dashboard-slot-count), minmax(0, 1fr)); }
.dashboard-time-slot { border-bottom: 1px solid #edf0f4; border-left: 1px solid #edf0f4; background: #fff; }
.dashboard-time-slot:nth-child(2n) { background: #fcfdff; }
.dashboard-closed-day { display: grid; min-height: 0; place-items: center; border-left: 1px solid #edf0f4; color: #536174; background: repeating-linear-gradient(135deg, #fafbfc, #fafbfc 5px, #f5f6f8 5px, #f5f6f8 10px); font-size: 12px; }
.dashboard-booking-card { position: absolute; z-index: 1; right: 0; left: 0; display: flex; flex-direction: column; gap: 1px; padding: 2px 4px; overflow: hidden; border: 1px solid rgb(30 80 59 / 12%); border-left: 3px solid var(--order-edge); border-radius: 4px; color: var(--order-text-color); background: var(--order-color); font-family: inherit; font-size: 11px; line-height: 1.1; text-align: left; cursor: pointer; }
.dashboard-booking-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-booking-card span { overflow: hidden; color: var(--order-text-color); font-size: 9px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-booking-card .dashboard-booking-detail { overflow: hidden; line-height: 1.15; text-overflow: ellipsis; white-space: pre-line; overflow-wrap: anywhere; }
.pwa-install-button { position: fixed; right: 18px; bottom: 18px; z-index: 8; box-shadow: 0 4px 16px rgb(26 42 64 / 15%); white-space: nowrap; }
.dashboard-daily-list { display: grid; min-height: 0; flex: 1; grid-auto-rows: minmax(96px, auto); gap: 0; overflow-x: hidden; overflow-y: auto; border: 1px solid #e8edf2; border-radius: 7px; }
.dashboard-day-orders { display: flex; min-height: 96px; flex-direction: column; padding: 8px 10px; overflow: visible; border-bottom: 1px solid #edf0f4; }
.dashboard-day-orders:last-child { border-bottom: 0; }
.dashboard-day-orders h4 { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; margin: 0 0 7px; color: #43536a; font-size: 14px; text-transform: capitalize; }
.dashboard-day-count { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 11px; color: #52647c; background: #eef2f7; font-size: 12px; }
.dashboard-order-item { display: flex; width: 100%; min-height: 52px; flex: 0 0 auto; align-items: flex-start; gap: 8px; margin-top: 5px; padding: 8px 10px; overflow: visible; border: 0; border-left: 3px solid var(--order-edge); border-radius: 5px; color: inherit; background: var(--order-color); font: inherit; text-align: left; cursor: pointer; }
.dashboard-order-item:hover, .dashboard-booking-card:hover { filter: brightness(.97); }
.dashboard-order-item:focus-visible, .dashboard-booking-card:focus-visible { outline: 2px solid #4778b8; outline-offset: 1px; }
.dashboard-order-dialog { width: min(100% - 32px, 560px); }
.dashboard-order-dialog .dialog-heading { margin-bottom: 14px; }
.dashboard-order-dialog-details { display: grid; gap: 10px; margin: 0; }
.dashboard-order-dialog-row { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #edf0f4; }
.dashboard-order-dialog-row:last-child { padding-bottom: 0; border-bottom: 0; }
.dashboard-order-dialog-row dt { color: #536174; font-size: 12px; font-weight: 700; }
.dashboard-order-dialog-row dd { margin: 0; color: #24344a; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dashboard-order-time { display: flex; min-width: 52px; flex-direction: column; color: var(--order-text-color); font-size: 13px; font-weight: 700; }
.dashboard-order-time small { margin-top: 1px; color: var(--order-text-color); font-size: 11px; font-weight: 500; }
.dashboard-order-copy { display: grid; min-width: 0; flex: 1; gap: 5px; }
.dashboard-order-copy > strong { color: var(--order-text-color); font-size: 14px; overflow-wrap: anywhere; }
.dashboard-order-detail { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: baseline; gap: 8px; color: var(--order-text-color); font-size: 13px; }
.dashboard-order-detail > span { font-size: 11px; font-weight: 700; }
.dashboard-order-detail > strong { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.dashboard-order-article { color: var(--order-text-color); font-size: 12px; overflow-wrap: anywhere; }
.dashboard-order-extra { color: var(--order-text-color); font-size: 12px; overflow-wrap: anywhere; white-space: pre-line; }
.dashboard-live-status.is-error { color: #a32e39; }
.dashboard-live-status.is-error .live-dot { background: #bc3d46; box-shadow: 0 0 0 3px #ffeaeb; }
.dashboard-no-orders, .dashboard-empty { margin: 0; color: #536174; font-size: 12px; }
.dashboard-empty { padding: 22px 0; font-size: 13px; }
.production-report-page { padding: 0; }
.report-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 15px; padding: 15px; border: 1px solid #e4e9f0; border-radius: 10px; background: #fff; }
.report-filter label { color: #536174; font-size: 12px; font-weight: 700; }
.report-filter input, .report-filter select { height: 36px; padding: 0 9px; border: 1px solid #dfe5ed; border-radius: 7px; background: #fff; color: #26384e; font-size: 12px; }
.report-filter .custom-select { width: 150px; }
.report-filter .custom-select-trigger { height: 36px; padding: 0 9px; border-color: #dfe5ed; font-size: 12px; }
.report-filter .primary-button { min-height: 36px; margin-left: auto; padding: 0 14px; font-size: 12px; }
.report-filter .report-export-button { min-height: 36px; padding: 0 14px; font-size: 12px; }
.report-export-button:disabled { cursor: not-allowed; opacity: .55; }
.report-summary { min-height: 18px; margin: 0 0 8px; color: #536174; font-size: 12px; }
.report-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 8px; }
.report-section-heading h2 { margin: 0; font-size: 16px; }
.report-section-heading span { color: #536174; font-size: 11px; }
.report-details-heading { margin-top: 24px; }
.report-table-wrap { overflow-x: auto; border: 1px solid #e4e9f0; border-radius: 9px; background: #fff; }
.production-report-table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; }
.production-report-table th, .production-report-table td { padding: 11px 14px; border-bottom: 1px solid #edf0f4; font-size: 12px; }
.production-report-table th { color: #536174; background: #fafbfd; font-weight: 700; }
.production-report-table tbody tr:last-child td { border-bottom: 0; }
.report-count { font-weight: 800; color: #315de8; }
.report-empty { padding: 20px 14px !important; color: #536174; text-align: center !important; }

@media (min-width: 1400px) and (min-height: 800px) {
    .machine-dashboard-page > .dashboard-page-heading { gap: 12px; padding: 5px 0; }
    .dashboard-page-heading .eyebrow { margin-bottom: 2px; font-size: 10px; }
    .dashboard-page-heading h1 { margin-bottom: 0; font-size: 25px; }
    .dashboard-machine-buttons .department-filter-button { min-height: 32px; font-size: 12px; }
    .dashboard-page-heading .week-controls { gap: 8px; }
    .dashboard-page-heading .icon-button { width: 34px; height: 34px; }
    .dashboard-page-heading .week-label { min-width: 150px; gap: 2px; }
    .dashboard-page-heading .week-label strong { font-size: 16px; }
    .dashboard-page-heading .week-label span { font-size: 12px; }
    .dashboard-page-heading .today-button { height: 34px; padding: 0 12px; font-size: 12px; }
    .machine-dashboard-heading { min-height: 40px; gap: 9px; padding: 0 12px; }
    .machine-dashboard-heading .machine-indicator { width: 12px; height: 12px; }
    .machine-dashboard-heading h2 { font-size: 20px; }
    .machine-dashboard-heading .machine-load, .machine-dashboard-heading .machine-hours { font-size: 12px; }
    .machine-dashboard-heading .machine-department { padding: 3px 7px; font-size: 11px; }
    .machine-dashboard-content { grid-template-columns: minmax(0, 1.15fr) minmax(460px, .85fr); gap: 12px; padding: 10px; }
    .dashboard-schedule h3, .dashboard-orders h3 { margin-bottom: 5px; font-size: 16px; }
    .dashboard-week-grid { grid-template-columns: 56px minmax(0, 1fr); --dashboard-slot-height: 36px; }
    .dashboard-calendar-heading { font-size: 12px; }
    .dashboard-week-grid > .days-heading .day-heading strong { font-size: 16px; }
    .dashboard-week-grid > .days-heading .day-heading span { font-size: 14px; }
    .dashboard-week-grid > .days-heading .day-heading small { font-size: 12px; }
    .dashboard-time-label { padding: 5px 5px 0 0; font-size: 13px; }
    .dashboard-closed-day { font-size: 16px; }
    .dashboard-booking-card { gap: 0; padding: 2px 5px; font-size: 15px; line-height: 1.05; }
    .dashboard-booking-card span { font-size: 12px; line-height: 1.05; }
    .dashboard-booking-card .dashboard-booking-detail { font-size: 12px; }
    .dashboard-daily-list { grid-auto-rows: minmax(112px, auto); }
    .dashboard-day-orders { min-height: 112px; padding: 12px 14px; }
    .dashboard-day-orders h4 { margin-bottom: 9px; font-size: 18px; }
    .dashboard-day-count { min-width: 28px; height: 28px; border-radius: 14px; font-size: 15px; }
    .dashboard-order-item { min-height: 72px; gap: 13px; margin-top: 7px; padding: 11px 14px; border-left-width: 5px; border-radius: 7px; }
    .dashboard-order-time { min-width: 68px; font-size: 17px; }
    .dashboard-order-time small { margin-top: 3px; font-size: 14px; }
    .dashboard-order-copy { gap: 6px; }
    .dashboard-order-copy > strong { font-size: 20px; }
    .dashboard-order-detail { grid-template-columns: 145px minmax(0, 1fr); gap: 10px; font-size: 17px; }
    .dashboard-order-detail > span { font-size: 14px; }
    .dashboard-order-detail > strong { font-size: 19px; }
    .dashboard-order-article, .dashboard-order-extra { font-size: 16px; line-height: 1.4; }
    .dashboard-no-orders, .dashboard-empty { font-size: 16px; }
    .machine-dashboard-page > .save-status { min-height: 20px; margin-top: 10px; font-size: 14px; }
}

@media (min-width: 1600px) { :root { --slot-height: 31px; } }
@media (max-width: 900px) { .standard-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    .app-shell { width: calc(100% - 28px); }
    .topbar { height: auto; min-height: 58px; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
    .account-controls { width: 100%; }
    .topbar-note { font-size: 0; }
    .page-heading, .dashboard-page-heading, .report-page-heading, .settings-page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 17px;
        padding: 25px 0 19px;
    }
    .week-controls { width: 100%; justify-content: flex-start; }
    .week-label { min-width: 145px; }
    .account-controls { gap: 6px; }
    .account-controls .topbar-note { display: none; }
    .account-controls .secondary-button { height: 34px; padding: 0 8px; font-size: 11px; }
    .account-controls { flex-wrap: wrap; justify-content: flex-end; }
    .machine-dashboard-app { min-height: 100vh; min-height: 100dvh; }
    .machine-dashboard-app > .topbar { flex-basis: auto; }
    .machine-dashboard-page > .dashboard-page-heading { align-items: center; flex-direction: row; flex-wrap: wrap; gap: 6px 10px; padding: 5px 0; }
    .dashboard-page-heading h1 { font-size: 19px; }
    .dashboard-heading-copy { flex: 1 1 auto; }
    .dashboard-filters { width: 100%; flex-wrap: wrap; gap: 8px; }
    .dashboard-department-filter { width: 100%; flex-direction: column; align-items: flex-start; gap: 5px; }
    .dashboard-department-buttons { width: 100%; }
    .dashboard-department-buttons .department-filter-button { min-height: 32px; }
    .dashboard-machine-filter { width: 100%; flex-direction: column; align-items: flex-start; gap: 5px; }
    .dashboard-machine-buttons { width: 100%; }
    .dashboard-machine-buttons .department-filter-button { min-height: 32px; }
    .dashboard-page-heading .week-controls { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 7px; }
    .dashboard-page-heading .week-label { min-width: 120px; }
    .schedule-key { flex-wrap: wrap; justify-content: flex-start; }
    .schedule-heading-main { align-items: flex-start; flex-direction: column; gap: 8px; }
    .department-filter { align-self: flex-end; }
    .dashboard-page-heading .dashboard-machine-filter { flex-wrap: wrap; }
    .machine-dashboard-content { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 7px; padding: 7px; }
    .dashboard-schedule h3, .dashboard-orders h3 { margin-bottom: 5px; font-size: 14px; }
    .dashboard-week-grid { grid-template-columns: 36px minmax(0, 1fr); --dashboard-slot-height: 36px; }
    .dashboard-week-grid > .days-heading .day-heading strong { font-size: 11px; }
    .dashboard-week-grid > .days-heading .day-heading span { font-size: 10px; }
    .dashboard-time-label { padding: 2px 2px 0 0; font-size: 10px; }
    .dashboard-booking-card { gap: 1px; padding: 2px 3px; font-size: 9px; }
    .dashboard-booking-card span { font-size: 8px; }
    .dashboard-day-orders { min-height: 88px; padding: 7px 8px; }
    .dashboard-day-orders h4 { gap: 5px; font-size: 12px; }
    .dashboard-day-count { min-width: 19px; height: 19px; font-size: 11px; }
    .dashboard-order-item { min-height: 48px; gap: 6px; padding: 7px; }
    .dashboard-order-time { min-width: 44px; font-size: 12px; }
    .dashboard-order-time small { font-size: 11px; }
    .dashboard-order-copy > strong { font-size: 12px; }
    .dashboard-order-detail { grid-template-columns: 88px minmax(0, 1fr); gap: 5px; font-size: 12px; }
    .dashboard-order-detail > span { font-size: 10px; }
    .dashboard-order-detail > strong { font-size: 13px; }
    .dashboard-order-article { font-size: 11px; }
    .report-filter { align-items: stretch; }
    .report-filter label { flex: 1 0 100%; }
    .report-filter input, .report-filter select { width: 100%; }
    .report-filter .custom-select { width: 100%; }
    .report-filter .primary-button { width: 100%; margin-left: 0; }
    .machine-dashboard-heading { flex-wrap: wrap; min-height: 38px; padding: 6px 8px; }
    .machine-dashboard-heading .machine-load { margin-left: auto; }
    .orders-section, .schedule-section { padding: 14px 12px; }
    .section-heading { align-items: flex-start; }
    .section-heading h2 { font-size: var(--section-title-size); }
    .section-heading p { max-width: 230px; line-height: 1.5; }
    .order-card { min-width: 165px; }
    .standard-order-dialog { padding: 18px; }
    .auth-card { padding: 23px; }
    .settings-page { width: 100%; padding-top: 0; }
    .settings-nav { overflow-x: auto; }
    .settings-nav button { flex: 0 0 auto; padding: 0 9px; }
    .settings-section { padding: 15px 12px; }
    .settings-section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .settings-section-heading > p { text-align: left; }
    .user-inline-form input { flex-basis: 100% !important; }
}
@media (max-width: 480px) { .standard-product-grid { grid-template-columns: 1fr; } }
@media (max-width: 1200px) { #machine-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    .settings-content { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .settings-content > .settings-section { grid-column: 1; }
    #product-list { grid-template-columns: minmax(0, 1fr); }
    #machine-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .machine-department-group { padding: 11px; }
    .machine-settings-main { grid-template-columns: 10px minmax(0, 1fr) auto; }
    .machine-settings-main > .department-select { grid-column: 2; grid-row: 2; }
    .machine-settings-main > .machine-order-controls { grid-column: 3; grid-row: 1 / span 2; }
    .machine-settings-hours { grid-template-columns: auto auto; }
    .machine-settings-hours > .weekday-options { grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-start; }
    .machine-settings-hours > .danger-button { grid-column: 1 / -1; justify-self: end; }
    .product-settings-fields { grid-template-columns: minmax(0, 1fr); }
    .product-settings-actions { grid-template-columns: minmax(0, 1fr) 90px 58px; }
    .product-settings-actions > .danger-button { grid-column: 1 / -1; }
}
@media (max-width: 520px) { #machine-list { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
    .planner-loading-spinner { animation: none; }
}
