* {
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: #f3f1eb;
    color: #1f2428;
}

body.device-profile-tablet {
    --wrap-max-width: 1600px;
    --panel-width: 92%;
    --panel-max-width: calc(var(--wrap-max-width) * 0.92);
    --tile-height: 120px;
}

:root {
    --wrap-max-width: 1280px;
    --panel-width: 72%;
    --panel-max-width: calc(var(--wrap-max-width) * 0.72);
    --tile-height: 140px;
}

.wrap {
    max-width: var(--wrap-max-width);
    margin: 0 auto;
    padding: 24px;
}

main.wrap {
    padding-top: 16px;
}

.topbar {
    background: linear-gradient(135deg, #143642, #305252);
    color: #fff;
}

.topbar .wrap {
    padding-top: 6px;
    padding-bottom: 6px;
}

.topbar-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.topbar-inner-compact {
    width: var(--panel-width);
    margin: 0 auto;
}

.topbar-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.topbar h1 {
    margin: 0;
}

.muted {
    color: #6a737d;
}

.phone-link {
    color: inherit;
    text-decoration: none;
}

.topbar .muted {
    color: rgba(255,255,255,0.8);
}

.topbar-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    text-decoration: none;
}

.topbar-logo {
    display: block;
    height: 100%;
    max-height: none;
    width: auto;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
}

.section-page-title {
    margin: 0 0 16px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #143642;
    letter-spacing: 0.01em;
}

.grid {
    display: grid;
    gap: 20px;
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 20px;
}

.two {
    grid-template-columns: 1fr 1.4fr;
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(20, 54, 66, 0.08);
}

.narrow-panel {
    width: var(--panel-width);
    max-width: var(--panel-max-width);
    margin-left: auto;
    margin-right: auto;
}

.list-panel {
    width: var(--panel-width);
    max-width: var(--panel-max-width);
    margin-left: auto;
    margin-right: auto;
}

.calendar-panel {
    width: 92%;
    max-width: calc(var(--wrap-max-width) * 0.92);
}

.dashboard-panel {
    min-height: 420px;
}

.card h2, .card h3 {
    margin-top: 0;
}

.stat .big {
    font-size: 40px;
    font-weight: 700;
}

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

.form-grid .full {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

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

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d7d4cb;
    border-radius: 10px;
    background: #fffdf8;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.inline-checks {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.check input {
    width: auto;
}

.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    background: #305252;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.button.secondary {
    background: #dfe8e8;
    color: #254046;
}

.button.warning {
    background: #d4a514;
    color: #1f2428;
}

.button.success {
    background: #2f8f4e;
    color: #fff;
}

.button.danger {
    background: #d64c4c;
    color: #fff;
}

.small-button {
    padding: 8px 12px;
    font-size: 14px;
}

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

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

th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #ece7dc;
    text-align: left;
    vertical-align: top;
}

.simple-list {
    margin: 0;
    padding-left: 18px;
}

.stack {
    display: grid;
    gap: 12px;
}

.row {
    display: flex;
    gap: 12px;
}

.between {
    justify-content: space-between;
}

.center {
    align-items: center;
}

.sort-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sort-links a {
    text-decoration: none;
    color: #305252;
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf2f2;
}

.sort-links a.active {
    background: #305252;
    color: #fff;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf2f2;
}

.success-badge {
    background: #d9efe0;
    color: #1d5a30;
}

.group-block + .group-block {
    margin-top: 18px;
}

.group-block.strong {
    padding: 12px 14px;
    border-top: 1px solid #ece7dc;
    border-radius: 14px;
    background: #edf6ef;
    border: 1px solid #cfe4d4;
}

.group-block.strong h3 {
    font-size: 22px;
    margin-bottom: 0;
}

.alert {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: #fff3d6;
}

.info-box {
    padding: 14px;
    border-radius: 12px;
    background: #edf2f2;
}

.top-space {
    margin-top: 16px;
}

.tile-section {
    margin-top: 20px;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    grid-auto-rows: var(--tile-height);
    align-content: start;
    align-items: stretch;
}

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

.fixed-grid {
    min-height: 0;
}

.selector-grid {
    min-height: 0;
}

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

.settings-section-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
}

.setting-tab {
    width: auto;
    min-height: 40px;
    padding: 8px 16px;
    justify-content: center;
    font-size: 16px;
    white-space: nowrap;
}

.setting-tab.active {
    background: #305252;
    color: #fff;
    border-color: #305252;
}

