:root {
    color-scheme: light;
    --ink: #1f2937;
    --muted: #667085;
    --line: #d7dde8;
    --paper: #ffffff;
    --soft: #f4f7fb;
    --brand: #c2410c;
    --brand-dark: #9a3412;
    --danger: #b42318;
    --ok: #15803d;
    --shadow: 0 16px 38px rgba(31, 41, 55, 0.12);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #fdf3ec 0%, #f8fafc 42%, #ffffff 100%);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

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

button {
    cursor: pointer;
}

.app-shell {
    width: min(1500px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0;
}

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding: 12px 0 10px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.eyebrow {
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 4px;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
}

h1 {
    font-size: clamp(28px, 4vw, 40px);
}

h2 {
    font-size: 18px;
}

.view-tabs {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 4px;
    padding: 5px;
}

.view-tabs button {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 700;
    min-height: 40px;
    padding: 8px 16px;
}

.view-tabs button.active {
    background: var(--brand);
    color: #fff;
}

.summary-strip {
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 10px;
    padding: 10px;
}

.summary-strip span {
    background: var(--soft);
    border-radius: 6px;
    color: var(--muted);
    padding: 10px 12px;
    white-space: nowrap;
}

.summary-strip strong {
    color: var(--ink);
}

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

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

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

.panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.setup-panel,
.orders-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    position: sticky;
    top: 76px;
}

.orders-panel {
    max-height: calc(100vh - 92px);
    overflow-y: auto;
}

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

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

.checkbox-label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.checkbox-label input {
    min-height: auto;
    width: auto;
}

.checkbox-label.inline {
    font-weight: 400;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    min-height: 42px;
    padding: 10px 11px;
    width: 100%;
}

input[type="color"] {
    padding: 4px;
    width: 52px;
}

textarea {
    resize: vertical;
}

.filters-panel {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 240px;
    margin-bottom: 16px;
    padding: 12px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tabs button,
.ghost-button {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    min-height: 38px;
    padding: 8px 11px;
}

.category-tabs button.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.ghost-button.small {
    font-size: 13px;
    min-height: 32px;
    padding: 4px 9px;
}

.product-grid {
    display: grid;
    gap: 24px;
}

.menu-section {
    display: grid;
    gap: 12px;
}

.menu-section-head {
    align-items: center;
    border-bottom: 2px solid var(--line);
    display: flex;
    font-size: 17px;
    gap: 9px;
    margin: 0;
    padding-bottom: 8px;
}

.menu-section-head .dot {
    border-radius: 999px;
    display: inline-block;
    height: 12px;
    width: 12px;
}

.menu-section-head small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    margin-left: auto;
}

.menu-section-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
}

.product-card {
    align-items: stretch;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);
    display: grid;
    gap: 10px;
    min-height: 138px;
    padding: 14px;
    text-align: left;
}

.product-card.clickable {
    cursor: pointer;
}

.product-card:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.product-card strong {
    font-size: 16px;
    line-height: 1.25;
}

.product-card {
    align-content: start;
}

.info-button {
    background: transparent;
    border: 0;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 0;
    text-align: left;
    width: fit-content;
}

.info-button:hover {
    text-decoration: underline;
}

.product-desc {
    background: var(--soft);
    border-left: 3px solid var(--brand);
    border-radius: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    padding: 8px 10px;
}

.size-buttons {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
}

.size-buttons button {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    display: grid;
    gap: 2px;
    padding: 7px 4px;
    text-align: center;
}

.size-buttons button span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.size-buttons button strong {
    font-size: 13px;
}

.size-buttons button:hover {
    background: var(--brand);
    border-color: var(--brand);
}

.size-buttons button:hover span,
.size-buttons button:hover strong {
    color: #fff;
}

.tag {
    align-self: start;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 8px;
    width: fit-content;
}

.price {
    color: var(--brand-dark);
    font-size: 20px;
    font-weight: 800;
}

.cart-list,
.orders-list {
    display: grid;
    gap: 10px;
}

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

