:root {
    --wa-bg: #f4f6fb;
    --wa-surface: #ffffff;
    --wa-surface-soft: #f8fafc;
    --wa-ink: #172033;
    --wa-muted: #68758b;
    --wa-line: #e5e9f2;
    --wa-primary: #6d3ce7;
    --wa-primary-dark: #5325c7;
    --wa-primary-soft: #efe9ff;
    --wa-free: #16a66a;
    --wa-free-soft: #dcf8eb;
    --wa-busy: #e54552;
    --wa-busy-soft: #ffe7e9;
    --wa-warning: #f59e0b;
    --wa-shadow: 0 18px 50px rgba(31, 43, 74, .10);
    --wa-shadow-soft: 0 8px 24px rgba(31, 43, 74, .08);
    --wa-radius: 22px;
    --wa-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
}

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

body.waiter-app {
    min-height: 100vh;
    margin: 0;
    color: var(--wa-ink);
    background:
        radial-gradient(circle at 0 0, rgba(109, 60, 231, .09), transparent 30rem),
        linear-gradient(180deg, #fafbff 0, var(--wa-bg) 18rem);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

body.waiter-app.modal-locked {
    overflow: hidden;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    touch-action: manipulation;
}

.wa-hidden {
    display: none !important;
}

.wa-appbar {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(229, 233, 242, .85);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 22px rgba(30, 41, 59, .05);
    backdrop-filter: blur(18px);
}

.wa-appbar__inner {
    width: min(1440px, 100%);
    min-height: 72px;
    margin: 0 auto;
    padding: 11px clamp(14px, 3vw, 34px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wa-brand,
.wa-user {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.wa-brand__mark,
.wa-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
}

.wa-brand__mark {
    color: #fff;
    background: linear-gradient(145deg, #7c4df0, #5422c6);
    box-shadow: 0 10px 24px rgba(109, 60, 231, .28);
    font-size: 20px;
}

.wa-avatar {
    color: var(--wa-primary-dark);
    background: var(--wa-primary-soft);
    font-size: 18px;
}

.wa-brand__copy,
.wa-user__copy {
    min-width: 0;
}

.wa-eyebrow {
    margin: 0 0 2px;
    color: var(--wa-primary);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.wa-title {
    margin: 0;
    font-size: clamp(18px, 3vw, 24px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -.025em;
}

.wa-user__name {
    max-width: 190px;
    overflow: hidden;
    color: var(--wa-ink);
    font-size: 14px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wa-connection {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wa-muted);
    font-size: 11px;
    font-weight: 750;
}

.wa-connection::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wa-free);
    box-shadow: 0 0 0 4px rgba(22, 166, 106, .12);
    content: "";
}

.wa-connection.is-offline::before {
    background: var(--wa-busy);
    box-shadow: 0 0 0 4px rgba(229, 69, 82, .12);
}

.wa-logout {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #ffd6da;
    border-radius: 14px;
    color: #c93643;
    background: #fff5f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.wa-logout:active {
    transform: scale(.98);
}

.wa-logout--compact {
    min-height: 38px;
    border-radius: 13px;
}

.wa-page {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 34px) calc(94px + var(--wa-safe-bottom));
}

.wa-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.wa-hero > div {
    min-width: 0;
}

.wa-hero h2 {
    margin: 0 0 5px;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -.045em;
}

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

.wa-refresh {
    min-width: 48px;
    min-height: 48px;
    border: 1px solid var(--wa-line);
    border-radius: 15px;
    color: var(--wa-primary);
    background: var(--wa-surface);
    box-shadow: var(--wa-shadow-soft);
    cursor: pointer;
}

.wa-refresh.is-spinning i {
    animation: wa-spin .7s linear infinite;
}

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

.wa-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.wa-stat {
    min-width: 0;
    min-height: 82px;
    padding: 15px 17px;
    border: 1px solid var(--wa-line);
    border-radius: 19px;
    background: var(--wa-surface);
    box-shadow: var(--wa-shadow-soft);
    display: flex;
    align-items: center;
    gap: 13px;
}

.wa-stat__icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--wa-primary);
    background: var(--wa-primary-soft);
}

.wa-stat--free .wa-stat__icon {
    color: var(--wa-free);
    background: var(--wa-free-soft);
}

.wa-stat--busy .wa-stat__icon {
    color: var(--wa-busy);
    background: var(--wa-busy-soft);
}

.wa-stat strong {
    display: block;
    font-size: 23px;
    line-height: 1;
    font-weight: 950;
}

.wa-stat span {
    display: block;
    margin-top: 4px;
    color: var(--wa-muted);
    font-size: 12px;
    font-weight: 750;
}

.wa-filters,
.wa-category-strip {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 1px 10px;
    scrollbar-width: none;
}

.wa-filters::-webkit-scrollbar,
.wa-category-strip::-webkit-scrollbar {
    display: none;
}

.wa-filter,
.wa-category {
    min-height: 42px;
    flex: 0 0 auto;
    padding: 0 17px;
    border: 1px solid var(--wa-line);
    border-radius: 999px;
    color: var(--wa-muted);
    background: var(--wa-surface);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.wa-filter.is-active,
.wa-category.is-active {
    border-color: var(--wa-primary);
    color: #fff;
    background: var(--wa-primary);
    box-shadow: 0 9px 20px rgba(109, 60, 231, .24);
}

.wa-area {
    margin-top: 21px;
}

.wa-area__heading {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wa-area__heading h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
}

.wa-area__heading span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--wa-muted);
    background: #e9edf5;
    font-size: 11px;
    font-weight: 850;
}

.wa-table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 13px;
}

