* {
    box-sizing: border-box;
}

:root {
    /* Version terrain: force le navigateur a recharger le theme compile. */
    --page-bg: #fff8ed;
    --surface: #ffffff;
    --surface-soft: #fff3df;
    --border: #ead7b8;
    --border-soft: #f2e2c9;
    --border-strong: #d7aa68;
    --text: #172019;
    --muted: #6f6252;
    --primary: #ff9800;
    --primary-dark: #d97900;
    --primary-deep: #5f3900;
    --accent: #ff9800;
    --danger: #9f1239;
    --shadow-sm: 0 1px 2px rgba(23, 32, 25, 0.06);
    --shadow-md: 0 12px 30px rgba(23, 32, 25, 0.08);
    --radius: 8px;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

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

input,
select,
textarea,
button {
    max-width: 100%;
}

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

h1,
h2,
h3,
h4,
p,
span,
strong,
td,
th,
a,
label,
small {
    min-width: 0;
    overflow-wrap: anywhere;
}

:focus-visible {
    outline: 3px solid rgba(217, 119, 6, 0.32);
    outline-offset: 2px;
}

a {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

.page-shell,
.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.home-shell {
    min-height: calc(100vh - 72px);
}

.home-navbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 14px 28px;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.home-brand {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.home-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    min-width: 0;
}

.home-nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius);
}

.home-brand:hover,
.home-nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.24);
}

.hero,
.auth-panel {
    width: min(100%, 520px);
}

.hero {
    padding: 8px;
}

.hero h1,
.auth-panel h1 {
    margin: 0 0 16px;
    font-size: 40px;
    line-height: 1.05;
}

.hero p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
}

.eyebrow {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 28px;
    min-width: 0;
}

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

.auth-panel {
    display: grid;
    gap: 12px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.auth-panel label {
    font-weight: 700;
}

.auth-panel input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font: inherit;
}

.auth-panel button {
    padding: 12px 16px;
    border: 0;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.alert,
.notice {
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 14px;
}

.alert {
    background: #fff1f2;
    color: var(--danger);
    border: 1px solid #fecdd3;
}

.notice {
    background: #ecfdf3;
    color: var(--primary-deep);
    border: 1px solid #bbf7d0;
}

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

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 18px;
    background: var(--primary);
    color: #fff;
}

.admin-sidebar a {
    color: #fff;
}

.brand {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
}

.hamburger-button {
    display: none;
    width: 44px;
    height: 42px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: var(--radius);
    cursor: pointer;
}

.hamburger-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 999px;
    transition: transform 160ms ease, opacity 160ms ease;
}

.admin-sidebar.is-menu-open .hamburger-button span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.admin-sidebar:focus-within .hamburger-button span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.admin-sidebar.is-menu-open .hamburger-button span:nth-child(2) {
    opacity: 0;
}

.admin-sidebar:focus-within .hamburger-button span:nth-child(2) {
    opacity: 0;
}

.admin-sidebar.is-menu-open .hamburger-button span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.admin-sidebar:focus-within .hamburger-button span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.admin-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-sidebar nav a,
.logout-link {
    min-width: 0;
    padding: 10px 12px;
    color: #eaf5eb;
    border-radius: var(--radius);
    font-weight: 700;
    line-height: 1.2;
    transition: background 160ms ease, color 160ms ease;
}

.admin-sidebar nav a:hover,
.logout-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sound-toggle {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--radius);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-align: left;
}

.sound-toggle.sound-enabled {
    background: #fff7ed;
    color: var(--primary-deep);
    border-color: #fff7ed;
}

.notification-toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 50;
    display: grid;
    gap: 10px;
    width: min(340px, calc(100vw - 32px));
}

.notification-toast {
    padding: 14px 16px;
    background: var(--primary-deep);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(124, 45, 18, 0.28);
    font-weight: 800;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 180ms ease;
}

.notification-toast.is-hiding {
    opacity: 0;
    transform: translateY(8px);
}

.logout-link {
    margin-top: auto;
}

.admin-main {
    width: 100%;
    max-width: 1560px;
    min-width: 0;
    padding: 28px;
}

.admin-header {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    min-width: 0;
}

.admin-header h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
}

.button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button {
    background: var(--primary);
    color: #fff;
}

.danger-button {
    background: var(--danger);
    color: #fff;
}

.button:hover,
.danger-button:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.button:disabled,
.danger-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

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

.metric-card {
    display: grid;
    gap: 10px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

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

.metric-card strong {
    font-size: 34px;
    line-height: 1;
}

.cashier-metrics {
    margin-bottom: 24px;
}

.period-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.period-form div {
    display: grid;
    gap: 6px;
}

.period-form label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.period-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font: inherit;
}

