:root {
    --lg-blue: #2294d2;
    --lg-blue-dark: #1476ad;
    --lg-orange: #f6a028;
    --lg-orange-dark: #e58d12;
    --lg-bg: #f3f7fb;
    --lg-card: #ffffff;
    --lg-text: #172033;
    --lg-muted: #687386;
    --lg-border: #e3e9f2;
    --lg-success: #17a673;
    --lg-danger: #dc3545;
    --shadow: 0 18px 45px rgba(24, 47, 79, .10);
    --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--lg-bg);
    color: var(--lg-text);
}
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top left, rgba(34,148,210,.22), transparent 38%), linear-gradient(160deg, #f7fbff, #eef6fb);
    padding: 24px;
}
.login-card {
    width: min(420px, 100%);
    background: var(--lg-card);
    border-radius: 30px;
    padding: 34px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.8);
}
.login-logo { display: block; width: 280px; max-width: 100%; margin: 0 auto 24px; }
.login-title { text-align: center; margin: 0 0 8px; font-size: 1.35rem; }
.login-subtitle { text-align: center; color: var(--lg-muted); margin: 0 0 24px; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 13px max(16px, calc((100vw - 1120px)/2));
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 6px 22px rgba(24, 47, 79, .06);
}
.brand img { height: 48px; display: block; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-pill { color: var(--lg-muted); font-size: .92rem; }
.main-content { padding: 24px 0 92px; }
.hero {
    border-radius: 28px;
    padding: 26px;
    color: #fff;
    background: linear-gradient(135deg, var(--lg-blue), #31aee5 54%, var(--lg-orange));
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(1.65rem, 4vw, 2.4rem); }
.hero p { margin: 0; opacity: .95; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
    background: var(--lg-card);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--lg-border);
}
.card h2, .card h3 { margin-top: 0; }
.action-card {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .15s ease, box-shadow .15s ease;
}
.action-card:hover { transform: translateY(-2px); box-shadow: 0 22px 55px rgba(24, 47, 79, .14); }
.action-card strong { font-size: 1.15rem; }
.action-card span { color: var(--lg-muted); margin-top: 8px; display: block; }
.action-dot { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: rgba(34,148,210,.12); color: var(--lg-blue); font-weight: 800; }
.action-card.orange .action-dot { background: rgba(246,160,40,.16); color: var(--lg-orange-dark); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 700; margin-bottom: 7px; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--lg-border);
    border-radius: 15px;
    padding: 13px 14px;
    font: inherit;
    color: var(--lg-text);
    background: #fff;
    outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--lg-blue); box-shadow: 0 0 0 4px rgba(34,148,210,.12); }
