:root {
    --bg: #f5f5f0;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #65707f;
    --line: #e4e1d8;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --accent: #c2410c;
    --soft: #ecfdf5;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}

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

button,
a {
    touch-action: manipulation;
}

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

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.58)),
        url("https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.login-card {
    width: min(420px, 100%);
    padding: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.brand-mark,
.app-logo span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--ink);
    color: white;
    font-weight: 800;
}

.login-card h1,
.topbar h1,
.section-header h2,
.form-panel h2,
.form-panel h3 {
    margin: 0;
    letter-spacing: 0;
}

.login-card h1 {
    margin-top: 18px;
    font-size: 34px;
}

.login-card p,
.section-header p,
.topbar .eyebrow {
    color: var(--muted);
}

.public-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        linear-gradient(rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.5)),
        url("https://images.unsplash.com/photo-1552566626-52f8b828add9?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.public-card {
    width: min(560px, 100%);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
    padding: 24px;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.public-brand span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--ink);
    color: white;
    font-weight: 900;
}

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

.public-heading h1 {
    margin: 0;
    font-size: clamp(30px, 6vw, 44px);
    letter-spacing: 0;
}

.public-heading p,
.public-switch {
    color: var(--muted);
}

.public-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.public-form .primary-btn {
    width: 100%;
    min-height: 48px;
}

.public-switch {
    margin-top: 16px;
    text-align: center;
    font-weight: 800;
}

