:root {
    --primary-color: #ffd21a;
    --primary-dark: #d66a1f;
    --primary-soft: rgba(255, 210, 26, 0.16);
    --secondary-color: #111111;
    --bg-color: #090909;
    --surface-color: #171717;
    --surface-elevated: #242424;
    --text-primary: #fff6d1;
    --text-secondary: #c7c0a8;
    --text-muted: #7e7a6c;
    --danger-color: #ef4444;
    --success-color: #239447;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.28);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html {
    background: var(--bg-color);
}

body {
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    text-transform: uppercase;
    background:
        radial-gradient(circle at top left, rgba(255, 210, 26, 0.2), transparent 34%),
        radial-gradient(circle at top right, rgba(214, 106, 31, 0.13), transparent 28%),
        linear-gradient(180deg, #15110a 0%, var(--bg-color) 48%);
}

body.light-mode {
    --bg-color: #fff8df;
    --surface-color: #fffdf4;
    --surface-elevated: #f4ead0;
    --text-primary: #18130a;
    --text-secondary: #6e644d;
    --text-muted: #8c8062;
    --border-color: rgba(24, 19, 10, 0.14);
    --shadow-soft: 0 14px 32px rgba(72, 52, 11, 0.14);
    background:
        radial-gradient(circle at top left, rgba(255, 210, 26, 0.28), transparent 34%),
        linear-gradient(180deg, #fff0a8 0%, var(--bg-color) 48%);
}

body.light-mode .app-header {
    background: rgba(24, 24, 20, 0.94);
    border-bottom-color: rgba(255, 210, 26, 0.22);
}

body.light-mode .app-header h1 {
    color: #fff6d1;
}

body.light-mode .app-header button {
    color: #fff6d1;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

body.light-mode #btn-home {
    color: #111;
    background: var(--primary-color);
}

input::placeholder,
textarea::placeholder {
    text-transform: uppercase;
}

button,
input,
select {
    font: inherit;
    text-transform: uppercase;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.active {
    display: block !important;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(16, 17, 22, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

#btn-home {
    color: #111;
    background: var(--primary-color);
    border-color: rgba(255, 210, 26, 0.65);
}

.app-header h1 {
    min-width: 0;
    color: var(--text-primary);
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header h1::before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 10px;
    border-radius: 999px;
    background: var(--success-color);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
    vertical-align: middle;
}

.app-header button {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-size: 1rem;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.app-header button:active,
.card:active,
.produto-card:active,
.btn:active,
.btn-icon:active {
    transform: scale(0.97);
}

.app-header button:hover,
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
}

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

.view {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 14px 96px;
}

.developer-credit {
    max-width: 980px;
    margin: -72px auto 22px;
    padding: 0 14px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 750;
    text-align: center;
    text-transform: uppercase;
}

.developer-credit strong {
    color: var(--text-secondary);
}

#view-cardapio {
    padding-bottom: 132px;
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-strip {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.brand-card,
.mini-stats,
.caixa-panel,
.report-card,
.card,
.itens-container,
.comanda-header-info,
.menu-order-summary,
.modal-content,
.produto-card,
.sale-card,
.tabs {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)), var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.brand-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 210, 26, 0.14), rgba(214, 106, 31, 0.08)),
        var(--surface-color);
}

.brand-logo {
    width: 108px;
    height: 108px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: #f7f7f2;
    border: 2px solid rgba(255, 210, 26, 0.72);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(255, 210, 26, 0.18);
    overflow: hidden;
}

.brand-logo img {
    width: 112%;
    height: 112%;
    object-fit: contain;
}

.brand-card span,
.mini-stats span,
.caixa-panel span,
.report-card span,
.payment-total span,
.change-row span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brand-card strong {
    color: var(--primary-color);
    font-size: 1.3rem;
    letter-spacing: 0.03em;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border-radius: 8px;
}

.mini-stats > div {
    min-width: 0;
}

.mini-stats strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.22rem;
    line-height: 1.1;
}

.caixa-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 8px;
}

.caixa-panel strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.08rem;
    line-height: 1.2;
}

.caixa-panel small {
    display: block;
    margin-top: 5px;
    color: var(--success-color);
    font-size: 0.9rem;
    font-weight: 850;
}

.caixa-panel.is-closed small {
    color: var(--danger-color);
}

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

.caixa-actions .btn {
    min-height: 50px;
    padding: 11px 13px;
    white-space: nowrap;
}

