:root {
    --bg: #f2f7f8;
    --panel: #ffffff;
    --text: #1c2a2e;
    --muted: #5f7377;
    --line: #dbe6e6;
    --primary: #0f7d8c;
    --primary-dark: #0a5964;
    --accent: #e0592a;
    --gold: #2fae60;
    --blue: #286aa6;
    --violet: #6d4bb3;
    --rose: #b9436d;
    --warn: #a15c00;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    transition: grid-template-columns 0.2s ease;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #eef8f7 58%, #e6f6ee 100%);
    border-right: 1px solid var(--line);
    box-shadow: 6px 0 22px rgba(28, 42, 46, 0.08);
    overflow: hidden;
}

.sidebar-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
    align-items: start;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-dark);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.15;
    padding: 10px 8px 16px;
    border-bottom: 3px solid var(--accent);
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--line);
    flex: 0 0 auto;
}

.brand-text {
    min-width: 0;
}

.sidebar-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #33464d, #536a72);
    font-size: 18px;
    line-height: 1;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 8px;
}

nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    border-left: 4px solid var(--primary);
}

.nav-text {
    min-width: 0;
}

.nav-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--rose);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

.sidebar-collapsed .nav-badge {
    top: 2px;
    right: 2px;
}

.nav-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
}

.nav-icon svg {
    width: 21px;
    height: 21px;
    display: block;
    fill: currentColor;
}

nav a:hover {
    background: #e9f5f4;
    color: var(--primary-dark);
}

nav a.active {
    background: var(--primary);
    color: #ffffff;
    border-left-color: var(--accent);
    box-shadow: 0 8px 16px rgba(15, 125, 140, 0.22);
}

nav a.active .nav-icon {
    color: #ffffff;
}

nav a:nth-child(4n + 1) {
    border-left-color: var(--primary);
}

nav a:nth-child(4n + 2) {
    border-left: 4px solid var(--gold);
}

nav a:nth-child(4n + 3) {
    border-left: 4px solid var(--blue);
}

nav a:nth-child(4n + 4) {
    border-left: 4px solid var(--rose);
}

nav a.active {
    border-left-color: var(--accent);
}

.sidebar-collapsed .sidebar {
    padding: 18px 8px;
}

.sidebar-collapsed .sidebar-header {
    grid-template-columns: 1fr;
}

.sidebar-collapsed .brand {
    display: none;
}

.sidebar-collapsed .sidebar-toggle {
    width: 100%;
}

.sidebar-collapsed nav {
    display: flex;
    gap: 8px;
}

.sidebar-collapsed nav a {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
    border-left-width: 0;
}

.sidebar-collapsed nav a:nth-child(n):not(.active) {
    border-left-width: 0;
}

.sidebar-collapsed .nav-icon {
    width: 28px;
    height: 28px;
}

.sidebar-collapsed .nav-icon svg {
    width: 24px;
    height: 24px;
}

.sidebar-collapsed .nav-text {
    display: none;
}

.container {
    width: min(1220px, calc(100% - 28px));
    margin: 24px auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.panel,
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(29, 37, 40, 0.1);
}

.card strong {
    display: block;
    font-size: 26px;
    margin-top: 8px;
}

h1 {
    margin: 0 0 18px;
    font-size: 28px;
}

h2 {
    margin: 0 0 12px;
    font-size: 19px;
}

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

.section-title h2 {
    margin: 0;
}

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

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

label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
}

.field-label {
    color: var(--muted);
    font-size: 14px;
}

.field-help {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.field-with-help {
    position: relative;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    font: inherit;
    background: #fff;
    color: var(--text);
}

button,
.button {
    border: 0;
    border-radius: 6px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--primary), #159e97);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button:hover,
.button:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 6px 14px rgba(29, 37, 40, 0.16);
}

button:active,
.button:active {
    transform: translateY(0) scale(0.97);
    filter: brightness(0.98);
    box-shadow: none;
}