.public-switch a {
    color: var(--brand-dark);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

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

.stack-form label,
.settings-form label,
.inline-form label {
    display: grid;
    gap: 6px;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.check-line {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
    gap: 10px;
    color: #374151;
    font-size: 13px;
    line-height: 1.35;
}

.check-line input {
    width: auto;
    margin-top: 2px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.primary-btn,
.date-switch button,
.logout-form button,
.status-actions button,
.inline-form button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 800;
}

.primary-btn,
.date-switch button {
    background: var(--brand);
    color: white;
}

.primary-btn:hover,
.date-switch button:hover {
    background: var(--brand-dark);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 236px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 22px;
    border-right: 1px solid var(--line);
    background: #111827;
    color: white;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo span {
    background: #f8fafc;
    color: #111827;
}

.sidebar nav {
    display: grid;
    gap: 8px;
}

.sidebar nav a,
.logout-form button {
    border-radius: 8px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.78);
}

.sidebar nav a.active,
.sidebar nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

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

.logout-form button {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-panel {
    padding: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.topbar h1 {
    font-size: clamp(24px, 3vw, 38px);
}

.eyebrow {
    display: block;
    margin-bottom: 4px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
}

.date-switch {
    display: flex;
    gap: 8px;
    align-items: center;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.metric-grid article,
.form-panel,
.reservations-panel,
.table-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.metric-grid article {
    padding: 16px;
}

.metric-grid span,
.table-card span,
.reservation-main p,
.status-pill {
    color: var(--muted);
    font-size: 13px;
}

.metric-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 30px;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.reservations-panel,
.form-panel {
    padding: 18px;
}

.section-header {
    margin-bottom: 16px;
}

.section-header.compact {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

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

.reservation-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--brand);
    border-radius: 8px;
    background: white;
}

.reservation-main {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
}

.reservation-main time {
    display: grid;
    place-items: center;
    height: 44px;
    border-radius: 8px;
    background: #f3f4f6;
    font-weight: 900;
}

.reservation-main h3 {
    margin: 0 0 3px;
}

.reservation-main p {
    margin: 2px 0;
}

.note {
    color: #374151;
}

.status-pill {
    width: max-content;
    border-radius: 999px;
    padding: 5px 10px;
    background: #f3f4f6;
    font-weight: 800;
}

.status-pending {
    border-left-color: #d97706;
}

.status-seated {
    border-left-color: #2563eb;
}

.status-cancelled,
.status-noshow {
    opacity: 0.72;
    border-left-color: #9ca3af;
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-actions form {
    margin: 0;
}

.status-actions button {
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    padding: 8px 10px;
}

.status-actions button:hover {
    background: #e5e7eb;
}

.empty-state {
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.table-card {
    display: grid;
    gap: 6px;
    min-height: 130px;
    padding: 16px;
}

.table-card strong {
    font-size: 22px;
}

.table-card em {
    margin-top: auto;
    color: var(--brand-dark);
    font-style: normal;
    font-weight: 900;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 9px 13px;
    font-weight: 900;
}

.small {
    padding: 8px 11px;
    font-size: 13px;
}

.floor-heading,
.section-header.floor-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
}

.hidden-form {
    display: none;
}

.floor-studio {
    display: grid;
    grid-template-columns: minmax(720px, 1fr) 286px;
    gap: 12px;
    align-items: start;
}

.floor-card {
    min-width: 0;
    border: 1px solid #d9d3c7;
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
    overflow: hidden;
}

.floor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: #f9fafb;
    font-weight: 900;
}

.tool-group,
.floor-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.tool-group button,
.selected-actions button {
    min-width: 34px;
    border: 1px solid #d7dce2;
    border-radius: 7px;
    background: white;
    color: #263241;
    padding: 7px 9px;
    cursor: pointer;
    font-weight: 900;
    font-size: 12px;
}

.tool-group button:hover,
.selected-actions button:hover {
    border-color: #9aa7b5;
    background: #f8fafc;
}

.mode-pill {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    border-radius: 7px;
    background: #111827;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

.color-tool,
.zoom-tool {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #d7dce2;
    border-radius: 7px;
    background: white;
    padding: 6px 9px;
    color: #263241;
    font-weight: 900;
    font-size: 12px;
}

.color-tool input {
    width: 28px;
    height: 24px;
    border: 0;
    padding: 0;
}

.zoom-tool input {
    width: 104px;
    padding: 0;
    box-shadow: none;
}

.floor-legend {
    color: #4b5563;
    font-size: 12px;
}

.floor-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.floor-legend i {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
}

.legend-free {
    background: #0f766e;
}

.legend-reserved {
    background: #d97706;
}

.legend-seated {
    background: #2563eb;
}

.floor-scroll {
    width: 100%;
    max-height: calc(100vh - 214px);
    min-height: 650px;
    overflow: auto;
    background:
        linear-gradient(135deg, #d7d0c4 0%, #eee8dc 100%);
}

.floor-canvas {
    position: relative;
    min-height: 650px;
    background:
        linear-gradient(90deg, rgba(31, 41, 55, 0.055) 1px, transparent 1px),
        linear-gradient(rgba(31, 41, 55, 0.055) 1px, transparent 1px),
        radial-gradient(circle at 15% 10%, rgba(15, 118, 110, 0.07), transparent 28%),
        #fffdfa;
    background-size: 28px 28px, 28px 28px, auto, auto;
    overflow: hidden;
}

.floor-scroll .floor-canvas {
    width: 1440px;
    height: 860px;
    min-height: 0;
    transform-origin: top left;
}

.floor-zone {
    position: absolute;
    border: 1px dashed #b9b1a2;
    border-radius: 8px;
    color: #70685e;
    background: rgba(255, 255, 255, 0.28);
    font-weight: 900;
    padding: 10px;
    pointer-events: none;
}

.zone-main {
    left: 3%;
    top: 6%;
    width: 55%;
    height: 84%;
}

.zone-terrace {
    right: 4%;
    top: 6%;
    width: 34%;
    height: 84%;
}

.floor-door {
    position: absolute;
    left: 43%;
    bottom: 2.5%;
    border-radius: 999px;
    background: #111827;
    color: white;
    padding: 8px 14px;
    font-weight: 900;
    pointer-events: none;
}

.floor-bar {
    position: absolute;
    right: 9%;
    bottom: 8%;
    width: 24%;
    height: 6.5%;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #2f2a24;
    color: white;
    font-weight: 900;
    pointer-events: none;
}

.floor-table {
    position: absolute;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    place-items: center;
    gap: 0;
    min-width: 46px;
    min-height: 32px;
    border: 1px solid var(--table-color);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.13);
    cursor: pointer;
    text-align: center;
    padding: 4px 5px 3px;
    overflow: visible;
    touch-action: none;
}

.floor-table::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--table-color) 10%, white);
    pointer-events: none;
}

.floor-table strong,
.floor-table span,
.floor-table em {
    position: relative;
    z-index: 1;
}

.floor-table strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.05;
}

.floor-table span {
    display: grid;
    place-items: center;
    min-width: 17px;
    min-height: 17px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--table-color) 18%, white);
    color: #111827;
    font-size: 9px;
    font-weight: 900;
}

.floor-table em {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: -13px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.9);
    color: white;
    padding: 2px 5px;
    font-size: 9px;
    line-height: 1;
    font-style: normal;
}

.shape-round,
.shape-round::before {
    border-radius: 999px;
}

.seat-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    border: 1px solid color-mix(in srgb, var(--table-color) 55%, white);
    border-radius: 999px;
    background: white;
    pointer-events: none;
}