.page-switch-tabs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
}

.page-switch-tabs.equal-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-switch-tab {
    justify-content: center;
    text-align: center;
    min-height: 40px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.1;
}

.page-switch-tab.active {
    pointer-events: none;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.1;
}

.page-switch-spacer {
    display: block;
}

.page-switch-target {
    justify-self: end;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.1;
}

.suspended-badge {
    background: #f5d7d7;
    color: #8a2f2f;
}

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

.calendar-month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-page-title {
    margin: 0;
    min-width: 240px;
}

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

.calendar-weekdays {
    margin-bottom: 10px;
}

.calendar-weekdays div {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #4f5c60;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calendar-day {
    min-height: 155px;
    padding: 10px;
    border: 1px solid #e1ddd4;
    border-radius: 14px;
    background: #fffdf8;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
}

.customer-calendar-mobile-list {
    display: none;
}

.customer-calendar-mobile-day {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 10px;
    align-items: stretch;
    padding: 10px 12px;
    border: 1px solid #e1ddd4;
    border-radius: 14px;
    background: #fffdf8;
    cursor: pointer;
}

.customer-calendar-mobile-day + .customer-calendar-mobile-day {
    margin-top: 8px;
}

.customer-calendar-mobile-day.weekend {
    background: #e8decd;
}

.customer-calendar-mobile-day.today {
    border-color: #305252;
    box-shadow: inset 0 0 0 1px #305252;
}

.customer-calendar-mobile-day.closed-day {
    background: #f8d9d9;
    border-color: #e07a7a;
}

.customer-calendar-mobile-head {
    display: grid;
    align-content: center;
    gap: 4px;
    padding-right: 8px;
    border-right: 1px solid #e7dfd1;
}

.customer-calendar-mobile-weekday {
    font-size: 13px;
    font-weight: 700;
    color: #4f5c60;
    line-height: 1.1;
}

.customer-calendar-mobile-date {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #143642;
}

.customer-calendar-mobile-events {
    display: grid;
    gap: 6px;
    align-content: center;
    min-width: 0;
}

.customer-calendar-mobile-empty {
    font-size: 13px;
    color: #6a737d;
}

.customer-calendar-hint {
    margin: 0 0 12px;
    text-align: center;
    color: #4f5c60;
    font-size: 15px;
}

.staff-schedule-panel {
    width: calc(100vw - 96px);
    max-width: calc(100vw - 96px);
    margin-left: calc(50% - 50vw + 48px);
    margin-right: calc(50% - 50vw + 48px);
    padding: 12px;
}

.staff-schedule-note {
    margin: 6px 0 0;
}

.staff-schedule-sheet {
    width: 100%;
}

.staff-schedule-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
}

.staff-schedule-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.staff-schedule-filter-pill {
    position: relative;
    display: inline-flex;
}

.staff-schedule-filter-pill input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.staff-schedule-filter-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid #7f8a8f;
    background: #f8fafb;
    color: #273136;
    font-size: 12px;
    font-weight: 700;
    border-top: 4px solid var(--employee-color);
    cursor: pointer;
}

.staff-schedule-filter-pill input:not(:checked) + span {
    opacity: 0.45;
    background: #eceff1;
}

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

.staff-schedule-actions form {
    margin: 0;
}

.staff-generation-summary {
    border: 1px solid #d7d4cb;
    border-radius: 12px;
    background: #fffdf8;
    padding: 10px 12px;
}

.staff-generation-summary-modal {
    max-width: 980px;
}

.staff-generation-summary-table-wrap {
    overflow-x: auto;
}

.staff-generation-summary-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    table-layout: fixed;
}

.staff-generation-summary-table th,
.staff-generation-summary-table td {
    border: 1px solid #6f7a80;
    padding: 10px 8px;
    text-align: center;
}

