:root {
    --bg: #101214;
    --panel: #181b1f;
    --panel-soft: #20242a;
    --line: #303740;
    --text: #f4f1ea;
    --muted: #aeb6bf;
    --primary: #f2b45b;
    --primary-strong: #f59e2f;
    --accent: #f2b45b;
    --success: #35b779;
    --danger: #e85f5c;
    --whatsapp: #22c063;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: 0;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.demo-banner {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 9px 12px;
    background: var(--danger);
    color: white;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.demo-banner span {
    font-weight: 700;
    opacity: 0.92;
}

.app-shell {
    width: min(1420px, 100%);
    margin: 0 auto;
    padding: 16px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-width: 0;
}

.product-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.product-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.brand {
    color: var(--primary);
    font-size: 25px;
    font-weight: 800;
    line-height: 1;
}

.subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.admin-brand-title {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 4px;
}

.admin-brand-title img {
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    border-radius: 18px;
    object-fit: cover;
}

.admin-brand-title h1 {
    margin: 0;
}

.admin-brand-title p {
    margin: 4px 0 0;
    color: var(--muted);
}

.top-actions,
.tabs,
.date-actions,
.search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 0;
}

.topbar-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 6px;
}

.more-menu {
    position: relative;
    flex: 0 0 auto;
}

.more-menu summary {
    list-style: none;
}

.more-menu summary::-webkit-details-marker {
    display: none;
}

.icon-menu-btn,
.compact-menu-btn {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-soft);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.icon-menu-btn {
    width: 44px;
    display: inline-grid;
    place-items: center;
    font-size: 20px;
    line-height: 1;
    letter-spacing: 1px;
}

.compact-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
}

.more-menu[open] > .icon-menu-btn,
.more-menu[open] > .compact-menu-btn,
.more-menu[open] > .more-tab {
    border-color: rgba(242, 180, 91, 0.55);
    box-shadow: 0 0 0 3px rgba(242, 180, 91, 0.14);
}

.more-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    min-width: 190px;
    display: grid;
    gap: 8px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.more-menu-panel .ghost-btn,
.more-menu-panel .nav-menu-item {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    text-align: left;
    flex: none;
}

.more-menu-panel .danger-lite {
    color: #ffaaa8;
}

.sync-badge {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.sync-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.sync-badge.connected {
    border-color: rgba(53, 183, 121, 0.35);
    background: rgba(53, 183, 121, 0.12);
    color: var(--success);
}

.sync-badge.disconnected {
    border-color: rgba(232, 95, 92, 0.35);
    background: rgba(232, 95, 92, 0.12);
    color: var(--danger);
    animation: syncPulse 2s infinite;
}

.sync-badge.pending {
    border-color: rgba(246, 183, 89, 0.45);
    background: rgba(246, 183, 89, 0.14);
    color: var(--primary);
}

@keyframes syncPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 6px;
    margin-bottom: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: visible;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 0 88px;
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.tab.active {
    background: var(--primary);
    color: #17110a;
}

.nav-more {
    flex: 0 0 78px;
}

.more-tab {
    height: 46px;
    border: 0;
    background: transparent;
}

.nav-menu-panel {
    min-width: 176px;
}

.nav-menu-item {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-soft);
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

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

.tablet-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.65fr);
    align-items: start;
}

.side-stack {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    box-shadow: var(--shadow);
    min-width: 0;
}

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

.panel-head.compact {
    margin-bottom: 8px;
}

h1,
h2,
p {
    margin: 0;
}

h1,
h2 {
    font-size: 22px;
    line-height: 1.15;
}

.panel-head p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.date-input {
    width: 152px;
    min-height: 44px;
}

.field,
.date-input {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #0e1012;
    color: var(--text);
    padding: 12px;
    outline: none;
}

.field {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
}

.field:focus,
.date-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(242, 180, 91, 0.18);
}