.seat-top {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.seat-right {
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.seat-bottom {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.seat-left {
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.table-free {
    border-color: #0f766e;
}

.table-reserved {
    border-color: #d97706;
    background: #fff8eb;
}

.table-seated {
    border-color: #2563eb;
    background: #eef5ff;
}

.floor-canvas.is-editing .floor-table {
    cursor: grab;
}

.floor-canvas.is-editing .floor-table:active {
    cursor: grabbing;
}

.floor-table.is-selected {
    outline: 3px solid rgba(15, 118, 110, 0.32);
    z-index: 7;
}

.resize-handle {
    position: absolute;
    right: -7px;
    bottom: -7px;
    z-index: 3;
    width: 17px;
    height: 17px;
    border: 2px solid white;
    border-radius: 999px;
    background: #111827;
    box-shadow: 0 3px 8px rgba(17, 24, 39, 0.25);
    cursor: nwse-resize;
}

.floor-inspector {
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 154px);
    overflow: auto;
}

.inspector-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.inspector-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.selected-card p,
.selected-details span {
    color: var(--muted);
    font-size: 13px;
}

.selected-details {
    display: grid;
    gap: 9px;
}

.selected-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.floor-side {
    display: grid;
    gap: 14px;
}

.compact-list {
    display: grid;
    gap: 9px;
}

.compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 10px;
}

.compact-row[data-jump-table] {
    cursor: pointer;
}

.compact-row span {
    display: grid;
    gap: 2px;
}

.compact-row small {
    color: var(--muted);
}

.compact-row button,
.mini-form button,
.deposit-form button,
.message-card button {
    border: 0;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 900;
}

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

.qr-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.qr-image {
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
}

.qr-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.qr-card h3 {
    margin: 4px 0 8px;
    font-size: 22px;
}

.qr-card p {
    color: var(--muted);
}

.qr-card code {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 8px;
    background: #f3f4f6;
    padding: 8px;
    color: #374151;
    font-size: 12px;
}

.qr-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qr-actions button,
.qr-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.print-strip {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    border: 1px dashed #b9b1a2;
    border-radius: 8px;
    padding: 14px;
    background: #fffdf8;
}

.print-strip p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.split-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 18px;
    align-items: start;
}

.wait-card {
    border-left-color: var(--accent);
}

.crm-grid,
.settings-grid,
.analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 18px;
    align-items: start;
}

.customer-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.customer-card,
.message-card,
.deposit-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 14px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.customer-card h3,
.message-card p,
.deposit-row h3 {
    margin: 0;
}

.customer-card p,
.deposit-row p {
    color: var(--muted);
}

.tag-line {
    width: max-content;
    max-width: 100%;
    border-radius: 999px;
    background: #ecfdf5;
    color: #065f46;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.customer-card dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.customer-card dl div {
    border-radius: 8px;
    background: #f8fafc;
    padding: 8px;
}

.customer-card dt {
    color: var(--muted);
    font-size: 12px;
}

.customer-card dd {
    margin: 0;
    font-weight: 900;
}

.mini-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

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

.whatsapp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

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

.whatsapp-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 12px;
}

.whatsapp-row p {
    margin: 4px 0 0;
    color: var(--muted);
}

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

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 8px;
    background: #16a34a;
    color: white;
    padding: 8px 11px;
    font-weight: 900;
}

.whatsapp-btn:hover {
    background: #15803d;
}

.legal-note,
.muted-text {
    color: var(--muted);
    font-size: 13px;
}

.consent-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.consent-line span {
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
}

.whatsapp-drafts {
    margin-top: 16px;
}

.message-card {
    display: grid;
    gap: 10px;
}

.message-card p {
    color: #374151;
}

.deposit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.deposit-form {
    display: flex;
    gap: 8px;
}

.deposit-form input {
    max-width: 100px;
}

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

.risk-high {
    border-left-color: #dc2626;
}

.risk-medium {
    border-left-color: #d97706;
}

.risk-pill {
    background: #fff7ed;
    color: #9a3412;
}

.analytics-metrics {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 40px;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.bar-row div {
    height: 12px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}

.bar-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}

.insight-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
    color: #374151;
}

.inline-form {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.form-panel.wide {
    max-width: 720px;
}

.alert {
    margin-bottom: 14px;
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 800;
}

.alert.error {
    background: #fef2f2;
    color: #991b1b;
}

.alert.success {
    background: var(--soft);
    color: #065f46;
}

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

    .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }

    .sidebar nav {
        display: flex;
    }

    .logout-form {
        margin-top: 0;
        margin-left: auto;
    }

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

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

    .floor-layout,
    .floor-studio,
    .qr-grid,
    .whatsapp-grid,
    .split-view,
    .crm-grid,
    .settings-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .floor-canvas {
        min-height: 520px;
    }

    .floor-inspector {
        max-height: none;
        overflow: visible;
    }

    .qr-card {
        grid-template-columns: 150px minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    .main-panel {
        padding: 16px;
    }

    .topbar,
    .date-switch,
    .public-two,
    .inline-form {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

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

    .reservation-main {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 12px;
        padding: 14px;
    }

    .app-logo strong {
        display: none;
    }

    .floor-heading,
    .section-header.floor-heading,
    .qr-card,
    .whatsapp-row,
    .print-strip,
    .compact-row,
    .deposit-row,
    .deposit-form,
    .mini-form {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

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

    .floor-canvas {
        min-height: 460px;
    }

    .floor-scroll {
        min-height: 440px;
        max-height: 65vh;
    }

    .floor-scroll .floor-canvas {
        min-height: 0;
    }

    .qr-image {
        width: min(260px, 100%);
        margin: 0 auto;
    }
}

@media print {
    .sidebar,
    .topbar,
    .section-header,
    .print-strip,
    .qr-actions {
        display: none !important;
    }

    .app-shell,
    .main-panel {
        display: block;
        padding: 0;
        background: white;
    }

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

    .qr-card {
        break-inside: avoid;
        box-shadow: none;
    }
}