.card {
    position: relative;
    min-height: 92px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.card:hover,
.produto-card:hover,
.sale-card:hover {
    border-color: rgba(255, 210, 26, 0.34);
}

.card::before {
    content: '';
    width: 4px;
    align-self: stretch;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary-color), #d66a1f);
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-info h3 {
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: 1.08rem;
    font-weight: 750;
}

.card-info p {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.card-total {
    margin-top: 10px;
    color: var(--success-color);
    font-size: 1.15rem;
    font-weight: 850;
}

.card-action {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--primary-color);
    background: var(--primary-soft);
    border-radius: 8px;
}

.primary-action-bar {
    display: flex;
    justify-content: center;
    margin: 10px 0 22px;
}

.btn-new-order {
    width: 100%;
    min-height: 104px;
    padding: 28px 24px;
    font-size: 1.22rem;
    border-radius: 10px;
    box-shadow: 0 18px 38px rgba(255, 210, 26, 0.28);
}

.btn-new-order i {
    font-size: 1.35rem;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 180px;
    padding: 26px 18px;
    color: var(--text-secondary);
    text-align: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 8px;
}

.empty-state i {
    color: var(--primary-color);
    font-size: 1.55rem;
}

.empty-state strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
}

.empty-state span {
    font-size: 0.9rem;
}

.comanda-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 8px;
}

.comanda-header-info h2 {
    min-width: 0;
    color: white;
    font-size: 1.3rem;
    overflow-wrap: anywhere;
}

.badge {
    flex: 0 0 auto;
    padding: 6px 10px;
    color: white;
    background: var(--primary-color);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 800;
}

.itens-container {
    min-height: 112px;
    padding: 4px 14px;
    margin-bottom: 16px;
    border-radius: 8px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.item-row.item-delivered {
    opacity: 0.72;
}

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

.item-row .item-name {
    font-weight: 750;
}

.item-row .item-qtd {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.item-row .item-price {
    flex: 0 0 auto;
    font-weight: 850;
}

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

.item-side {
    display: grid;
    justify-items: end;
    gap: 10px;
    flex: 0 0 auto;
}

.item-note {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 750;
}

.item-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.item-tool {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.item-tool.danger {
    color: white;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.35);
}

.item-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    color: var(--success-color);
    font-size: 0.75rem;
    font-weight: 700;
}

.item-status.delivered {
    color: var(--primary-color);
}

.comanda-totais {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.22);
    font-size: 1.25rem;
    font-weight: 850;
}

.comanda-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn {
    min-height: 54px;
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 13px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.98rem;
    font-weight: 800;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), #d66a1f);
    box-shadow: 0 10px 24px rgba(255, 210, 26, 0.24);
}

.btn-secondary {
    color: var(--text-primary);
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
}

.btn-danger {
    color: white;
    background: linear-gradient(135deg, var(--danger-color), #fb7185);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.24);
}

.btn:disabled,
.btn-icon:disabled,
.btn-qty-inline:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
    filter: grayscale(0.18);
}

.tabs {
    position: sticky;
    top: 174px;
    z-index: 50;
    display: flex;
    gap: 6px;
    padding: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
    border-radius: 8px;
    background: rgba(20, 22, 28, 0.94);
    backdrop-filter: blur(12px);
}

.menu-search {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin: -4px 0 14px;
    padding: 10px 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.menu-search input {
    min-width: 0;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: none;
    font-weight: 800;
}

.menu-search button {
    width: 42px;
    height: 42px;
    color: var(--text-secondary);
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.menu-order-summary {
    position: sticky;
    top: 70px;
    z-index: 60;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: rgba(20, 22, 28, 0.96);
    backdrop-filter: blur(12px);
}

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

.menu-order-summary span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.05em;
}

.menu-order-summary strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.menu-order-summary small {
    display: block;
    margin-top: 4px;
    color: var(--success-color);
    font-size: 1rem;
    font-weight: 850;
}

.menu-order-actions .btn {
    min-height: 48px;
    padding: 10px 12px;
    white-space: nowrap;
}

.tab-btn {
    min-width: 104px;
    flex: 1;
    padding: 11px 12px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.tab-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), #d66a1f);
}

.produto-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 8px;
}

.produto-thumb,
.admin-product-thumb {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--primary-color);
    background: rgba(255, 210, 26, 0.1);
    border: 1px solid rgba(255, 210, 26, 0.18);
    border-radius: 8px;
    overflow: hidden;
}

.produto-thumb {
    width: 74px;
    height: 74px;
    font-size: 1.5rem;
}