.period-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font: inherit;
}

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

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

.analytics-panel {
    display: grid;
    gap: 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

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

.analytics-panel header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.analytics-panel h2 {
    margin: 0;
}

.analytics-panel header span {
    color: var(--primary-dark);
    font-weight: 800;
}

.bar-chart {
    min-height: 260px;
}

.vertical-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 12px;
    align-items: end;
}

.bar-column {
    display: grid;
    grid-template-rows: auto 180px auto;
    gap: 8px;
    min-width: 0;
    text-align: center;
}

.bar-column small,
.bar-value {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.bar-track {
    position: relative;
    align-self: stretch;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 2px;
    background: var(--primary);
}

.horizontal-bars {
    display: grid;
    gap: 12px;
}

.hbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 2fr) minmax(84px, auto);
    gap: 10px;
    align-items: center;
}

.hbar-row span {
    min-width: 0;
    color: var(--muted);
    font-weight: 800;
}

.hbar-row strong {
    text-align: right;
}

.hbar {
    height: 14px;
    background: var(--surface-soft);
    border-radius: 999px;
    overflow: hidden;
}

.hbar div {
    height: 100%;
    min-width: 2px;
    background: var(--primary);
    border-radius: inherit;
}

.status-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.status-summary div {
    display: grid;
    gap: 8px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    min-width: 0;
}

.status-summary span {
    color: var(--muted);
    font-weight: 800;
    text-transform: capitalize;
}

.status-summary strong {
    font-size: 28px;
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
}

table {
    min-width: 720px;
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: top;
    max-width: 280px;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}

.row-actions > * {
    min-width: 0;
}

.role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.resource-form {
    display: grid;
    gap: 16px;
    width: min(100%, 720px);
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.resource-form > div {
    display: grid;
    gap: 6px;
}

.resource-form label {
    font-weight: 700;
}

.resource-form input,
.resource-form textarea,
.resource-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font: inherit;
}

.resource-form input[type="checkbox"] {
    width: auto;
}