.staff-generation-summary-table thead th {
    background: color-mix(in srgb, var(--summary-color, #305252) 32%, #ffffff);
    font-size: 15px;
}

.staff-generation-summary-table thead th:first-child {
    background: #edf2ee;
}

.staff-generation-summary-table tbody th {
    width: 160px;
    background: #edf2ee;
    text-align: left;
    font-size: 14px;
}

.staff-generation-summary-table tbody td {
    background: color-mix(in srgb, var(--summary-color, #305252) 18%, #ffffff);
    font-size: 16px;
    font-weight: 700;
}

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

.staff-schedule-table {
    border-collapse: collapse;
    width: auto;
    table-layout: fixed;
    background: #fffdf8;
}

.staff-schedule-table th,
.staff-schedule-table td {
    border: 1px solid #7f8a8f;
    padding: 0;
}

.staff-schedule-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #edf2ee;
    min-height: 44px;
    height: 44px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.staff-schedule-table thead th:first-child {
    background: #efe8da;
}

.staff-col-day {
    width: 92px;
}

.staff-col-employee {
    width: 102px;
}

.staff-col-events {
    width: 260px;
}

.staff-schedule-header-name {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border-top: 4px solid var(--employee-color);
    background: #edf2ee;
    word-break: break-word;
    line-height: 1.1;
}

.staff-schedule-header-link {
    color: inherit;
    text-decoration: none;
}

.staff-schedule-table thead th:last-child {
    background: #dde7ea;
}

.staff-day-start td,
.staff-day-start th {
    border-top: 2px solid #3f474c;
}

.staff-day-start.weekend .staff-day-cell,
.staff-day-second.weekend .staff-day-cell {
    background: #e4d4b8;
}

.staff-day-cell {
    width: 92px;
    min-width: 92px;
    vertical-align: middle;
    background: #fffdf8;
    padding: 0;
}

.staff-day-main {
    min-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px;
    text-align: center;
}

.staff-day-weekday {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
}

.staff-day-date {
    font-size: 15px;
    font-weight: 700;
    color: #2b353a;
}

.staff-shift-cell {
    width: 102px;
    min-width: 102px;
    background: var(--employee-column-tint, #f8fafb);
    position: relative;
}

.staff-shift-cell[data-availability-pill]::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 18px;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.staff-shift-cell.availability-available::after {
    background: #cda93a;
}

.staff-shift-cell.availability-preferred::after {
    background: #2f8f4e;
}

.staff-shift-cell.availability-unavailable::after {
    background: #b85c5c;
}

.staff-shift-toggle {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.staff-shift-toggle input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.staff-shift-toggle span {
    width: 100%;
    height: 100%;
    min-height: 40px;
    border: 1px solid #8b959b;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 22px;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    position: relative;
    z-index: 1;
}

.staff-shift-toggle input:checked + span {
    background: #3f8f70;
    border-color: #2e6f57;
    color: #ffffff;
}

.staff-availability-toggle {
    width: 100%;
    min-height: 40px;
    border: 1px solid #8b959b;
    background: rgba(255, 255, 255, 0.55);
    color: #263238;
    font: inherit;
    cursor: pointer;
    padding: 4px 6px;
}

.staff-availability-toggle.availability-preferred {
    background: rgba(212, 165, 20, 0.28);
}

.staff-availability-toggle.availability-unavailable {
    background: rgba(184, 92, 92, 0.28);
}

.availability-label {
    display: block;
    font-size: 12px;
    line-height: 1.1;
}

.staff-events-cell {
    width: 260px;
    min-width: 260px;
    vertical-align: top;
    padding: 0;
}

.staff-events-lane-table {
    position: relative;
    min-height: 80px;
    background: #f4f1e8;
    height: 100%;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

.staff-events-lane-table::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #5f696f;
    z-index: 0;
}

.staff-schedule-row > .staff-schedule-toggle:nth-last-child(n + 2),
.staff-schedule-row > .staff-schedule-side,
.staff-schedule-row > .staff-schedule-events-lane {
    margin-right: -1px;
}

.staff-schedule-sticky-head > * {
    margin-right: -1px;
}

.staff-schedule-event-block {
    position: absolute;
    z-index: 1;
    background: var(--event-color);
    color: #fff;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
}

.staff-schedule-event-block.closed {
    background: #df8080;
}


.customer-event-info-modal {
    max-width: 560px;
}

.calendar-day.empty {
    background: transparent;
    border: 1px dashed #ddd6c8;
}

.calendar-day.today {
    border-color: #305252;
    box-shadow: inset 0 0 0 1px #305252;
}

.calendar-day.closed-day {
    background: #f8d9d9;
    border-color: #e07a7a;
    box-shadow: inset 0 0 0 1px #e07a7a;
}

.calendar-day-number {
    align-self: flex-start;
    background: transparent;
    color: #143642;
    border: none;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.calendar-day.closed-day .calendar-day-number {
    color: #9b4949;
}

.calendar-day-events {
    display: grid;
    gap: 6px;
    align-content: start;
}

.calendar-event-chip {
    display: grid;
    gap: 2px;
    width: 100%;
    text-align: left;
    padding: 8px 9px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--event-color) 60%, #ffffff 40%);
    background: color-mix(in srgb, var(--event-color) 14%, #ffffff 86%);
    color: #183238;
    cursor: pointer;
}

.calendar-request-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    padding: 7px 9px;
    border-radius: 10px;
    border: 1px solid #ff8d2a;
    background: #ffe2c2;
    color: #8a3d00;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.calendar-request-chip.backup {
    border-color: #b9b4d9;
    background: #f2f0fb;
    color: #453d72;
}

.calendar-request-chip.active {
    box-shadow: inset 0 0 0 2px #c14e00;
    background: #ffcf99;
}

.calendar-event-chip:focus-visible,
.calendar-day-number:focus-visible,
.color-choice-button:focus-visible {
    outline: 2px solid #305252;
    outline-offset: 2px;
}

.color-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-choice-button {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #d3cec2;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.color-choice-button.active {
    border-color: #305252;
    box-shadow: inset 0 0 0 2px #305252;
}

.color-choice-swatch {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: var(--color-choice);
}

.color-choice-default {
    background:
        linear-gradient(135deg, #305252 0 50%, #d3ded7 50% 100%);
}

.calendar-event-time {
    font-size: 12px;
    font-weight: 700;
}

.calendar-event-title {
    font-size: 13px;
    line-height: 1.2;
}

.calendar-closed-label {
    width: 100%;
    text-align: center;
    padding: 10px 8px;
    border-radius: 10px;
    background: #efb7b7;
    color: #8f4343;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.calendar-day-event-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.calendar-request-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.compact-stack {
    gap: 8px;
}

.calendar-month-list h3 {
    margin-bottom: 0;
}

.calendar-list-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.calendar-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #183238;
    background: color-mix(in srgb, var(--event-color) 18%, #ffffff 82%);
    border: 1px solid color-mix(in srgb, var(--event-color) 58%, #ffffff 42%);
}

.calendar-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.compact-checks {
    gap: 8px;
}

#customer-birthday-only.hidden {
    display: none;
}

.customer-step-title {
    font-size: 20px;
}

.customer-picked-date {
    font-size: 20px;
    font-weight: 600;
    color: #143642;
}

.customer-step-label {
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #4f5c60;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.customer-summary-box {
    border: 1px solid #ddd6c8;
    border-radius: 12px;
    background: #fffdf8;
    padding: 14px;
}

.customer-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #eee8dc;
}

.customer-summary-row:last-child {
    border-bottom: none;
}

.weekday-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.event-mode-section {
    padding: 14px;
    border: 1px solid #ece7dc;
    border-radius: 14px;
    background: #fffdf8;
}

.inline-choice-row {
    flex-wrap: wrap;
}

.choice-tab,
.weekday-tab,
.duration-tab,
.staff-count-tab,
.event-mode-tab {
    min-height: 40px;
}

.weekday-check {
    min-width: 72px;
}

.weekday-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.weekday-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.weekday-choice .setting-tab {
    min-width: 58px;
}

.weekday-choice input:checked + .setting-tab {
    background: #305252;
    color: #fff;
    border-color: #305252;
}

.label-inline {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tile, .mini-tile {
    border: 1px solid #d7d4cb;
    background: #fffdf8;
    color: #1f2428;
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    font-weight: 700;
    min-height: var(--tile-height);
}

.tile {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    height: 100%;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    overflow: hidden;
}

.dashboard-tile-with-badge {
    position: relative;
}

.dashboard-notice-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2f8f4e;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
}

.selector-grid .tile,
.home-grid .tile,
.settings-grid .tile {
    min-height: var(--tile-height);
}

.setting-tile {
    font-size: 20px;
    font-weight: 700;
}

.setting-tile.active {
    background: #305252;
    color: #fff;
    border-color: #305252;
}

.mini-tile {
    font-weight: 600;
}

.nav-tile {
    font-size: 24px;
}

.nav-tile.active {
    background: #305252;
    color: #fff;
    border-color: #305252;
}

.muted-tile {
    color: #6a737d;
    background: #f5f2ea;
}

.muted-tile:empty {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.empty-tile {
    cursor: default;
}

body.input-mode-keyboard .tile {
    min-height: 112px;
    padding: 14px;
}

body.input-mode-keyboard .button,
body.input-mode-keyboard button {
    padding-top: 9px;
    padding-bottom: 9px;
}

body.input-mode-keyboard .nav a {
    padding-top: 10px;
    padding-bottom: 10px;
}

body.device-profile-tablet .wrap {
    padding-left: 18px;
    padding-right: 18px;
}

body.device-profile-tablet .topbar-inner-compact,
body.device-profile-tablet .narrow-panel,
body.device-profile-tablet .list-panel,
body.device-profile-tablet .calendar-panel {
    width: 100%;
    max-width: 100%;
}

body.device-profile-tablet .card {
    border-radius: 16px;
}

body.device-profile-tablet .button,
body.device-profile-tablet button,
body.device-profile-tablet input,
body.device-profile-tablet select,
body.device-profile-tablet textarea {
    min-height: 48px;
}

body.device-profile-tablet .settings-grid,
body.device-profile-tablet .home-grid,
body.device-profile-tablet .selector-grid,
body.device-profile-tablet .tile-grid,
body.device-profile-tablet .tile-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.device-profile-tablet .setting-tile,
body.device-profile-tablet .nav-tile {
    font-size: 22px;
}

body.device-profile-tablet .staff-schedule-panel {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin-left: calc(50% - 50vw + 16px);
    margin-right: calc(50% - 50vw + 16px);
}

.tree-card {
    padding: 16px;
    border-radius: 14px;
    background: #fffdf8;
    border: 1px solid #ece7dc;
}

.category-mini-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.category-add-tile {
    font-size: 36px;
    text-decoration: none;
    color: #305252;
}

.shopping-lines {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shopping-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 12px;
    border-bottom: 1px solid #ece7dc;
    border-radius: 14px;
    background: #fffdf8;
}

.shopping-line.alt {
    background: #f8f2e7;
}

.shopping-main {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.shopping-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shopping-line-top,
.shopping-line-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.shopping-title {
    font-size: 20px;
    line-height: 1.15;
}

.shopping-amount {
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.shopping-side {
    font-size: 15px;
    color: #6a737d;
    text-align: right;
    white-space: nowrap;
}

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

.product-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-right {
    margin-left: auto;
    justify-content: flex-end;
}

.toolbar-right input {
    width: min(280px, 100%);
}

.list-search {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: block;
}

.search-row {
    width: 100%;
}

.suggestion-list {
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
    margin-top: -6px;
}

.suggestion-item {
    width: 100%;
    justify-content: flex-start;
    background: #f6efe6;
    color: #5c4938;
    border: 1px solid #dfd1c0;
}

.contact-confirm-label {
    font-size: 18px;
    font-weight: 700;
    color: #305252;
}

.decision-button {
    min-width: 72px;
    font-weight: 700;
}

.product-filters {
    display: none;
    gap: 12px;
}

.product-filters.filter-open {
    display: grid;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-filter-button {
    background: #f7efe3;
    color: #6c5638;
    border: 1px solid #d8c1a1;
}

.product-filter-button.active,
.filter-toggle-button.active {
    background: #d6c0a6;
    color: #3e2d18;
    border: 1px solid #b39573;
}

.filter-toggle-button {
    display: inline-flex;
    background: #f7efe3;
    color: #6c5638;
    border: 1px solid #d8c1a1;
}

.product-card {
    border: 1px solid #ece7dc;
    border-radius: 14px;
    padding: 14px 16px;
    background: #fffdf8;
}

.product-card-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.product-card-title-wrap {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.product-card-title {
    font-size: 21px;
    line-height: 1.2;
}

.product-card-stock {
    font-size: 19px;
    font-weight: 700;
    white-space: nowrap;
}

.product-card-title-line {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.product-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
}

.add-mini-button {
    background: #2f8f4e;
}

.queued-add-button {
    background: #d4a514;
    color: #1f2428;
    min-width: 48px;
}

.low-stock-add-button {
    background: #d64c4c;
    color: #fff;
}

.delivery-add-button {
    background: #87b88c;
    color: #1f2428;
    min-width: 48px;
}

.icon-mini-button {
    min-width: 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.button-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.queued-qty,
.queued-qty-label {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.queued-qty-label {
    min-width: 42px;
    text-align: right;
    color: #7a5b00;
}


.product-card-more {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #ece7dc;
}

.draft-title-row {
    flex-wrap: wrap;
    gap: 8px;
}

.draft-title-row .badge {
    white-space: nowrap;
}

.purchase-order-details {
    background: #f7f4ee;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #e6ded0;
}

.order-item-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.order-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

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

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

.quick-inline-form {
    position: relative;
    display: flex;
    align-items: center;
}

.quick-inline-panel {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #d7d4cb;
    background: #fffdf8;
    box-shadow: 0 8px 20px rgba(20, 54, 66, 0.12);
    white-space: nowrap;
}

.quick-inline-form.active .quick-inline-panel {
    display: flex;
}

.quick-inline-quantity {
    width: 86px;
    padding: 8px 10px;
    text-align: center;
}

.quick-inline-unit {
    font-size: 14px;
    font-weight: 700;
    color: #254046;
}

.quick-inline-message {
    font-size: 14px;
    font-weight: 700;
    color: #2f8f4e;
}

.quick-inline-form .icon-mini-button[data-active="true"] {
    font-size: 16px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 54, 66, 0.35);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    overflow-y: auto;
}

.quick-add-card {
    width: min(420px, 100%);
}

.modal-backdrop > .card {
    width: min(var(--panel-max-width), calc(100vw - 40px));
    max-width: min(var(--panel-max-width), calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal-unit {
    display: flex;
    align-items: end;
    padding-bottom: 10px;
}

.input-prefix-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
}

.input-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #d7d4cb;
    border-radius: 10px;
    background: #fffdf8;
    color: #254046;
    font-weight: 600;
}

.add-panel {
    align-self: start;
}

.hidden {
    display: none !important;
}

.category-pill {
    min-width: 220px;
    justify-content: center;
}

.manual-form .category-pill {
    width: fit-content;
    min-width: 220px;
}

.manual-form .hidden {
    display: none !important;
}

.nip-inline-form {
    display: grid;
    grid-template-columns: 1fr 56px;
    gap: 10px;
    align-items: stretch;
}

.square-icon-button {
    width: 56px;
    min-width: 56px;
    padding: 0;
}

.link-button {
    background: transparent;
    color: #305252;
    padding: 0;
}

.link-button.danger {
    color: #9c2f2f;
}

@media (max-width: 900px) {
    .card {
        padding: 15px;
    }

    .narrow-panel {
        width: 100%;
    }

    .list-panel {
        width: 100%;
    }

    .calendar-panel {
        width: 100%;
        max-width: 100%;
    }

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

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

    .group-block.strong {
        padding: 9px 10px;
    }

    .calendar-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-month-nav {
        justify-content: center;
    }

    .calendar-page-title {
        min-width: 0;
        font-size: 21px;
    }

    .customer-calendar-mobile-list {
        display: block;
        margin-top: 10px;
    }

    .customer-calendar-page .calendar-weekdays,
    .customer-calendar-page .calendar-grid {
        display: none;
    }

    .customer-calendar-page .calendar-header-row {
        gap: 10px;
    }

    .customer-calendar-page .calendar-month-nav {
        justify-content: space-between;
    }

    .customer-calendar-page .calendar-page-title {
        font-size: 20px;
    }

    .customer-calendar-mobile-day {
        grid-template-columns: 84px 1fr;
        gap: 8px;
        padding: 8px 10px;
    }

    .customer-calendar-mobile-events {
        gap: 4px;
    }

    .customer-calendar-mobile-weekday {
        font-size: 12px;
    }

    .customer-calendar-mobile-date {
        font-size: 24px;
    }

    .customer-calendar-mobile-events .calendar-event-chip {
        padding: 5px 7px;
        border-radius: 9px;
        width: 100%;
    }

    .customer-calendar-mobile-events .calendar-event-time,
    .customer-calendar-mobile-events .calendar-event-title,
    .customer-calendar-mobile-events .calendar-closed-label {
        font-size: 12px;
    }

    .topbar-inner {
        justify-content: center;
    }

    .topbar-inner-compact {
        width: 100%;
    }

    .topbar-cluster {
        width: 100%;
        gap: 0;
    }

    .topbar-logo {
        height: 100%;
        max-height: none;
    }

    .section-page-title {
        font-size: 22px;
    }

    .list-toolbar,
    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }

    .toolbar-right {
        margin-left: 0;
        justify-content: flex-start;
    }

    .toolbar-right input {
        width: 100%;
    }

    .list-search {
        max-width: none;
        margin-left: 0;
    }

    .product-card-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .product-card-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .quick-inline-panel {
        right: 56px;
        top: auto;
        bottom: calc(100% + 8px);
        transform: none;
    }

    .product-details-grid {
        grid-template-columns: 1fr;
    }

    .product-card-title {
        font-size: 19px;
    }

    .product-card-stock {
        font-size: 17px;
    }
}

@media (min-width: 901px) {
}