.icon-btn,
.ghost-btn,
.primary-btn,
.action-btn {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.icon-btn {
    width: 44px;
    background: var(--panel-soft);
    color: var(--text);
    font-weight: 800;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: var(--panel-soft);
    color: var(--text);
    font-weight: 700;
}

.primary-btn {
    width: 100%;
    margin-top: 12px;
    background: var(--primary);
    border-color: var(--primary);
    color: #17110a;
    font-weight: 800;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.metrics div {
    padding: 12px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metrics strong {
    display: block;
    color: var(--primary);
    font-size: 28px;
    line-height: 1;
}

.metrics span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.search-row {
    margin-bottom: 12px;
}

.search-row .field {
    flex: 1;
}

.booking-list,
.client-list {
    display: grid;
    gap: 8px;
}

.booking-card {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.booking-card.arrivato {
    border-left-color: var(--success);
}

.booking-card.offline-pending {
    border-left-color: var(--primary);
    background: rgba(246, 183, 89, 0.08);
}

.booking-card.in-arrivo {
    border-left-color: #f6b759;
    box-shadow: 0 0 0 1px rgba(246, 183, 89, 0.18);
}

.booking-card.in-ritardo {
    border-left-color: #ef5b5b;
    animation: bookingAttentionPulse 1.35s ease-in-out infinite;
}

@keyframes bookingAttentionPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 91, 91, 0.15);
        background: var(--panel-soft);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(239, 91, 91, 0.24);
        background: rgba(239, 91, 91, 0.08);
    }
}

.booking-time {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    background: #0e1012;
    border-radius: 6px;
    color: var(--primary);
    font-size: 20px;
    font-weight: 800;
}

.booking-time span {
    display: block;
}

.booking-card.in-arrivo .booking-time {
    background: rgba(246, 183, 89, 0.16);
    color: #ffd58e;
}

.booking-card.in-ritardo .booking-time {
    background: rgba(239, 91, 91, 0.16);
    color: #ffb0b0;
}

.booking-main {
    min-width: 0;
}

.booking-summary {
    min-width: 0;
}

.booking-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.booking-name {
    font-size: 18px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.booking-meta,
.booking-note {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.booking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.booking-meta span {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.055);
    color: #cbd3dc;
    line-height: 1.15;
}

.booking-area {
    margin-top: 4px;
    color: #cfd6df;
    font-size: 13px;
    font-weight: 700;
}

.status-pill {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: #111417;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.booking-card.arrivato .status-pill {
    background: rgba(53, 183, 121, 0.16);
    border-color: rgba(53, 183, 121, 0.45);
    color: #78e1ac;
}

.status-pill.pending {
    background: rgba(246, 183, 89, 0.14);
    border-color: rgba(246, 183, 89, 0.45);
    color: var(--primary);
}

.status-pill.attention {
    background: rgba(246, 183, 89, 0.14);
    border-color: rgba(246, 183, 89, 0.5);
    color: #ffd58e;
}

.booking-card.in-ritardo .status-pill.attention {
    background: rgba(239, 91, 91, 0.16);
    border-color: rgba(239, 91, 91, 0.55);
    color: #ffb0b0;
}

@media (prefers-reduced-motion: reduce) {
    .booking-card.in-ritardo {
        animation: none;
    }
}

.offline-note {
    color: var(--primary);
    font-weight: 800;
}

.booking-phone-warning {
    display: block;
    width: 100%;
    padding: 8px 10px;
    color: #ffd58e;
    text-align: left;
    font-weight: 800;
    line-height: 1.3;
    background: rgba(246, 183, 89, 0.12);
    border: 1px solid rgba(246, 183, 89, 0.42);
    border-radius: 8px;
    cursor: pointer;
}

.booking-phone-warning:focus,
.booking-phone-warning:hover {
    border-color: rgba(246, 183, 89, 0.72);
    background: rgba(246, 183, 89, 0.18);
}

.booking-actions,
.client-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.booking-actions > .action-btn,
.booking-actions > .booking-more,
.client-actions > .action-btn,
.client-actions > .client-more {
    flex: 1 1 88px;
}

.booking-more,
.client-more {
    min-width: 88px;
}

.booking-more > summary.action-btn,
.client-more > summary.action-btn {
    width: 100%;
    min-height: 44px;
    user-select: none;
}

.booking-menu-panel,
.client-menu-panel {
    min-width: 178px;
}

.booking-menu-panel .action-btn,
.client-menu-panel .action-btn {
    width: 100%;
    justify-content: flex-start;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: #111417;
    color: var(--text);
    font-weight: 750;
}

.action-btn.primary-action {
    background: var(--success);
    border-color: var(--success);
    color: #06150d;
}

.action-btn.success,
.action-btn.arrivato {
    background: var(--success);
    border-color: var(--success);
    color: #06150d;
}

.action-btn.danger {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.action-btn.wa {
    background: var(--whatsapp);
    border-color: var(--whatsapp);
    color: #041408;
}

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

.form-grid label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

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

.suggestions {
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
    padding: 8px;
    background: #0e1012;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-soft);
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.suggestion-item strong {
    overflow-wrap: anywhere;
}

.suggestion-item span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
}

.client-list {
    margin-top: 10px;
    max-height: 390px;
    overflow: auto;
}

.client-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.client-name {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.client-phone,
.client-note {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.client-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.client-stats span {
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #111417;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.client-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.client-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.client-modal-panel {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.password-modal-panel {
    width: min(440px, 100%);
}

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

.password-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.modal-message {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 750;
}

.modal-message.error {
    background: rgba(232, 95, 92, 0.18);
    border: 1px solid rgba(232, 95, 92, 0.56);
    color: #ffd9d8;
}

.modal-message.success {
    background: rgba(53, 183, 121, 0.16);
    border: 1px solid rgba(53, 183, 121, 0.52);
    color: #c8f6de;
}

.client-detail-body {
    display: grid;
    gap: 10px;
}

.profile-banner {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: #0e1012;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

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

.profile-banner strong {
    color: var(--primary);
    font-size: 18px;
}

.profile-banner span,
.profile-banner p {
    color: var(--muted);
    font-size: 13px;
}

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

.detail-metrics div {
    min-width: 0;
    padding: 10px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.detail-metrics strong {
    display: block;
    color: var(--primary);
    font-size: 20px;
    line-height: 1;
    overflow-wrap: anywhere;
}

.detail-metrics span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

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

.detail-note-label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.detail-note {
    min-height: 104px;
    resize: vertical;
}

.compact-save {
    margin-top: 0;
}

.detail-section-title {
    color: var(--text);
    font-weight: 800;
}

.history-list {
    display: grid;
    gap: 8px;
}

.history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.history-row strong,
.history-row span,
.history-row p {
    display: block;
}

.history-row strong {
    color: var(--text);
}

.history-row span,
.history-row p,
.history-row em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.whatsapp-body,
.marketing-body,
.report-list {
    display: grid;
    gap: 8px;
}

.message-choice,
.report-row {
    display: grid;
    gap: 5px;
    padding: 10px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
}

.message-choice {
    border-left: 4px solid var(--whatsapp);
}

.message-choice strong {
    color: var(--text);
}

.message-choice span,
.report-row {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    white-space: pre-wrap;
}

.report-block {
    display: grid;
    gap: 8px;
}

.compact-report-list {
    gap: 6px;
}

.warning-row {
    color: #ffd18a;
    border-color: rgba(245, 181, 88, 0.45);
    background: rgba(245, 181, 88, 0.10);
}

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

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

.hidden {
    display: none !important;
}

.license-banner {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    transition: max-height 0.18s ease, opacity 0.18s ease, padding 0.18s ease;
}

.license-banner button {
    border: 0;
    border-radius: 7px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.license-banner.trial {
    background: rgba(243, 181, 86, 0.14);
    color: var(--accent);
}

.license-banner.trial button {
    background: var(--accent);
    color: #111;
}

.license-banner.expired {
    background: rgba(240, 95, 95, 0.16);
    color: #ff8d8d;
}

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

.license-banner.full {
    position: static;
    background: rgba(42, 194, 107, 0.1);
    color: #55d88a;
}

.license-banner.full span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.license-banner-collapsed .license-banner.full {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.guida-link {
    text-decoration: none;
}

.guide-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

.guide-container {
    width: min(900px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 48px;
}

.guide-hero,
.guide-summary,
.guide-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.guide-hero {
    padding: 18px;
    margin-bottom: 12px;
}

.guide-kicker {
    margin: 18px 0 5px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.guide-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 8vw, 48px);
    line-height: 1;
    letter-spacing: 0;
}

.guide-hero p,
.guide-section p,
.guide-section li {
    color: var(--muted);
    line-height: 1.65;
}

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

.guide-summary strong {
    grid-column: 1 / -1;
    margin-bottom: 6px;
}

.guide-summary a {
    color: #8dbff0;
    padding: 5px 0;
    font-size: 14px;
    text-decoration: none;
}

.guide-summary a:hover {
    color: var(--text);
}

.guide-section {
    padding: 18px;
    margin-bottom: 12px;
}

.guide-section h2 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 22px;
    letter-spacing: 0;
}

.guide-section h3 {
    margin: 18px 0 6px;
    font-size: 16px;
}

.guide-section ul,
.guide-section ol {
    padding-left: 22px;
    margin: 0 0 14px;
}

.guide-section code {
    background: var(--input);
    color: var(--accent);
    border-radius: 5px;
    padding: 2px 6px;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.guide-step span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #4a90d9;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.guide-step p {
    margin: 2px 0 0;
}

.guide-tip,
.guide-warning {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #cfd3dc;
    line-height: 1.55;
}

.guide-tip {
    background: rgba(74, 144, 217, 0.12);
    border-left: 3px solid #4a90d9;
}

.guide-warning {
    background: rgba(243, 181, 86, 0.12);
    border-left: 3px solid var(--accent);
}

.guide-objective-grid a {
    min-height: 42px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-flow {
    display: grid;
    gap: 8px;
}

.guide-photo {
    margin: 0 0 18px;
}

.guide-photo figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.mock-phone,
.mock-tablet {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    background: #101820;
    border: 1px solid #2b3641;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
}

.mock-phone {
    width: min(360px, 100%);
    min-height: 520px;
    border-radius: 28px;
    padding: 18px;
}

.mock-tablet {
    width: min(680px, 100%);
    min-height: 430px;
    border-radius: 18px;
    padding: 18px;
}

.mock-topbar {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -4px 0 14px;
    border-radius: 8px;
    background: #18222c;
    color: #f3f5f7;
    font-weight: 900;
}

.mock-tabs,
.mock-toolbar,
.mock-actions,
.mock-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

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

.mock-tabs span,
.mock-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 8px;
    background: #22303d;
    color: #cbd4dd;
    font-size: 13px;
    font-weight: 800;
}

.mock-tabs .active,
.mock-chip.active,
.mock-button {
    background: #4a90d9;
    color: #fff;
}

.mock-chip.danger {
    background: #8e2f35;
    color: #fff;
}

.mock-form {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.mock-form label {
    color: #9caab6;
    font-size: 12px;
    font-weight: 900;
}

.mock-input,
.mock-search,
.mock-textarea,
.mock-message-preview,
.mock-composer,
.mock-setting {
    min-height: 42px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    background: #0b1117;
    border: 1px solid #2b3641;
    color: #dce3ea;
    padding: 0 12px;
}

.mock-textarea {
    min-height: 92px;
    align-items: flex-start;
    padding-top: 12px;
}

.mock-button {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
}

.mock-search {
    margin: 12px 0;
}

.mock-booking,
.mock-customer,
.mock-detail,
.mock-chat,
.mock-paper,
.mock-setting {
    margin-top: 10px;
    border-radius: 8px;
    background: #16212b;
    border: 1px solid #2b3641;
    color: #e8edf2;
    padding: 12px;
}

.mock-booking,
.mock-customer {
    display: grid;
    grid-template-columns: 70px 1fr 90px;
    align-items: center;
    gap: 10px;
}

.mock-booking.wide {
    grid-template-columns: 70px 1fr;
}

.mock-booking em,
.mock-customer em {
    display: flex;
    justify-content: center;
    border-radius: 8px;
    background: #243445;
    color: #8dbff0;
    padding: 8px;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.mock-detail {
    display: grid;
    gap: 8px;
    min-height: 145px;
}

.mock-message-preview {
    min-height: 86px;
    margin-top: 14px;
}

.mock-tablet.split {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
}

.mock-chat-list,
.mock-chat-thread {
    min-height: 350px;
    border-radius: 8px;
    background: #0b1117;
    border: 1px solid #2b3641;
    padding: 10px;
}

.mock-chat {
    margin: 0 0 8px;
}

.mock-chat.active {
    border-color: #4a90d9;
}

.bubble {
    max-width: 78%;
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    color: #fff;
}

.bubble.in {
    background: #22303d;
}

.bubble.out {
    margin-left: auto;
    background: #2d7d51;
}

.mock-composer {
    position: absolute;
    right: 28px;
    bottom: 28px;
    width: calc(100% - 240px);
}

.mock-floor {
    display: grid;
    grid-template-columns: repeat(4, minmax(62px, 1fr));
    gap: 16px;
    padding: 42px 0 34px;
}

.table {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    font-weight: 900;
}

.table.free {
    background: #2d7d51;
}

.table.busy {
    background: #8e2f35;
}

.mock-paper {
    min-height: 250px;
    background: #f4f1e8;
    color: #222;
    font-family: Georgia, serif;
}

.mock-paper div {
    padding: 12px 4px;
    border-bottom: 1px solid #d6ceb8;
}

.hotspot {
    position: absolute;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #e23a3a;
    color: #fff;
    border: 3px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    font-size: 14px;
    font-weight: 900;
}

.privacy-footer {
    padding: 8px 10px 14px;
    text-align: center;
    font-size: 11px;
    opacity: 0.62;
}

.privacy-footer a {
    color: var(--muted);
    text-decoration: none;
}

.privacy-footer a:hover {
    color: var(--text);
}

.cookie-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 980px;
    margin: 0 auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #1a1d24;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.42);
}

.cookie-text {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.cookie-text strong {
    color: var(--text);
}

.cookie-text a {
    color: #8dbff0;
    font-weight: 800;
}

.cookie-banner button {
    border: 0;
    border-radius: 8px;
    background: #2ac26b;
    color: #07140c;
    min-height: 40px;
    padding: 9px 14px;
    white-space: nowrap;
    font-weight: 900;
}

.privacy-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

.privacy-container {
    width: min(900px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 54px;
}

.privacy-hero,
.privacy-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.privacy-hero {
    padding: 18px;
    margin-bottom: 12px;
}

.privacy-kicker {
    margin: 18px 0 5px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.privacy-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 8vw, 48px);
    line-height: 1;
    letter-spacing: 0;
}

.privacy-hero p,
.privacy-section p,
.privacy-section li {
    color: var(--muted);
    line-height: 1.66;
}

.privacy-update {
    font-size: 13px;
    opacity: 0.76;
}

.privacy-section {
    padding: 18px;
    margin-bottom: 12px;
}

.privacy-section h2 {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 22px;
    letter-spacing: 0;
}

.privacy-section ul {
    margin: 0;
    padding-left: 22px;
}

.privacy-section.highlight {
    background: rgba(74, 144, 217, 0.1);
    border-left: 3px solid #4a90d9;
}

.setup-link {
    display: block;
    margin-top: 14px;
    color: #737b86;
    font-size: 12px;
    text-align: center;
    text-decoration: none;
}

.setup-link:hover {
    color: var(--text);
}

.onboarding-body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0, rgba(242, 180, 91, 0.16), transparent 36%), var(--bg);
    color: var(--text);
}

.onboarding-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(500px, calc(100% - 28px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 34px 0;
    text-align: center;
}

.onboarding-step {
    display: none;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    animation: fadeIn 0.28s ease;
}

.onboarding-step.active {
    display: block;
}

.onboarding-icon,
.success-check {
    display: inline-grid;
    place-items: center;
    min-width: 84px;
    min-height: 84px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: #0d0f14;
    color: var(--accent);
    font-size: 22px;
    font-weight: 950;
}

.success-check {
    color: #2ecc71;
}

.onboarding-step h1 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: 0;
}

.onboarding-step p {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.6;
}

.onboarding-step input {
    width: 100%;
    min-height: 52px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0d0f14;
    color: var(--text);
    font-size: 17px;
    text-align: center;
}

.onboarding-step input:focus {
    border-color: #4a90d9;
    outline: none;
}

.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 22px 0;
}

.progress-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #3a3d45;
    transition: all 0.2s ease;
}

.progress-dot.active {
    width: 28px;
    background: var(--accent);
}

.progress-dot.done {
    background: #2ecc71;
}

.onboarding-buttons {
    display: flex;
    gap: 10px;
}

.btn-next,
.btn-skip,
.btn-finish {
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.btn-next,
.btn-finish {
    flex: 1;
    border: 0;
    background: var(--accent);
    color: #17110a;
}

.btn-finish {
    width: 100%;
    background: #2ecc71;
}

.btn-skip {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
}

.onboarding-error {
    min-height: 18px;
    margin-bottom: 8px;
    color: #ff7a73;
    font-size: 13px;
    line-height: 1.35;
}

.onboarding-error:empty {
    display: none;
}

.onboarding-summary {
    margin: 16px 0;
    padding: 14px;
    border-radius: 10px;
    background: #0d0f14;
    color: var(--muted);
    text-align: left;
}

.onboarding-summary p {
    margin: 7px 0;
}

.admin-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

.admin-shell {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 50px;
}

.admin-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.admin-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 5vw, 42px);
    letter-spacing: 0;
}

.admin-hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.admin-quick,
.admin-jump,
.admin-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-quick a,
.admin-jump a,
.admin-link-grid a,
.admin-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0d0f14;
    color: var(--text);
    font-weight: 850;
    text-decoration: none;
}

.admin-jump {
    position: sticky;
    top: 0;
    z-index: 20;
    align-items: center;
    margin: 0 0 12px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(16, 18, 20, 0.94);
    box-shadow: var(--shadow);
}

.admin-jump a {
    min-height: 38px;
    background: var(--panel-soft);
    color: var(--muted);
}

.admin-jump a.active {
    background: rgba(242, 180, 91, 0.16);
    color: var(--primary);
    border-color: rgba(242, 180, 91, 0.48);
}

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

.admin-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.admin-card.admin-section-hidden {
    display: none;
}

.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.admin-card-head span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

.admin-card-head strong {
    font-size: 20px;
}

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

.admin-form.compact {
    margin-top: 12px;
}

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

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0d0f14;
    color: var(--text);
    font-size: 16px;
}

.admin-form textarea {
    min-height: 92px;
    resize: vertical;
    line-height: 1.4;
}

.admin-form select {
    appearance: auto;
}

.admin-form button,
.admin-main-btn,
.admin-neutral-btn {
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid rgba(243, 181, 86, 0.48);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--primary), var(--primary-strong));
    color: #17110a;
    font-weight: 950;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.admin-neutral-btn {
    border: 1px solid var(--line);
    background: #171b22;
    color: var(--text);
}

.admin-form button:disabled,
.admin-main-btn:disabled {
    border: 1px solid var(--line);
    background: #2a3038;
    color: #f4f1ea;
    opacity: 1;
    cursor: wait;
    box-shadow: none;
}

.admin-body .admin-form button:disabled,
.admin-body .admin-main-btn:disabled,
.admin-body .admin-neutral-btn:disabled {
    border-color: #3b4350 !important;
    background: #2a3038 !important;
    color: #f4f1ea !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.admin-check {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}

.admin-check input {
    width: 22px;
    min-height: 22px;
    accent-color: var(--accent);
}

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

.admin-accounting-card {
    border-color: rgba(242, 180, 91, 0.45);
}

.admin-fast-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.admin-fast-actions button {
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0d0f14;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.admin-fast-actions button:hover,
.admin-fast-actions button:focus-visible {
    border-color: rgba(242, 180, 91, 0.72);
    outline: 0;
}

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

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

.admin-message-section {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(13, 15, 20, 0.62);
}

.admin-message-section h3 {
    margin: 0;
    color: var(--accent);
    font-size: 16px;
}

.admin-message-section .admin-form-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

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

.admin-money-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.admin-money-grid div,
.admin-row {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0d0f14;
}

.admin-money-grid strong {
    display: block;
    color: var(--accent);
    font-size: 22px;
}

.admin-money-grid span,
.admin-row small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.admin-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    margin-bottom: 8px;
}

.admin-row button {
    grid-row: span 2;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: var(--danger);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.admin-danger-text {
    color: #ff928d;
}

.admin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.admin-status {
    margin: 8px 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0d0f14;
    color: var(--muted);
    line-height: 1.55;
}

.admin-status.success {
    border-color: rgba(46, 204, 113, 0.36);
    color: #8ee6ad;
}

.admin-status.warning {
    border-color: rgba(242, 180, 91, 0.42);
    color: var(--accent);
}

.admin-status.error {
    border-color: rgba(232, 95, 92, 0.44);
    color: #ff928d;
}

.admin-muted {
    color: var(--muted);
    line-height: 1.55;
}

.admin-secondary {
    margin-top: 10px;
}

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

.admin-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 100000;
    max-width: min(420px, calc(100% - 32px));
    padding: 12px 14px;
    border-radius: 10px;
    background: #2ecc71;
    color: #061108;
    font-weight: 950;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

.admin-toast.error {
    background: #e85f5c;
    color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 900px) {
    .device-phone .tabs {
        display: grid;
    }

    .device-tablet .tablet-tabs {
        display: grid;
    }

    .device-phone .workbench {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .device-phone .hidden-mobile {
        display: none !important;
    }

    .device-tablet .hidden-mobile {
        display: none !important;
    }

    .device-tablet .agenda-panel {
        position: sticky;
        top: 12px;
        max-height: calc(100vh - 24px);
        overflow: auto;
    }
}

@media (max-width: 899px) {
    .app-shell {
        padding: 10px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .topbar {
        margin-bottom: 10px;
        align-items: center;
        flex-direction: row;
        padding: 9px 10px;
    }

    .product-logo {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 10px;
    }

    .brand {
        font-size: 21px;
    }

    .subtitle {
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
    }

    .sync-badge {
        min-height: 32px;
        padding: 6px 8px;
        font-size: 0;
    }

    .sync-badge::after {
        content: attr(data-short);
        font-size: 11px;
    }

    .icon-menu-btn {
        width: 42px;
        min-height: 42px;
    }

    .more-menu[open] {
        z-index: 260;
    }

    .more-menu[open] > summary {
        position: relative;
        z-index: 261;
    }

    .more-menu[open] .more-menu-panel {
        position: fixed;
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
        top: auto;
        z-index: 300;
        min-width: 0;
        max-height: min(46vh, 340px);
        overflow-y: auto;
        padding: 12px;
        border-radius: 10px;
        box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.55);
    }

    .more-menu-panel .action-btn,
    .more-menu-panel .ghost-btn,
    .more-menu-panel .nav-menu-item {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        text-align: center;
    }

    .license-banner.full {
        padding: 5px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

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

    .topbar-actions {
        justify-content: flex-end;
        flex: 0 0 auto;
    }

    .topbar-actions .sync-badge {
        flex: 0 0 auto;
    }

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

    .device-tablet .side-stack {
        display: contents;
    }

    .hidden-mobile {
        display: none;
    }

    .date-actions {
        width: 100%;
    }

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

    .tab,
    .nav-more {
        min-width: 0;
        flex: none;
    }

    .tab {
        padding: 0 8px;
        font-size: 14px;
    }

    .more-tab {
        width: 100%;
        padding: 0 8px;
    }

    .nav-menu-panel {
        right: 0;
    }

    .search-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
        align-items: stretch;
    }

    .agenda-more {
        min-width: 0;
    }

    .agenda-menu-panel {
        min-width: 188px;
    }

    .panel-head {
        flex-direction: column;
    }

    .agenda-panel {
        padding: 10px;
    }

    .agenda-panel .panel-head {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .agenda-panel h1 {
        font-size: 20px;
    }

    .agenda-panel .date-actions {
        width: auto;
        flex: 1 1 210px;
        justify-content: flex-end;
        gap: 6px;
    }

    .agenda-panel .icon-btn,
    .agenda-panel .date-input {
        min-height: 38px;
    }

    .agenda-panel .icon-btn {
        width: 38px;
    }

    .agenda-panel .date-input {
        width: min(142px, 100%);
        padding: 8px 9px;
        font-size: 14px;
    }

    .agenda-panel .metrics {
        gap: 6px;
        margin-bottom: 8px;
    }

    .agenda-panel .metrics div {
        padding: 9px 10px;
    }

    .agenda-panel .metrics strong {
        font-size: 23px;
    }

    .agenda-panel .metrics span {
        margin-top: 3px;
        font-size: 11px;
    }

    .agenda-panel .search-row {
        gap: 6px;
        margin-bottom: 8px;
    }

    .agenda-panel .search-row .field,
    .agenda-panel .search-row .ghost-btn,
    .agenda-panel .search-row .compact-menu-btn {
        min-height: 40px;
    }

    .agenda-panel .search-row .field {
        padding: 9px 10px;
    }

    .date-input {
        flex: 1;
        width: auto;
    }

    .booking-card {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 7px;
        padding: 7px;
        border-left-width: 3px;
    }

    .booking-time {
        align-self: stretch;
        min-height: 100%;
        padding: 0 4px;
        font-size: 16px;
    }

    .booking-name {
        font-size: 16px;
        line-height: 1.15;
    }

    .booking-meta,
    .booking-note {
        margin-top: 2px;
        font-size: 11px;
        line-height: 1.25;
    }

    .booking-meta {
        gap: 3px;
    }

    .booking-meta span {
        min-height: 19px;
        padding: 1px 5px;
    }

    .booking-area {
        margin-top: 2px;
        font-size: 12px;
    }

    .booking-actions {
        gap: 5px;
        margin-top: 7px;
    }

    .booking-actions > .action-btn,
    .booking-actions > .booking-more {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
    }

    .booking-actions > .booking-more {
        flex-basis: 42px;
        flex-grow: 0;
    }

    .booking-actions .action-btn,
    .booking-more > summary.action-btn {
        min-height: 40px;
        padding: 0 7px;
        font-size: 13px;
    }

    .booking-more > summary.action-btn {
        font-size: 0;
    }

    .booking-more > summary.action-btn::after {
        content: "...";
        font-size: 18px;
        line-height: 1;
        letter-spacing: 1px;
    }

    .status-pill {
        padding: 4px 7px;
        font-size: 11px;
    }

    .client-card {
        grid-template-columns: 1fr;
    }

    .client-actions > .action-btn,
    .client-actions > .client-more {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 78px;
    }

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

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

    .form-grid .wide,
    .form-grid label:nth-child(1),
    .form-grid label:nth-child(2),
    .form-grid label:nth-child(3) {
        grid-column: 1 / -1;
    }

    .device-tablet .panel {
        padding: 16px;
    }

    .device-tablet .client-list {
        max-height: none;
    }
}

@media (max-width: 430px) {
    .demo-banner {
        display: grid;
        gap: 2px;
    }

    .topbar {
        align-items: center;
    }

    .product-logo {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .brand {
        font-size: 20px;
    }

    .subtitle {
        font-size: 12px;
        line-height: 1.25;
    }

    .sync-badge {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 0;
    }

    .sync-badge::after {
        content: attr(data-short);
        font-size: 12px;
    }

    .icon-menu-btn {
        width: 42px;
        min-height: 38px;
    }

    .tabs {
        gap: 5px;
        padding: 5px;
    }

    .tab,
    .more-tab {
        min-height: 42px;
        font-size: 13px;
        padding: 0 5px;
    }

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

    .compact-menu-btn,
    .search-row .ghost-btn {
        min-height: 44px;
        padding: 0 12px;
    }

    .metrics strong {
        font-size: 24px;
    }

    .metrics div {
        padding: 10px 8px;
    }

    .booking-card {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 6px;
        padding: 6px;
    }

    .booking-time {
        justify-content: center;
        min-height: 100%;
        padding: 0 4px;
        font-size: 15px;
    }

    .booking-top {
        gap: 6px;
    }

    .booking-name {
        font-size: 15px;
    }

    .booking-meta {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .booking-actions {
        gap: 4px;
        margin-top: 6px;
    }

    .booking-actions .action-btn,
    .booking-more > summary.action-btn {
        min-height: 38px;
        padding: 0 5px;
        font-size: 12px;
    }

    .booking-more > summary.action-btn {
        font-size: 0;
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    width: calc(100% - 32px);
    pointer-events: none;
}

.toast {
    background: #1e1f22;
    color: #f4f1ea;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    pointer-events: auto;
    animation: toastIn 0.3s ease-out;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-left: 4px solid #4a90d9;
}

.toast.success {
    border-left-color: #2ecc71;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.warning {
    border-left-color: #f39c12;
}

.toast.removing {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    min-width: 24px;
    height: 24px;
    margin-top: 1px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 900;
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 2px;
}

.toast-message {
    opacity: 0.85;
}

.toast-close {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #fff;
}

@keyframes toastIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.confirm-box {
    background: #1e1f22;
    border-radius: 16px;
    padding: 28px 24px 20px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    color: #f4f1ea;
    animation: scaleIn 0.2s ease;
    border: 1px solid #3a3b3f;
}

.confirm-box h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirm-icon {
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2a2b2f;
    font-size: 12px;
    font-weight: 900;
}

.confirm-box p {
    margin: 0 0 24px 0;
    opacity: 0.8;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-actions button {
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.confirm-cancel {
    background: #3a3b3f;
    color: #ccc;
}

.confirm-cancel:hover {
    background: #4a4b4f;
    color: #fff;
}

.confirm-danger {
    background: #e74c3c;
    color: #fff;
}

.confirm-danger:hover {
    background: #c0392b;
    transform: scale(1.02);
}

.confirm-safe {
    background: #2ecc71;
    color: #fff;
}

.confirm-safe:hover {
    background: #27ae60;
    transform: scale(1.02);
}

.confirm-warning {
    background: #f39c12;
    color: #fff;
}

.confirm-warning:hover {
    background: #e67e22;
    transform: scale(1.02);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.field-error {
    border-color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.08) !important;
}

.field-error:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
}

.error-message {
    color: #ff8a80;
    font-size: 12px;
    line-height: 1.25;
    margin-top: 2px;
    display: none;
}

.error-message.visible {
    display: block;
}

.form-hint {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.field-success {
    border-color: #2ecc71 !important;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #f4f1ea;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.spinner-large {
    width: 36px;
    height: 36px;
    border-width: 3px;
}

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

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #9fa3ad;
    font-size: 14px;
    gap: 10px;
}

.loading-overlay .spinner {
    width: 24px;
    height: 24px;
}

.skeleton {
    background: linear-gradient(90deg, #202229 25%, #2d3038 50%, #202229 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-card {
    height: 112px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    width: 70%;
}

.skeleton-text.short {
    width: 40%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

button:disabled {
    opacity: 0.86;
    cursor: not-allowed;
}

button.loading {
    pointer-events: none;
}

.agenda-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.refresh-badge {
    background: #2ecc71;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.refresh-badge:hover {
    background: #27ae60;
}

.refresh-badge:active {
    transform: scale(0.96);
}

.refresh-badge.paused {
    background: #888;
}

.refresh-badge.paused:hover {
    background: #666;
}

.sort-header {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.sort-header-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #9fa3ad;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
}

.sort-header-btn:hover {
    color: #f4f1ea;
    border-color: #3a3d45;
}

.sort-header-btn.active {
    color: #f4f1ea;
    background: #252832;
    border-color: #f3b556;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.whatsapp-reply-box {
    display: grid;
    gap: 8px;
    background: #111318;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.whatsapp-reply-box strong {
    color: #f3b556;
    font-size: 14px;
}

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

.whatsapp-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.36fr) minmax(0, 0.64fr);
    gap: 12px;
    align-items: stretch;
    min-height: calc(100vh - 210px);
}

.whatsapp-conversations,
.whatsapp-thread {
    display: grid;
    gap: 8px;
}

.whatsapp-conversations {
    align-content: start;
    max-height: calc(100vh - 210px);
    overflow: auto;
    padding-right: 2px;
}

.whatsapp-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 4px;
    background: var(--bg);
}

.whatsapp-filter button {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #181b21;
    color: #f4f1ea;
    font-weight: 800;
    cursor: pointer;
}

.whatsapp-filter button.active {
    border-color: rgba(243, 181, 86, 0.75);
    background: #2a2419;
    color: #f3b556;
}

.whatsapp-filter span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

.whatsapp-thread {
    grid-template-rows: auto auto minmax(280px, 1fr) auto;
    min-height: calc(100vh - 210px);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #101214;
    overflow: hidden;
}

.whatsapp-conversation {
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #181b21;
    color: #f4f1ea;
    text-align: left;
    cursor: pointer;
}

.whatsapp-conversation.active {
    border-color: rgba(34, 192, 99, 0.65);
    background: #20262a;
}

.whatsapp-avatar {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #263b31;
    color: #7bed9f;
    font-size: 13px;
    font-weight: 800;
}

.whatsapp-conversation-main,
.whatsapp-conversation-side {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.whatsapp-conversation-main strong,
.whatsapp-conversation-main small,
.whatsapp-conversation-main em,
.whatsapp-conversation-side small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.whatsapp-conversation-main strong {
    font-size: 14px;
}

.whatsapp-conversation-main small,
.whatsapp-conversation-main em,
.whatsapp-conversation-side small {
    color: #9fa3ad;
    font-size: 12px;
    font-style: normal;
}

.whatsapp-conversation-side {
    justify-items: end;
}

.whatsapp-conversation-side b {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--whatsapp);
    color: #06140a;
    font-size: 12px;
}

.whatsapp-chat-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    background: #1b1d23;
}

.whatsapp-chat-back {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #111318;
    color: #f4f1ea;
    font-weight: 900;
    padding: 0 10px;
    cursor: pointer;
}

.whatsapp-chat-title {
    min-width: 0;
}

.whatsapp-chat-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.whatsapp-chat-head strong,
.whatsapp-chat-head span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.whatsapp-chat-head strong {
    color: #f4f1ea;
    font-size: 15px;
}

.whatsapp-chat-head span {
    color: #9fa3ad;
    font-size: 12px;
}

.whatsapp-template-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    background: #151820;
}

.template-chip {
    flex: 0 0 auto;
    border: 1px solid rgba(34, 192, 99, 0.45);
    border-radius: 999px;
    background: #102017;
    color: #7bed9f;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
    cursor: pointer;
}

.whatsapp-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: auto;
    min-height: 0;
    padding: 12px;
    background: #0f1213;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.whatsapp-bubble {
    width: fit-content;
    max-width: min(78%, 560px);
    border-radius: 8px;
    padding: 8px 10px 6px;
    background: #1f242c;
    color: #f4f1ea;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.whatsapp-bubble.incoming {
    align-self: flex-start;
    border-top-left-radius: 2px;
}

.whatsapp-bubble.outgoing {
    align-self: flex-end;
    border-top-right-radius: 2px;
    background: #175c36;
}

.whatsapp-bubble.unread {
    outline: 1px solid rgba(34, 192, 99, 0.65);
}

.whatsapp-bubble.failed {
    outline: 1px solid rgba(239, 68, 68, 0.75);
}

.whatsapp-bubble p {
    color: #f4f1ea;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.whatsapp-bubble span {
    display: block;
    margin-top: 4px;
    color: rgba(244, 241, 234, 0.65);
    font-size: 10px;
    text-align: right;
}

.whatsapp-failure {
    display: block;
    margin-top: 6px;
    color: #fca5a5;
    font-size: 11px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.whatsapp-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: #1b1d23;
}

.whatsapp-composer textarea {
    min-height: 44px;
    max-height: 120px;
    resize: vertical;
}

@media (max-width: 899px) {
    body.whatsapp-mobile-chat-open {
        overflow: hidden;
        background: #0b0e0d;
    }

    body.whatsapp-mobile-chat-open .app-shell {
        max-width: none;
        min-height: 100dvh;
        padding: 0;
    }

    body.whatsapp-mobile-chat-open .topbar,
    body.whatsapp-mobile-chat-open .tabs,
    body.whatsapp-mobile-chat-open .privacy-footer {
        display: none;
    }

    .whatsapp-panel.whatsapp-thread-mode {
        padding: 0;
        border-color: transparent;
        background: transparent;
    }

    body.whatsapp-mobile-chat-open #whatsapp-section.whatsapp-thread-mode {
        display: block !important;
        position: fixed;
        inset: 0;
        z-index: 999;
        width: 100%;
        height: 100dvh;
        border: 0;
        border-radius: 0;
        background: #0b0e0d;
    }

    .whatsapp-panel.whatsapp-thread-mode .panel-head {
        display: none;
    }

    body.whatsapp-mobile-chat-open #whatsappInbox {
        height: 100%;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .whatsapp-layout {
        display: block;
        min-height: calc(100vh - 180px);
        min-height: calc(100dvh - 180px);
    }

    .whatsapp-layout.has-active-thread {
        min-height: calc(100vh - 130px);
        min-height: calc(100dvh - 130px);
    }

    body.whatsapp-mobile-chat-open .whatsapp-layout.has-active-thread {
        height: 100%;
        min-height: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .whatsapp-layout.has-active-thread .whatsapp-conversations {
        display: none;
    }

    .whatsapp-layout:not(.has-active-thread) .whatsapp-thread {
        display: none;
    }

    .whatsapp-conversations {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .whatsapp-filter {
        top: 0;
        z-index: 3;
        border-radius: 8px;
        padding: 6px;
        background: #151820;
    }

    .whatsapp-thread {
        height: calc(100vh - 132px);
        height: calc(100dvh - 132px);
        min-height: 520px;
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        border-radius: 8px;
    }

    body.whatsapp-mobile-chat-open .whatsapp-thread {
        height: 100%;
        min-height: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        border: 0;
        border-radius: 0;
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        background: #0b0e0d;
    }

    .whatsapp-chat-head {
        grid-template-columns: auto 42px minmax(0, 1fr);
        position: sticky;
        top: 0;
        z-index: 4;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        background: #111b21;
    }

    body.whatsapp-mobile-chat-open .whatsapp-chat-title,
    body.whatsapp-mobile-chat-open .whatsapp-chat-title strong,
    body.whatsapp-mobile-chat-open .whatsapp-chat-title span {
        min-width: 0;
        max-width: 100%;
    }

    .whatsapp-chat-back {
        display: inline-flex;
        background: transparent;
        border-color: transparent;
        color: #f4f1ea;
    }

    .whatsapp-chat-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    body.whatsapp-mobile-chat-open .whatsapp-chat-actions {
        display: none;
    }

    .whatsapp-chat-actions .action-btn {
        flex: 1 1 0;
    }

    .whatsapp-chat-messages {
        min-height: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        padding: 10px;
        scroll-behavior: smooth;
    }

    .whatsapp-composer {
        position: sticky;
        bottom: 0;
        z-index: 4;
        grid-template-columns: minmax(0, 1fr) 74px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        background: #111b21;
    }

    .whatsapp-composer textarea {
        min-width: 0;
        max-width: 100%;
        min-height: 52px;
        max-height: 88px;
        resize: none;
    }

    .whatsapp-composer .primary-btn {
        width: 74px;
        min-width: 74px;
        align-self: stretch;
    }

    .whatsapp-bubble {
        max-width: min(86vw, 420px);
        box-sizing: border-box;
    }

    .whatsapp-bubble p {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

.dashboard-section {
    width: 100%;
}

.dashboard-frame {
    width: 100%;
    height: calc(100vh - 150px);
    min-height: 640px;
    border: none;
    border-radius: 8px;
    background: #101214;
}

.dashboard-body {
    background: #101214;
    color: #f4f1ea;
    min-height: 100vh;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

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

.dash-header h1 {
    font-size: 24px;
    line-height: 1.1;
    margin: 0 0 4px;
    color: #f4f1ea;
}

.dash-header p {
    color: #9fa3ad;
    font-size: 14px;
    margin: 0;
    text-transform: capitalize;
}

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.dash-kpi {
    background: #1b1d23;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.dash-kpi strong {
    display: block;
    color: #f3b556;
    font-size: 24px;
    line-height: 1.1;
}

.dash-kpi span {
    color: #9fa3ad;
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dash-card {
    background: #1b1d23;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid var(--border);
    min-width: 0;
}

.dash-card h2 {
    font-size: 15px;
    margin: 0 0 12px;
    color: #cfd3dc;
    font-weight: 700;
}

.dash-card.full-width {
    grid-column: 1 / -1;
}

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

.metric-card {
    min-height: 104px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 14px;
    border: 1px solid rgba(243, 181, 86, 0.18);
    border-radius: 8px;
    background: #22262d;
    text-align: center;
}

.metric-value {
    color: #f4f1ea;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}

.metric-label {
    color: #9fa3ad;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

.comp-item {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: #22262d;
    color: #cfd3dc;
    flex-wrap: wrap;
}

.comp-label {
    color: #9fa3ad;
    font-size: 12px;
    font-weight: 800;
}

.comp-value {
    color: #4a90d9;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.top-giorni-list {
    display: grid;
    gap: 8px;
}

.top-giorno {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: #22262d;
}

.top-giorno .data,
.top-giorno .persone,
.top-giorno .prenotazioni {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-giorno .data {
    color: #f4f1ea;
    font-weight: 900;
}

.top-giorno .persone {
    color: #35b779;
    font-weight: 900;
}

.top-giorno .prenotazioni {
    color: #9fa3ad;
    font-size: 13px;
    font-weight: 800;
}

.gold {
    color: #f3b556 !important;
}

.silver {
    color: #cfd3dc !important;
}

.bronze {
    color: #cd7f32 !important;
}

.chart-wrapper {
    position: relative;
    height: 220px;
    width: 100%;
}

.dash-card.full-width .chart-wrapper {
    height: 260px;
}

.dash-list {
    display: grid;
    gap: 2px;
}

.dash-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid #2a2d36;
    font-size: 14px;
    color: #cfd3dc;
}

.dash-list-item:last-child {
    border-bottom: none;
}

.dash-rank {
    background: #4a90d9;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.dash-value {
    margin-left: auto;
    color: #9fa3ad;
    font-size: 13px;
    white-space: nowrap;
}

.dash-value.warning {
    color: #f3b556;
    font-weight: 700;
}

.dash-empty {
    color: #9fa3ad;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 768px) {
    .dash-kpis,
    .dash-grid {
        grid-template-columns: 1fr;
    }

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

    .metric-value {
        font-size: 23px;
    }

    .comparison-bar,
    .top-giorno {
        grid-template-columns: 1fr;
    }

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

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

    .dashboard-container {
        padding: 12px;
    }

    .chart-wrapper,
    .dash-card.full-width .chart-wrapper {
        height: 240px;
    }
}

/* Mappa tavoli */
.tavoli-frame {
    width: 100%;
    min-height: 78vh;
    border: 0;
    border-radius: 10px;
    background: #11151c;
}

.tavoli-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
}

.tavoli-page {
    min-height: 100vh;
    padding: 14px;
}

.tavoli-shell {
    max-width: 1240px;
    margin: 0 auto;
}

.tavoli-header,
.tavoli-toolbar,
.tavoli-card,
.tavolo-detail,
.booking-picker-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
}

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

.tavoli-header h1,
.tavolo-detail h2,
.booking-picker-panel h2 {
    margin: 0;
}

.tavoli-header p,
.tavolo-detail p,
.booking-picker-panel p {
    margin: 4px 0 0;
    color: var(--muted);
}

.tavoli-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto auto auto;
    gap: 10px;
    padding: 12px;
    margin-bottom: 12px;
    align-items: end;
}

.tavoli-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.tavoli-toolbar input {
    width: 100%;
    background: var(--input);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 10px;
    font-size: 16px;
}

.tavoli-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.legend-dot.free {
    background: #2ac26b;
}

.legend-dot.busy {
    background: #f05f5f;
}

.legend-dot.scheduled {
    background: #f2b45b;
}

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

.tavoli-card {
    padding: 12px;
}

.mappa-tavoli {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
    background:
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        #0d1015;
    background-size: 40px 40px;
}

.mappa-tavoli.editing {
    border-color: rgba(243, 181, 86, 0.78);
    box-shadow: inset 0 0 0 2px rgba(243, 181, 86, 0.12);
}

.mappa-tavoli.editing::after {
    content: "Trascina i tavoli per spostarli";
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 1;
    border: 1px solid rgba(243, 181, 86, 0.36);
    border-radius: 999px;
    background: rgba(16, 18, 20, 0.9);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
    pointer-events: none;
}

.map-zone-label {
    position: absolute;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #202630;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.map-zone-label.interno {
    left: 14px;
}

.map-zone-label.esterno {
    right: 14px;
}

.tavolo {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 14px;
    border: 2px solid transparent;
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    touch-action: none;
    user-select: none;
}

.tavolo strong {
    font-size: 19px;
    line-height: 1;
}

.tavolo span {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    opacity: 0.92;
}

.tavolo.libero {
    background: linear-gradient(160deg, #1d8f55, #2ac26b);
}

.tavolo.occupato {
    background: linear-gradient(160deg, #bf3737, #f05f5f);
}

.tavolo.scheduled {
    background: linear-gradient(160deg, #a86b16, #f2b45b);
    color: #181008;
}

.tavolo.active,
.tavolo:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(243, 181, 86, 0.22), 0 12px 28px rgba(0, 0, 0, 0.32);
    transform: translateY(-2px);
}

.tavolo.editable {
    cursor: grab;
}

.tavolo.dragging {
    z-index: 5;
    cursor: grabbing;
    transform: scale(1.04);
    box-shadow: 0 0 0 5px rgba(243, 181, 86, 0.2), 0 18px 34px rgba(0, 0, 0, 0.42);
}

.tavoli-side {
    display: grid;
    gap: 12px;
}

.tavolo-detail,
.booking-picker-panel {
    padding: 14px;
}

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

.table-status {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.table-status.libero {
    background: rgba(42, 194, 107, 0.16);
    color: #55d88a;
}

.table-status.occupato {
    background: rgba(240, 95, 95, 0.16);
    color: #ff8d8d;
}

.map-edit-banner,
.table-edit-hint {
    margin-bottom: 12px;
    border: 1px solid rgba(243, 181, 86, 0.32);
    border-radius: 8px;
    background: rgba(243, 181, 86, 0.12);
    color: var(--accent);
    font-size: 13px;
    font-weight: 850;
    padding: 9px 10px;
}

.table-edit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px 0 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #10141b;
}

.table-edit-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.table-edit-form label:first-child,
.table-edit-actions {
    grid-column: 1 / -1;
}

.table-edit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.table-active-booking,
.table-assignment-row,
.booking-pick {
    display: grid;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: #11151c;
}

.table-active-booking {
    margin-bottom: 14px;
}

.table-active-booking span,
.table-active-booking small,
.booking-meta,
.booking-note,
.table-free-text {
    color: var(--muted);
}

.table-assignments,
.booking-list {
    display: grid;
    gap: 8px;
}

.table-assignment-row {
    grid-template-columns: 82px minmax(0, 1fr) auto;
    align-items: center;
}

.booking-pick {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
}

.booking-pick.assigned {
    border-color: rgba(242, 180, 91, 0.35);
}

.tavoli-error {
    padding: 14px;
    border: 1px solid rgba(232, 95, 92, 0.45);
    border-radius: 8px;
    background: rgba(232, 95, 92, 0.12);
    color: #ff928d;
    font-weight: 850;
}

.booking-time {
    color: var(--accent);
    font-size: 17px;
    font-weight: 900;
}

.booking-main {
    min-width: 0;
}

.booking-note {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
}

.danger-btn {
    border: 0;
    border-radius: 8px;
    background: var(--danger);
    color: #fff;
    font-weight: 900;
    min-height: 40px;
    padding: 9px 12px;
}

@media (max-width: 900px) {
    .tavoli-grid-page {
        grid-template-columns: 1fr;
    }

    .mappa-tavoli {
        min-height: 520px;
    }
}

@media (max-width: 640px) {
    .cookie-banner {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .cookie-banner button {
        width: 100%;
    }

    .privacy-container {
        width: min(100% - 16px, 900px);
        padding-top: 10px;
    }

    .privacy-hero,
    .privacy-section {
        padding: 14px;
    }

    .admin-shell {
        width: min(100% - 16px, 1180px);
        padding-top: 8px;
    }

    .admin-hero,
    .admin-grid,
    .admin-actions,
    .admin-link-grid,
    .admin-fast-actions,
    .admin-form-two,
    .admin-money-grid {
        grid-template-columns: 1fr;
    }

    .admin-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 14px;
    }

    .admin-card {
        padding: 14px;
    }

    .admin-brand-title img {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        border-radius: 14px;
    }

    .admin-brand-title h1 {
        font-size: 34px;
    }

    .admin-quick,
    .admin-jump {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-jump {
        top: 0;
    }

    .admin-double {
        grid-column: 1;
    }

    .admin-toast {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }

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

    .guide-container {
        width: min(100% - 16px, 900px);
    }

    .guide-hero,
    .guide-section {
        padding: 14px;
    }

    .mock-phone {
        min-height: 500px;
        padding: 14px;
        border-radius: 22px;
    }

    .mock-tablet {
        min-height: 420px;
        padding: 14px;
        border-radius: 14px;
    }

    .mock-tablet.split {
        display: block;
    }

    .mock-chat-list,
    .mock-chat-thread {
        min-height: 190px;
        margin-bottom: 10px;
    }

    .mock-composer {
        position: static;
        width: 100%;
        margin-top: 10px;
    }

    .mock-booking,
    .mock-customer {
        grid-template-columns: 1fr;
    }

    .mock-floor {
        grid-template-columns: repeat(2, minmax(90px, 1fr));
    }

    .hotspot {
        width: 30px;
        height: 30px;
    }

    .license-banner {
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
        padding: 8px 10px;
    }

    .license-banner button {
        width: 100%;
        min-height: 36px;
    }

    .tavoli-page {
        padding: 8px;
    }

    .tavoli-header,
    .tavoli-toolbar {
        grid-template-columns: 1fr;
    }

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

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

    .mappa-tavoli {
        min-height: 430px;
    }

    .tavolo strong {
        font-size: 16px;
    }

    .tavolo span {
        max-width: 68px;
    }

    .booking-pick,
    .table-assignment-row,
    .table-edit-form,
    .table-edit-actions {
        grid-template-columns: 1fr;
    }

    .table-edit-form label:first-child,
    .table-edit-actions {
        grid-column: auto;
    }
}