.details-list {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px 20px;
    width: min(100%, 720px);
    margin: 0 0 24px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.details-list dt {
    color: var(--muted);
    font-weight: 800;
}

.details-list dd {
    margin: 0;
}

.dish-thumb {
    display: inline-grid;
    place-items: center;
    width: 72px;
    height: 54px;
    object-fit: cover;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.dish-preview,
.dish-hero {
    width: min(100%, 520px);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.dish-preview {
    max-width: 280px;
}

.form-preview-label {
    color: var(--muted);
    font-weight: 800;
}

.service-sidebar {
    background: var(--primary);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
    gap: 16px;
}

.service-card {
    display: grid;
    gap: 18px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.service-card h2 {
    margin: 4px 0 8px;
}

.service-card p {
    margin: 0;
    color: var(--muted);
}

.reservation-note {
    display: grid;
    gap: 6px;
    padding: 10px;
    background: #fff7ed;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 800;
}

.service-card-kicker {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 6px 10px;
    background: var(--surface-soft);
    color: var(--primary-deep);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.status-pill.available {
    background: #fff3df;
    color: var(--primary-deep);
}

.status-pill.busy {
    background: #ffe2ad;
    color: var(--primary-deep);
}

.status-pill.kitchen {
    background: #fff3df;
    color: var(--primary-deep);
}

.status-pill.cashier {
    background: #fff3df;
    color: var(--primary-deep);
}

.quick-order-form {
    display: grid;
    gap: 8px;
}

.quick-order-form label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.quick-order-form input,
.clients-form input,
.menu-item-controls input,
.cart-line-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font: inherit;
}

.service-section {
    margin-top: 32px;
}

.demand-panel {
    scroll-margin-top: 24px;
    border-color: var(--primary);
}

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

.service-order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 20px;
    align-items: start;
}

.menu-panel,
.cart-panel {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.cart-panel {
    position: sticky;
    top: 20px;
}

.mobile-cart-button {
    display: none;
}

.panel-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
}

.search-box {
    display: block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.menu-search {
    width: 100%;
    margin: 8px 0 20px;
    padding: 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font: inherit;
}

.menu-category {
    margin-top: 22px;
}

.menu-category h3 {
    margin: 0 0 12px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 14px;
}

.menu-item {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    min-width: 0;
}

.menu-item-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.menu-item-photo.placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
}

.menu-item h4 {
    margin: 0 0 6px;
}

.menu-item p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.menu-item strong {
    color: var(--primary-dark);
}

.menu-item-controls {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
}

.menu-item-controls .button {
    grid-column: 1 / -1;
}

.clients-form {
    display: grid;
    grid-template-columns: 1fr 90px 52px;
    gap: 8px;
    align-items: end;
    margin: 16px 0;
}

.clients-form label {
    grid-column: 1 / -1;
    color: var(--muted);
    font-weight: 800;
}

.clients-form button,
.cart-line-form button {
    min-height: 42px;
    border: 0;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.cart-lines {
    display: grid;
    gap: 12px;
}

.cart-line {
    display: grid;
    gap: 10px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    min-width: 0;
}

.cart-line-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.cart-line-form {
    display: grid;
    gap: 8px;
}

.cart-line-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.line-note {
    color: var(--primary-dark);
    font-weight: 700;
}

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

.cart-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.cart-actions form,
.cart-actions button {
    width: 100%;
}

.order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
    gap: 20px;
    align-items: start;
}

.order-panel {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.order-panel h2 {
    margin: 0 0 16px;
}

.order-panel-header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.order-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 18px 0 0;
    font-size: 18px;
}

.order-total strong {
    font-size: 28px;
}

.inline-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.inline-form input {
    width: min(180px, 100%);
    padding: 8px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
}

.inline-form button,
.link-button {
    border: 0;
    background: none;
    color: var(--primary-dark);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.compact-form {
    width: 100%;
    padding: 0;
    border: 0;
}

.stock-voucher-form {
    width: min(100%, 960px);
    overflow: visible;
}

.stock-voucher-form .service-section {
    min-width: 0;
    margin-top: 8px;
}

.stock-voucher-form .table-wrap {
    width: 100%;
    max-width: 100%;
}

.stock-voucher-table {
    min-width: 0;
    table-layout: fixed;
}

.stock-voucher-table th:nth-child(1),
.stock-voucher-table td:nth-child(1) {
    width: 52%;
}

.stock-voucher-table th:nth-child(2),
.stock-voucher-table td:nth-child(2),
.stock-voucher-table th:nth-child(3),
.stock-voucher-table td:nth-child(3) {
    width: 24%;
}

.kitchen-sidebar {
    background: var(--primary);
}

.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 18px;
}

.kitchen-ticket {
    display: grid;
    gap: 18px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.kitchen-ticket header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.kitchen-ticket h2 {
    margin: 4px 0 0;
}

.ticket-lines {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ticket-lines li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 8px 12px;
    padding: 12px;
    background: var(--surface-soft);
    border-radius: var(--radius);
    min-width: 0;
}

.ticket-lines strong {
    grid-row: span 2;
    color: var(--primary-dark);
}

.ticket-lines small {
    color: var(--muted);
}

.ticket-comment {
    grid-column: 2;
    padding: 8px 10px;
    background: #fff;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    color: var(--primary-deep);
    font-style: normal;
    font-weight: 800;
}

.print-frame {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.empty-state {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.cashier-sidebar {
    background: var(--primary);
}

.magasin-sidebar {
    background: var(--primary);
}

@media (max-width: 1180px) {
    .admin-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .admin-main {
        padding: 24px;
    }

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

    .service-order-layout,
    .order-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .cart-panel {
        position: static;
    }

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

    .period-form .button,
    .period-form button {
        width: 100%;
    }
}

@media (max-width: 920px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 14px;
        padding: 16px;
    }

    .hamburger-button {
        display: block;
        justify-self: end;
    }

    .admin-sidebar nav {
        grid-column: 1 / -1;
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0;
        overflow: visible;
        padding: 0;
    }

    .admin-sidebar.is-menu-open nav,
    .admin-sidebar:focus-within nav {
        display: grid;
    }

    .admin-sidebar nav a,
    .logout-link {
        flex: none;
        min-height: 38px;
        padding: 9px 12px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: var(--radius);
        white-space: normal;
    }

    .logout-link {
        grid-column: 1 / -1;
        display: none;
        margin-top: 0;
        width: 100%;
    }

    .admin-sidebar.is-menu-open .logout-link,
    .admin-sidebar:focus-within .logout-link {
        display: inline-flex;
        align-items: center;
    }

    .sound-toggle {
        grid-column: 1 / -1;
        display: none;
        width: 100%;
    }

    .admin-sidebar.is-menu-open .sound-toggle,
    .admin-sidebar:focus-within .sound-toggle {
        display: block;
    }

    .admin-main {
        min-width: 0;
        padding: 22px 18px;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-header .actions {
        width: 100%;
        margin-top: 0;
    }

    .admin-header .actions .button,
    .admin-header .actions a,
    .admin-header .actions button {
        flex: 1 1 180px;
    }

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

    .kitchen-grid,
    .service-grid,
    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 760px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-main {
        padding: 20px 16px;
    }

    .admin-header .actions .button,
    .admin-header .actions a,
    .admin-header .actions button {
        flex-basis: 100%;
    }

    .brand {
        font-size: 20px;
    }

    .admin-header h1 {
        font-size: 28px;
        line-height: 1.12;
    }

    .hero h1,
    .auth-panel h1 {
        font-size: 32px;
    }

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

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

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

    .hbar-row strong {
        text-align: left;
    }

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

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

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

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

    .service-order-layout {
        grid-template-columns: 1fr;
    }

    .mobile-cart-button {
        position: sticky;
        top: 0;
        z-index: 18;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        min-height: 52px;
        margin: -4px 0 16px;
        padding: 12px 14px;
        background: var(--primary);
        color: #fff;
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
    }

    .mobile-cart-button:hover {
        color: #fff;
        background: var(--primary-dark);
    }

    .mobile-cart-button strong {
        text-align: right;
    }

    .menu-panel {
        padding-top: 16px;
    }

    .cart-panel {
        position: static;
        scroll-margin-top: 64px;
    }

    .resource-form {
        padding: 18px;
    }

    .menu-item-controls,
    .clients-form {
        grid-template-columns: 1fr;
    }

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

    .menu-item {
        gap: 10px;
        padding: 14px;
    }

    .menu-item-photo {
        display: none;
    }

    .clients-form label {
        grid-column: auto;
    }

    .cart-line-main,
    .order-total,
    .analytics-panel header,
    .kitchen-ticket header {
        align-items: flex-start;
        flex-direction: column;
    }

    .order-total {
        justify-content: flex-start;
    }

    .vertical-chart {
        grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .bar-column {
        grid-template-rows: auto 130px auto;
    }

    .notification-toasts {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
}

@media (max-width: 520px) {
    .page-shell,
    .auth-shell {
        padding: 20px 12px;
    }

    .auth-panel {
        padding: 20px;
    }

    .home-navbar {
        align-items: flex-start;
        flex-direction: column;
        min-height: auto;
        padding: 12px;
    }

    .home-nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .home-nav-links a {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }

    .home-shell {
        min-height: calc(100vh - 130px);
    }

    .admin-main {
        padding: 18px 12px;
    }

    .admin-sidebar {
        padding: 14px 12px;
    }

    .admin-sidebar nav {
        grid-template-columns: 1fr;
    }

    .admin-header h1 {
        font-size: 24px;
    }

    .metric-card,
    .analytics-panel,
    .order-panel,
    .menu-panel,
    .cart-panel,
    .kitchen-ticket,
    .service-card,
    .empty-state {
        padding: 16px;
    }

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

    .status-summary strong {
        font-size: 24px;
    }

    .button,
    .danger-button {
        width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }

    .actions {
        width: 100%;
        gap: 10px;
    }

    .actions > * {
        flex: 1 1 100%;
    }

    .kitchen-grid,
    .service-grid,
    .menu-grid {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 12px;
    }

    table {
        min-width: 600px;
    }

    .stock-voucher-table {
        min-width: 520px;
    }

    .details-list {
        padding: 18px;
    }

    .ticket-lines li {
        grid-template-columns: 36px 1fr;
    }
}

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

    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }

    .admin-shell {
        display: block;
    }

    .admin-sidebar,
    .no-print,
    .print-button,
    .sf-toolbar,
    .sf-toolbarreset {
        display: none !important;
    }

    .admin-main {
        padding: 0;
    }

    .admin-header,
    .service-section,
    .cashier-metrics {
        break-inside: avoid;
    }

    .admin-header {
        display: block;
        margin-bottom: 14px;
    }

    .admin-header h1 {
        font-size: 22pt;
    }

    .metric-grid,
    .analytics-grid,
    .mode-summary,
    .status-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .metric-card,
    .table-wrap,
    .order-panel,
    .analytics-panel,
    .details-list {
        border-color: #999;
        background: #fff;
        box-shadow: none;
        break-inside: avoid;
    }

    .table-wrap {
        overflow: visible;
    }

    table,
    .stock-voucher-table {
        min-width: 0;
        table-layout: auto;
        font-size: 9pt;
    }

    th,
    td {
        padding: 6px 8px;
    }

    a {
        color: #000;
        text-decoration: none;
    }
}