.produto-thumb img,
.admin-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.produto-thumb.is-empty::before,
.admin-product-thumb.is-empty::before {
    content: "\f03e";
    font: var(--fa-font-solid);
}

.produto-card.cat-espetos {
    border-left: 5px solid #d66a1f;
}

.produto-card.cat-chopp {
    border-left: 5px solid #f59e0b;
}

.produto-card.cat-bebidas {
    border-left: 5px solid #2f80ed;
}

.produto-card.cat-acompanhamentos {
    border-left: 5px solid #239447;
}

.produto-card.cat-lanches,
.produto-card.cat-pasteis,
.produto-card.cat-churros {
    border-left: 5px solid #ffd21a;
}

.produto-card.has-quantity {
    border-color: rgba(255, 210, 26, 0.68);
    background: linear-gradient(180deg, rgba(255, 210, 26, 0.12), rgba(255, 255, 255, 0.018)), var(--surface-color);
}

.produto-actions {
    display: grid;
    grid-template-columns: 56px 62px 56px 56px;
    gap: 9px;
    align-items: center;
    flex: 0 0 auto;
}

.produto-qtd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 850;
}

.produto-info {
    flex: 1 1 auto;
    min-width: 0;
}

.produto-info h4 {
    margin-bottom: 5px;
    font-size: 1rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.produto-info span {
    color: var(--success-color);
    font-weight: 850;
}

.produto-obs-preview {
    display: block;
    margin-top: 8px;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
}

.btn-qty-inline,
.btn-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    color: white;
    border: none;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.btn-qty-inline {
    width: 56px;
    height: 58px;
    color: var(--text-primary);
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.22rem;
}

.btn-obs-inline.active {
    color: #111;
    background: var(--primary-color);
    border-color: rgba(255, 210, 26, 0.7);
}

.order-footer {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 80;
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: rgba(12, 12, 10, 0.96);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -16px 36px rgba(0, 0, 0, 0.35);
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
}

body.light-mode .order-footer {
    background: rgba(255, 253, 244, 0.96);
}

body.light-mode .payment-modal-content .modal-actions {
    background: rgba(255, 253, 244, 0.98);
}

body.light-mode .tabs,
body.light-mode .menu-order-summary {
    background: rgba(255, 253, 244, 0.94);
}

body.light-mode .order-footer {
    color: #18130a;
}

.order-footer span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.05em;
}

.order-footer strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.35rem;
    line-height: 1.1;
}

.order-footer small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 750;
}

.order-footer .btn {
    min-width: 210px;
    min-height: 66px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.modal-content {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    border-radius: 8px;
}

#modal-pagamento {
    align-items: flex-start;
}

.payment-modal-content {
    max-height: min(760px, calc(100dvh - 24px));
    overflow-y: auto;
    padding: 14px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.payment-modal-content .modal-actions {
    position: sticky;
    bottom: -14px;
    z-index: 2;
    margin: 12px -14px -14px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(24, 24, 24, 0.98);
    border-top: 1px solid var(--border-color);
}

.payment-modal-content h3 {
    margin-bottom: 10px;
}

.payment-modal-content .field-label {
    margin: 8px 0 6px;
}

.payment-modal-content .input-control,
.payment-modal-content input {
    min-height: 44px;
    padding: 11px 12px;
}

.payment-modal-content .input-control {
    margin-bottom: 10px;
}

.payment-modal-content input {
    margin-bottom: 12px;
}

.modal-content h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 1.15rem;
    text-align: center;
}

.modal-content input,
.input-control {
    width: 100%;
    min-height: 50px;
    padding: 14px;
    color: white;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

body.light-mode .modal-content input,
body.light-mode .input-control,
body.light-mode .menu-search input {
    color: #18130a;
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(24, 19, 10, 0.18);
}

body.light-mode .modal-content input::placeholder,
body.light-mode .menu-search input::placeholder {
    color: rgba(24, 19, 10, 0.5);
}

.modal-content input {
    margin-bottom: 24px;
}

.input-control {
    margin-bottom: 16px;
}

.modal-content input:focus,
.input-control:focus {
    outline: none;
    border-color: rgba(255, 210, 26, 0.68);
    box-shadow: 0 0 0 4px rgba(255, 210, 26, 0.12);
}

.pin-code {
    -webkit-text-security: disc;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.qtd-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 4px 26px;
}

.btn-icon {
    width: 48px;
    height: 48px;
    background-color: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
}

#modal-qtd-value {
    min-width: 48px;
    text-align: center;
    font-size: 2rem;
    font-weight: 850;
}