button.secondary,
.button.secondary {
    background: linear-gradient(135deg, #33464d, #536a72);
}

button.edit-button,
.button.edit-button {
    background: linear-gradient(135deg, #d87a18, #f09a2a);
}

button.new-button,
.button.new-button {
    background: linear-gradient(135deg, #286aa6, #33a4c9);
}

button.danger,
.button.danger {
    background: linear-gradient(135deg, #8b2d20, #b13b2b);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

td details summary {
    cursor: pointer;
}

td details summary::-webkit-details-marker {
    color: var(--primary);
}

.group-row th {
    background: #d5ebe8;
    font-size: 14px;
}

.consumo-detalle {
    margin-top: 8px;
}

.consumo-list {
    margin: 0 0 8px;
    padding-left: 18px;
    font-size: 13px;
}

.consumo-list li {
    margin-bottom: 2px;
}

#cobro-vuelto {
    font-weight: 800;
    color: var(--gold);
}

#cobro-vuelto.vuelto-negativo {
    color: #b13b2b;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: #eaf5f4;
    font-size: 13px;
}

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

.actions form {
    margin: 0;
}

.alert {
    padding: 12px;
    border-radius: 7px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: #fff;
    transition: opacity 0.25s ease, transform 0.25s ease, margin 0.25s ease, padding 0.25s ease;
}

.alert.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.alert.error {
    border-color: #d9a7a0;
    color: #8b1e12;
}

.alert.ok {
    border-color: #9acbb8;
    color: #0f624e;
    background: #f0fbf6;
}

.status-ok,
.status-bad {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status-ok {
    background: #e4f6ee;
    color: #0f624e;
}

.status-bad {
    background: #fde5df;
    color: #8b1e12;
}

.login-box {
    position: relative;
    z-index: 1;
    max-width: 390px;
    margin: 80px auto;
    text-align: center;
}

.login-decor {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-decor-icon {
    position: absolute;
    color: var(--primary);
    opacity: 0.1;
}

.login-decor-icon.accent {
    color: var(--accent);
}

.login-decor-icon.pos-bowl-1 {
    width: 240px;
    height: 240px;
    top: -50px;
    left: -60px;
    transform: rotate(-12deg);
}

.login-decor-icon.pos-lime-1 {
    width: 130px;
    height: 130px;
    top: 8%;
    right: 6%;
    transform: rotate(20deg);
}

.login-decor-icon.pos-shrimp-1 {
    width: 190px;
    height: 190px;
    bottom: -30px;
    left: 4%;
    transform: rotate(8deg) scaleX(-1);
}

.login-decor-icon.pos-leaf-1 {
    width: 120px;
    height: 120px;
    bottom: 8%;
    right: -20px;
    transform: rotate(-8deg);
}

.login-decor-icon.pos-lime-2 {
    width: 90px;
    height: 90px;
    top: 12%;
    left: 8%;
    opacity: 0.08;
    transform: rotate(-25deg);
}

.login-decor-icon.pos-bowl-2 {
    width: 170px;
    height: 170px;
    bottom: 6%;
    left: 42%;
    opacity: 0.07;
    transform: rotate(6deg);
}

@media (max-width: 720px) {
    .login-decor-icon.pos-lime-2,
    .login-decor-icon.pos-bowl-2 {
        display: none;
    }
}

.login-box form,
.login-box p {
    text-align: left;
}

.login-box h1 {
    color: var(--accent);
}

.login-logo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--line);
    margin: 0 auto 18px;
    display: block;
    animation: login-logo-in 0.7s ease-out, login-logo-glow 2.8s ease-in-out 0.7s infinite;
}

@keyframes login-logo-in {
    0% {
        opacity: 0;
        transform: scale(0.55) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes login-logo-glow {
    0%,
    100% {
        box-shadow: 0 6px 16px rgba(224, 89, 42, 0.18), 0 0 0 0 rgba(224, 89, 42, 0.3);
    }
    50% {
        box-shadow: 0 8px 22px rgba(224, 89, 42, 0.3), 0 0 0 12px rgba(224, 89, 42, 0);
    }
}

.ticket {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
}

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

.public-ticket .ticket {
    display: block;
    margin: 8px 0;
    font-size: 48px;
    letter-spacing: 2px;
}

.ticket-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 14px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fbfa;
}

.ticket-box span,
.ticket-box strong {
    display: block;
}

.pay-ticket-form {
    margin-top: 14px;
}

.thumb {
    width: 86px;
    height: 64px;
    object-fit: contain;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: #ffffff;
}

.image-empty {
    color: var(--muted);
    font-size: 13px;
}

.current-product-image {
    margin-top: 14px;
    display: grid;
    gap: 8px;
    width: 220px;
}

.current-product-image img {
    width: 220px;
    height: 165px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.sales-screen {
    display: grid;
    gap: 16px;
}

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

.sales-products {
    display: grid;
    gap: 16px;
}

.category-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.category-panel h2 {
    margin-bottom: 10px;
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.category-button {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: #f8fbfb;
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 4px 10px rgba(28, 42, 46, 0.06);
}

.category-button:nth-child(2n) .category-icon {
    background: #fff0c7;
    color: #7a4b00;
}

.category-button:nth-child(3n) .category-icon {
    background: #dcecff;
    color: #174c85;
}

.category-button:nth-child(4n) .category-icon {
    background: #fde2ec;
    color: #8d254c;
}

.category-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(29, 37, 40, 0.1);
    border-color: var(--primary);
}

.category-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dcf1ee;
    color: var(--primary-dark);
    font-size: 17px;
}

.category-text {
    line-height: 1.1;
}

.category-count {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.category-button.active {
    background: linear-gradient(135deg, var(--primary), #159e97);
    border-color: var(--primary);
    color: #ffffff;
}

.category-button.active .category-icon {
    background: #ffffff;
    color: var(--primary-dark);
}

.category-button.active .category-count {
    color: #dcf1ee;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.item-form {
    margin: 0;
}

.item-form .item-card {
    position: relative;
    width: 100%;
    min-height: 270px;
    padding: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: 160px 64px 46px;
    border: 1px solid #c9d9d8;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    text-align: left;
    box-shadow: 0 6px 16px rgba(28, 42, 46, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.item-form .item-card:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(28, 42, 46, 0.14);
}

.item-form:nth-child(4n + 1) .item-card {
    border-top: 5px solid var(--primary);
}

.item-form:nth-child(4n + 2) .item-card {
    border-top: 5px solid var(--gold);
}

.item-form:nth-child(4n + 3) .item-card {
    border-top: 5px solid var(--blue);
}

.item-form:nth-child(4n + 4) .item-card {
    border-top: 5px solid var(--rose);
}

.item-form .item-card:active {
    transform: scale(0.98);
}

.item-form .item-card:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.item-image {
    display: grid;
    place-items: center;
    background: #ffffff;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-image span {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--blue));
    color: #fff;
    font-size: 36px;
    font-weight: 800;
}

.item-name {
    padding: 12px 12px 6px;
    min-height: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    background: #ffffff;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 8px;
    padding: 8px 12px 12px;
    background: #ffffff;
}

.item-meta strong {
    color: var(--accent);
    font-size: 19px;
}

.item-meta small {
    color: var(--muted);
    font-size: 12px;
}

.in-cart-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    animation: badge-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-pop {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.cart-panel {
    position: sticky;
    top: 16px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: 14px;
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
    background: linear-gradient(180deg, #ffffff 0%, #f4fbf5 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(28, 42, 46, 0.08);
}

.cart-header,
.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cart-header h2 {
    margin: 0;
}

.cart-header strong {
    color: var(--primary);
}

.cart-list {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding-right: 4px;
}

.cart-item {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfb;
    animation: cart-item-in 0.3s ease-out;
}

@keyframes cart-item-in {
    0% {
        opacity: 0;
        transform: translateX(14px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

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

.cart-actions form {
    margin: 0;
}

.qty-button {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 8px;
    font-size: 20px;
}

.remove-button {
    min-height: 38px;
    padding: 8px 10px;
    background: #8b2d20;
}

.compact-button {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 13px;
}

.cart-total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.cart-total span {
    color: var(--muted);
    font-weight: 800;
}

.cart-total strong {
    color: var(--accent);
    font-size: 28px;
}

.checkout-form {
    display: grid;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    background: #f4fbf5;
}

.checkout-button {
    min-height: 56px;
    font-size: 19px;
}

.purchase-form {
    display: grid;
    gap: 16px;
}

.purchase-submit {
    justify-self: end;
    min-width: 180px;
    min-height: 42px;
    padding: 10px 18px;
}

.purchase-detail {
    display: grid;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.purchase-detail-head,
.purchase-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.purchase-lines {
    display: grid;
    gap: 10px;
}

.purchase-line {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(120px, 0.6fr) minmax(140px, 0.7fr) minmax(110px, 0.5fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfb;
}

.purchase-subtotal {
    display: grid;
    gap: 6px;
}

.purchase-subtotal strong {
    min-height: 40px;
    display: flex;
    align-items: center;
    color: var(--accent);
}

.purchase-total {
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-weight: 800;
}

.purchase-total strong {
    color: var(--accent);
    font-size: 24px;
}

.full-button {
    width: 100%;
}

.choice-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.choice-buttons label {
    display: block;
}

.choice-buttons input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-buttons span {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.choice-buttons input:checked + span {
    background: linear-gradient(135deg, var(--primary), #159e97);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(15, 125, 140, 0.2);
}

.mesa-card {
    display: grid;
    gap: 8px;
}

.mesa-card.mesa-ocupada {
    border-left: 4px solid var(--accent);
}

.mesa-card.mesa-libre {
    border-left: 4px solid var(--gold);
}

.kitchen-settings {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #fff3df, #ffffff);
}

.kitchen-settings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.kitchen-settings-row p {
    margin: 0;
    flex: 1 1 260px;
}

.kitchen-mode-buttons {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    max-width: 360px;
}

.kitchen-print-frame {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    border: 0;
}

.kitchen-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.kitchen-column {
    display: grid;
    align-content: start;
    gap: 12px;
}

.kitchen-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfb;
    animation: kitchen-card-in 0.45s ease-out both;
}

.kitchen-card:nth-child(1) {
    animation-delay: 0s;
}

.kitchen-card:nth-child(2) {
    animation-delay: 0.06s;
}

.kitchen-card:nth-child(3) {
    animation-delay: 0.12s;
}

.kitchen-card:nth-child(n + 4) {
    animation-delay: 0.18s;
}

.kitchen-column-pendiente .kitchen-card {
    animation: kitchen-card-in 0.45s ease-out both, kitchen-card-highlight 1.6s ease-out 0.45s;
}

@keyframes kitchen-card-in {
    0% {
        opacity: 0;
        transform: translateY(-14px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes kitchen-card-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(224, 89, 42, 0.5);
        border-color: var(--accent);
    }
    100% {
        box-shadow: 0 0 0 14px rgba(224, 89, 42, 0);
        border-color: var(--line);
    }
}

.kitchen-card ul {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
}

.kitchen-button {
    min-height: 52px;
    font-size: 16px;
}

.receipt {
    max-width: 320px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    font-family: 'Courier New', Courier, monospace;
}

.receipt h1 {
    font-size: 16px;
    text-align: center;
    margin-bottom: 6px;
}

.receipt hr {
    border: none;
    border-top: 1px dashed var(--line);
    margin: 10px 0;
}

.receipt-center {
    text-align: center;
    margin: 2px 0;
}

.receipt-table {
    width: 100%;
    font-size: 12px;
    border: 0;
    background: transparent;
}

.receipt-table td {
    border: 0;
    padding: 3px 0;
}

.receipt-amount {
    text-align: right;
    white-space: nowrap;
}

.receipt-total {
    text-align: right;
    font-weight: 800;
    font-size: 16px;
}

.receipt .button {
    margin-top: 14px;
}

.receipt-format-bar {
    max-width: 320px;
    margin: 0 auto 14px;
}

@media print {
    .no-print,
    .sidebar,
    .kitchen-settings {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .container {
        width: auto;
        margin: 0;
    }

    .receipt {
        border: 0;
    }
}

@media (max-width: 960px) {
    .kitchen-board {
        grid-template-columns: 1fr;
    }
}

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

    .app-shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar-header {
        grid-template-columns: minmax(0, 1fr) 42px;
    }

    .sidebar-toggle {
        display: none;
    }

    .sidebar-collapsed .brand {
        display: block;
    }

    .sidebar-collapsed .nav-text {
        display: inline;
    }

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

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

    .cart-panel {
        position: static;
    }

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

    .purchase-detail-head,
    .section-title,
    .purchase-total {
        align-items: stretch;
        flex-direction: column;
    }

    .purchase-submit {
        justify-self: stretch;
    }

    .purchase-line {
        grid-template-columns: 1fr;
    }
}

.tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--line);
}

.tab-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    margin-bottom: -2px;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #e9f5f4;
    color: var(--primary-dark);
    transform: none;
    box-shadow: none;
    filter: none;
}

.tab-button.active {
    background: #ffffff;
    color: var(--primary-dark);
    border-bottom-color: var(--accent);
}

.tab-badge {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--rose);
    color: #ffffff;
    font-size: 12px;
    line-height: 18px;
}

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

.inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-template-columns: none;
}

.inline-check input {
    width: auto;
}

h3 {
    margin: 0 0 8px;
    font-size: 16px;
}