.wa-table-card {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 214px;
    padding: 15px;
    overflow: hidden;
    border: 1px solid var(--wa-line);
    border-radius: var(--wa-radius);
    background: var(--wa-surface);
    box-shadow: var(--wa-shadow-soft);
    cursor: pointer;
    text-align: left;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.wa-table-card:active {
    transform: scale(.985);
}

.wa-table-card.is-mine {
    border-color: rgba(109, 60, 231, .45);
    box-shadow: 0 10px 28px rgba(109, 60, 231, .13);
}

.wa-table-card__top,
.wa-table-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.wa-table-card__name {
    overflow: hidden;
    color: var(--wa-ink);
    font-size: 16px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wa-status-badge {
    min-height: 25px;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--wa-free);
    background: var(--wa-free-soft);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.wa-table-card.is-busy .wa-status-badge {
    color: var(--wa-busy);
    background: var(--wa-busy-soft);
}

.wa-table-card.is-mine .wa-status-badge {
    color: var(--wa-primary-dark);
    background: var(--wa-primary-soft);
}

.wa-table-visual {
    position: relative;
    width: 94px;
    height: 94px;
    margin: 13px auto 11px;
    display: grid;
    place-items: center;
}

.wa-table-visual__surface {
    width: 66px;
    height: 66px;
    border: 8px solid rgba(255, 255, 255, .65);
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(145deg, #26bf80, var(--wa-free));
    box-shadow: 0 13px 25px rgba(22, 166, 106, .25), inset 0 0 0 1px rgba(255, 255, 255, .25);
    display: grid;
    place-items: center;
    font-size: 20px;
}

.wa-table-card.is-busy .wa-table-visual__surface {
    background: linear-gradient(145deg, #fa6470, var(--wa-busy));
    box-shadow: 0 13px 25px rgba(229, 69, 82, .25), inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.wa-table-card.is-mine .wa-table-visual__surface {
    background: linear-gradient(145deg, #8559f4, var(--wa-primary));
    box-shadow: 0 13px 25px rgba(109, 60, 231, .28), inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.wa-seat {
    position: absolute;
    width: 22px;
    height: 12px;
    border-radius: 6px;
    background: #cfd7e6;
    box-shadow: inset 0 -2px 0 rgba(21, 32, 51, .08);
}

.wa-seat--top { top: 0; left: 36px; }
.wa-seat--right { right: -5px; top: 41px; transform: rotate(90deg); }
.wa-seat--bottom { bottom: 0; left: 36px; }
.wa-seat--left { left: -5px; top: 41px; transform: rotate(90deg); }

.wa-table-card__meta {
    min-height: 34px;
    color: var(--wa-muted);
    font-size: 11px;
    font-weight: 750;
}

.wa-table-card__meta strong {
    color: var(--wa-ink);
    font-size: 12px;
}

.wa-empty {
    padding: 44px 20px;
    border: 1px dashed #ccd4e2;
    border-radius: var(--wa-radius);
    color: var(--wa-muted);
    background: rgba(255, 255, 255, .65);
    text-align: center;
}

.wa-empty i {
    display: block;
    margin-bottom: 10px;
    color: #a6b0c2;
    font-size: 30px;
}

.wa-bottom-nav {
    position: fixed;
    z-index: 45;
    right: 12px;
    bottom: calc(12px + var(--wa-safe-bottom));
    left: 12px;
    min-height: 64px;
    padding: 7px;
    border: 1px solid rgba(229, 233, 242, .9);
    border-radius: 21px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 45px rgba(23, 32, 51, .18);
    backdrop-filter: blur(18px);
    display: none;
    align-items: stretch;
    justify-content: space-around;
}

.wa-nav-item {
    min-width: 74px;
    border: 0;
    border-radius: 16px;
    color: var(--wa-muted);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 850;
    text-decoration: none;
}

.wa-nav-item.is-active {
    color: var(--wa-primary);
    background: var(--wa-primary-soft);
}

/* Pedido */
.wa-order-page {
    width: min(1540px, 100%);
    margin: 0 auto;
    padding: 18px clamp(12px, 2vw, 28px) 30px;
}

.wa-order-head {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wa-order-head__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-back {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid var(--wa-line);
    border-radius: 15px;
    color: var(--wa-ink);
    background: var(--wa-surface);
    box-shadow: var(--wa-shadow-soft);
    display: grid;
    place-items: center;
    text-decoration: none;
}

.wa-order-identity {
    min-width: 0;
    flex: 1;
}

.wa-order-identity h1 {
    margin: 0;
    overflow: hidden;
    font-size: clamp(19px, 3vw, 27px);
    line-height: 1.1;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wa-order-identity p {
    margin: 4px 0 0;
    color: var(--wa-muted);
    font-size: 12px;
    font-weight: 700;
}

.wa-order-stage {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    color: #9a6300;
    background: #fff2cf;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.wa-order-stage.is-sent {
    color: var(--wa-primary-dark);
    background: var(--wa-primary-soft);
}

.wa-order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
    align-items: start;
    gap: 17px;
}

.wa-panel {
    border: 1px solid var(--wa-line);
    border-radius: var(--wa-radius);
    background: var(--wa-surface);
    box-shadow: var(--wa-shadow-soft);
}

.wa-catalog-panel {
    min-height: calc(100vh - 126px);
    overflow: hidden;
}

.wa-catalog-tools {
    position: sticky;
    top: 73px;
    z-index: 15;
    padding: 15px 16px 8px;
    border-bottom: 1px solid var(--wa-line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
}

.wa-search {
    position: relative;
}

.wa-search i {
    position: absolute;
    top: 50%;
    left: 16px;
    color: #8b97aa;
    transform: translateY(-50%);
}

.wa-search input {
    width: 100%;
    height: 49px;
    padding: 0 45px;
    border: 1px solid var(--wa-line);
    outline: none;
    border-radius: 16px;
    color: var(--wa-ink);
    background: var(--wa-surface-soft);
    font-size: 14px;
    font-weight: 700;
}

.wa-search input:focus {
    border-color: rgba(109, 60, 231, .55);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109, 60, 231, .10);
}

.wa-search__clear {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 11px;
    color: var(--wa-muted);
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
}

.wa-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 12px;
    padding: 15px;
}

.wa-product {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--wa-line);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(30, 41, 59, .06);
    display: flex;
    flex-direction: column;
}

.wa-product.is-out {
    opacity: .62;
}

.wa-product__image {
    position: relative;
    height: 122px;
    overflow: hidden;
    color: #9b87d0;
    background: linear-gradient(145deg, #f2edff, #f8f5ff);
    display: grid;
    place-items: center;
    font-size: 34px;
}

.wa-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wa-product__stock {
    position: absolute;
    top: 9px;
    right: 9px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #0d6b43;
    background: rgba(232, 255, 245, .94);
    box-shadow: 0 3px 10px rgba(20, 83, 45, .12);
    font-size: 9px;
    font-weight: 950;
}

.wa-product.is-low .wa-product__stock {
    color: #925f00;
    background: rgba(255, 245, 211, .96);
}

.wa-product.is-out .wa-product__stock {
    color: #a3202b;
    background: rgba(255, 231, 233, .96);
}

.wa-product__body {
    min-height: 119px;
    padding: 12px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.wa-product__category {
    margin-bottom: 4px;
    color: var(--wa-primary);
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.wa-product__name {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.wa-product__footer {
    margin-top: auto;
    padding-top: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wa-product__price {
    font-size: 15px;
    font-weight: 950;
}

.wa-add-product {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--wa-primary);
    box-shadow: 0 8px 17px rgba(109, 60, 231, .24);
    cursor: pointer;
}

.wa-add-product:disabled {
    color: #98a2b2;
    background: #e9edf3;
    box-shadow: none;
    cursor: not-allowed;
}

.wa-cart-panel {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 106px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wa-cart-head {
    min-height: 64px;
    padding: 14px 17px;
    border-bottom: 1px solid var(--wa-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wa-cart-head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 950;
}

.wa-cart-count {
    min-width: 29px;
    height: 29px;
    padding: 0 8px;
    border-radius: 10px;
    color: var(--wa-primary-dark);
    background: var(--wa-primary-soft);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 950;
}

.wa-cart-close {
    display: none;
}

.wa-cart-items {
    min-height: 130px;
    overflow-y: auto;
    padding: 7px 14px;
}

.wa-cart-empty {
    min-height: 180px;
    color: var(--wa-muted);
    display: grid;
    place-items: center;
    text-align: center;
}

.wa-cart-empty i {
    display: block;
    margin-bottom: 9px;
    color: #b1bac9;
    font-size: 30px;
}

.wa-cart-item {
    padding: 13px 0;
    border-bottom: 1px solid var(--wa-line);
}

.wa-cart-item:last-child {
    border-bottom: 0;
}

.wa-cart-item__top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.wa-cart-item__copy {
    min-width: 0;
    flex: 1;
}

.wa-cart-item__copy h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
}

.wa-cart-item__copy p {
    margin: 4px 0 0;
    color: var(--wa-muted);
    font-size: 10px;
    line-height: 1.35;
}

.wa-cart-item__total {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 950;
}

.wa-cart-item__controls {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wa-stepper {
    min-height: 38px;
    padding: 3px;
    border: 1px solid var(--wa-line);
    border-radius: 13px;
    background: var(--wa-surface-soft);
    display: inline-flex;
    align-items: center;
}

.wa-stepper button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    color: var(--wa-primary);
    background: #fff;
    cursor: pointer;
}

.wa-stepper strong {
    min-width: 35px;
    text-align: center;
    font-size: 12px;
}

.wa-item-actions {
    display: flex;
    gap: 6px;
}

.wa-item-action {
    width: 37px;
    height: 37px;
    border: 1px solid var(--wa-line);
    border-radius: 12px;
    color: var(--wa-muted);
    background: #fff;
    cursor: pointer;
}

.wa-item-action--options {
    color: var(--wa-primary);
    background: var(--wa-primary-soft);
    border-color: transparent;
}

.wa-item-action--delete {
    color: var(--wa-busy);
}

.wa-order-note {
    padding: 12px 15px;
    border-top: 1px solid var(--wa-line);
}

.wa-order-note label {
    display: block;
    margin-bottom: 6px;
    color: var(--wa-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.wa-order-note textarea,
.wa-modal textarea {
    width: 100%;
    min-height: 72px;
    padding: 11px 12px;
    resize: vertical;
    border: 1px solid var(--wa-line);
    outline: none;
    border-radius: 14px;
    color: var(--wa-ink);
    background: var(--wa-surface-soft);
    font-size: 13px;
}

.wa-cart-footer {
    padding: 14px 16px 16px;
    border-top: 1px solid var(--wa-line);
    background: #fff;
}

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

.wa-total span {
    color: var(--wa-muted);
    font-size: 12px;
    font-weight: 800;
}

.wa-total strong {
    font-size: 22px;
    font-weight: 950;
}

.wa-primary-button,
.wa-secondary-button,
.wa-danger-button {
    min-height: 49px;
    padding: 0 17px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.wa-primary-button {
    width: 100%;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #7b4cec, var(--wa-primary-dark));
    box-shadow: 0 11px 24px rgba(109, 60, 231, .25);
}

.wa-primary-button:disabled {
    color: #96a0b0;
    background: #e6eaf1;
    box-shadow: none;
    cursor: not-allowed;
}

.wa-secondary-button {
    border: 1px solid var(--wa-line);
    color: var(--wa-ink);
    background: #fff;
}

.wa-danger-button {
    border: 1px solid #ffd1d5;
    color: var(--wa-busy);
    background: #fff7f8;
}

.wa-discard {
    width: 100%;
    min-height: 40px;
    margin-top: 8px;
    border: 0;
    color: var(--wa-busy);
    background: transparent;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.wa-mobile-cart {
    position: fixed;
    z-index: 37;
    right: 12px;
    bottom: calc(12px + var(--wa-safe-bottom));
    left: 12px;
    min-height: 62px;
    padding: 8px 9px 8px 14px;
    border: 1px solid rgba(229, 233, 242, .85);
    border-radius: 20px;
    color: #fff;
    background: #1f2937;
    box-shadow: 0 18px 40px rgba(17, 24, 39, .27);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

.wa-mobile-cart__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wa-mobile-cart__copy small {
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 750;
}

.wa-mobile-cart__copy strong {
    margin-top: 2px;
    font-size: 17px;
    font-weight: 950;
}

.wa-mobile-cart__action {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    color: #fff;
    background: var(--wa-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
}

/* Modales, confirmaciones y avisos */
.wa-modal-layer,
.wa-confirm-layer {
    position: fixed;
    z-index: 100;
    inset: 0;
    padding: 16px;
    background: rgba(17, 24, 39, .48);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
}

.wa-modal-layer.is-open,
.wa-confirm-layer.is-open {
    display: flex;
}

.wa-modal,
.wa-confirm {
    width: min(620px, 100%);
    max-height: min(86vh, 760px);
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(17, 24, 39, .30);
    display: flex;
    flex-direction: column;
    animation: wa-modal-in .18s ease-out;
}

.wa-confirm {
    width: min(390px, 100%);
}

@keyframes wa-modal-in {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
}

.wa-modal__head,
.wa-confirm__body {
    padding: 17px 18px;
}

.wa-modal__head {
    border-bottom: 1px solid var(--wa-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wa-modal__head h2,
.wa-confirm h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 950;
}

.wa-modal__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 13px;
    color: var(--wa-muted);
    background: var(--wa-surface-soft);
    cursor: pointer;
}

.wa-modal__body {
    overflow-y: auto;
    padding: 8px 18px 18px;
}

.wa-modal__footer,
.wa-confirm__actions {
    padding: 12px 18px 18px;
    border-top: 1px solid var(--wa-line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.wa-option-position {
    margin-top: 16px;
}

.wa-option-position__title {
    margin: 0 0 8px;
    color: var(--wa-primary);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.wa-option-group {
    margin-bottom: 13px;
    padding: 13px;
    border: 1px solid var(--wa-line);
    border-radius: 17px;
    background: var(--wa-surface-soft);
}

.wa-option-group__head {
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.wa-option-group__head strong {
    font-size: 13px;
}

.wa-option-group__head span {
    color: var(--wa-muted);
    font-size: 10px;
    font-weight: 800;
}

.wa-option-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.wa-option {
    position: relative;
    min-height: 45px;
}

.wa-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wa-option label {
    min-height: 45px;
    padding: 9px 10px;
    border: 1px solid var(--wa-line);
    border-radius: 13px;
    color: var(--wa-ink);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.wa-option input:checked + label {
    border-color: var(--wa-primary);
    color: var(--wa-primary-dark);
    background: var(--wa-primary-soft);
    box-shadow: inset 0 0 0 1px var(--wa-primary);
}

.wa-option__price {
    color: var(--wa-free);
    font-size: 9px;
    white-space: nowrap;
}

.wa-confirm__icon {
    width: 52px;
    height: 52px;
    margin-bottom: 13px;
    border-radius: 17px;
    color: var(--wa-primary);
    background: var(--wa-primary-soft);
    display: grid;
    place-items: center;
    font-size: 21px;
}

.wa-confirm p {
    margin: 8px 0 0;
    color: var(--wa-muted);
    font-size: 13px;
    line-height: 1.5;
}

.wa-toast-stack {
    position: fixed;
    z-index: 130;
    top: 84px;
    right: 16px;
    width: min(360px, calc(100vw - 32px));
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.wa-toast {
    min-height: 52px;
    padding: 11px 13px;
    border: 1px solid var(--wa-line);
    border-left: 5px solid var(--wa-primary);
    border-radius: 15px;
    color: var(--wa-ink);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 15px 38px rgba(17, 24, 39, .17);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 800;
    animation: wa-toast-in .2s ease-out;
}

.wa-toast.is-error { border-left-color: var(--wa-busy); }
.wa-toast.is-success { border-left-color: var(--wa-free); }

@keyframes wa-toast-in {
    from { opacity: 0; transform: translateX(15px); }
}

.wa-loading {
    min-height: 210px;
    color: var(--wa-muted);
    display: grid;
    place-items: center;
    text-align: center;
}

.wa-loading i {
    display: block;
    margin-bottom: 10px;
    color: var(--wa-primary);
    font-size: 26px;
    animation: wa-spin .75s linear infinite;
}

@media (hover: hover) {
    .wa-table-card:hover,
    .wa-product:hover {
        transform: translateY(-3px);
        box-shadow: var(--wa-shadow);
    }

    .wa-refresh:hover,
    .wa-back:hover,
    .wa-secondary-button:hover {
        border-color: rgba(109, 60, 231, .35);
    }

    .wa-logout:hover {
        border-color: #ffb3bb;
        color: #aa2632;
        background: #ffebed;
    }
}

@media (max-width: 900px) {
    .wa-order-layout {
        grid-template-columns: 1fr;
    }

    .wa-order-page {
        padding-bottom: calc(94px + var(--wa-safe-bottom));
    }

    .wa-cart-panel {
        position: fixed;
        z-index: 80;
        inset: 0;
        max-height: none;
        border: 0;
        border-radius: 0;
        transform: translateY(105%);
        transition: transform .22s ease;
    }

    body.cart-open .wa-cart-panel {
        transform: translateY(0);
    }

    .wa-cart-head {
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
    }

    .wa-cart-close {
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 13px;
        color: var(--wa-muted);
        background: var(--wa-surface-soft);
        display: block;
    }

    .wa-cart-items {
        flex: 1;
    }

    .wa-cart-footer {
        padding-bottom: calc(16px + var(--wa-safe-bottom));
    }

    .wa-mobile-cart {
        display: flex;
    }
}

@media (max-width: 680px) {
    .wa-appbar__inner {
        min-height: 64px;
        padding: 9px 13px;
    }

    .wa-brand__mark,
    .wa-avatar {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 14px;
    }

    .wa-user__copy {
        display: none;
    }

    .wa-user .wa-logout {
        width: 42px;
        padding: 0;
    }

    .wa-user .wa-logout span {
        display: none;
    }

    .wa-page {
        padding-top: 19px;
    }

    .wa-hero {
        align-items: center;
        gap: 9px;
    }

    .wa-hero h2 {
        font-size: 27px;
    }

    .wa-refresh {
        min-width: 44px;
        min-height: 44px;
        flex: 0 0 44px;
    }

    .wa-stats {
        gap: 8px;
    }

    .wa-stat {
        min-height: 72px;
        padding: 11px;
        border-radius: 17px;
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }

    .wa-stat__icon {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        border-radius: 10px;
        font-size: 12px;
    }

    .wa-stat strong {
        font-size: 19px;
    }

    .wa-stat span {
        margin-top: 2px;
        font-size: 9px;
    }

    .wa-table-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .wa-table-card {
        min-height: 196px;
        padding: 12px;
        border-radius: 19px;
    }

    .wa-table-card__name {
        font-size: 13px;
    }

    .wa-status-badge {
        padding: 4px 6px;
        font-size: 8px;
    }

    .wa-table-visual {
        transform: scale(.9);
        margin-top: 7px;
        margin-bottom: 3px;
    }

    .wa-table-card__meta {
        font-size: 9px;
    }

    .wa-table-card__meta strong {
        font-size: 10px;
    }

    .wa-bottom-nav {
        display: flex;
    }

    .wa-order-page {
        padding-top: 11px;
    }

    .wa-order-head {
        margin-bottom: 11px;
    }

    .wa-order-stage {
        min-width: 37px;
        padding: 0 11px;
    }

    .wa-order-stage span {
        display: none;
    }

    .wa-order-head__actions {
        gap: 5px;
    }

    .wa-logout--compact {
        width: 38px;
        padding: 0;
    }

    .wa-logout--compact span {
        display: none;
    }

    .wa-catalog-panel {
        min-height: calc(100vh - 120px);
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .wa-catalog-tools {
        top: 64px;
        margin: 0 -12px;
        padding: 10px 12px 6px;
    }

    .wa-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        padding: 11px 0;
    }

    .wa-product {
        border-radius: 17px;
    }

    .wa-product__image {
        height: 105px;
    }

    .wa-product__body {
        min-height: 112px;
        padding: 10px;
    }

    .wa-product__name {
        font-size: 12px;
    }

    .wa-add-product {
        width: 39px;
        height: 39px;
        border-radius: 13px;
    }

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

    .wa-modal-layer,
    .wa-confirm-layer {
        padding: 0;
        align-items: flex-end;
    }

    .wa-modal,
    .wa-confirm {
        width: 100%;
        max-height: 92vh;
        border-radius: 25px 25px 0 0;
    }

    .wa-toast-stack {
        top: 71px;
        right: 10px;
        width: calc(100vw - 20px);
    }
}

@media (max-width: 360px) {
    .wa-table-card {
        min-height: 186px;
        padding: 10px;
    }

    .wa-table-visual {
        transform: scale(.82);
        margin-left: -1px;
        margin-right: -1px;
    }

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

/* Herramientas PWA y timbre digital de mesas */
.wa-user-tools,
.wa-order-head__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-tool-button {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #ded5fb;
    border-radius: 13px;
    color: var(--wa-primary-dark);
    background: #f7f4ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.wa-tool-button.is-enabled {
    border-color: #b7ecd5;
    color: #078a55;
    background: #eafaf3;
}

.wa-tool-button--compact { min-height: 38px; }

.wa-call-dock {
    position: fixed;
    z-index: 120;
    top: 84px;
    left: 50%;
    width: min(760px, calc(100% - 24px));
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    transform: translate(-50%, -18px);
    opacity: 0;
    visibility: hidden;
    display: grid;
    gap: 10px;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.wa-call-dock.is-open {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.wa-call-card {
    position: relative;
    min-height: 112px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(115deg, #df3547 0%, #f05846 52%, #ef753f 100%);
    box-shadow: 0 20px 48px rgba(203, 49, 64, .34);
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    overflow: hidden;
}

.wa-call-card::after {
    position: absolute;
    width: 150px;
    height: 150px;
    right: -55px;
    top: -75px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    content: "";
}

.wa-call-card.is-accepted {
    background: linear-gradient(115deg, #087f59, #13ad72 58%, #29c58b);
    box-shadow: 0 20px 48px rgba(12, 139, 91, .3);
}

.wa-call-card__signal {
    position: relative;
    z-index: 1;
    width: 62px;
    height: 62px;
    border-radius: 21px;
    display: grid;
    place-items: center;
    color: #d93646;
    background: #fff;
    font-size: 25px;
    box-shadow: 0 10px 24px rgba(87, 10, 24, .18);
}

.wa-call-card.is-ringing .wa-call-card__signal i { animation: wa-call-bell .8s ease-in-out infinite; transform-origin: 50% 15%; }
.wa-call-card.is-accepted .wa-call-card__signal { color: #07905f; }
.wa-call-card__copy { position: relative; z-index: 1; min-width: 0; }
.wa-call-card__copy p { margin: 0 0 2px; font-size: 10px; font-weight: 950; letter-spacing: .13em; opacity: .82; }
.wa-call-card__copy h2 { margin: 0 0 5px; font-size: 25px; line-height: 1; font-weight: 950; letter-spacing: -.03em; }
.wa-call-card__copy span { font-size: 11px; font-weight: 750; opacity: .9; }
.wa-call-card__action {
    position: relative;
    z-index: 2;
    min-height: 50px;
    padding: 0 16px;
    border: 0;
    border-radius: 16px;
    color: #b82a38;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(72, 8, 19, .16);
}
.wa-call-card.is-accepted .wa-call-card__action { color: #087f59; }

.wa-table-card.has-waiter-call {
    border: 2px solid #ef4050;
    box-shadow: 0 0 0 5px rgba(239, 64, 80, .1), 0 18px 40px rgba(203, 49, 64, .18);
    animation: wa-call-card-pulse 1.5s ease-in-out infinite;
}

.wa-table-call-badge {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    color: #fff;
    background: #e33b4b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 950;
    white-space: nowrap;
    box-shadow: 0 7px 16px rgba(203, 49, 64, .28);
}

.wa-install-layer {
    position: fixed;
    z-index: 250;
    inset: 0;
    padding: 18px;
    display: grid;
    place-items: center;
    background: rgba(21, 27, 43, .57);
    backdrop-filter: blur(9px);
}

.wa-install-modal {
    width: min(420px, 100%);
    padding: 28px 24px 22px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 28px;
    text-align: center;
    background: #fff;
    box-shadow: 0 30px 80px rgba(20, 24, 40, .3);
}
.wa-install-icon {
    position: relative;
    width: 78px;
    height: 78px;
    margin: 0 auto 16px;
    border-radius: 25px;
    color: #fff;
    background: linear-gradient(145deg, #8453f2, #5521c8);
    display: grid;
    place-items: center;
    font-size: 36px;
    box-shadow: 0 16px 34px rgba(89, 36, 201, .3);
}
.wa-install-icon span {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 29px;
    height: 29px;
    border: 3px solid #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--wa-free);
    font-size: 11px;
}
.wa-install-modal h2 { margin: 5px 0 10px; font-size: 26px; font-weight: 950; letter-spacing: -.035em; }
.wa-install-modal > p:not(.wa-eyebrow) { margin: 0 auto 20px; color: var(--wa-muted); font-size: 13px; line-height: 1.55; }
.wa-install-actions { display: grid; gap: 9px; }
.wa-install-actions button { width: 100%; min-height: 50px; }
.wa-install-steps { margin: 17px 0 20px; display: grid; gap: 9px; text-align: left; }
.wa-install-steps span { padding: 11px; border-radius: 13px; color: var(--wa-muted); background: var(--wa-surface-soft); font-size: 12px; }
.wa-install-steps b { width: 23px; height: 23px; margin-right: 7px; border-radius: 8px; color: #fff; background: var(--wa-primary); display: inline-grid; place-items: center; }

@keyframes wa-call-bell {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(15deg); }
    50% { transform: rotate(-14deg); }
    75% { transform: rotate(8deg); }
}

@keyframes wa-call-card-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(239, 64, 80, .08), 0 16px 38px rgba(203, 49, 64, .15); }
    50% { box-shadow: 0 0 0 8px rgba(239, 64, 80, .14), 0 20px 44px rgba(203, 49, 64, .24); }
}

@media (max-width: 820px) {
    .wa-user-tools .wa-tool-button span { display: none; }
    .wa-user-tools .wa-tool-button { width: 40px; padding: 0; }
    .wa-call-dock { top: 76px; width: calc(100% - 18px); }
    .wa-call-card { min-height: 103px; padding: 13px; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; border-radius: 21px; }
    .wa-call-card__signal { width: 51px; height: 51px; border-radius: 17px; font-size: 21px; }
    .wa-call-card__copy h2 { font-size: 21px; }
    .wa-call-card__action { width: 52px; min-height: 52px; padding: 0; border-radius: 17px; font-size: 18px; }
    .wa-call-card__action span { display: none; }
    .wa-order-head__actions .wa-tool-button span { display: none; }
    .wa-order-head__actions .wa-tool-button { width: 38px; padding: 0; }
}

@media (max-width: 560px) {
    .wa-user__copy { display: none; }
    .wa-appbar__inner { gap: 8px; }
    .wa-user { gap: 6px; }
    .wa-avatar { display: none; }
    .wa-user-tools { gap: 5px; }
    .wa-logout { width: 40px; min-width: 40px; padding: 0; }
    .wa-logout span { display: none; }
    .wa-order-head__actions .wa-order-stage span,
    .wa-order-head__actions .wa-logout span { display: none; }
    .wa-order-head__actions .wa-logout { width: 38px; padding: 0; }
    .wa-order-head__actions { gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    .wa-call-card.is-ringing .wa-call-card__signal i,
    .wa-table-card.has-waiter-call { animation: none; }
}

/* Avisos automáticos de productos listos en Cocina */
.wa-kitchen-dock {
    position: fixed;
    z-index: 118;
    right: 18px;
    bottom: 22px;
    width: min(430px, calc(100% - 36px));
    max-height: min(540px, calc(100vh - 120px));
    overflow-y: auto;
    display: grid;
    gap: 9px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.wa-kitchen-dock.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.wa-kitchen-alert {
    position: relative;
    min-height: 92px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 21px;
    color: #fff;
    background: linear-gradient(120deg, #0a8d5c, #14b875 58%, #25c98b);
    box-shadow: 0 18px 44px rgba(7, 131, 83, .3);
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.wa-kitchen-alert::after {
    position: absolute;
    width: 130px;
    height: 130px;
    right: -48px;
    top: -67px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    content: "";
}

.wa-kitchen-alert.is-complete {
    background: linear-gradient(120deg, #5632cb, #7542e3 58%, #925df0);
    box-shadow: 0 18px 44px rgba(91, 47, 199, .3);
}

.wa-kitchen-alert__icon {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #07915c;
    background: #fff;
    display: grid;
    place-items: center;
    font-size: 21px;
    box-shadow: 0 10px 22px rgba(4, 75, 47, .2);
}
.wa-kitchen-alert.is-complete .wa-kitchen-alert__icon { color: #6736d3; }
.wa-kitchen-alert__copy { position: relative; z-index: 1; min-width: 0; }
.wa-kitchen-alert__copy p { margin: 0 0 3px; font-size: 9px; font-weight: 950; letter-spacing: .12em; opacity: .82; }
.wa-kitchen-alert__copy h2 { margin: 0 0 5px; font-size: 18px; line-height: 1.05; font-weight: 950; letter-spacing: -.025em; }
.wa-kitchen-alert__copy span { display: block; overflow: hidden; color: rgba(255,255,255,.9); font-size: 10px; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.wa-table-card.has-kitchen-ready {
    border: 2px solid #16b875;
    box-shadow: 0 0 0 5px rgba(22, 184, 117, .1), 0 18px 40px rgba(7, 131, 83, .18);
}

.wa-table-ready-badge {
    position: absolute;
    z-index: 4;
    right: 8px;
    bottom: 8px;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    color: #fff;
    background: #0ca667;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 950;
    white-space: nowrap;
    box-shadow: 0 7px 16px rgba(7, 131, 83, .25);
}
.wa-table-card.has-waiter-call .wa-table-ready-badge { bottom: 39px; }

@media (max-width: 820px) {
    .wa-kitchen-dock { right: 9px; bottom: 76px; width: calc(100% - 18px); max-height: 43vh; }
    .wa-kitchen-alert { min-height: 84px; padding: 12px; grid-template-columns: 48px minmax(0, 1fr); border-radius: 19px; gap: 10px; }
    .wa-kitchen-alert__icon { width: 48px; height: 48px; border-radius: 16px; font-size: 19px; }
    .wa-kitchen-alert__copy h2 { font-size: 16px; }
}