textarea { resize: vertical; min-height: 92px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 15px;
    padding: 13px 18px;
    font-weight: 800;
    cursor: pointer;
    background: var(--lg-blue);
    color: #fff;
    box-shadow: 0 10px 24px rgba(34,148,210,.24);
}
.btn:hover { background: var(--lg-blue-dark); }
.btn-orange { background: var(--lg-orange); color: #1e2630; box-shadow: 0 10px 24px rgba(246,160,40,.22); }
.btn-orange:hover { background: var(--lg-orange-dark); }
.btn-light { background: #edf5fb; color: var(--lg-blue-dark); box-shadow: none; }
.btn-danger { background: var(--lg-danger); box-shadow: none; }
.btn-success { background: var(--lg-success); box-shadow: none; }
.btn-sm { padding: 9px 12px; border-radius: 12px; font-size: .9rem; }
.btn-block { width: 100%; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--lg-border); vertical-align: top; }
th { color: var(--lg-muted); font-size: .86rem; text-transform: uppercase; letter-spacing: .035em; }
.badge { display: inline-flex; border-radius: 999px; padding: 7px 11px; font-weight: 800; font-size: .82rem; }
.badge-blue { background: rgba(34,148,210,.12); color: var(--lg-blue-dark); }
.badge-orange { background: rgba(246,160,40,.19); color: #9c5d00; }
.badge-yellow { background: #fff3cd; color: #8a6500; }
.badge-green { background: rgba(23,166,115,.14); color: #0f7652; }
.badge-gray { background: #eef1f5; color: #677280; }
.alert { border-radius: 16px; padding: 13px 15px; margin-bottom: 16px; font-weight: 700; }
.alert-success { background: rgba(23,166,115,.12); color: #0f7652; border: 1px solid rgba(23,166,115,.22); }
.alert-danger { background: rgba(220,53,69,.10); color: #b42333; border: 1px solid rgba(220,53,69,.20); }
.kpi { display: flex; flex-direction: column; gap: 8px; }
.kpi strong { font-size: 1.8rem; }
.kpi span { color: var(--lg-muted); }
.order-card-list { display: grid; gap: 14px; }
.order-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.order-card h3 { margin: 0 0 5px; }
.order-meta { color: var(--lg-muted); font-size: .92rem; }
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: min(620px, calc(100% - 26px));
    background: rgba(255,255,255,.96);
    border: 1px solid var(--lg-border);
    border-radius: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 8px;
    box-shadow: 0 18px 45px rgba(24, 47, 79, .16);
    z-index: 20;
}
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 28px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.bottom-nav .nav-item {
    position: relative;
    min-height: 54px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 10px 4px;
    border-radius: 18px;
    color: var(--lg-muted);
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.bottom-nav .nav-item:hover {
    background: rgba(34,148,210,.10);
    color: var(--lg-blue-dark);
    transform: translateY(-1px);
}
.bottom-nav .nav-item.active {
    color: var(--lg-blue);
    background: linear-gradient(180deg, rgba(34,148,210,.12), rgba(34,148,210,.04));
}
.bottom-nav .nav-item.active .material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}
.bottom-nav .nav-item.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 26px;
    height: 4px;
    border-radius: 999px;
    background: var(--lg-orange);
    transform: translateX(-50%);
}
.bottom-nav .nav-item.nav-scan {
    width: 66px;
    min-height: 66px;
    justify-self: center;
    margin-top: -24px;
    border: 5px solid #fff;
    border-radius: 24px;
    background: linear-gradient(145deg, var(--lg-blue), var(--lg-blue-dark));
    color: #fff;
    box-shadow: 0 12px 28px rgba(34,148,210,.34);
}
.bottom-nav .nav-item.nav-scan:hover,
.bottom-nav .nav-item.nav-scan.active {
    background: linear-gradient(145deg, #38a6df, var(--lg-blue-dark));
    color: #fff;
    transform: translateY(-2px);
}
.bottom-nav .nav-item.nav-scan .material-symbols-rounded {
    color: #fff;
    font-size: 33px;
    font-variation-settings: 'FILL' 0, 'wght' 650, 'GRAD' 0, 'opsz' 24;
}
.bottom-nav .nav-item.nav-scan.active::after { display: none; }
.nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.ticket-page { background: #f2f2f2; }
.ticket-actions { max-width: 520px; margin: 16px auto; padding: 0 12px; }
.ticket {
    background: #fff;
    width: 80mm;
    min-height: 100mm;
    margin: 16px auto;
    padding: 3mm 4mm;
    box-sizing: border-box;
    font-family: "Courier New", monospace;
    font-size: 9px;
    line-height: 1.25;
    color: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,.16);
    white-space: pre-wrap;
}
.ticket.ticket-80 { width: 80mm; font-size: 9px; }
.hidden { display: none !important; }
@media (max-width: 850px) {
    .grid-2, .grid-3, .grid-4, .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .topbar { padding: 12px 14px; }
    .brand img { height: 40px; }
    .user-pill { display: none; }
    .hero { padding: 22px; }
    .order-card { grid-template-columns: 1fr; }
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    tr { border-bottom: 1px solid var(--lg-border); padding: 10px 0; }
    td { border-bottom: 0; padding: 7px 0; }
    td::before { content: attr(data-label); display: block; color: var(--lg-muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
}
@media print {
    body.ticket-page { background: #fff; }
    .ticket-actions { display: none !important; }
    .ticket, .ticket.ticket-80 { box-shadow: none; margin: 0; padding: 3mm 4mm; width: 80mm; }
    @page { margin: 0; }
}

/* Dashboard mobile app style */
.dashboard-panel {
    background: var(--lg-card);
    border: 1px solid rgba(227,233,242,.9);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-title h1,
.section-title h2 { margin: 0 0 6px; font-size: clamp(1.45rem, 5vw, 2rem); line-height: 1.05; letter-spacing: -.025em; color: #07142d; }
.section-title p { margin: 0; color: #64758a; font-weight: 700; }
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.metric-card {
    min-height: 104px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    border: 1px solid var(--lg-border);
    box-shadow: 0 12px 30px rgba(24, 47, 79, .08);
}
.metric-card strong { display: block; font-size: clamp(1.45rem, 4.5vw, 2rem); line-height: 1; color: #07142d; }
.metric-card span:not(.material-symbols-rounded) { display: block; margin-top: 6px; color: #64758a; font-weight: 800; }
.icon-box {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(34,148,210,.13), rgba(34,148,210,.07));
    color: var(--lg-blue-dark);
    border: 1px solid rgba(34,148,210,.12);
}
.icon-box .material-symbols-rounded { font-size: 31px; color: var(--lg-blue-dark); }
.icon-box .accent-dot,
.icon-box .accent-mark,
.icon-box .accent-bars { color: var(--lg-blue-dark); }
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.quick-card {
    min-height: 96px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    border: 1px solid var(--lg-border);
    box-shadow: 0 12px 30px rgba(24, 47, 79, .08);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(24,47,79,.13); border-color: rgba(34,148,210,.35); }
.quick-card strong { color: #07345c; font-size: 1.05rem; line-height: 1.1; }
.dashboard-accordion-list {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}
.dashboard-accordion {
    overflow: hidden;
    border: 1px solid rgba(227,233,242,.95);
    border-radius: 24px;
    background: var(--lg-card);
    box-shadow: var(--shadow);
}
.dashboard-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.dashboard-accordion summary::-webkit-details-marker { display: none; }
.dashboard-accordion summary::marker { display: none; content: ''; }
.accordion-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}
.accordion-heading strong,
.accordion-heading small { display: block; }
.accordion-heading strong { color: #07142d; font-size: 1.08rem; }
.accordion-heading small { margin-top: 3px; color: #64758a; font-size: .84rem; font-weight: 700; }
.accordion-arrow {
    flex: 0 0 auto;
    color: var(--lg-blue-dark);
    transition: transform .2s ease;
}
.dashboard-accordion[open] .accordion-arrow { transform: rotate(180deg); }
.dashboard-accordion[open] summary { border-bottom: 1px solid var(--lg-border); }
.dashboard-accordion-content { padding: 14px; background: linear-gradient(180deg, #f8fbfe, #fff); }
.accordion-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.recent-panel { margin-bottom: 20px; }
@media (max-width: 850px) {
    .app-shell { background: linear-gradient(180deg, #edf4fa, #f7fbff); }
    .main-content { padding: 18px 0 100px; }
    .topbar {
        border-bottom-left-radius: 22px;
        border-bottom-right-radius: 22px;
        padding: 12px 22px 12px 18px;
    }
    .topbar-actions { gap: 0; }
    .dashboard-panel { padding: 18px; border-radius: 24px; margin-bottom: 18px; }
    .section-title { margin-bottom: 14px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .metric-card { min-height: 80px; gap: 10px; padding: 12px; border-radius: 17px; }
    .metric-card strong { font-size: 1.45rem; }
    .metric-card span:not(.material-symbols-rounded) { font-size: .84rem; margin-top: 4px; }
    .icon-box { width: 46px; height: 46px; border-radius: 15px; }
    .icon-box .material-symbols-rounded { font-size: 26px; }
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .quick-card { min-height: 86px; gap: 11px; padding: 12px; border-radius: 17px; }
    .quick-card strong { font-size: .97rem; }
    .dashboard-accordion-list { gap: 10px; margin-bottom: 18px; }
    .dashboard-accordion { border-radius: 20px; }
    .dashboard-accordion summary { padding: 12px 14px; }
    .accordion-heading { gap: 10px; }
    .accordion-heading strong { font-size: 1rem; }
    .accordion-heading small { font-size: .76rem; }
    .dashboard-accordion-content { padding: 12px; }
    .accordion-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .recent-panel { display: none; }
}
@media (max-width: 390px) {
    .container { width: min(100% - 20px, 1120px); }
    .dashboard-panel { padding: 14px; }
    .metric-card { gap: 8px; padding: 10px; }
    .metric-card strong { font-size: 1.28rem; }
    .metric-card span:not(.material-symbols-rounded) { font-size: .76rem; }
    .icon-box { width: 42px; height: 42px; border-radius: 14px; }
    .quick-card { gap: 9px; padding: 10px; }
    .quick-card strong { font-size: .9rem; }
}
.icon-box.orange-plus,
.icon-box.orange-check,
.icon-box.orange-base,
.icon-box.orange-bars {
    position: relative;
}
.icon-box.orange-plus::after,
.icon-box.orange-check::after,
.icon-box.orange-base::after,
.icon-box.orange-bars::after {
    content: '';
    position: absolute;
    right: 9px;
    top: 9px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lg-orange);
    box-shadow: 0 0 0 3px rgba(246,160,40,.15);
}
.icon-box.orange-check::after {
    width: 15px;
    height: 9px;
    border-radius: 2px;
    background: transparent;
    border-left: 4px solid var(--lg-orange);
    border-bottom: 4px solid var(--lg-orange);
    transform: rotate(-45deg);
    box-shadow: none;
}
.icon-box.orange-base::after {
    top: auto;
    bottom: 10px;
    right: 13px;
    width: 18px;
    height: 5px;
    border-radius: 999px;
}
.icon-box.orange-bars::after {
    top: auto;
    right: 10px;
    bottom: 10px;
    width: 8px;
    height: 25px;
    border-radius: 4px;
}

/* Nuevo pedido: cliente, catálogo visual y prendas */
.order-form-card { overflow: visible; }
.form-section {
    border: 1px solid var(--lg-border);
    border-radius: 22px;
    padding: 18px;
    margin: 16px 0;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}
.section-mini-title {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.section-mini-title > .material-symbols-rounded {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(34,148,210,.11);
    color: var(--lg-blue-dark);
    flex: 0 0 auto;
}
.section-mini-title h3 { margin: 0 0 4px; }
.section-mini-title p { margin: 0; color: var(--lg-muted); font-size: .92rem; }
.client-picker,
.item-add-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}
.client-search-wrap,
.service-search-wrap { position: relative; }
.add-client-btn {
    width: 54px;
    height: 54px;
    padding: 0;
    border-radius: 17px;
    margin-bottom: 16px;
}
.predictive-list {
    position: absolute;
    z-index: 35;
    left: 0;
    right: 0;
    top: calc(100% - 12px);
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--lg-border);
    box-shadow: 0 18px 45px rgba(24,47,79,.16);
}
.predictive-item {
    width: 100%;
    border: 0;
    border-radius: 13px;
    padding: 10px 12px;
    background: #f7fbff;
    color: var(--lg-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    cursor: pointer;
}
.predictive-item:hover { background: rgba(34,148,210,.10); }
.predictive-item span,
.predictive-item small { color: var(--lg-muted); font-weight: 700; }
.predictive-item.icon-result { justify-content: flex-start; }
.predictive-item.icon-result .material-symbols-rounded { color: var(--lg-blue-dark); }
.predictive-item.muted { color: var(--lg-muted); cursor: default; }
.selected-items { display: grid; gap: 10px; margin-top: 12px; }
.selected-item-card,
.order-item-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--lg-border);
    border-radius: 18px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(24,47,79,.07);
}
.selected-item-main,
.order-item-line > div:first-child + div,
.order-item-line .selected-item-main { min-width: 0; }
.selected-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
}
.selected-item-main strong,
.order-item-line strong { color: #07142d; }
.selected-item-main span,
.selected-item-main small,
.order-item-line span,
.order-item-line small {
    display: block;
    color: var(--lg-muted);
    font-size: .88rem;
    margin-top: 2px;
}
.selected-item-actions { display: flex; align-items: center; gap: 10px; }
.empty-items {
    border: 1px dashed rgba(34,148,210,.35);
    background: rgba(34,148,210,.06);
    color: var(--lg-muted);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}
.empty-items .material-symbols-rounded { color: var(--lg-blue-dark); }
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(7,20,45,.42);
    padding: 18px;
    display: grid;
    place-items: center;
    backdrop-filter: blur(8px);
}
.modal-card {
    width: min(760px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    background: #fff;
    border: 1px solid var(--lg-border);
    border-radius: 26px;
    padding: 20px;
    box-shadow: 0 30px 80px rgba(7,20,45,.28);
}
.small-modal { width: min(420px, 100%); }
.item-detail-card { width: min(680px, 100%); }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.modal-header h3 { margin: 0 0 4px; }
.modal-header p { margin: 0; color: var(--lg-muted); }
.icon-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #edf5fb;
    color: var(--lg-blue-dark);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    flex: 0 0 auto;
}
.icon-btn:hover { background: rgba(34,148,210,.14); }
.icon-btn.danger { background: rgba(220,53,69,.10); color: var(--lg-danger); }
.garment-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.garment-choice {
    min-height: 108px;
    border: 1px solid var(--lg-border);
    border-radius: 19px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    box-shadow: 0 10px 26px rgba(24,47,79,.07);
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 12px;
    cursor: pointer;
    color: #07345c;
    font-weight: 800;
}
.garment-choice:hover { border-color: rgba(34,148,210,.45); transform: translateY(-1px); }
.garment-choice .material-symbols-rounded { font-size: 34px; color: var(--lg-blue-dark); }
.selected-garment-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.selected-garment-head strong { font-size: 1.2rem; color: #07142d; }
.choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 16px;
}
.choice-pill {
    border: 1px solid var(--lg-border);
    background: #fff;
    border-radius: 999px;
    padding: 9px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 800;
    color: #07345c;
}
.choice-pill.active { border-color: rgba(34,148,210,.55); background: rgba(34,148,210,.10); color: var(--lg-blue-dark); }
.color-dot {
    width: 17px;
    height: 17px;
    border-radius: 999px;
    border: 1px solid rgba(7,20,45,.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.order-item-list { display: grid; gap: 10px; margin: 8px 0 18px; }
.order-item-line { grid-template-columns: auto 1fr auto; }
.sticky-save-row { margin-top: 16px; }
@media (max-width: 850px) {
    .form-section { padding: 14px; border-radius: 20px; }
    .client-picker,
    .item-add-bar { grid-template-columns: 1fr; }
    .add-client-btn { width: 100%; height: 50px; margin-bottom: 0; }
    .garment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .selected-item-card,
    .order-item-line { grid-template-columns: 1fr; align-items: start; }
    .selected-item-actions { justify-content: space-between; width: 100%; }
    .modal-backdrop { align-items: end; padding: 10px; }
    .modal-card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; max-height: calc(100vh - 20px); }
    .sticky-save-row .btn { width: 100%; }
}

/* Clientes y productos */
.quick-grid.quick-grid-extended { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-form {
    border: 1px solid var(--lg-border);
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(180deg, #fff, #fbfdff);
}
.search-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: min(360px, 100%);
}
.search-inline input { min-height: 42px; padding: 10px 12px; }
.management-list { display: grid; gap: 12px; }
.management-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--lg-border);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    box-shadow: 0 10px 26px rgba(24,47,79,.07);
}
.management-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.management-main strong { display: block; color: #07142d; }
.management-main span { display: block; color: var(--lg-muted); font-size: .9rem; margin-top: 3px; }
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.product-price-card {
    border: 1px solid var(--lg-border);
    border-radius: 22px;
    padding: 16px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    box-shadow: 0 10px 26px rgba(24,47,79,.07);
}
.product-price-card.inactive { opacity: .58; }
.product-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.toggle-line {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-weight: 800;
    color: var(--lg-muted);
}
.toggle-line input { width: auto; }
.product-mini-row { gap: 10px; }
.product-mini-row .form-group { margin-bottom: 10px; }
@media (max-width: 980px) {
    .quick-grid.quick-grid-extended { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
    .quick-grid.quick-grid-extended { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .management-row { grid-template-columns: 1fr; align-items: start; }
    .management-row .btn-row { width: 100%; justify-content: flex-start; }
    .search-inline { width: 100%; }
    .product-grid { grid-template-columns: 1fr; }
    .customer-form-row { grid-template-columns: 1fr; }
}

/* Productos: lista limpia con edición por modal */
.product-list-row {
    grid-template-columns: 1fr auto;
}
.product-list-row.inactive {
    opacity: .62;
}
.product-list-row .management-main .icon-box {
    width: 50px;
    height: 50px;
    border-radius: 16px;
}
.product-list-row .management-main .icon-box .material-symbols-rounded {
    font-size: 28px;
}
.product-row-actions {
    justify-content: flex-end;
}
.product-edit-modal .form-group {
    margin-bottom: 14px;
}
.product-active-line {
    margin: 4px 0 2px;
    justify-content: flex-start;
}
.product-active-line input {
    width: auto;
}
@media (max-width: 850px) {
    .section-title .btn-row {
        width: 100%;
    }
    .section-title .btn-row .btn {
        flex: 1 1 auto;
    }
    .product-list-row {
        grid-template-columns: 1fr auto;
    }
    .product-list-row .management-main {
        align-items: center;
    }
    .product-row-actions {
        width: auto !important;
        justify-content: flex-end !important;
    }
    .product-row-actions .icon-btn {
        width: 46px;
        height: 46px;
    }
}

/* Nuevo pedido: selector de cliente compacto */
.compact-customer-section {
    padding: 12px 14px;
}
.compact-customer-title {
    align-items: center;
    margin-bottom: 9px;
}
.compact-customer-title > .material-symbols-rounded {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 24px;
}
.customer-title-line {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.customer-title-line h3 {
    margin: 0;
}
.selected-customer-name {
    display: inline-flex;
    align-items: center;
    max-width: min(420px, 65vw);
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(34,148,210,.11);
    color: var(--lg-blue-dark);
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.compact-client-picker {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
    align-items: center;
}
.compact-client-picker .client-search-wrap {
    min-width: 0;
}
.compact-client-picker input {
    min-height: 46px;
    padding: 10px 13px;
    border-radius: 14px;
}
.compact-client-picker .add-client-btn {
    width: 46px;
    height: 46px;
    margin: 0;
    border-radius: 14px;
}
.compact-client-picker .predictive-list {
    top: calc(100% + 5px);
}
@media (max-width: 850px) {
    .compact-client-picker {
        grid-template-columns: minmax(0, 1fr) 46px;
    }
    .compact-client-picker .add-client-btn {
        width: 46px;
        height: 46px;
        margin: 0;
    }
    .selected-customer-name {
        max-width: calc(100vw - 145px);
    }
}

.compact-customer-row {
    display: grid;
    grid-template-columns: minmax(150px, auto) minmax(240px, 1fr);
    align-items: center;
    gap: 12px;
}
.compact-customer-row .compact-customer-title {
    margin-bottom: 0;
}
@media (max-width: 620px) {
    .compact-customer-section {
        padding: 10px;
    }
    .compact-customer-row {
        grid-template-columns: minmax(108px, auto) minmax(0, 1fr);
        gap: 8px;
    }
    .compact-customer-title {
        gap: 7px;
    }
    .compact-customer-title > .material-symbols-rounded {
        width: 34px;
        height: 34px;
        font-size: 21px;
    }
    .customer-title-line {
        display: block;
        min-width: 0;
    }
    .customer-title-line h3 {
        font-size: .95rem;
    }
    .selected-customer-name {
        display: block;
        max-width: 105px;
        min-height: 0;
        margin-top: 2px;
        padding: 0;
        border-radius: 0;
        background: transparent;
        font-size: .73rem;
    }
    .compact-client-picker {
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 6px;
    }
    .compact-client-picker input {
        min-height: 42px;
        padding: 9px 11px;
        font-size: .88rem;
    }
    .compact-client-picker .add-client-btn {
        width: 42px;
        height: 42px;
    }
}

/* Nuevo pedido: separación de Tintorería y Lavandería */
.service-order-section { overflow: visible; }
.service-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.service-type-card {
    width: 100%;
    min-height: 104px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--lg-border);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #f8fbfe);
    color: var(--lg-text);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(24,47,79,.07);
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.service-type-card:hover,
.service-type-card.active {
    transform: translateY(-1px);
    border-color: rgba(34,148,210,.55);
    box-shadow: 0 14px 32px rgba(34,148,210,.14);
}
.service-type-card[data-service-type="lavanderia"].active { border-color: rgba(246,160,40,.72); }
.service-type-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: rgba(34,148,210,.12);
    color: var(--lg-blue-dark);
}
.service-type-card[data-service-type="lavanderia"] .service-type-icon {
    background: rgba(246,160,40,.17);
    color: #a76100;
}
.service-type-card strong,
.service-type-card small { display: block; }
.service-type-card strong { font-size: 1.03rem; margin-bottom: 4px; }
.service-type-card small { color: var(--lg-muted); line-height: 1.3; }
.service-arrow { color: var(--lg-muted); font-size: 24px; }
.service-catalog-panel {
    margin: 10px 0 18px;
    padding: 15px;
    border: 1px solid var(--lg-border);
    border-radius: 20px;
    background: #f8fbfe;
}
.active-service-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.active-service-header h4 { margin: 6px 0 3px; font-size: 1.08rem; }
.active-service-header p { margin: 0; color: var(--lg-muted); font-size: .9rem; }
.service-category-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(34,148,210,.13);
    color: var(--lg-blue-dark);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .035em;
}
.service-category-badge[data-service="lavanderia"] {
    background: rgba(246,160,40,.18);
    color: #945800;
}
.selected-services-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0 9px;
}
.selected-services-head span { color: var(--lg-muted); font-size: .86rem; font-weight: 800; }
.grouped-selected-items { gap: 9px; }
.selected-service-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    margin-top: 5px;
    border-radius: 14px;
    background: rgba(34,148,210,.08);
    color: var(--lg-blue-dark);
}
.selected-service-group-title .material-symbols-rounded { font-size: 22px; }
.selected-service-group-title small { margin-left: auto; color: var(--lg-muted); font-weight: 800; }
.single-garment-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin: -3px 0 14px;
    border-radius: 14px;
    background: rgba(34,148,210,.10);
    color: var(--lg-blue-dark);
    font-size: .88rem;
    font-weight: 800;
}
.garment-choice small {
    display: block;
    margin-top: 4px;
    color: var(--lg-muted);
    font-size: .74rem;
}

/* Ticket con QR */
.ticket { white-space: normal; }
.ticket-text {
    margin: 0;
    font: inherit;
    white-space: pre-wrap;
}
.ticket-qr {
    display: grid;
    place-items: center;
    margin: 4px auto 6px;
    min-height: 116px;
}
.ticket-qr svg {
    display: block;
    width: 116px;
    height: 116px;
    shape-rendering: crispEdges;
}
.ticket-qr-caption {
    text-align: center;
    font-family: "Courier New", monospace;
    font-size: 10px;
    line-height: 1.35;
    color: #000;
    padding-bottom: 6px;
}
.ticket.ticket-80 .ticket-qr svg { width: 132px; height: 132px; }

@media (max-width: 680px) {
    .service-type-grid { grid-template-columns: 1fr; }
    .service-type-card { min-height: 88px; }
    .active-service-header { align-items: stretch; flex-direction: column; }
    .active-service-header .btn { width: 100%; }
}

@media print {
    .ticket-text { margin: 0; }
    .ticket-qr { page-break-inside: avoid; }
}

/* Personalización del ticket */
.ticket-customizer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr);
    gap: 20px;
    align-items: start;
}
.ticket-settings-card { min-width: 0; }
.settings-block {
    border: 1px solid var(--lg-border);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #fff, #fbfdff);
}
.settings-block h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: #07345c;
}
.settings-block h3 .material-symbols-rounded { color: var(--lg-blue); }
.logo-upload-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}
.logo-current-box {
    width: 150px;
    height: 94px;
    border-radius: 16px;
    border: 1px dashed #b7c6d8;
    background: #fff;
    display: grid;
    place-items: center;
    padding: 10px;
    overflow: hidden;
    color: var(--lg-muted);
}
.logo-current-box img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-current-box .material-symbols-rounded { font-size: 42px; }
.form-group small { display: block; margin-top: 7px; color: var(--lg-muted); line-height: 1.35; }
.inline-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    color: var(--lg-text);
    font-weight: 750;
}
.inline-check input { width: 18px; height: 18px; margin: 0; }
.inline-check-danger { color: #a72c38; }
.sticky-settings-actions {
    position: sticky;
    bottom: 84px;
    z-index: 4;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    border: 1px solid var(--lg-border);
    box-shadow: 0 12px 28px rgba(24,47,79,.12);
}
.sticky-settings-actions .material-symbols-rounded { font-size: 20px; vertical-align: middle; }
.ticket-preview-card {
    position: sticky;
    top: 92px;
    padding: 18px;
    overflow: auto;
    max-height: calc(100vh - 120px);
}
.ticket-preview-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.ticket-preview-heading h2 { margin: 0 0 4px; }
.ticket-preview-heading p { margin: 0; color: var(--lg-muted); font-size: .9rem; }
.ticket-settings-preview {
    margin: 8px auto 2px;
    min-height: auto;
    box-shadow: 0 5px 18px rgba(0,0,0,.14);
}
.ticket-business-logo {
    display: block;
    width: auto;
    max-width: 82%;
    max-height: 34mm;
    object-fit: contain;
    margin: 0 auto 8px;
    filter: grayscale(1) contrast(1.08);
}
.ticket-preview-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.35;
    white-space: normal;
}
.ticket-preview-text > span:empty { display: none; }
.ticket-preview-text hr { width: 100%; border: 0; border-top: 1px dashed #000; margin: 7px 0; }
.ticket-preview-left { width: 100%; text-align: left; white-space: normal; }
.ticket-preview-qr {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    margin: 4px auto;
}
.ticket-preview-qr .material-symbols-rounded { font-size: 88px; color: #000; }
.ticket-action-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 900px) {
    .ticket-customizer-grid { grid-template-columns: 1fr; }
    .ticket-preview-card { position: static; max-height: none; }
}
@media (max-width: 580px) {
    .logo-upload-row { align-items: stretch; flex-direction: column; }
    .logo-current-box { width: 100%; height: 112px; }
    .sticky-settings-actions { bottom: 82px; }
    .sticky-settings-actions .btn { width: 100%; }
    .ticket-action-heading { align-items: stretch; flex-direction: column; }
}

@media print {
    .ticket-business-logo { max-height: 30mm; margin-bottom: 5px; }
}

/* Entrega con escáner QR */
.delivery-search-card { overflow: hidden; }
.delivery-heading,
.delivery-results-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.delivery-heading h2,
.delivery-results-heading h2 { margin: 0 0 6px; }
.delivery-heading p,
.delivery-results-heading p { margin: 0; }
.delivery-scan-main { flex: 0 0 auto; min-width: 190px; }
.delivery-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--lg-muted);
    font-size: .79rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.delivery-divider::before,
.delivery-divider::after { content: ''; height: 1px; background: var(--lg-border); flex: 1; }
.delivery-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, .95fr);
    gap: 12px;
    align-items: end;
}
.delivery-search-form .form-group { margin-bottom: 0; }
.delivery-results-card { margin-top: 18px; scroll-margin-top: 88px; }
.delivery-qr-ok {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(23,166,115,.12);
    color: #0f7652;
    font-size: .83rem;
    font-weight: 900;
}
.delivery-qr-ok .material-symbols-rounded { font-size: 21px; font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24; }

.qr-scanner-panel {
    margin-top: 18px;
    padding: 16px;
    border-radius: 22px;
    background: #0c1724;
    color: #fff;
    box-shadow: 0 18px 42px rgba(4,14,28,.24);
}
.qr-camera-shell {
    position: relative;
    width: min(100%, 680px);
    margin: 0 auto;
    aspect-ratio: 4 / 3;
    max-height: 57vh;
    overflow: hidden;
    border-radius: 18px;
    background: #02060a;
}
.qr-camera-shell video { width: 100%; height: 100%; display: block; object-fit: cover; }
.qr-camera-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0 27%, rgba(0,0,0,.25) 42%, rgba(0,0,0,.64) 100%);
    pointer-events: none;
}
.qr-target {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(64%, 300px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 24px;
    box-shadow: 0 0 0 999px rgba(0,0,0,.12);
    pointer-events: none;
}
.qr-target span { position: absolute; width: 42px; height: 42px; border-color: var(--lg-orange); border-style: solid; }
.qr-target span:nth-child(1) { left: -2px; top: -2px; border-width: 5px 0 0 5px; border-radius: 17px 0 0 0; }
.qr-target span:nth-child(2) { right: -2px; top: -2px; border-width: 5px 5px 0 0; border-radius: 0 17px 0 0; }
.qr-target span:nth-child(3) { left: -2px; bottom: -2px; border-width: 0 0 5px 5px; border-radius: 0 0 0 17px; }
.qr-target span:nth-child(4) { right: -2px; bottom: -2px; border-width: 0 5px 5px 0; border-radius: 0 0 17px 0; }
.qr-scan-line {
    position: absolute;
    left: 50%;
    top: calc(50% - min(32%, 150px));
    width: min(60%, 280px);
    height: 3px;
    transform: translateX(-50%);
    border-radius: 99px;
    background: linear-gradient(90deg, transparent, #fff, var(--lg-orange), #fff, transparent);
    box-shadow: 0 0 14px rgba(246,160,40,.9);
    animation: qrScanMove 2s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes qrScanMove {
    from { transform: translate(-50%, 8px); }
    to { transform: translate(-50%, min(56vw, 275px)); }
}
.qr-scanner-status {
    width: min(100%, 680px);
    margin: 12px auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    text-align: center;
    color: #dce9f6;
    font-weight: 800;
}
.qr-scanner-status .material-symbols-rounded { color: var(--lg-orange); font-size: 24px; }
.qr-scanner-status.is-error { color: #ffb7be; }
.qr-scanner-status.is-error .material-symbols-rounded { color: #ff6675; }
.qr-scanner-status.is-success { color: #9cf0ce; }
.qr-scanner-status.is-success .material-symbols-rounded { color: #41d59b; }
.qr-scanner-actions { justify-content: center; }
.qr-scanner-actions .btn { box-shadow: none; }
.qr-scanner-actions .btn.is-active { background: var(--lg-orange); color: #172033; }
.qr-photo-button { cursor: pointer; }
.qr-camera-help { display: block; margin-top: 12px; text-align: center; color: #9eb0c3; line-height: 1.4; }

.delivery-order-card {
    padding: 18px;
    border: 1px solid var(--lg-border);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #fbfdff);
}
.delivery-order-highlight {
    border: 2px solid rgba(23,166,115,.48);
    box-shadow: 0 15px 32px rgba(23,166,115,.10);
}
.delivery-order-summary { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.delivery-order-icon {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: var(--lg-blue-dark);
    background: rgba(34,148,210,.11);
}
.delivery-order-icon .material-symbols-rounded { font-size: 30px; }
.delivery-customer-name { display: block; margin-bottom: 3px; font-size: 1rem; color: #07345c; }
.delivery-items-summary { margin-top: 8px; max-width: 590px; }
.delivery-money-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 10px 0; font-size: .9rem; }
.delivery-balance-due { color: #b36200; }
.delivery-balance-paid { color: #0f7652; }
.delivery-confirm-card {
    min-width: min(100%, 390px);
    padding: 15px;
    border: 1px solid rgba(34,148,210,.13);
    border-radius: 18px;
    background: #f5faff;
}
.delivery-confirm-card .form-group { margin-bottom: 12px; }
.delivery-confirm-card small { color: var(--lg-muted); }
.payment-method-fieldset { margin: 0; padding: 0; border: 0; }
.payment-method-fieldset legend { margin-bottom: 8px; font-weight: 850; }
.payment-method-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.payment-method-option { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 12px; border: 1px solid var(--lg-border); border-radius: 14px; background: #fff; color: var(--lg-blue-dark); cursor: pointer; }
.payment-method-option:has(input:checked) { border-color: var(--lg-blue); background: rgba(34,148,210,.10); box-shadow: 0 0 0 3px rgba(34,148,210,.10); }
.payment-method-option input { width: auto; margin: 0; }
.payment-method-option .material-symbols-rounded { font-size: 23px; }
.payment-summary { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: rgba(23,166,115,.11); color: #0f7652; }
.payment-summary > .material-symbols-rounded { font-size: 28px; }
.payment-summary small, .payment-summary strong { display: block; }
.delivery-buttons { align-items: stretch; }
.delivery-buttons .btn { flex: 1 1 145px; }
.delivery-already-done {
    min-width: 290px;
    padding: 17px;
    border-radius: 18px;
    background: rgba(23,166,115,.10);
    color: #0f7652;
    text-align: center;
}
.delivery-already-done > .material-symbols-rounded { display: block; margin: 0 auto 7px; font-size: 40px; }
.delivery-already-done strong,
.delivery-already-done small { display: block; }
.delivery-already-done small { margin: 4px 0 13px; }
.delivery-already-done .btn-row { justify-content: center; }
.delivery-empty-result { text-align: center; padding: 32px 16px; color: var(--lg-muted); }
.delivery-empty-result > .material-symbols-rounded { font-size: 54px; color: #9aabbd; }
.delivery-empty-result strong { display: block; margin-top: 8px; color: #07345c; font-size: 1.08rem; }
.delivery-empty-result p { margin: 7px auto 16px; max-width: 480px; }

@media (max-width: 850px) {
    .delivery-heading,
    .delivery-results-heading { align-items: stretch; flex-direction: column; }
    .delivery-scan-main { width: 100%; }
    .delivery-search-form { grid-template-columns: 1fr; }
    .delivery-order-card { gap: 16px; }
    .delivery-confirm-card,
    .delivery-already-done { width: 100%; min-width: 0; }
}
@media (max-width: 520px) {
    .qr-scanner-panel { margin-left: -12px; margin-right: -12px; padding: 10px; border-radius: 18px; }
    .qr-camera-shell { border-radius: 14px; aspect-ratio: 3 / 4; max-height: 61vh; }
    .qr-target { width: 72%; }
    .qr-scanner-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qr-scanner-actions .btn { width: 100%; padding: 11px 8px; font-size: .84rem; }
    .delivery-order-summary { flex-direction: column; }
    .delivery-order-icon { width: 46px; height: 46px; }
    .delivery-buttons { flex-direction: column; }
    .delivery-buttons .btn { flex: 0 0 auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .qr-scan-line { animation: none; top: 50%; }
}


/* Preparación y ubicación de pedidos */
.ready-header-card { margin-bottom: 18px; }
.ready-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ready-heading h2 { margin: 0 0 6px; }
.ready-heading p { margin: 0; max-width: 720px; }
.ready-count-badge { flex: 0 0 auto; min-width: 112px; display: grid; grid-template-columns: auto auto; align-items: center; justify-content: center; gap: 0 8px; padding: 12px 16px; border-radius: 18px; background: rgba(23,166,115,.11); color: #0f7652; }
.ready-count-badge .material-symbols-rounded { grid-row: 1 / 3; font-size: 32px; }
.ready-count-badge strong { font-size: 1.45rem; line-height: 1; }
.ready-count-badge span:last-child { font-size: .78rem; font-weight: 800; }
.ready-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; padding: 5px; border-radius: 16px; background: #f1f6fa; }
.ready-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 12px; color: var(--lg-muted); font-weight: 850; font-size: .9rem; }
.ready-tabs a span { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: rgba(24,47,79,.08); text-align: center; font-size: .76rem; }
.ready-tabs a.active { background: #fff; color: var(--lg-blue-dark); box-shadow: 0 6px 18px rgba(24,47,79,.09); }
.ready-tabs a.active span { background: rgba(34,148,210,.12); color: var(--lg-blue-dark); }
.ready-search-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; }
.ready-search-form .form-group { margin: 0; }
.ready-order-list { display: grid; gap: 16px; }
.ready-order-card { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(310px, .75fr); gap: 20px; border: 1px solid var(--lg-border); }
.ready-order-card.is-ready { border-color: rgba(23,166,115,.42); box-shadow: 0 16px 38px rgba(23,166,115,.08); }
.ready-order-info { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.ready-order-icon { flex: 0 0 auto; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: rgba(34,148,210,.11); color: var(--lg-blue-dark); }
.ready-order-card.is-ready .ready-order-icon { background: rgba(23,166,115,.12); color: #0f7652; }
.ready-order-icon .material-symbols-rounded { font-size: 30px; }
.ready-order-copy { min-width: 0; flex: 1; }
.ready-order-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ready-order-title-row h3 { margin: 0 0 3px; color: #07345c; }
.ready-order-copy > .order-meta { margin: 9px 0; }
.ready-due { display: inline-flex; align-items: center; gap: 6px; color: var(--lg-muted); font-size: .86rem; }
.ready-due .material-symbols-rounded { font-size: 19px; }
.ready-current-location, .ready-location-box, .delivery-location-box { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 15px; background: rgba(23,166,115,.11); color: #0f7652; }
.ready-current-location > .material-symbols-rounded, .ready-location-box > .material-symbols-rounded, .delivery-location-box > .material-symbols-rounded { flex: 0 0 auto; font-size: 28px; }
.ready-current-location small, .ready-current-location strong, .ready-current-location span, .ready-location-box small, .ready-location-box strong, .ready-location-box span, .delivery-location-box small, .delivery-location-box strong { display: block; }
.ready-current-location small, .ready-location-box small, .delivery-location-box small { font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; opacity: .82; }
.ready-current-location strong, .ready-location-box strong, .delivery-location-box strong { font-size: 1rem; }
.ready-current-location span, .ready-location-box span { margin-top: 2px; font-size: .78rem; opacity: .82; }
.ready-location-form { padding: 15px; border: 1px solid rgba(34,148,210,.14); border-radius: 18px; background: #f7fbff; }
.ready-location-form .form-group { margin-bottom: 10px; }
.ready-quick-locations { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ready-quick-locations button { border: 1px solid var(--lg-border); border-radius: 999px; padding: 7px 10px; background: #fff; color: var(--lg-blue-dark); font: inherit; font-size: .77rem; font-weight: 800; cursor: pointer; }
.ready-quick-locations button:hover { border-color: rgba(34,148,210,.45); background: rgba(34,148,210,.06); }
.ready-actions .btn { flex: 1 1 140px; }
.ready-return-form { grid-column: 2; justify-self: end; margin-top: -12px; }
.ready-empty { text-align: center; padding: 36px 18px; color: var(--lg-muted); }
.ready-empty > .material-symbols-rounded { font-size: 56px; color: #9aabbd; }
.ready-empty strong { display: block; margin: 8px 0 4px; color: #07345c; font-size: 1.08rem; }
.ready-empty p { margin: 0; }
.order-location-inline { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: #0f7652; font-size: .8rem; font-weight: 850; }
.order-location-inline .material-symbols-rounded { font-size: 18px; }
.delivery-location-box { margin-top: 12px; max-width: 460px; }
.delivery-location-missing { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(246,160,40,.13); color: #8a5900; font-size: .8rem; font-weight: 800; }
.delivery-location-missing .material-symbols-rounded { font-size: 19px; }

@media (max-width: 900px) {
    .ready-order-card { grid-template-columns: 1fr; }
    .ready-return-form { grid-column: 1; justify-self: stretch; margin-top: -8px; }
    .ready-return-form .btn { width: 100%; }
}
@media (max-width: 620px) {
    .ready-heading { flex-direction: column; }
    .ready-count-badge { width: 100%; }
    .ready-search-form { grid-template-columns: 1fr; }
    .ready-search-form .btn { width: 100%; }
    .ready-tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
    .ready-tabs a { justify-content: center; padding: 9px 6px; font-size: .76rem; text-align: center; }
    .ready-order-info { flex-direction: column; }
    .ready-order-title-row { width: 100%; }
    .ready-actions { flex-direction: column; }
    .ready-actions .btn { width: 100%; flex: 0 0 auto; }
    .bottom-nav { width: calc(100% - 16px); gap: 1px; padding: 6px; }
    .bottom-nav .nav-item { min-height: 50px; padding: 8px 1px; }
    .bottom-nav .material-symbols-rounded { font-size: 25px; }
}

/* Búsqueda QR en preparación de pedidos */
.ready-search-form { grid-template-columns: minmax(0,1fr) auto auto; }
.ready-scan-button { white-space: nowrap; }
.ready-qr-confirmation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 13px 16px;
    border: 1px solid rgba(23,166,115,.25);
    border-radius: 16px;
    background: rgba(23,166,115,.10);
    color: #0f7652;
}
.ready-qr-confirmation > .material-symbols-rounded { font-size: 30px; font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24; }

/* Escáner QR unificado: preparación y entrega */
.unified-scan-card,
.unified-ready-question,
.unified-scan-empty { max-width: 760px; margin-left: auto; margin-right: auto; }
.unified-scan-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.unified-scan-heading h2 { margin: 0 0 4px; }
.unified-scan-heading p { margin: 0; }
.unified-scan-icon {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--lg-blue), var(--lg-blue-dark));
    color: #fff;
    box-shadow: 0 10px 22px rgba(34,148,210,.25);
}
.unified-scan-icon .material-symbols-rounded { font-size: 31px; }
.unified-scan-start { min-height: 52px; font-size: 1rem; }
.unified-scan-search {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--lg-border);
}
.unified-scan-search .form-group { margin: 0; }
.unified-ready-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-radius: 16px;
    background: rgba(246,160,40,.14);
    color: #8b5705;
}
.unified-ready-status > .material-symbols-rounded { font-size: 32px; }
.unified-ready-status strong,
.unified-ready-status span { display: block; }
.unified-ready-status span { margin-top: 3px; font-size: .88rem; }
.unified-order-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 2px 12px;
}
.unified-order-summary h3 { margin: 0 0 4px; }
.unified-order-summary p { margin: 5px 0 0; }
.unified-ready-form { padding-top: 12px; border-top: 1px solid var(--lg-border); }
.unified-ready-actions .btn { flex: 1 1 220px; }
.unified-scan-empty { text-align: center; }
.unified-scan-empty > .material-symbols-rounded { display: block; margin-bottom: 8px; color: var(--lg-muted); font-size: 46px; }
.unified-scan-empty strong { display: block; font-size: 1.12rem; }
.unified-scan-empty p { color: var(--lg-muted); }
@media (max-width: 620px) {
    .unified-scan-card,
    .unified-ready-question { padding: 14px; }
    .unified-scan-heading { align-items: flex-start; gap: 10px; }
    .unified-scan-icon { width: 46px; height: 46px; border-radius: 15px; }
    .unified-scan-search { grid-template-columns: 1fr; }
    .unified-scan-search .btn { width: 100%; }
    .unified-order-summary { flex-direction: column; }
    .unified-ready-actions { flex-direction: column; }
    .unified-ready-actions .btn { width: 100%; flex: 0 0 auto; }
    .bottom-nav .nav-item.nav-scan { width: 62px; min-height: 62px; margin-top: -21px; }
}
.ready-qr-confirmation strong,
.ready-qr-confirmation span { display: block; }
.ready-qr-confirmation span { margin-top: 2px; font-size: .82rem; }
@media (max-width: 760px) {
    .ready-search-form { grid-template-columns: 1fr; }
    .ready-search-form .btn { width: 100%; }
}