.cart-item {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 10px;
}

.cart-item-main {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto;
}

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

.cart-addons {
    border-left: 3px solid var(--line);
    color: var(--muted);
    display: grid;
    font-size: 12px;
    gap: 3px;
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
}

.addons-button {
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 7px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    min-height: 32px;
    padding: 5px 9px;
    width: fit-content;
}

.addons-button:hover {
    border-color: var(--brand);
}

.quantity-control {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: 34px 28px 34px;
    text-align: center;
}

.quantity-control button {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    height: 34px;
}

.totals {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
    padding-top: 12px;
}

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

.totals strong:last-child {
    color: var(--brand-dark);
    font-size: 24px;
}

.primary-button {
    background: var(--brand);
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-weight: 800;
    min-height: 48px;
    padding: 12px;
}

.primary-button:hover {
    background: var(--brand-dark);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.notice {
    color: var(--ok);
    font-size: 13px;
    font-weight: 700;
    min-height: 18px;
    margin: 0;
}

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

.order-filters {
    display: flex;
    gap: 6px;
}

.order-filters button {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
}

.order-filters button.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* ── Handoff notifications ───────────────────────── */
.handoffs-notice {
    background: #fff7ed;
    border: 1.5px solid #f97316;
    border-radius: 10px;
    display: grid;
    gap: 8px;
    overflow: hidden;
}
.handoffs-notice-head {
    align-items: center;
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    padding: 10px 14px;
}
.handoff-item {
    align-items: center;
    border-bottom: 1px solid #fed7aa;
    display: flex;
    font-size: 13px;
    gap: 10px;
    padding: 9px 14px;
}
.handoff-item:last-child { border-bottom: 0; }
.handoff-rep { font-weight: 800; flex: 1; }
.handoff-amt { color: #9a3412; font-size: 15px; font-weight: 900; }
.btn-confirm-handoff {
    background: #15803d;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    white-space: nowrap;
}
.btn-confirm-handoff:hover { background: #166534; }

.order-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.order-card[data-status="lista"] {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.order-card[data-status="pagada"] {
    background: #ecfdf3;
}

.order-card[data-status="cancelada"] {
    background: #fff1f0;
    opacity: 0.8;
}

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

.status {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.status.preparando {
    background: #fff7ed;
    color: #9a3412;
}

.status.lista {
    background: #dbeafe;
    color: #1d4ed8;
}

.status.pagada {
    background: #dcfce7;
    color: #166534;
}

.status.cancelada {
    background: #fee2e2;
    color: #991b1b;
}

.elapsed {
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    margin-left: 6px;
    padding: 2px 7px;
}

.elapsed.late {
    background: #fee2e2;
    color: #991b1b;
}

.order-meta {
    color: var(--muted);
    font-size: 13px;
}

.order-notes {
    background: var(--soft);
    border-radius: 6px;
    padding: 6px 8px;
}

.order-items {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
    padding-left: 18px;
}

.order-actions {
    display: grid;
    gap: 8px;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
}

.order-actions button {
    border: 1px solid var(--line);
    border-radius: 7px;
    font-weight: 700;
    min-height: 36px;
}

.ready-button {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.pay-button {
    background: var(--ok);
    border-color: var(--ok);
    color: #fff;
}

.cancel-button {
    background: #fff;
    color: var(--danger);
}

/* ===================== Modal de cobro ===================== */

.modal-backdrop {
    align-items: center;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 16px;
    position: fixed;
    z-index: 50;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    max-width: 420px;
    padding: 20px;
    width: 100%;
}

.pay-summary {
    background: var(--soft);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    padding: 12px;
    text-align: center;
}

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

.pay-methods button {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 700;
    min-height: 44px;
}

.pay-methods button.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

#cashFields {
    display: grid;
    gap: 10px;
}

.quick-cash {
    display: grid;
    gap: 8px;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
}

.quick-cash button {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-weight: 700;
    min-height: 38px;
}

.change-line {
    font-size: 15px;
    margin: 0;
    text-align: right;
}

.change-line strong {
    color: var(--ok);
    font-size: 20px;
}

.change-line strong.insufficient {
    color: var(--danger);
}

/* ===================== Pizza personalizada y extras ===================== */

.custom-card {
    border-style: dashed;
    border-color: var(--brand);
}

.custom-hint {
    color: var(--muted);
    font-size: 13px;
}

.customize-button {
    background: var(--brand);
    border: 0;
    border-radius: 7px;
    color: #fff;
    font-weight: 800;
    min-height: 40px;
    padding: 9px;
}

.customize-button:hover {
    background: var(--brand-dark);
}

.custom-modal {
    max-width: 520px;
}

.custom-body {
    display: grid;
    gap: 10px;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 4px;
}

.custom-body h3 {
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    padding-bottom: 5px;
    text-transform: uppercase;
    color: var(--muted);
}

.option-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
}

.option-grid button {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 3px;
    padding: 9px 6px;
    text-align: center;
}

.option-grid button span {
    font-size: 13px;
    font-weight: 700;
}

.option-grid button strong {
    color: var(--muted);
    font-size: 12px;
}

.option-grid button.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.option-grid button.active strong {
    color: #fff;
}

.option-list {
    display: grid;
    gap: 4px;
    grid-template-columns: 1fr 1fr;
}

.option-check {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    display: grid;
    font-size: 13px;
    font-weight: 400;
    gap: 7px;
    grid-template-columns: auto 1fr auto;
    padding: 6px 8px;
}

.option-check:hover {
    background: var(--soft);
}

.option-check input {
    accent-color: var(--brand);
    height: 17px;
    min-height: auto;
    width: 17px;
}

.option-check span {
    color: var(--ink);
}

.option-check strong {
    color: var(--muted);
    font-size: 12px;
}

.custom-total {
    align-items: center;
    background: var(--soft);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
}

.custom-total span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.custom-total strong {
    color: var(--brand-dark);
    font-size: 22px;
}

.item-extras {
    list-style: none;
    margin: 2px 0 0;
    padding-left: 12px;
}

.item-extra {
    font-size: 12px;
}

.item-extra::before {
    content: '· ';
}

/* ===================== Admin de productos ===================== */

.option-form {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
}

.option-form input,
.option-form select {
    min-height: 38px;
}

.size-prices {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.category-form-head {
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding-top: 14px;
}

.category-form {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto auto;
}

.catalog-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.catalog-section {
    display: grid;
    gap: 6px;
}

.catalog-section h3 {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    font-size: 15px;
    gap: 8px;
    padding-bottom: 6px;
}

.catalog-section h3 small {
    color: var(--muted);
    font-weight: 400;
}

.catalog-section .dot {
    border-radius: 999px;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.catalog-row {
    align-items: center;
    border-bottom: 1px dashed var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto auto auto;
    padding: 6px 0;
}

.catalog-row.inactive .catalog-name,
.catalog-row.inactive strong {
    color: var(--muted);
    text-decoration: line-through;
}

.catalog-name {
    font-size: 14px;
}

/* ===================== Corte del día ===================== */

.report-panel {
    display: grid;
    gap: 18px;
    padding: 18px;
}

.report-panel .panel-head input {
    width: auto;
}

.report-cards {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.report-card {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 4px;
    padding: 14px;
}

.report-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.report-card strong {
    font-size: 26px;
}

.report-card small {
    color: var(--muted);
    min-height: 15px;
}

.report-card.highlight {
    background: #fff7ed;
    border-color: #fed7aa;
}

.report-card.highlight strong {
    color: var(--brand-dark);
}

.report-card.danger strong {
    color: var(--danger);
}

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

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

.report-block h3 {
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    padding-bottom: 6px;
}

.report-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto auto;
    font-size: 14px;
}

.report-row span:nth-child(2) {
    color: var(--muted);
    font-size: 13px;
}

.hour-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 48px 1fr auto;
    font-size: 13px;
}

.hour-bar {
    background: var(--soft);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.hour-bar div {
    background: var(--brand);
    border-radius: 999px;
    height: 100%;
}

/* ===================== Login screen ===================== */

.login-screen {
    align-items: center;
    background: linear-gradient(180deg, #fdf3ec 0%, #f8fafc 60%, #ffffff 100%);
    display: flex;
    inset: 0;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: fixed;
    z-index: 100;
}

.login-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
    max-width: 380px;
    padding: 32px;
    width: 100%;
}

.cashier-badge {
    align-items: center;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 8px;
    padding: 8px 12px;
}

.cashier-name {
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

/* ===================== Order extras and ticket ===================== */

.extras-section-head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 6px 0 4px;
    text-transform: uppercase;
}

/* ── Delivery section in POS panel ───────────────── */
.delivery-section {
    background: #fff7ed;
    border: 1.5px solid #fb923c;
    border-left: 4px solid #ea580c;
    border-radius: 9px;
    display: grid;
    gap: 10px;
    padding: 12px 14px 14px;
}
.delivery-section-head {
    align-items: center;
    color: #9a3412;
    display: flex;
    font-size: 12px;
    font-weight: 900;
    gap: 6px;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.delivery-section label {
    color: #7c2d12;
}
.delivery-section input {
    background: #fff;
    border-color: #fed7aa;
}
.delivery-section input:focus {
    border-color: #ea580c;
    outline: none;
}
.delivery-folio-tip {
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 7px;
    color: #166534;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 12px;
}

/* ── Nueva Orden panel redesign ───────────────────── */
.order-panel {
    gap: 0;
    overflow: hidden;
    padding: 0;
}

.order-panel-header {
    align-items: center;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 60%, #991b1b 100%);
    display: flex;
    justify-content: space-between;
    padding: 14px 16px 12px;
}

.order-panel-title {
    align-items: center;
    display: flex;
    gap: 8px;
}

.order-panel-title h2 {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    text-transform: uppercase;
}

.order-panel-title span {
    font-size: 18px;
}

.order-clear-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    transition: background 0.15s;
}

.order-clear-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.order-panel-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

.online-badge {
    background: #dbeafe;
    border-radius: 999px;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    margin-left: 6px;
    padding: 2px 7px;
    text-transform: uppercase;
    vertical-align: middle;
}

.rep-badge {
    background: #fef3c7;
    border-radius: 999px;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    margin-left: 5px;
    padding: 2px 7px;
    vertical-align: middle;
}

.status.en_camino    { background: #fef3c7; color: #92400e; }
.status.en_domicilio { background: #fde68a; color: #78350f; font-weight: 800; }
.status.entregada    { background: #d1fae5; color: #065f46; }
.status.pendiente    { background: #fef9c3; color: #854d0e; }
.status.rechazada    { background: #fee2e2; color: #991b1b; }

.order-card[data-status="pendiente"] {
    background: #fffbeb;
    border-color: #fcd34d;
    border-width: 2px;
}

.accept-button {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.reject-button {
    background: #fff;
    color: #dc2626;
    border-color: #dc2626;
}

.pending-alert {
    animation: pulse-bg 1.8s ease-in-out infinite;
    background: #dc2626;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.65; }
}

.order-actions-secondary {
    display: flex;
    gap: 8px;
}

.ticket-button {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    min-height: 32px;
    padding: 4px 10px;
}

.ticket-button:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* ===================== Responsive ===================== */

@media (max-width: 1180px) {
    .workspace {
        grid-template-columns: 320px 1fr;
    }

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

    .orders-panel {
        grid-column: 1 / -1;
        max-height: none;
        position: static;
    }
}

@media (max-width: 760px) {
    .app-shell {
        width: min(100% - 20px, 1500px);
        padding: 12px 0;
    }

    .topbar,
    .summary-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .view-tabs {
        justify-content: stretch;
    }

    .view-tabs button {
        flex: 1;
        padding: 8px 6px;
    }

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

    .setup-panel {
        position: static;
    }
}

/* Respeta la preferencia de menos movimiento del sistema */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