#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, calc(100vw - 28px));
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 16px;
    color: white;
    background-color: var(--surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
    font-weight: 650;
    animation: slideDown 0.3s ease forwards;
    pointer-events: auto;
}

.toast-success i {
    color: var(--success-color);
}

.toast-error i {
    color: var(--danger-color);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 3rem;
}

.text-center {
    text-align: center;
}

.field-label {
    display: block;
    margin: 12px 0 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 800;
}

.helper-text {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.printer-status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding: 14px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.printer-status-card strong {
    color: var(--primary-color);
    text-align: right;
}

.bt-section {
    margin-top: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.bt-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 800;
}

.bt-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--text-muted);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.bt-dot.bt-dot-on {
    background: var(--success-color);
    box-shadow: 0 0 0 4px rgba(34, 148, 71, 0.18);
}

.bt-device-name {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 12px;
}

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

.btn-sm {
    padding: 7px 12px;
    font-size: 0.82rem;
    min-height: 36px;
}

.cash-close-summary {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.cash-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cash-summary-grid div,
.cash-difference {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.cash-summary-grid .cash-focus {
    background: rgba(35, 148, 71, 0.14);
    border-color: rgba(35, 148, 71, 0.34);
}

.cash-summary-grid span,
.cash-difference span,
.cash-payment-label span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 850;
}

.cash-summary-grid strong,
.cash-difference strong {
    display: block;
    margin-top: 4px;
    color: var(--success-color);
    font-size: 1.05rem;
}

.cash-payment-chart {
    display: grid;
    gap: 10px;
}

.cash-payment-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
}

.cash-payment-label strong {
    color: var(--text-primary);
    font-size: 0.86rem;
}

.cash-payment-bar {
    height: 9px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.cash-payment-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: inherit;
}

.cash-difference {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cash-difference strong {
    margin-top: 0;
}

.cash-difference strong.is-negative {
    color: var(--danger-color);
}

.cash-difference strong.is-positive {
    color: var(--primary-color);
}

.cash-loading {
    padding: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 800;
}

.checkout-summary {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(255, 210, 26, 0.08);
    border: 1px solid rgba(255, 210, 26, 0.18);
    border-radius: 8px;
}

.checkout-summary span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.checkout-summary > div:first-child strong {
    display: block;
    margin-top: 3px;
    color: var(--text-primary);
    font-size: 1rem;
}

.checkout-items {
    display: grid;
    gap: 5px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-primary);
    font-size: 0.86rem;
}

.checkout-item strong {
    flex: 0 0 auto;
    color: var(--success-color);
}

.checkout-more {
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 850;
}

.payment-total,
.change-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.payment-total span,
.change-row span {
    margin-bottom: 0;
}

.payment-total strong,
.change-row strong {
    color: var(--success-color);
    font-size: 1.12rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 10px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.split-payment {
    margin-bottom: 10px;
}

.split-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.split-payment-grid input {
    margin-bottom: 0;
}

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

.report-context {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -6px 0 18px;
    padding: 12px 14px;
    color: var(--primary-color);
    background: rgba(255, 210, 26, 0.08);
    border: 1px solid rgba(255, 210, 26, 0.18);
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 850;
}

.report-context:empty {
    display: none;
}

.report-filters {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.report-tabs {
    position: static;
    margin-bottom: 0;
}

.report-range {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

.report-range .input-control {
    margin-bottom: 0;
}

.report-card {
    padding: 18px;
    border-radius: 8px;
}

.report-card strong {
    color: var(--text-primary);
    font-size: 1.45rem;
}

.section-title {
    margin: 12px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.sale-card {
    padding: 14px;
    border-radius: 8px;
}

.sale-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.sale-card-header > div {
    flex: 1;
    min-width: 0;
}

.admin-product-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)), var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.admin-product-thumb {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
}

.admin-product-card h4 {
    margin-bottom: 5px;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.admin-product-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.admin-product-actions {
    display: flex;
    gap: 8px;
}

.btn-square {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.btn-square.danger {
    color: white;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.35);
}

body.light-mode .btn-square {
    color: #18130a;
    background: #efe3bd;
    border-color: rgba(24, 19, 10, 0.18);
}

body.light-mode .btn-square.danger {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.btn-square.destaque.ativo {
    color: #fff;
    background: #f59e0b;
    border-color: #d97706;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.55);
}

body.light-mode .btn-square.destaque.ativo {
    color: #fff;
    background: #d97706;
    border-color: #b45309;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.5);
}

body.light-mode .btn-secondary {
    color: #18130a;
    background: #fff7dc;
    border-color: rgba(24, 19, 10, 0.18);
}

.product-report-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)), var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.product-report-card h4 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.product-report-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.product-report-card.chart-card {
    align-items: stretch;
}

.report-bar {
    height: 9px;
    margin-top: 9px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.report-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: inherit;
}

.product-report-card strong {
    color: var(--success-color);
    font-size: 1.2rem;
    white-space: nowrap;
}

.sale-card h4 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.sale-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
}

@media (min-width: 760px) {
    .view {
        padding-top: 24px;
    }

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

@media (max-width: 720px) {
    .dashboard-strip {
        grid-template-columns: 1fr;
    }

    .caixa-panel {
        grid-template-columns: 1fr;
    }

    .caixa-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

    .report-range {
        grid-template-columns: 1fr;
    }

    .action-row,
    .modal-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .tabs {
        position: static;
        gap: 5px;
        padding: 5px;
        margin-bottom: 10px;
        scrollbar-width: none;
    }

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

    .tab-btn {
        min-width: auto;
        flex: 0 0 auto;
        padding: 9px 12px;
        border-radius: 8px;
        font-size: 0.9rem;
    }

    .menu-order-summary {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 10px;
        margin-bottom: 10px;
        top: 64px;
    }

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

    .menu-order-actions .btn {
        width: 100%;
        min-height: 42px;
        padding: 8px 10px;
        font-size: 0.86rem;
    }

    .menu-order-summary span {
        margin-bottom: 2px;
        font-size: 0.68rem;
    }

    .menu-order-summary strong {
        font-size: 0.94rem;
    }

    .menu-order-summary small {
        margin-top: 2px;
        font-size: 0.9rem;
    }

    .menu-search {
        margin-bottom: 10px;
        padding: 7px 10px;
    }

    .menu-search button {
        width: 36px;
        height: 36px;
    }

    .produto-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        padding: 8px 10px;
        min-height: 68px;
    }

    .produto-thumb {
        display: none;
    }

    .produto-info h4 {
        margin-bottom: 2px;
        font-size: 0.92rem;
        line-height: 1.12;
    }

    .produto-info span {
        font-size: 0.86rem;
    }

    .produto-obs-preview {
        margin-top: 5px;
        font-size: 0.72rem;
    }

    .item-row {
        flex-direction: column;
    }

    .item-side {
        justify-items: stretch;
    }

    .item-tools {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
    }

    .item-tool {
        width: 100%;
        min-height: 44px;
    }

    .admin-product-card {
        grid-template-columns: 72px 1fr;
    }

    .admin-product-actions {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .btn-square {
        width: 100%;
    }

    .produto-actions {
        grid-column: auto;
        grid-template-columns: 36px 40px 36px 36px;
        gap: 5px;
    }

    .produto-qtd,
    .btn-qty-inline {
        min-height: 38px;
        height: 38px;
    }

    .btn-qty-inline {
        width: 36px;
        font-size: 0.9rem;
    }

    .produto-qtd {
        font-size: 1rem;
    }

    .order-footer {
        grid-template-columns: 1fr;
        gap: 7px;
        padding-top: 8px;
    }

    .order-footer .btn {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        padding: 9px 12px;
        font-size: 0.9rem;
    }

    .order-footer strong {
        font-size: 1.05rem;
    }

    .order-footer span,
    .order-footer small {
        font-size: 0.68rem;
    }
}

/* Hide admin-only header buttons on small phones — available via modals */
@media (max-width: 480px) {
    #btn-db-settings {
        display: none;
    }
}

@media (max-width: 420px) {
    .app-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .app-header button {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 0.92rem;
    }

    .header-actions {
        gap: 5px;
    }

    .view {
        padding-left: 12px;
        padding-right: 12px;
    }

    .developer-credit {
        margin-top: -78px;
        font-size: 0.66rem;
    }

    .btn {
        font-size: 0.92rem;
    }

    .comanda-totais {
        font-size: 1.12rem;
    }

    /* Larger tap targets for key action buttons */
    .btn-primary,
    .btn-danger {
        min-height: 50px;
    }

    /* Modal fits smaller screens */
    .modal-content {
        padding: 20px 16px;
        max-height: 92dvh;
        overflow-y: auto;
    }

    /* Cardapio order bar more compact */
    .menu-order-summary {
        padding: 8px 10px;
    }

    /* Product grid tighter on small screens */
    .produto-card {
        padding: 7px 9px;
        min-height: 60px;
    }
}
