:root {
    --canvas: #f4f1eb;
    --canvas-deep: #ebe5db;
    --surface: #fffdf9;
    --surface-soft: #f8f5ef;
    --ink: #172a2f;
    --ink-soft: #526268;
    --muted: #667477;
    --navy: #172f35;
    --navy-light: #23454c;
    --coral: #c84f34;
    --coral-deep: #a93d2a;
    --teal: #32786f;
    --sand: #c89b5b;
    --success: #367862;
    --warning: #a97525;
    --danger: #b5483e;
    --line: #e8e2d9;
    --line-strong: #d9d0c4;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 8px 22px rgba(27, 42, 45, 0.05);
    --shadow: 0 18px 50px rgba(27, 42, 45, 0.08);
    --font-display: "Bodoni 72", Didot, "Palatino Linotype", Georgia, serif;
    --font-body: Aptos, "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    background:
        radial-gradient(circle at 78% 0%, rgba(237, 104, 72, 0.08), transparent 24rem),
        linear-gradient(rgba(23, 47, 53, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 47, 53, 0.018) 1px, transparent 1px),
        var(--canvas);
    background-size: auto, 32px 32px, 32px 32px, auto;
}
body.menu-open { overflow: hidden; }
.auth-body { min-height: 100vh; background: var(--canvas); }
.auth-shell { display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(360px, .95fr); min-height: 100vh; }
.auth-brand-panel { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(36px, 7vw, 100px); color: white; background: radial-gradient(circle at 20% 15%, rgba(237,104,72,.28), transparent 20rem), linear-gradient(145deg, var(--navy-light), var(--navy)); }
.auth-brand-panel img { width: 88px; height: 88px; margin-bottom: auto; object-fit: cover; border-radius: 22px; }
.auth-brand-panel span { color: #ffd7c9; font-size: .82rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.auth-brand-panel h1 { max-width: 720px; margin: 14px 0; font-family: var(--font-display); font-size: clamp(2.3rem, 5vw, 5rem); line-height: .98; }
.auth-brand-panel p { max-width: 580px; margin: 0; color: rgba(255,255,255,.8); font-size: 1rem; }
.auth-form-panel { display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 90% 10%, rgba(200,155,91,.14), transparent 18rem), var(--canvas); }
.auth-form { width: min(430px, 100%); padding: clamp(26px, 5vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.auth-form h2 { margin: 5px 0 6px; font-family: var(--font-display); font-size: 2rem; }
.auth-form > p { margin-bottom: 24px; color: var(--ink-soft); }
.auth-form .field { margin-bottom: 16px; }
.auth-form > small { display: block; margin-top: 16px; color: var(--ink-soft); font-size: .82rem; text-align: center; }
.logout-form { margin: 0; }
.account-security-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1fr); gap: 40px; max-width: 950px; padding: clamp(24px, 5vw, 48px); }
.account-security-card h2 { margin: 5px 0; font-family: var(--font-display); font-size: 2rem; }
.account-security-card p { color: var(--ink-soft); }
.account-security-card form { display: grid; gap: 16px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(237, 104, 72, 0.28);
    outline-offset: 2px;
}

.icon {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}
.icon path:first-child:last-child[d^="M4 13"] { fill: currentColor; stroke: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    position: fixed;
    left: 1rem;
    top: -5rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    color: white;
    background: var(--navy);
    border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.app-shell {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 252px;
    height: 100vh;
    padding: 26px 18px 20px;
    color: #f7f3ec;
    background:
        radial-gradient(circle at 10% 90%, rgba(237, 104, 72, 0.16), transparent 20rem),
        linear-gradient(165deg, var(--navy-light), var(--navy) 58%);
    overflow-y: auto;
}
.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.25;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 28px 28px;
}
.sidebar > * { position: relative; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
    display: grid;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    place-items: center;
    padding: 4px;
    overflow: hidden;
    background: white;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,.14);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.brand-copy { display: grid; min-width: 0; }
.brand-copy strong { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.05; letter-spacing: .01em; }
.brand-copy small { color: rgba(247,243,236,.58); font-size: .72rem; white-space: nowrap; }
.workspace-label {
    margin: 34px 10px 10px;
    color: rgba(247,243,236,.44);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.nav { display: grid; gap: 7px; margin-top: 24px; }
.nav-section { display: grid; gap: 3px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.07); }
.nav-section-label {
    padding: 3px 11px 4px;
    color: rgba(247,243,236,.4);
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.nav-section .nav-link { min-height: 42px; padding-top: 7px; padding-bottom: 7px; }
.nav-home { margin-bottom: 2px; }
.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    color: rgba(247,243,236,.72);
    font-size: .93rem;
    font-weight: 650;
    border: 1px solid transparent;
    border-radius: 13px;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav-link:hover { color: white; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-link.is-active {
    color: white;
    background: rgba(255,255,255,.11);
    border-color: rgba(255,255,255,.08);
    box-shadow: inset 3px 0 0 var(--coral);
}
.nav-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: rgba(247,243,236,.58);
    border-radius: 8px;
}
.nav-link.is-active .nav-icon { color: #ff8a6d; }
.sidebar-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 14px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
}
.sidebar-status strong, .sidebar-status small { display: block; }
.sidebar-status strong { font-size: .8rem; }
.sidebar-status small { color: rgba(247,243,236,.5); font-size: .69rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #65c59e; box-shadow: 0 0 0 5px rgba(101,197,158,.12); }
.sidebar-status.is-development .status-dot { background: #e5ad58; box-shadow: 0 0 0 5px rgba(229,173,88,.14); }
.finance-entry { transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.finance-entry:hover, .finance-entry.is-active { color: white; background: rgba(255,255,255,.12); border-color: rgba(229,173,88,.3); transform: translateY(-1px); }
.finance-entry > div { flex: 1; }
.finance-entry > .icon { width: 15px; color: rgba(247,243,236,.55); }
.sidebar-footnote { display: flex; justify-content: space-between; margin: 14px 5px 0; color: rgba(247,243,236,.32); font-size: .66rem; }
.sidebar-close { display: none; color: white; }
.sidebar-overlay { display: none; }
.mobile-bottom-nav { display: none; }

.main-panel { min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 118px;
    padding: 22px clamp(24px, 3vw, 48px) 18px;
    background: linear-gradient(to bottom, rgba(244,241,235,.97) 75%, rgba(244,241,235,.82));
    backdrop-filter: blur(16px);
}
.page-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.eyebrow { margin: 0 0 2px; color: var(--coral-deep); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-family: var(--font-display); font-size: clamp(1.8rem, 2.5vw, 2.5rem); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; }
.page-subtitle { margin: 4px 0 0; color: var(--ink-soft); font-size: .86rem; }
.topbar-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.profile-chip { display: flex; align-items: center; gap: 9px; padding-left: 8px; }
.profile-chip > span { display: grid; width: 38px; height: 38px; place-items: center; color: white; background: var(--navy); border-radius: 12px; font-size: .74rem; font-weight: 800; }
.profile-chip strong, .profile-chip small { display: block; line-height: 1.2; }
.profile-chip strong { font-size: .76rem; }
.profile-chip small { color: var(--muted); font-size: .67rem; }
.menu-toggle { display: none; }
.page-content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 8px clamp(24px, 3vw, 48px) 52px; }

.panel {
    background: rgba(255,253,249,.94);
    border: 1px solid rgba(217,208,196,.72);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    color: white;
    background: var(--coral);
    border: 1px solid var(--coral);
    border-radius: 12px;
    font-size: .84rem;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(237,104,72,.18);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { background: var(--coral-deep); border-color: var(--coral-deep); box-shadow: 0 10px 24px rgba(200,79,52,.22); transform: translateY(-1px); }
.button-secondary { color: var(--ink); background: var(--surface); border-color: var(--line-strong); box-shadow: none; }
.button-secondary:hover { color: var(--navy); background: #f2eee7; border-color: #cfc4b7; box-shadow: none; }
.button-quiet { color: var(--ink-soft); background: transparent; border-color: transparent; box-shadow: none; }
.button-quiet:hover { color: var(--ink); background: var(--surface-soft); border-color: var(--line); box-shadow: none; }
.button-small { min-height: 36px; padding: 8px 12px; font-size: .76rem; }
.button-block { width: 100%; }
.button-whatsapp { background: #2d8b68; border-color: #2d8b68; box-shadow: none; }
.button-whatsapp:hover { background: #246f54; border-color: #246f54; box-shadow: none; }
.button-danger { background: var(--danger); border-color: var(--danger); box-shadow: 0 8px 18px rgba(181,72,62,.16); }
.button-danger:hover { background: #93372f; border-color: #93372f; box-shadow: 0 10px 24px rgba(181,72,62,.2); }
.button-success { background: var(--success); border-color: var(--success); box-shadow: 0 8px 18px rgba(54,120,98,.16); }
.button-success:hover { background: #2b614f; border-color: #2b614f; box-shadow: 0 10px 24px rgba(54,120,98,.2); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: var(--ink);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}
.icon-button:hover { background: var(--surface-soft); border-color: var(--line); }
.icon-button.sidebar-close, .icon-button.menu-toggle { display: none; }
.text-link, .subtle-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 750; }
.text-link { color: white; font-size: .84rem; }
.text-link .icon { transition: transform .18s ease; }
.text-link:hover .icon { transform: translateX(3px); }
.subtle-link { color: var(--coral-deep); font-size: .76rem; }
.section-kicker { display: block; margin-bottom: 3px; color: var(--coral-deep); font-size: .64rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.flash-message {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 11px;
    align-items: center;
    margin-bottom: 16px;
    padding: 13px 14px;
    border: 1px solid;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: opacity .2s ease, transform .2s ease, margin .2s ease, padding .2s ease;
}
.flash-message > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; }
.flash-message p { margin: 0; font-size: .76rem; font-weight: 700; }
.flash-message .icon-button { width: 32px; height: 32px; }
.flash-success { color: #265b4a; background: #e6f2ed; border-color: #bfddd1; }
.flash-success > span { background: #cce5db; }
.flash-error { color: #7f3029; background: #f9e5e2; border-color: #edc6c1; }
.flash-error > span { background: #f2ccc6; }
.flash-message.is-hidden { margin-bottom: 0; padding-top: 0; padding-bottom: 0; max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-6px); border-width: 0; }

.reveal { animation: reveal .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--delay, 0ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.overview-banner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, .8fr);
    min-height: 260px;
    margin-bottom: 18px;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 84% 0%, rgba(237,104,72,.4), transparent 17rem),
        linear-gradient(125deg, #234b50, #173038 62%);
    border-radius: 28px;
    box-shadow: var(--shadow);
}
.daily-command {
    display: grid;
    grid-template-columns: minmax(300px, .72fr) minmax(520px, 1.28fr);
    gap: clamp(24px, 4vw, 58px);
    align-items: center;
    margin-bottom: 16px;
    padding: clamp(26px, 3.5vw, 42px);
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 16% 0%, rgba(238, 161, 96, .3), transparent 19rem),
        linear-gradient(125deg, #244f50, #172f35 64%);
    border-radius: 28px;
    box-shadow: var(--shadow);
}
.daily-command-copy { max-width: 560px; }
.daily-command .kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 13px; color: rgba(255,255,255,.65); font-size: .67rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.daily-command .kicker i { width: 8px; height: 8px; background: #70d5ab; border-radius: 50%; box-shadow: 0 0 0 6px rgba(112,213,171,.12); }
.daily-command h2 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 3vw, 3rem); line-height: 1; letter-spacing: -.03em; }
.daily-command p { max-width: 500px; margin: 12px 0 0; color: rgba(255,255,255,.65); font-size: .84rem; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-action {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 78px;
    padding: 13px;
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.075);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.quick-action:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.18); transform: translateY(-2px); }
.quick-action.is-primary { color: var(--navy); background: #fff7ef; border-color: #fff7ef; }
.quick-action > span { display: grid; width: 38px; height: 38px; place-items: center; color: #ffad91; background: rgba(255,255,255,.1); border-radius: 12px; }
.quick-action.is-primary > span { color: white; background: var(--coral); }
.quick-action > div { min-width: 0; }
.quick-action strong, .quick-action small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-action strong { font-size: .78rem; }
.quick-action small { margin-top: 2px; color: rgba(255,255,255,.52); font-size: .63rem; }
.quick-action.is-primary small { color: var(--muted); }
.quick-action > .icon { width: 15px; opacity: .55; }

.today-workspace { margin-bottom: 16px; padding: 21px; background: rgba(255,253,249,.75); border: 1px solid rgba(217,208,196,.72); border-radius: 22px; box-shadow: var(--shadow-sm); }
.workspace-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.workspace-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.55rem; }
.workspace-head p { margin: 2px 0 0; color: var(--muted); font-size: .7rem; }
.today-stamp { padding: 7px 11px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: .67rem; font-weight: 800; }
.work-queue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.work-queue { display: flex; min-width: 0; overflow: hidden; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.work-queue > header { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 15px; border-bottom: 1px solid var(--line); }
.work-queue > header > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; }
.deliveries-queue > header > span { color: var(--coral-deep); background: #fbe7e0; }
.returns-queue > header > span { color: var(--teal); background: #e1efeb; }
.collections-queue > header > span { color: #936a2d; background: #f4ead8; }
.work-queue h3, .work-queue header small { margin: 0; }
.work-queue h3 { font-size: .82rem; }
.work-queue header small { display: block; color: var(--muted); font-size: .61rem; }
.work-queue header b { display: grid; min-width: 28px; height: 28px; padding: 0 7px; place-items: center; color: var(--navy); background: var(--surface-soft); border-radius: 999px; font-size: .67rem; }
.work-queue-list { display: grid; align-content: start; flex: 1; padding: 6px; }
.work-queue-list > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 57px; padding: 9px; border-radius: 11px; transition: background .16s ease; }
.work-queue-list > a:hover { background: var(--surface-soft); }
.queue-marker { display: grid; width: 30px; height: 30px; place-items: center; color: var(--ink-soft); background: var(--surface-soft); border-radius: 9px; }
.queue-marker .icon { width: 14px; }
.work-queue-list > a > span:nth-child(2) { min-width: 0; }
.work-queue-list strong, .work-queue-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-queue-list strong { font-size: .7rem; }
.work-queue-list small { color: var(--muted); font-size: .61rem; }
.work-queue-list em { color: var(--ink-soft); font-size: .65rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.work-queue-list > a > .icon { width: 14px; color: var(--muted); }
.queue-empty { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 12px; color: var(--success); }
.queue-empty > .icon { width: 20px; }
.queue-empty span { min-width: 0; }
.queue-empty small { color: var(--muted); }
.queue-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 15px; color: var(--coral-deep); background: var(--surface-soft); border-top: 1px solid var(--line); font-size: .66rem; font-weight: 800; }
.queue-footer .icon { width: 14px; transition: transform .16s ease; }
.queue-footer:hover .icon { transform: translateX(3px); }
.overview-banner::after { content: ""; position: absolute; inset: 0; opacity: .23; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 30px 30px; pointer-events: none; }
.overview-copy { position: relative; z-index: 2; max-width: 720px; padding: clamp(28px, 4vw, 48px); }
.overview-copy .kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; color: rgba(255,255,255,.68); font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.overview-copy .kicker i { width: 8px; height: 8px; background: #70d5ab; border-radius: 50%; box-shadow: 0 0 0 6px rgba(112,213,171,.12); }
.overview-copy h2 { max-width: 650px; margin-bottom: 10px; font-family: var(--font-display); font-size: clamp(2rem, 3.5vw, 3.25rem); line-height: .98; letter-spacing: -.035em; }
.overview-copy p { max-width: 610px; margin-bottom: 24px; color: rgba(255,255,255,.65); font-size: .92rem; }
.banner-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.overview-visual { position: relative; z-index: 1; display: grid; place-items: center; min-height: 230px; }
.overview-visual img { position: relative; z-index: 2; width: 130px; height: 130px; padding: 5px; object-fit: cover; background: white; border: 8px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 24px 50px rgba(0,0,0,.24); }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.orbit-one { width: 220px; height: 220px; }
.orbit-two { width: 320px; height: 320px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.metric-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; }
.metric-icon.coral { color: var(--coral-deep); background: #fce5dd; }
.metric-icon.teal { color: var(--teal); background: #e0eeea; }
.metric-icon.sand { color: #936a2d; background: #f4ead8; }
.metric-icon.ink { color: var(--navy); background: #e3eaeb; }
.metric-copy { min-width: 0; }
.metric-copy span { display: block; color: var(--muted); font-size: .7rem; font-weight: 700; }
.metric-copy strong { display: block; margin-top: 2px; overflow: hidden; font-family: var(--font-display); font-size: clamp(1.45rem, 2.2vw, 2rem); line-height: 1.1; text-overflow: ellipsis; }
.metric-card > small { grid-column: 1 / -1; color: var(--muted); font-size: .67rem; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dashboard-grid .panel { padding: 22px; }
.operational-alerts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.operational-alerts.single-alert { grid-template-columns: 1fr; }
.operational-alert { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.operational-alert:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.operational-alert > span { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 13px; }
.operational-alert > div { min-width: 0; }
.operational-alert small { color: var(--muted); font-size: .56rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.operational-alert strong { display: block; font-size: .76rem; }
.operational-alert p { margin: 2px 0 0; color: var(--muted); font-size: .61rem; }
.operational-alert > .icon { color: var(--muted); }
.reception-alert > span { color: var(--teal); background: #e1efeb; }
.incident-alert > span { color: var(--warning); background: #f7ecd9; }
.demand-panel { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.35rem; }
.panel-count { display: grid; width: 34px; height: 34px; place-items: center; color: var(--coral-deep); background: #fce8e1; border-radius: 50%; font-size: .76rem; font-weight: 800; }
.compact-list { display: grid; gap: 8px; }
.compact-row { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 10px; background: var(--surface-soft); border: 1px solid transparent; border-radius: 13px; transition: background .18s ease, border-color .18s ease; }
a.compact-row:hover { background: white; border-color: var(--line); }
.row-icon, .date-tile { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; color: var(--coral-deep); background: #f8e6df; border-radius: 11px; }
.row-icon .icon { width: 17px; }
.date-tile { height: 42px; color: var(--navy); background: #e5edec; }
.date-tile strong, .date-tile small { line-height: 1; }
.date-tile strong { font-family: var(--font-display); font-size: 1.05rem; }
.date-tile small { margin-top: -7px; font-size: .5rem; font-weight: 800; }
.row-copy { display: grid; min-width: 0; margin-right: auto; }
.row-copy strong, .row-copy small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-copy strong { font-size: .8rem; }
.row-copy small { color: var(--muted); font-size: .67rem; }
.badge, .status-badge { display: inline-flex; align-items: center; justify-content: center; width: fit-content; border-radius: 999px; font-size: .65rem; font-weight: 800; white-space: nowrap; }
.badge { min-height: 26px; padding: 5px 9px; }
.badge-danger { color: var(--danger); background: #f9e4e1; }
.badge-success { color: var(--success); background: #e0eee8; }
.badge-neutral { color: var(--ink-soft); background: #ece9e3; }
.badge-accent { color: var(--coral-deep); background: #fbe5de; }
.demand-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 28px; }
.demand-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.demand-row strong { font-size: .76rem; }
.demand-row span { color: var(--muted); font-size: .67rem; }
.progress-track { height: 7px; overflow: hidden; background: #ece7df; border-radius: 999px; }
.progress-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--coral), #eea160); border-radius: inherit; }

.catalog-toolbar { margin-bottom: 20px; padding: 17px; }
.catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 4px 4px 16px; border-bottom: 1px solid var(--line); }
.catalog-heading h2 { margin: 0; font-family: var(--font-display); font-size: 1.35rem; }
.catalog-heading p { margin: 2px 0 0; color: var(--muted); font-size: .68rem; }
.filter-bar { display: grid; grid-template-columns: minmax(240px, 1.4fr) minmax(170px, .7fr) minmax(145px, .55fr) auto auto; gap: 10px; }
.search-control, .select-control { position: relative; display: flex; align-items: center; }
.search-control .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search-control input { padding-left: 43px; }
.filter-button { min-width: 104px; }
.results-summary { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding: 0 4px; }
.results-summary p { margin: 0; color: var(--ink-soft); font-size: .76rem; }
.results-summary p strong { color: var(--ink); font-size: .9rem; }
.results-summary > span { color: var(--muted); font-size: .69rem; }
.inventory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.inventory-card { display: flex; min-width: 0; overflow: hidden; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.inventory-card:hover { border-color: #d3c8bb; box-shadow: var(--shadow); transform: translateY(-4px); }
.inventory-card.is-inactive { border-style: dashed; border-color: #cfc6ba; }
.inventory-card.is-inactive .item-media img { opacity: .58; filter: saturate(.45); }
.inventory-card.is-inactive:hover .item-media img { opacity: .76; }
.item-media { position: relative; display: grid; aspect-ratio: 4 / 3; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f1ede6, #faf8f4); border-bottom: 1px solid var(--line); }
.item-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 -30px 45px rgba(26,40,43,.04); }
.item-media img { width: 100%; height: 100%; padding: 12px; object-fit: contain; transition: transform .35s ease; }
.inventory-card:hover .item-media img { transform: scale(1.035); }
.item-media.is-placeholder img { padding: 0; object-fit: cover; }
.stock-chip { position: absolute; z-index: 2; top: 11px; right: 11px; padding: 5px 9px; color: var(--success); background: rgba(245,252,248,.92); border: 1px solid rgba(54,120,98,.15); border-radius: 999px; font-size: .62rem; font-weight: 800; backdrop-filter: blur(8px); }
.stock-chip.is-low { color: var(--danger); background: rgba(255,246,244,.94); border-color: rgba(181,72,62,.16); }
.stock-chip.is-inactive { gap: 5px; color: var(--ink-soft); background: rgba(245,242,236,.94); border-color: rgba(82,98,104,.18); }
.stock-chip.is-inactive .icon { width: 12px; height: 12px; }
.item-card-body { display: flex; flex: 1; flex-direction: column; padding: 15px 16px 13px; }
.item-category { color: var(--coral-deep); font-size: .61rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.item-card-body h2 { display: -webkit-box; min-height: 2.5em; margin: 5px 0 3px; overflow: hidden; font-family: var(--font-display); font-size: 1.08rem; line-height: 1.23; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.item-card-body h2 a:hover { color: var(--coral-deep); }
.item-card-body > p { margin-bottom: 14px; color: var(--muted); font-size: .68rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.price-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: auto; }
.price-row > span { display: grid; min-width: 0; padding: 9px; background: var(--surface-soft); border-radius: 10px; }
.price-row small { color: var(--muted); font-size: .58rem; }
.price-row strong { overflow: hidden; font-size: .72rem; white-space: nowrap; text-overflow: ellipsis; }
.item-card-footer { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 8px 12px 8px 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: .59rem; letter-spacing: .06em; }
.item-card-footer a { display: grid; width: 30px; height: 30px; place-items: center; color: var(--ink); background: var(--surface-soft); border-radius: 9px; }
.item-card-footer a:hover { color: white; background: var(--navy); }
.item-card-footer .icon { width: 14px; }
.item-card-actions { display: flex; gap: 5px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 26px; }
.page-button { display: grid; width: 38px; height: 38px; place-items: center; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; font-size: .75rem; font-weight: 800; }
.page-button:hover { color: var(--coral-deep); border-color: #e3ab9b; }
.page-button.is-current { color: white; background: var(--navy); border-color: var(--navy); }
.page-button.is-disabled { opacity: .35; pointer-events: none; }
.page-gap { color: var(--muted); }

.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; color: var(--ink-soft); font-size: .76rem; font-weight: 750; }
.back-link:hover { color: var(--coral-deep); }
.back-link .icon { width: 16px; }
.item-detail { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(420px, 1.1fr); gap: clamp(28px, 4vw, 58px); padding: clamp(22px, 3vw, 40px); }
.detail-media { position: relative; display: grid; min-height: 470px; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f0ece5, #faf8f4); border: 1px solid var(--line); border-radius: 20px; }
.detail-media img { width: 100%; height: 100%; max-height: 560px; padding: 22px; object-fit: contain; }
.detail-media.is-placeholder img { padding: 0; object-fit: cover; }
.image-label { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; color: var(--ink-soft); background: rgba(255,253,249,.88); border: 1px solid rgba(217,208,196,.7); border-radius: 9px; font-size: .61rem; font-weight: 700; backdrop-filter: blur(7px); }
.image-label .icon { width: 14px; }
.detail-copy { align-self: center; }
.detail-badges { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.detail-copy h2 { margin-bottom: 3px; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -.035em; }
.detail-section { color: var(--muted); font-size: .84rem; }
.detail-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 24px 0 12px; }
.detail-stats > div { display: grid; padding: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 13px; }
.detail-stats span, .detail-stats small { color: var(--muted); font-size: .61rem; }
.detail-stats strong { margin: 3px 0; font-family: var(--font-display); font-size: 1.35rem; overflow-wrap: anywhere; }
.stock-condition-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 18px; }
.stock-condition-strip > span { display: grid; grid-template-columns: auto 1fr; column-gap: 7px; align-items: center; padding: 9px 10px; background: var(--surface-soft); border-radius: 10px; }
.stock-condition-strip i { grid-row: 1 / 3; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(0,0,0,.04); }
.stock-condition-strip i.good { background: var(--success); }
.stock-condition-strip i.maintenance { background: var(--warning); }
.stock-condition-strip i.lost { background: var(--danger); }
.stock-condition-strip strong { font-size: .7rem; }
.stock-condition-strip small { color: var(--muted); font-size: .54rem; }
.detail-notes { padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-notes > span { color: var(--ink-soft); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.detail-notes p { margin: 5px 0 0; color: var(--ink-soft); font-size: .8rem; }
.detail-actions { display: flex; gap: 9px; margin-top: 22px; flex-wrap: wrap; }
.item-detail.is-inactive { border-style: dashed; }
.item-detail.is-inactive .detail-media img { opacity: .62; filter: saturate(.45); }
.inactive-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 14px 16px; color: #6d542d; background: #f6ecd9; border: 1px solid #e7d1aa; border-radius: 14px; }
.inactive-notice > .icon { flex: 0 0 auto; width: 22px; height: 22px; }
.inactive-notice strong { display: block; font-size: .8rem; }
.inactive-notice p { margin: 1px 0 0; font-size: .68rem; }
.lifecycle-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 20px 22px; }
.lifecycle-copy { display: flex; align-items: center; gap: 13px; }
.lifecycle-icon { display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center; border-radius: 13px; }
.lifecycle-icon.is-danger { color: var(--danger); background: #f8e4e1; }
.lifecycle-icon.is-success { color: var(--success); background: #e0eee8; }
.lifecycle-copy h2 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; }
.lifecycle-copy p { max-width: 670px; margin: 2px 0 0; color: var(--muted); font-size: .68rem; }

.list-overview { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 22px 24px; }
.list-overview h2 { margin: 0 0 3px; font-family: var(--font-display); font-size: 1.45rem; }
.list-overview p { margin: 0; color: var(--muted); font-size: .76rem; }
.data-panel { overflow: hidden; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 15px 18px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { color: var(--muted); background: var(--surface-soft); font-size: .62rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.data-table td { color: var(--ink-soft); font-size: .75rem; }
.data-table td > strong, .data-table td > small { display: block; }
.data-table td > strong { color: var(--ink); font-size: .78rem; }
.data-table td > small { color: var(--muted); font-size: .64rem; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #fdfaf5; }
/* Columna de acciones fija al borde derecho del area con scroll horizontal
   (.table-scroll): en tablas anchas (p.ej. reservaciones con los botones de
   filtro en cada encabezado) los botones de accion quedaban recortados fuera
   de la vista hasta desplazarse del todo hacia la derecha. */
.data-table .actions-col { position: sticky; right: 0; z-index: 1; background: var(--surface); border-left: 1px solid var(--line); }
.data-table th.actions-col { z-index: 2; background: var(--surface-soft); }
.data-table tbody tr:hover .actions-col { background: #fdfaf5; }
/* La tabla de reservaciones tiene un encabezado por columna filtrable (texto +
   boton de filtro), asi que gana ancho extra respecto a una tabla comun; se
   recorta un poco el relleno para que quepan mas columnas sin scroll. */
.data-table[data-filterable-table] th, .data-table[data-filterable-table] td { padding-left: 13px; padding-right: 13px; }
[data-no-results-row] td { text-align: center; color: var(--muted); padding: 22px; font-size: .68rem; }
.text-right { text-align: right !important; }

/* Filtro de columna al estilo de una tabla de Excel: boton en el encabezado,
   menu flotante con ordenar / buscar / lista de valores con casillas. */
.col-header { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.col-header-right { flex-direction: row-reverse; }
.col-filter-btn { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 5px; cursor: pointer; flex: none; }
.col-filter-btn svg { width: 12px; height: 12px; }
.col-filter-btn:hover { color: var(--ink); background: rgba(0,0,0,.06); }
.col-filter-btn.is-active { color: white; background: var(--coral-deep); }
.col-filter-popover { position: fixed; z-index: 60; width: 250px; max-width: calc(100vw - 24px); display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 40px rgba(20,20,20,.18); font-size: .68rem; }
.col-filter-popover button.col-filter-action { display: flex; align-items: center; gap: 8px; padding: 8px 9px; text-align: left; color: var(--ink); background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: .68rem; font-weight: 600; }
.col-filter-popover button.col-filter-action:hover:not(:disabled) { background: var(--surface-soft); }
.col-filter-popover button.col-filter-action:disabled { color: var(--muted); cursor: not-allowed; }
.col-filter-popover hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--line); }
.col-filter-search { margin: 2px 0 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); font-size: .68rem; }
.col-filter-search:focus { outline: none; border-color: var(--coral); }
.col-filter-list { max-height: 190px; overflow-y: auto; display: grid; gap: 2px; padding: 2px 2px 2px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.col-filter-list label { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 6px; cursor: pointer; }
.col-filter-list label:hover { background: rgba(0,0,0,.04); }
.col-filter-list label.is-select-all { font-weight: 800; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 2px; }
/* El reset general de "input, select, textarea" (width:100%, min-height:43px,
   padding, borde grueso) tambien alcanza a un <input type="checkbox">, que sin
   anular esas propiedades se estira para llenar la fila y no deja espacio
   para el texto de al lado. Se neutraliza aqui con un tamaño fijo normal. */
.col-filter-list input[type="checkbox"] { flex: none; width: 15px; height: 15px; min-height: 0; padding: 0; border-width: 1px; border-radius: 4px; }
.col-filter-list span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-filter-empty { padding: 10px; color: var(--muted); text-align: center; }
.col-filter-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.col-filter-actions button { padding: 7px 14px; border-radius: 8px; font-size: .66rem; font-weight: 700; cursor: pointer; }
.col-filter-actions [data-filter-cancel] { color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); }
.col-filter-actions [data-filter-apply] { color: white; background: var(--coral-deep); border: 1px solid var(--coral-deep); }
.col-filter-actions [data-filter-apply]:disabled { opacity: .5; cursor: not-allowed; }
.date-range { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.date-range i { color: var(--coral); font-style: normal; }
.status-badge { min-height: 27px; padding: 5px 9px; }
.status-confirmed, .status-in_progress { color: var(--success); background: #e1eee9; }
.status-quote { color: var(--coral-deep); background: #fbe5de; }
.status-quote_expired { color: var(--ink-soft); background: #ece9e3; }
.status-quote_rejected { color: var(--danger); background: #f8e4e1; }
.status-draft { color: var(--warning); background: #f5ead5; }
.status-delivered { color: #2b6cb0; background: #dde9f8; }
.status-completed { color: #536e79; background: #e5ecef; }
.status-closed { color: #536e79; background: #e5ecef; }
.status-cancelled { color: var(--danger); background: #f8e4e1; }
.quote-entry td:first-child strong { color: var(--coral-deep); }
.table-action { width: 58px; }
/* Fase 2: estado financiero (con saldo / liquidada), separado del estado
   operativo de arriba -- ver "Estados separados" en la hoja de ruta. Es un
   distintivo calculado (balance_due), no una columna nueva en la base. */
.financial-badge { display: inline-flex; align-items: center; gap: 4px; width: fit-content; margin-top: 4px; padding: 3px 8px; border-radius: 999px; font-size: .6rem; font-weight: 800; white-space: nowrap; }
.financial-badge.is-settled { color: var(--success); background: #e1eee9; }
.financial-badge.is-pending { color: var(--warning); background: #f5ead5; }
/* Fase 2: devoluciones parciales -- aviso de que una reserva o recepcion aun
   tiene conceptos pendientes de conciliar en otro evento. */
.reception-partial-note { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--warning); font-size: .72rem; font-weight: 700; }
.reception-partial-note .icon { width: 14px; height: 14px; }
.table-action .icon-button { width: 34px; height: 34px; background: var(--surface-soft); }

.workflow-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.workflow-main { display: grid; gap: 16px; }
.form-section { padding: 23px; }
.form-section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.form-section-head > span { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; color: var(--coral-deep); background: #fbe7e0; border-radius: 11px; font-size: .68rem; font-weight: 850; }
.form-section-head h2 { margin: 0 0 2px; font-family: var(--font-display); font-size: 1.35rem; }
.form-section-head p { margin: 0; color: var(--muted); font-size: .7rem; }
.form-section-actions > button { margin-left: auto; }
.form-grid { display: grid; gap: 13px; margin-bottom: 13px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-span-two { grid-column: span 2; }
.field, .line-field, .line-note { display: grid; gap: 6px; min-width: 0; }
.field > span, .line-field > span { color: var(--ink-soft); font-size: .65rem; font-weight: 750; }
input, select, textarea {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fffefb;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder, textarea::placeholder { color: #a39f98; }
input:hover, select:hover, textarea:hover { border-color: #c9bbae; }
input:focus, select:focus, textarea:focus { background: white; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(237,104,72,.1); }
textarea { min-height: 94px; resize: vertical; }
.field-help { color: var(--muted); font-size: .6rem; }
.form-error { color: var(--danger); font-size: .62rem; font-weight: 750; }
input.is-invalid, select.is-invalid, textarea.is-invalid, .upload-control.is-invalid { border-color: rgba(181,72,62,.7); box-shadow: 0 0 0 3px rgba(181,72,62,.07); }
.input-prefix, .input-suffix { display: flex; align-items: center; overflow: hidden; background: #fffefb; border: 1px solid var(--line-strong); border-radius: 11px; transition: border-color .18s ease, box-shadow .18s ease; }
.input-prefix:focus-within, .input-suffix:focus-within { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(237,104,72,.1); }
.input-prefix > span, .input-suffix > span { flex: 0 0 auto; padding: 0 11px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.input-prefix input, .input-suffix input { min-width: 0; border: 0; border-radius: 0; box-shadow: none; }
.input-prefix input:focus, .input-suffix input:focus { box-shadow: none; }
.input-prefix input { padding-left: 0; }
.input-suffix input { padding-right: 0; }
.availability-explainer { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 12px 13px; color: #2f6655; background: #e8f2ed; border: 1px solid #cee2da; border-radius: 12px; }
.availability-explainer > span { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; background: #d3e8df; border-radius: 9px; }
.availability-explainer p { margin: 0; font-size: .67rem; }

.product-form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.product-form-sidebar { position: sticky; top: 132px; }
.product-media-card { padding: 17px; }
.product-preview { position: relative; display: grid; aspect-ratio: 4 / 3; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f0ece5, #faf8f4); border: 1px solid var(--line); border-radius: 15px; }
.product-preview img { width: 100%; height: 100%; padding: 12px; object-fit: contain; }
.product-preview.is-placeholder img { padding: 0; object-fit: cover; }
.product-preview > span { position: absolute; left: 9px; bottom: 9px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; color: var(--ink-soft); background: rgba(255,253,249,.9); border-radius: 8px; font-size: .58rem; font-weight: 750; }
.product-preview > span .icon { width: 12px; }
.upload-copy { margin: 14px 2px 10px; }
.upload-copy h2 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; }
.upload-copy p { margin: 2px 0 0; color: var(--muted); font-size: .64rem; }
.upload-control { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 10px 12px; color: var(--ink-soft); background: var(--surface-soft); border: 1px dashed #cdbfb0; border-radius: 12px; cursor: pointer; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.upload-control:hover { color: var(--coral-deep); background: #fff8f5; border-color: var(--coral); }
.upload-control > .icon { width: 22px; height: 22px; }
.upload-control > span { display: grid; min-width: 0; }
.upload-control strong { font-size: .7rem; }
.upload-control small { overflow: hidden; color: var(--muted); font-size: .58rem; white-space: nowrap; text-overflow: ellipsis; }
.upload-control input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.remove-image-control { display: flex; align-items: center; gap: 7px; margin: 9px 2px; color: var(--danger); font-size: .64rem; cursor: pointer; }
.remove-image-control input { width: 15px; min-height: 15px; height: 15px; padding: 0; accent-color: var(--danger); }
.current-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.current-status > span { color: var(--muted); font-size: .64rem; }
.current-status strong { display: inline-flex; align-items: center; gap: 6px; font-size: .66rem; }
.current-status strong i { width: 7px; height: 7px; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 4px currentColor; opacity: .75; }
.current-status .is-active { color: var(--success); }
.current-status .is-inactive { color: var(--danger); }
.product-media-card > .button-block { margin-top: 10px; }
.product-media-card > .button-block + .button-block { margin-top: 6px; }
.line-items { display: grid; gap: 10px; }
.optional-supplies { border-top: 3px solid #d79a43; }
.feature-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; white-space: nowrap; }
.feature-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.feature-switch > span { position: relative; width: 40px; height: 22px; background: #c7ceca; border-radius: 999px; transition: background .2s ease; }
.feature-switch > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: transform .2s ease; }
.feature-switch input:checked + span { background: #d7902f; }
.feature-switch input:checked + span::after { transform: translateX(18px); }
.feature-switch input:focus-visible + span { outline: 3px solid rgba(215,144,47,.25); outline-offset: 2px; }
.feature-switch strong { font-size: .67rem; }
.supplies-accordion { overflow: hidden; border: 1px solid #ead8bb; border-radius: 14px; background: #fffaf1; }
.supplies-accordion summary { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; color: var(--ink); font-size: .72rem; font-weight: 800; cursor: pointer; }
.supplies-accordion summary small { color: var(--muted); font-weight: 500; }
.supplies-content { display: grid; gap: 12px; padding: 0 15px 15px; }
.consumable-line { border-color: #ead8bb; background: #fffdf8; }
.supply-no-charge strong { color: #86550f; font-size: .76rem; }
.supply-badge { color: #85520e; background: #f7e8c8; }
.internal-cost { display: inline-block; margin-top: 8px; padding: 5px 9px; color: #76501b; background: #fff2d8; border-radius: 8px; font-weight: 700; }
/* Apiladas verticalmente (en vez de una fila) para que la columna de acciones
   ocupe solo el ancho del boton mas ancho, no la suma de los 2-3 botones; asi
   le deja mas espacio a las demas columnas (p.ej. Total / saldo) en la tabla
   de reservaciones, que ya de por si es ancha por los filtros de encabezado. */
.table-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; justify-content: center; }
.table-actions .button { justify-content: center; }
.line-editor { display: grid; grid-template-columns: minmax(230px, 1.7fr) 90px 115px 105px 36px; gap: 9px; align-items: end; padding: 13px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; transition: border-color .18s ease, box-shadow .18s ease; }
.line-editor.is-available { border-color: rgba(54,120,98,.45); box-shadow: 0 0 0 3px rgba(54,120,98,.06); }
.line-editor.is-unavailable { border-color: rgba(181,72,62,.5); box-shadow: 0 0 0 3px rgba(181,72,62,.07); }
.line-field input, .line-field select, .line-note input { min-height: 39px; padding: 8px 10px; background: white; font-size: .72rem; }
.line-total { align-self: stretch; align-content: center; padding: 5px 9px; background: #ece8e0; border-radius: 10px; }
.line-total strong { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; }
.line-remove { width: 36px; height: 39px; color: var(--muted); background: white; border-color: var(--line); }
.line-remove:hover { color: var(--danger); background: #f9e8e5; border-color: #e9bdb7; }
.line-remove .icon { width: 15px; }
.line-note { grid-column: 1 / -1; }
.line-note input { min-height: 35px; color: var(--ink-soft); }
.availability-status { grid-column: 1 / -1; margin: -2px 2px 0; color: var(--muted); font-size: .64rem; }
.availability-status[data-state="available"] { color: var(--success); font-weight: 750; }
.availability-status[data-state="unavailable"] { color: var(--danger); font-weight: 750; }
.availability-status[data-state="checking"] { color: var(--warning); }
.workflow-sidebar { position: sticky; top: 132px; }
.summary-card { padding: 22px; }
.summary-icon { display: grid; width: 44px; height: 44px; place-items: center; color: var(--coral-deep); background: #fbe6df; border-radius: 14px; }
.summary-card h2 { margin: 14px 0 7px; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.08; }
.summary-card > p { color: var(--muted); font-size: .72rem; }
.summary-rule { display: flex; align-items: center; gap: 7px; margin: 10px 0; color: var(--ink-soft); font-size: .65rem; }
.summary-rule i { flex: 1; border-bottom: 1px dashed var(--line-strong); }
.summary-rule strong { color: var(--ink); font-size: .65rem; }
.summary-result { padding-top: 9px; border-top: 1px solid var(--line); }
.summary-result strong { color: var(--success); }
.estimated-total { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin: 18px 0 13px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.estimated-total span { color: var(--muted); font-size: .68rem; }
.estimated-total strong { font-family: var(--font-display); font-size: 1.45rem; }
.summary-card .button-block + .button-block { margin-top: 7px; }
.form-note { display: block; margin-top: 12px; color: var(--muted); font-size: .61rem; text-align: center; }
.alert { display: flex; gap: 12px; margin-bottom: 16px; padding: 15px 18px; border-radius: 14px; }
.alert > span { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 10px; }
.alert strong { display: block; margin-bottom: 3px; }
.alert p { margin: 2px 0 0; font-size: .72rem; }
.alert-danger { color: #7f3029; background: #f9e5e2; border: 1px solid #edc6c1; }
.alert-danger > span { background: #f2ccc6; }

.document-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 20px 22px; }
.document-actions h2 { margin: 7px 0 0; font-family: var(--font-display); font-size: 1.35rem; }
.document-actions p { margin: 0; color: var(--muted); font-size: .72rem; }
.action-group { display: flex; gap: 8px; flex-wrap: wrap; }
.quote-document { padding: clamp(24px, 4vw, 48px); }
.quote-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.quote-header span { color: var(--coral-deep); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.quote-header h2 { margin: 5px 0 0; font-family: var(--font-display); font-size: 2rem; }
.quote-header img { width: 78px; height: 78px; padding: 3px; object-fit: cover; border: 1px solid var(--line); border-radius: 50%; }
.quote-meta { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.quote-meta > div { display: grid; padding: 12px; background: var(--surface-soft); border-radius: 11px; }
.quote-meta span { color: var(--muted); font-size: .61rem; }
.quote-meta strong { font-size: .76rem; }
.quote-lines { border: 1px solid var(--line); }
.product-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.product-cell img { width: 42px; height: 42px; padding: 2px; object-fit: contain; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; }
.quote-footer { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.quote-footer > div:first-child span { color: var(--muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.quote-footer p { max-width: 650px; margin: 5px 0 0; color: var(--ink-soft); font-size: .72rem; }
.quote-total { display: grid; min-width: 180px; text-align: right; }
.quote-total span { color: var(--muted); font-size: .7rem; }
.quote-total strong { font-family: var(--font-display); font-size: 2rem; }

.calendar-filter { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 20px 22px; }
.calendar-filter h2 { margin: 0; font-family: var(--font-display); font-size: 1.35rem; }
.calendar-filter form { display: flex; align-items: end; gap: 9px; }
.calendar-filter label { display: grid; gap: 3px; }
.calendar-filter label span { color: var(--muted); font-size: .6rem; font-weight: 750; }
.calendar-filter input { min-width: 142px; min-height: 39px; padding: 7px 9px; font-size: .72rem; }
.range-separator { align-self: center; color: var(--coral); }
.logistics-timeline { padding: 26px; }
.logistics-event { display: grid; grid-template-columns: 18px 62px minmax(0,1fr); gap: 16px; }
.logistics-event:not(:last-child) { padding-bottom: 24px; }
.timeline-rail { position: relative; display: flex; justify-content: center; }
.timeline-rail::after { content: ""; position: absolute; top: 15px; bottom: -25px; width: 1px; background: var(--line-strong); }
.logistics-event:last-child .timeline-rail::after { display: none; }
.timeline-rail span { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 8px; background: var(--coral); border: 3px solid #f9d4c9; border-radius: 50%; box-sizing: content-box; }
.event-date { display: grid; align-content: start; justify-items: center; padding-top: 2px; }
.event-date strong { font-family: var(--font-display); font-size: 1.65rem; line-height: 1; }
.event-date span { color: var(--coral-deep); font-size: .58rem; font-weight: 850; }
.event-date small { color: var(--muted); font-size: .57rem; }
.event-body { padding: 18px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 16px; }
.event-title { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.event-title h2 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; }
.event-title p { margin: 2px 0 0; color: var(--muted); font-size: .7rem; }
.logistics-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 15px; }
.logistics-steps > span { display: grid; grid-template-columns: auto 1fr; column-gap: 7px; align-items: center; padding: 10px; background: white; border: 1px solid var(--line); border-radius: 11px; }
.logistics-steps .icon { grid-row: 1 / 3; color: var(--coral-deep); }
.logistics-steps small { color: var(--muted); font-size: .57rem; }
.logistics-steps strong { font-size: .67rem; }

/* ---- Calendario mensual de rentas (calendar/index.php) ----
   Cada tipo de evento define su color con variables; chips, leyenda,
   detalle y conteos las reutilizan. Paleta del sistema: teal, navy, coral
   y arena. */
.rcal-type-delivery { --ev: #2d6f66; --ev-bg: #e3f0ec; --ev-line: #bfdcd4; }
.rcal-type-rental { --ev: #23454c; --ev-bg: #e4ecef; --ev-line: #c6d5db; }
.rcal-type-pickup { --ev: #a93d2a; --ev-bg: #fbe8e1; --ev-line: #f0c6b8; }
.rcal-type-quote { --ev: #8a611d; --ev-bg: #f6ecd8; --ev-line: #e5d0a2; }
.rcal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.rcal { min-width: 0; padding: 16px; }
.rcal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.rcal-search { position: relative; display: block; flex: 1 1 220px; }
.rcal-search .icon { position: absolute; top: 50%; left: 12px; width: 1rem; height: 1rem; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.rcal-search input { min-height: 40px; padding: 8px 12px 8px 36px; font-size: .74rem; border-radius: 11px; }
.rcal-select { display: block; flex: 1 1 170px; }
.rcal-select select { min-height: 40px; padding: 8px 10px; font-size: .74rem; border-radius: 11px; }
/* Primera fila de la barra: mes a la izquierda, "Hoy" a la derecha; los
   filtros quedan en la fila de abajo. */
.rcal-month-nav { display: flex; order: -1; align-items: center; gap: 4px; width: 100%; }
.rcal-month-label { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px; }
.rcal-month-label .icon { color: var(--coral-deep); }
.rcal-month-label strong { font-family: var(--font-display); font-size: 1.35rem; white-space: nowrap; }
.rcal-month-nav .button { margin-left: auto; }
.rcal-grid { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.rcal-weekdays, .rcal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.rcal-weekdays > span { padding: 10px 6px; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.rcal-weekday-short { display: none; }
.rcal-day { display: flex; flex-direction: column; gap: 5px; min-width: 0; min-height: 132px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .15s ease, box-shadow .15s ease; }
.rcal-week > .rcal-day:last-child { border-right: 0; }
.rcal-week:last-child > .rcal-day { border-bottom: 0; }
.rcal-day.is-outside { background: #faf8f4; }
.rcal-day.is-outside .rcal-day-number { color: #b3a99d; }
.rcal-day.is-outside .rcal-chip { opacity: .5; }
.rcal-day.is-selected { background: #fdf4f0; box-shadow: inset 0 0 0 2px var(--coral); }
.rcal-day-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.rcal-day-number { display: inline-grid; min-width: 26px; height: 26px; padding: 0 5px; place-items: center; color: var(--ink); border-radius: 8px; font-size: .74rem; font-weight: 800; }
.rcal-day-number:hover { background: var(--surface-soft); }
.rcal-day.is-today .rcal-day-number { color: white; background: var(--coral); }
.rcal-today-tag { color: var(--coral-deep); font-size: .54rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.rcal-chips { display: grid; gap: 4px; min-width: 0; }
.rcal-chip { display: grid; gap: 1px; width: 100%; min-width: 0; padding: 5px 7px; color: var(--ev); font: inherit; text-align: left; background: var(--ev-bg); border: 1px solid var(--ev-line); border-left: 3px solid var(--ev); border-radius: 8px; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.rcal-chip:hover { box-shadow: 0 6px 14px rgba(23,42,47,.1); transform: translateY(-1px); }
.rcal-chip:focus-visible { outline: 2px solid var(--ev); outline-offset: 1px; }
.rcal-chip-head { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: .6rem; }
.rcal-chip-head .icon { flex: none; width: .85rem; height: .85rem; }
.rcal-chip-head b { overflow: hidden; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.rcal-chip-client, .rcal-chip-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rcal-chip-client { color: var(--ink); font-size: .62rem; font-weight: 700; }
.rcal-chip-sub { color: var(--ink-soft); font-size: .56rem; }
.rcal-chip.is-done { opacity: .62; }
.rcal-chip.is-overdue { border-color: #e3aaa2; border-left-color: var(--danger); }
.rcal-chip-flag { display: inline-grid; flex: none; width: 14px; height: 14px; margin-left: auto; place-items: center; color: white; background: var(--danger); border-radius: 50%; font-size: .55rem; font-style: normal; font-weight: 900; }
.rcal-more { justify-self: start; padding: 2px 6px; color: var(--ink-soft); border-radius: 6px; font-size: .6rem; font-weight: 800; }
.rcal-more:hover { color: var(--coral-deep); background: var(--surface-soft); }
.rcal-add { display: grid; width: 28px; height: 28px; margin: 16px auto 0; place-items: center; color: #c3b8aa; border: 1px dashed transparent; border-radius: 9px; opacity: .55; transition: opacity .15s ease, color .15s ease, border-color .15s ease; }
.rcal-day:hover .rcal-add, .rcal-add:focus-visible { color: var(--coral-deep); border-color: var(--line-strong); opacity: 1; }
.rcal-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; padding: 12px 16px; color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; font-size: .68rem; }
.rcal-count { display: inline-flex; align-items: center; gap: 6px; }
.rcal-count b { color: var(--ink); }
.rcal-dot { width: 10px; height: 10px; background: var(--ev); border-radius: 50%; }
.rcal-total { display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; margin-left: auto; padding-left: 16px; border-left: 1px solid var(--line-strong); }
.rcal-total .icon { grid-row: span 2; color: var(--coral-deep); }
.rcal-total small { color: var(--muted); font-size: .58rem; }
.rcal-total strong { color: var(--ink); font-family: var(--font-display); font-size: 1.35rem; line-height: 1; }
.rcal-side { display: grid; gap: 14px; min-width: 0; }
.rcal-side > .panel { padding: 18px; }
.rcal-side h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 1.15rem; }
.rcal-legend ul, .rcal-upcoming ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rcal-legend li { display: flex; align-items: center; gap: 11px; }
.rcal-legend li strong, .rcal-legend li small { display: block; }
.rcal-legend li strong { color: var(--ev); font-size: .76rem; }
.rcal-legend li small { color: var(--muted); font-size: .64rem; }
.rcal-legend-icon, .rcal-detail-icon, .rcal-upcoming-icon { display: grid; flex: none; width: 34px; height: 34px; place-items: center; color: white; background: var(--ev); border-radius: 10px; }
.rcal-dayinfo h2 { margin-bottom: 0; }
.rcal-dayinfo-weekday { margin: 0 0 12px; color: var(--muted); font-size: .7rem; }
.rcal-detail-list { display: grid; gap: 10px; margin-bottom: 12px; }
.rcal-detail { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 11px 11px 11px 10px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--ev); border-radius: 12px; }
.rcal-detail .rcal-detail-icon { width: 30px; height: 30px; border-radius: 9px; }
.rcal-detail .rcal-detail-icon .icon { width: .95rem; height: .95rem; }
.rcal-detail-type { margin: 0; color: var(--ev); font-size: .64rem; }
.rcal-detail strong { display: block; margin-top: 1px; color: var(--ink); font-size: .78rem; }
.rcal-detail small { display: block; color: var(--ink-soft); font-size: .64rem; line-height: 1.4; }
.rcal-detail small.rcal-detail-items { color: var(--muted); }
.rcal-detail small.rcal-detail-notes { margin-top: 4px; padding: 5px 7px; background: var(--surface-soft); border-radius: 7px; font-style: italic; }
.rcal-detail-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.rcal-detail-foot .status-badge { min-height: 22px; padding: 3px 8px; font-size: .58rem; }
.rcal-detail-foot a { display: inline-flex; align-items: center; gap: 4px; color: var(--coral-deep); font-size: .66rem; font-weight: 800; }
.rcal-detail-foot a .icon { width: .85rem; height: .85rem; }
.rcal-flag { display: inline-block; padding: 1px 6px; color: white; background: var(--danger); border-radius: 999px; font-size: .56rem; font-style: normal; font-weight: 800; }
.rcal-detail.is-done { opacity: .8; }
.rcal-detail.is-done .rcal-flag { background: #7d8f95; }
.rcal-detail.is-focus { border-color: var(--ev); animation: rcal-pulse 1.1s ease-out; }
@keyframes rcal-pulse { from { box-shadow: 0 0 0 0 rgba(200,79,52,.4); } to { box-shadow: 0 0 0 10px rgba(200,79,52,0); } }
.rcal-dayinfo-empty { display: grid; justify-items: center; gap: 6px; margin: 4px 0 12px; padding: 16px; color: var(--muted); background: var(--surface-soft); border-radius: 12px; font-size: .68rem; text-align: center; }
.rcal-dayinfo-empty .icon { color: #b9aea1; }
.rcal-dayinfo-empty p { margin: 0; }
.rcal-upcoming li a { display: grid; grid-template-columns: 28px 46px minmax(0, 1fr); align-items: center; gap: 9px; padding: 4px; border-radius: 10px; }
.rcal-upcoming li a:hover { background: var(--surface-soft); }
.rcal-upcoming .rcal-upcoming-icon { width: 28px; height: 28px; border-radius: 8px; }
.rcal-upcoming .rcal-upcoming-icon .icon { width: .85rem; height: .85rem; }
.rcal-upcoming-date { color: var(--ink); font-size: .68rem; font-weight: 800; }
.rcal-upcoming-text { min-width: 0; }
.rcal-upcoming-text b, .rcal-upcoming-text small { display: block; }
.rcal-upcoming-text b { color: var(--ev); font-size: .68rem; }
.rcal-upcoming-text small { overflow: hidden; color: var(--muted); font-size: .64rem; white-space: nowrap; text-overflow: ellipsis; }
.rcal-side-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; color: var(--coral-deep); font-size: .7rem; font-weight: 800; }
.rcal-side-link .icon { width: .9rem; height: .9rem; }
@media (max-width: 1280px) {
    .rcal-layout { grid-template-columns: minmax(0, 1fr); }
    .rcal-side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
}
@media (max-width: 900px) {
    .rcal-select { flex: 1 1 140px; }
    .rcal-day { min-height: 100px; }
    .rcal-chip-sub { display: none; }
}
@media (max-width: 680px) {
    .rcal { padding: 10px; }
    .rcal-weekday-long { display: none; }
    .rcal-weekday-short { display: inline; }
    .rcal-weekdays > span { padding: 8px 2px; font-size: .56rem; letter-spacing: .02em; }
    .rcal-day { min-height: 62px; padding: 4px; gap: 4px; }
    .rcal-day-number { min-width: 22px; height: 22px; font-size: .66rem; }
    .rcal-today-tag, .rcal-add { display: none; }
    /* En telefono cada evento es un punto de color; el detalle completo
       aparece debajo, en "Eventos del dia seleccionado". */
    .rcal-chips { display: flex; flex-wrap: wrap; gap: 3px; }
    .rcal-chip { width: 9px; height: 9px; min-width: 0; min-height: 0; padding: 0; background: var(--ev); border: 0; border-radius: 50%; }
    .rcal-chip > span { display: none; }
    .rcal-chip:hover { box-shadow: none; transform: none; }
    .rcal-more { width: 100%; padding: 0; font-size: .54rem; }
    .rcal-summary { gap: 6px 12px; font-size: .62rem; }
    .rcal-total { width: 100%; margin-left: 0; padding-left: 0; border-left: 0; }
    .rcal-side { grid-template-columns: minmax(0, 1fr); }
}

.empty-state { display: grid; place-items: center; text-align: center; }
.empty-state > .icon { width: 26px; height: 26px; color: var(--coral-deep); }
.empty-state strong, .empty-state h2 { margin: 8px 0 3px; font-family: var(--font-display); }
.empty-state p { max-width: 460px; margin: 0; color: var(--muted); font-size: .72rem; }
.compact-empty { min-height: 190px; padding: 18px; }
.compact-empty .button { margin-top: 13px; }
.large-empty { min-height: 380px; padding: 42px; }
.large-empty > .icon { width: 42px; height: 42px; }
.large-empty h2 { font-size: 1.75rem; }
.large-empty .button { margin-top: 18px; }

.print-body { color: #172a2f; background: white; }
.print-sheet { max-width: 900px; margin: 0 auto; padding: 42px; background: white; }
.print-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 2px solid var(--navy); }
.print-header img { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; }
.print-header h1 { margin: 0; font-family: var(--font-display); }
.print-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px 18px; margin-bottom: 20px; }
.print-meta p { margin: 0; font-size: .8rem; }
.print-sheet table { width: 100%; border-collapse: collapse; }
.print-sheet th, .print-sheet td { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; font-size: .78rem; }
.print-sheet th { background: #f2eee7; }
.totals { display: grid; justify-items: end; gap: 10px; margin-top: 22px; }
.totals strong { font-family: var(--font-display); font-size: 1.5rem; }
.totals p { max-width: 600px; color: #526268; font-size: .74rem; text-align: right; }

.operations-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; padding: 28px 30px; overflow: hidden; color: white; background: radial-gradient(circle at 88% 20%, rgba(237,104,72,.32), transparent 13rem), linear-gradient(135deg, var(--navy-light), var(--navy)); }
.operations-hero h2 { margin: 5px 0 6px; font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); }
.operations-hero p { max-width: 650px; margin: 0; color: rgba(255,255,255,.68); font-size: .78rem; }
.operations-hero .section-kicker { color: #ffad96; }
.operations-hero-stat { display: grid; flex: 0 0 auto; width: 124px; height: 124px; place-items: center; align-content: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: inset 0 0 0 9px rgba(255,255,255,.03); }
.operations-hero-stat strong { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.operations-hero-stat span { margin-top: 5px; color: rgba(255,255,255,.62); font-size: .64rem; }
.section-block { margin-bottom: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-heading h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.45rem; }
.section-heading p { max-width: 680px; margin: 4px 0 0; color: var(--muted); font-size: .7rem; }
.padded-heading { padding: 20px 22px 4px; }
.reception-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.reception-card { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px; }
.reception-date { display: grid; width: 66px; height: 72px; place-items: center; align-content: center; color: var(--coral-deep); background: #fbe8e1; border-radius: 15px; }
.reception-date span { font-size: .58rem; font-weight: 850; letter-spacing: .12em; }
.reception-date strong { font-family: var(--font-display); font-size: 1.85rem; line-height: 1; }
.reception-card-body { min-width: 0; }
.reception-card-body h3 { margin: 2px 0; overflow: hidden; font-family: var(--font-display); font-size: 1.15rem; white-space: nowrap; text-overflow: ellipsis; }
.reception-card-body > p { margin: 0; overflow: hidden; color: var(--muted); font-size: .66rem; white-space: nowrap; text-overflow: ellipsis; }
.reception-card-meta { display: flex; gap: 12px; margin-top: 9px; color: var(--ink-soft); font-size: .62rem; }
.reception-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.reception-card-meta .icon { width: 13px; }
.reception-result { display: inline-flex; min-width: 28px; justify-content: center; margin: 2px 4px 2px 0; padding: 4px 8px; border-radius: 999px; font-size: .62rem; font-weight: 800; }
.reception-result.good { color: var(--success); background: #e4f0eb; }
.reception-result.damaged { color: var(--warning); background: #f5ead6; }
.reception-result.missing { color: var(--danger); background: #f7e3e0; }

.reception-context { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 24px 26px; border-left: 4px solid var(--coral); }
.reception-context h2 { margin: 3px 0; font-family: var(--font-display); font-size: 1.65rem; }
.reception-context p { margin: 0; color: var(--muted); font-size: .7rem; }
.context-facts { display: flex; gap: 8px; flex-wrap: wrap; }
.context-facts > span { display: grid; min-width: 130px; padding: 10px 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.context-facts small { color: var(--muted); font-size: .56rem; }
.context-facts strong { font-size: .68rem; }
.reception-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.reception-main { display: grid; gap: 24px; min-width: 0; }
.reception-sidebar { position: sticky; top: 132px; min-width: 0; }
.reception-summary-card { display: grid; gap: 12px; padding: 22px; }
.reception-summary-card .summary-icon { margin-bottom: 2px; }
.reception-summary-card h2 { margin: -4px 0 0; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.05; }
.reception-summary-card > p { margin: 0; color: var(--muted); font-size: .66rem; }
.reception-progress-card { display: grid; gap: 2px; padding: 13px; color: white; background: linear-gradient(135deg, var(--navy-light), var(--navy)); border-radius: 13px; }
.reception-progress-card small { color: rgba(255,255,255,.58); font-size: .55rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.reception-progress-card strong { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.reception-warning { display: flex; gap: 9px; align-items: flex-start; padding: 11px 12px; color: #80551c; background: #fbefdc; border: 1px solid #ead3ab; border-radius: 12px; font-size: .62rem; font-weight: 750; line-height: 1.35; }
.reception-warning .icon { width: 17px; margin-top: 1px; }
.reception-lines { display: grid; gap: 12px; }
.reception-line { position: relative; display: grid; grid-template-columns: minmax(250px, 1fr) 160px 180px auto; gap: 16px; align-items: center; padding: 17px; border-left: 4px solid transparent; transition: border-color .18s ease, box-shadow .18s ease; }
.reception-line.has-issue { border-left-color: var(--warning); box-shadow: 0 14px 36px rgba(169,117,37,.09); }
.reception-product { display: flex; align-items: center; gap: 12px; min-width: 0; }
.reception-thumb { display: grid; flex: 0 0 auto; width: 58px; height: 58px; place-items: center; overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 13px; }
.reception-thumb img { width: 100%; height: 100%; padding: 3px; object-fit: contain; }
.reception-product > div { min-width: 0; }
.reception-product h3 { margin: 2px 0; overflow: hidden; font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }
.reception-product p { margin: 0; color: var(--muted); font-size: .62rem; }
.received-control { display: grid; gap: 6px; }
.received-control > span { color: var(--ink-soft); font-size: .62rem; font-weight: 750; }
.received-control input { min-width: 0; }
.condition-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.condition-toggle > input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.toggle-track { position: relative; flex: 0 0 auto; width: 42px; height: 24px; padding: 3px; background: #c8d8d2; border-radius: 999px; transition: background .18s ease; }
.toggle-track i { display: block; width: 18px; height: 18px; background: white; border-radius: 50%; box-shadow: 0 2px 7px rgba(0,0,0,.16); transition: transform .18s ease; }
.condition-toggle input:checked + .toggle-track { background: var(--warning); }
.condition-toggle input:checked + .toggle-track i { transform: translateX(18px); }
.condition-toggle input:focus-visible + .toggle-track { outline: 3px solid rgba(237,104,72,.28); outline-offset: 2px; }
.toggle-copy { display: grid; }
.toggle-copy strong { font-size: .66rem; }
.toggle-copy small { color: var(--muted); font-size: .56rem; }
.issue-button { color: var(--warning); border-color: #e2c895; }
.line-balance { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.line-balance span { padding: 4px 8px; border-radius: 8px; font-size: .59rem; }
.line-balance .good { color: var(--success); background: #edf5f1; }
.line-balance .damaged { color: var(--warning); background: #faf0df; }
.line-balance .missing { color: var(--danger); background: #fae9e6; }
.incident-dialog { width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 32px); padding: 0; color: var(--ink); background: var(--surface); border: 0; border-radius: 20px; box-shadow: 0 30px 100px rgba(10,27,31,.34); }
.incident-dialog::backdrop { background: rgba(10,27,31,.58); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); }
.dialog-head h3 { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.3rem; }
.dialog-body { display: grid; gap: 14px; padding: 20px 22px; }
.incident-quantity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calculated-field { display: grid; align-content: center; padding: 11px 13px; background: #f8eee0; border: 1px solid #ead5b5; border-radius: 11px; }
.calculated-field > span { color: var(--ink-soft); font-size: .62rem; font-weight: 750; }
.calculated-field strong { color: var(--warning); font-family: var(--font-display); font-size: 1.5rem; }
.calculated-field small { color: var(--muted); font-size: .56rem; }
.other-status-field[hidden], [data-incident-other-detail][hidden] { display: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; background: var(--surface-soft); border-top: 1px solid var(--line); }
.reception-close { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(300px, 1.25fr); gap: 18px 28px; align-items: start; padding: 25px; }
.reception-close h2 { margin: 3px 0 6px; font-family: var(--font-display); font-size: 1.45rem; }
.reception-close p { margin: 0; color: var(--muted); font-size: .7rem; }
.reception-close .field-wide { grid-row: span 2; }
.reception-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; }
.consumable-reception-line { grid-template-columns: minmax(250px,1fr) 90px 190px 145px; border-left: 4px solid #d7902f; }
.consumable-reception-line .line-note { grid-column: 1 / -1; }
.supply-sent, .supply-consumed { display: grid; gap: 4px; }
.supply-sent span, .supply-consumed span { color: var(--muted); font-size: .57rem; font-weight: 700; }
.supply-sent strong, .supply-consumed strong { font-family: var(--font-display); font-size: 1.35rem; }
.supply-consumed strong { color: #9a5d13; }
.reception-result.consumed { color: #8a5718; background: #f7e8c8; }
.reception-totals > span { display: grid; padding: 10px; text-align: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.reception-totals strong { font-family: var(--font-display); font-size: 1.35rem; }
.reception-totals small { color: var(--muted); font-size: .56rem; }
.reception-close .form-actions { grid-column: 1 / -1; }

.receipt-summary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 18px; align-items: center; margin-bottom: 18px; padding: 24px; }
.receipt-check { display: grid; width: 56px; height: 56px; place-items: center; color: white; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 8px #e6f1ed; }
.receipt-check .icon { width: 25px; height: 25px; }
.receipt-summary h2 { margin: 2px 0; font-family: var(--font-display); font-size: 1.6rem; }
.receipt-summary p { margin: 0; color: var(--muted); font-size: .7rem; }
.receipt-meta { display: flex; gap: 8px; }
.receipt-meta > span { display: grid; min-width: 130px; padding: 9px 11px; background: var(--surface-soft); border-radius: 10px; }
.receipt-meta small { color: var(--muted); font-size: .56rem; }
.receipt-meta strong { font-size: .66rem; }
.receipt-notes { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 22px; }
.receipt-notes > div:first-child { display: flex; gap: 12px; align-items: start; }
.receipt-notes > div:first-child > .icon { color: var(--coral-deep); }
.receipt-notes small { color: var(--muted); font-size: .58rem; font-weight: 800; text-transform: uppercase; }
.receipt-notes p { max-width: 760px; margin: 4px 0 0; color: var(--ink-soft); font-size: .7rem; }

.incident-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.incident-metric { display: flex; align-items: center; gap: 14px; padding: 18px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.incident-metric > span { display: grid; width: 44px; height: 44px; place-items: center; color: var(--warning); background: #f7ecd9; border-radius: 13px; }
.incident-metric.primary { color: white; background: linear-gradient(135deg, var(--coral-deep), var(--coral)); border-color: transparent; }
.incident-metric.primary > span { color: white; background: rgba(255,255,255,.14); }
.incident-metric > div { display: grid; }
.incident-metric strong { font-family: var(--font-display); font-size: 1.7rem; line-height: 1; }
.incident-metric small { margin-top: 3px; color: inherit; font-size: .62rem; opacity: .7; }
.status-tabs { display: flex; gap: 5px; margin-bottom: 16px; padding: 7px; overflow-x: auto; }
.status-tabs a { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 11px; color: var(--muted); border-radius: 10px; font-size: .62rem; white-space: nowrap; }
.status-tabs a strong { display: grid; min-width: 21px; height: 21px; place-items: center; color: var(--ink-soft); background: var(--canvas-deep); border-radius: 50%; font-size: .55rem; }
.status-tabs a.is-active { color: white; background: var(--navy); }
.status-tabs a.is-active strong { color: var(--navy); background: white; }
.incident-list { display: grid; gap: 10px; }
.incident-card { display: grid; grid-template-columns: 80px minmax(0,1fr) 150px; gap: 16px; align-items: center; padding: 15px; border-left: 4px solid var(--warning); }
.incident-card.status-total_loss { border-left-color: var(--danger); }
.incident-card.status-resolved { border-left-color: var(--success); opacity: .82; }
.incident-image { display: grid; width: 78px; height: 78px; place-items: center; overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; }
.incident-image img { width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.incident-main { min-width: 0; }
.incident-title { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.incident-title h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.15rem; }
.incident-description { margin: 7px 0 9px; color: var(--ink-soft); font-size: .68rem; }
.incident-facts { display: flex; gap: 7px; flex-wrap: wrap; }
.incident-facts span { display: grid; min-width: 105px; padding: 6px 9px; background: var(--surface-soft); border-radius: 8px; }
.incident-facts small { color: var(--muted); font-size: .52rem; }
.incident-facts strong { font-size: .61rem; }
.incident-card-action { display: grid; justify-items: end; }
.incident-card-action > strong { font-family: var(--font-display); font-size: 1.15rem; }
.incident-card-action > small { margin-bottom: 10px; color: var(--muted); font-size: .54rem; }
.incident-status-repair { color: var(--warning); background: #f7ecd9; }
.incident-status-replacement { color: #416d89; background: #e4eef4; }
.incident-status-total_loss { color: var(--danger); background: #f8e3e0; }
.incident-status-other { color: #6d5c87; background: #eee9f5; }
.incident-status-resolved { color: var(--success); background: #e3f0eb; }
.incident-detail-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.incident-profile { position: sticky; top: 132px; padding: 18px; }
.incident-profile-image { display: grid; aspect-ratio: 4 / 3; place-items: center; margin-bottom: 14px; overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 15px; }
.incident-profile-image img { width: 100%; height: 100%; padding: 8px; object-fit: contain; }
.incident-profile > .status-badge { margin-bottom: 12px; }
.incident-profile h2 { margin: 2px 0 7px; font-family: var(--font-display); font-size: 1.4rem; }
.incident-profile > p { color: var(--ink-soft); font-size: .7rem; }
.incident-stock-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.incident-stock-strip span { display: grid; text-align: center; }
.incident-stock-strip strong { font-family: var(--font-display); font-size: 1.2rem; }
.incident-stock-strip small { color: var(--muted); font-size: .52rem; }
.incident-detail-stack { display: grid; gap: 16px; }
.incident-event-card, .incident-status-form { padding: 22px; }
.incident-event-card { display: grid; grid-template-columns: .7fr 1.3fr; gap: 20px; align-items: center; }
.incident-event-card h2, .incident-status-form h2 { margin: 3px 0; font-family: var(--font-display); font-size: 1.4rem; }
.incident-event-card p, .incident-status-form > div > p { margin: 0; color: var(--muted); font-size: .68rem; }
.incident-status-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.incident-status-form > div:first-child, .incident-status-form .field:has(textarea), .incident-status-form .form-actions { grid-column: 1 / -1; }

@media (max-width: 1420px) {
    .inventory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: 0; width: min(290px, 88vw); transform: translateX(-105%); transition: transform .24s cubic-bezier(.2,.8,.2,1); box-shadow: 24px 0 60px rgba(8,20,23,.28); }
    .menu-open .sidebar { transform: translateX(0); }
    .icon-button.sidebar-close { display: inline-grid; }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 25; display: block; width: 100%; height: 100%; padding: 0; visibility: hidden; opacity: 0; background: rgba(12,27,31,.52); border: 0; transition: opacity .2s ease, visibility .2s ease; }
    .menu-open .sidebar-overlay { visibility: visible; opacity: 1; }
    .icon-button.menu-toggle { display: inline-grid; flex: 0 0 auto; background: var(--surface); border-color: var(--line); }
    .topbar { min-height: 105px; }
    .profile-chip { display: none; }
    .daily-command { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .quick-action { grid-template-columns: auto minmax(0, 1fr); }
    .quick-action > .icon { display: none; }
    .workflow-layout { grid-template-columns: 1fr; }
    .workflow-sidebar { position: static; }
    .product-form-layout { grid-template-columns: 1fr; }
    .product-form-sidebar { position: static; }
    .product-media-card { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(260px, 1fr); column-gap: 18px; align-items: start; }
    .product-preview { grid-row: 1 / 8; }
    .summary-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
    .summary-card > .summary-icon, .summary-card > h2, .summary-card > p, .summary-card > .summary-rule, .summary-card > .estimated-total, .summary-card > .form-note { grid-column: 1 / -1; }
    .summary-card .button-block { width: auto; }
    .summary-card .button-block + .button-block { margin-top: 0; }
    .reception-grid { grid-template-columns: 1fr; }
    .incident-detail-grid { grid-template-columns: 1fr; }
    .incident-profile { position: static; display: grid; grid-template-columns: 220px 1fr; gap: 0 18px; }
    .incident-profile-image { grid-row: 1 / 7; margin: 0; }
}

@media (max-width: 900px) {
    .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .work-queue-grid { grid-template-columns: 1fr; }
    .overview-banner { grid-template-columns: 1fr; }
    .operational-alerts { grid-template-columns: 1fr; }
    .overview-visual { display: none; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .demand-panel { grid-column: auto; }
    .demand-list { grid-template-columns: 1fr; }
    .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .item-detail { grid-template-columns: 1fr; }
    .detail-media { min-height: 380px; }
    .form-grid.two-columns, .form-grid.three-columns, .form-grid.four-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .line-editor { grid-template-columns: minmax(200px, 1.5fr) 85px 110px 36px; }
    .line-total { display: none; }
    .quote-meta { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .calendar-filter { align-items: flex-start; flex-direction: column; }
    .calendar-filter form { width: 100%; }
    .calendar-filter label { flex: 1; }
    .calendar-filter input { min-width: 0; }
    .reception-form { grid-template-columns: 1fr; }
    .reception-sidebar { position: static; }
    .reception-summary-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reception-summary-card > .summary-icon, .reception-summary-card > .section-kicker, .reception-summary-card > h2, .reception-summary-card > p, .reception-progress-card, .reception-totals, .reception-warning, .reception-summary-card > .form-note { grid-column: 1 / -1; }
    .reception-line { grid-template-columns: minmax(230px,1fr) 150px 170px; }
    .consumable-reception-line { grid-template-columns: minmax(230px,1fr) 90px 180px; }
    .consumable-reception-line .supply-consumed { grid-column: 2 / 4; }
    .reception-line .issue-button { grid-column: 2 / 4; justify-self: end; }
    .incident-card { grid-template-columns: 70px minmax(0,1fr); }
    .incident-card-action { grid-column: 2; grid-row: 2; justify-items: start; }
    .incident-event-card { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .topbar { align-items: flex-start; min-height: auto; padding: 16px 16px 12px; }
    .page-heading h1 { font-size: 1.65rem; }
    .page-subtitle { display: none; }
    .topbar-actions .top-action span { display: none; }
    .topbar-actions .top-action { width: 40px; min-width: 40px; min-height: 40px; padding: 0; }
    .topbar-actions .button-secondary { display: none; }
    .page-content { padding: 5px 14px calc(102px + env(safe-area-inset-bottom, 0px)); }
    .daily-command { gap: 22px; padding: 25px 20px; border-radius: 22px; }
    .daily-command h2 { font-size: 2rem; }
    .quick-actions { grid-template-columns: 1fr; }
    .quick-action { min-height: 68px; }
    .today-workspace { padding: 15px; border-radius: 19px; }
    .workspace-head { align-items: flex-start; }
    .workspace-head p { display: none; }
    .today-stamp { margin-top: 3px; }
    .mobile-bottom-nav {
        position: fixed;
        right: 10px;
        bottom: calc(9px + env(safe-area-inset-bottom, 0px));
        left: 10px;
        z-index: 24;
        display: flex;
        min-height: 66px;
        padding: 7px;
        color: var(--ink-soft);
        background: rgba(255,253,249,.95);
        border: 1px solid rgba(217,208,196,.9);
        border-radius: 19px;
        box-shadow: 0 18px 50px rgba(16,35,39,.2);
        backdrop-filter: blur(18px);
    }
    .mobile-bottom-link {
        display: grid;
        flex: 1 1 0;
        min-width: 0;
        min-height: 50px;
        padding: 5px 3px;
        place-items: center;
        align-content: center;
        gap: 2px;
        color: var(--muted);
        background: transparent;
        border: 0;
        border-radius: 13px;
        cursor: pointer;
        font-size: .58rem;
        font-weight: 800;
    }
    .mobile-bottom-link .icon { width: 19px; height: 19px; }
    .mobile-bottom-link.is-active { color: white; background: var(--navy); }
    .overview-banner { min-height: 0; border-radius: 22px; }
    .overview-copy { padding: 28px 22px; }
    .overview-copy h2 { font-size: 2rem; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { grid-template-columns: auto 1fr auto; align-items: center; }
    .metric-card > small { grid-column: auto; max-width: 90px; text-align: right; }
    .inventory-grid { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .catalog-heading { align-items: stretch; flex-direction: column; }
    .catalog-heading .button { width: 100%; }
    .filter-button, .filter-bar .button-quiet { width: 100%; }
    .results-summary { align-items: flex-start; flex-direction: column; gap: 3px; }
    .pagination { gap: 4px; }
    .page-button { width: 34px; height: 34px; }
    .item-detail { gap: 20px; padding: 14px; }
    .detail-media { min-height: 300px; }
    .detail-stats { grid-template-columns: 1fr; }
    .stock-condition-strip { grid-template-columns: 1fr; }
    .detail-actions .button { width: 100%; }
    .list-overview, .document-actions { align-items: stretch; flex-direction: column; }
    .list-overview .button { width: 100%; }
    .action-group .button { flex: 1 1 auto; }
    .form-section { padding: 17px; }
    .form-section-head { flex-wrap: wrap; }
    .form-section-actions > button { width: 100%; margin-left: 48px; }
    .form-grid.two-columns, .form-grid.three-columns, .form-grid.four-columns { grid-template-columns: 1fr; }
    .field-span-two { grid-column: auto; }
    .line-editor { grid-template-columns: minmax(0, 1fr) 76px 36px; }
    .line-field-item { grid-column: 1 / -1; }
    .line-field:has([data-unit-price]) { grid-column: 1 / 3; }
    .line-remove { grid-column: 3; grid-row: 2; }
    .summary-card { grid-template-columns: 1fr; }
    .summary-card > *, .summary-card > .summary-icon, .summary-card > h2, .summary-card > p, .summary-card > .summary-rule, .summary-card > .estimated-total, .summary-card > .form-note { grid-column: 1; }
    .summary-card .button-block { width: 100%; }
    .product-media-card { display: block; }
    .product-preview { margin-bottom: 14px; }
    .lifecycle-panel { align-items: stretch; flex-direction: column; }
    .lifecycle-panel .button { width: 100%; }
    .quote-document { padding: 18px; }
    .quote-meta { grid-template-columns: 1fr; }
    .quote-footer { grid-template-columns: 1fr; }
    .quote-total { min-width: 0; text-align: left; }
    .calendar-filter form { display: grid; grid-template-columns: 1fr 1fr; }
    .calendar-filter form .range-separator { display: none; }
    .calendar-filter form .button { grid-column: 1 / -1; }
    .logistics-timeline { padding: 16px 12px; }
    .logistics-event { grid-template-columns: 12px 48px minmax(0,1fr); gap: 8px; }
    .event-body { padding: 13px; }
    .event-title { flex-direction: column; gap: 7px; }
    .logistics-steps { grid-template-columns: 1fr; }
    .operations-hero { align-items: flex-start; padding: 23px 20px; }
    .operations-hero-stat { width: 78px; height: 78px; }
    .operations-hero-stat strong { font-size: 1.65rem; }
    .reception-card { grid-template-columns: 58px minmax(0,1fr); gap: 11px; }
    .reception-date { width: 56px; height: 64px; }
    .reception-card > .button { grid-column: 1 / -1; width: 100%; }
    .reception-context { align-items: flex-start; flex-direction: column; padding: 20px; }
    .context-facts { width: 100%; }
    .context-facts > span { flex: 1 1 130px; }
    .reception-sidebar { order: -1; }
    .reception-summary-card { grid-template-columns: 1fr; padding: 18px; }
    .reception-summary-card > * { grid-column: 1; }
    .reception-summary-card .button-block { width: 100%; }
    .reception-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reception-line { grid-template-columns: 1fr 1fr; gap: 13px; padding: 14px; }
    .consumable-reception-line { grid-template-columns: 1fr 1fr; }
    .consumable-reception-line .supply-consumed { grid-column: auto; }
    .feature-switch { grid-column: 1 / -1; }
    .supplies-accordion summary small { display: none; }
    .reception-product { grid-column: 1 / -1; }
    .received-control, .condition-toggle { align-self: end; }
    .reception-line .issue-button { grid-column: 1 / -1; width: 100%; }
    .incident-quantity-grid { grid-template-columns: 1fr; }
    .dialog-head, .dialog-body { padding-left: 17px; padding-right: 17px; }
    .dialog-actions { padding: 12px 17px 17px; }
    .dialog-actions .button { flex: 1; }
    .reception-close { grid-template-columns: 1fr; padding: 19px; }
    .reception-close .field-wide { grid-row: auto; }
    .reception-close .form-actions { grid-column: 1; }
    .reception-close .form-actions .button { width: 100%; }
    .receipt-summary { grid-template-columns: auto 1fr; padding: 18px; }
    .receipt-meta { grid-column: 1 / -1; width: 100%; }
    .receipt-meta > span { flex: 1; min-width: 0; }
    .receipt-notes { align-items: stretch; flex-direction: column; }
    .receipt-notes .form-actions .button { width: 100%; }
    .incident-overview { grid-template-columns: 1fr; }
    .incident-card { grid-template-columns: 58px minmax(0,1fr); gap: 11px; }
    .incident-image { width: 58px; height: 58px; }
    .incident-title { flex-direction: column; gap: 6px; }
    .incident-facts span { flex: 1 1 105px; }
    .incident-card-action { grid-column: 1 / -1; }
    .incident-card-action .button { width: 100%; }
    .incident-profile { display: block; }
    .incident-profile-image { margin-bottom: 14px; }
    .incident-status-form { grid-template-columns: 1fr; padding: 18px; }
    .incident-status-form > div:first-child, .incident-status-form .field:has(textarea), .incident-status-form .form-actions { grid-column: 1; }
    .incident-status-form .form-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 760px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand-panel { min-height: 34vh; padding: 28px; }
    .auth-brand-panel img { width: 64px; height: 64px; margin-bottom: 55px; }
    .auth-brand-panel h1 { font-size: 2.35rem; }
    .auth-form-panel { padding: 20px; }
    .account-security-card { grid-template-columns: 1fr; gap: 20px; }
}

@media print {
    body { background: white !important; }
    .app-shell, .topbar, .sidebar { display: block; }
    .mobile-bottom-nav { display: none !important; }
    .print-sheet { max-width: none; padding: 0; }
    .print-body .button { display: none; }
}

/* Customer trust and risk workspace */
.text-danger { color: var(--danger) !important; }
.customer-directory-head { display: grid; grid-template-columns: 1fr minmax(300px, .8fr) auto; gap: 18px; align-items: center; padding: 22px; }
.customer-directory-head h2 { margin: 3px 0; font-family: var(--font-display); font-size: 1.55rem; }
.customer-directory-head p { margin: 0; color: var(--muted); font-size: .68rem; }
.customer-search { display: flex; gap: 8px; }
.customer-search label { display: flex; flex: 1; align-items: center; gap: 8px; padding: 0 11px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.customer-search input { width: 100%; min-width: 0; padding: 10px 0; background: transparent; border: 0; outline: 0; font-size: .7rem; }
.customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; margin-top: 16px; }
.customer-card { display: grid; gap: 15px; padding: 18px; border-top: 4px solid var(--line-strong); }
.score-border-vip { border-top-color: #bd8a2b; }
.score-border-standard { border-top-color: #4a7784; }
.score-border-incidents { border-top-color: var(--warning); }
.score-border-risk { border-top-color: var(--danger); }
.customer-card header { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.customer-avatar, .customer-profile-avatar { display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--navy-light), var(--navy)); font-family: var(--font-display); font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.customer-avatar { width: 52px; height: 52px; border-radius: 15px; font-size: 1.05rem; }
.customer-card h2 { margin: 5px 0 1px; font-family: var(--font-display); font-size: 1.08rem; }
.customer-card header p { margin: 0; color: var(--muted); font-size: .59rem; }
.score-badge { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: .52rem; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.score-vip { color: #77530e; background: #f5e6c2; }
.score-standard { color: #365d69; background: #e1edf0; }
.score-incidents { color: #805812; background: #f7ecd9; }
.score-risk { color: #963b33; background: #f8e3e0; }
.customer-card-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.customer-card-metrics span { display: grid; padding: 8px; background: var(--surface-soft); border-radius: 9px; }
.customer-card-metrics small { color: var(--muted); font-size: .49rem; }
.customer-card-metrics strong { font-size: .72rem; }
.score-action { margin: 0; color: var(--ink-soft); font-size: .6rem; line-height: 1.5; }
.customer-card footer { display: flex; justify-content: flex-end; gap: 7px; align-items: center; }
.customer-whatsapp { color: white; background: #2d8b68; border-color: #2d8b68; }
.customer-form-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 18px; align-items: start; }
.customer-form-main { min-width: 0; }
.customer-form-side { position: sticky; top: 132px; }
.risk-policy-card { padding: 22px; }
.risk-policy-card h2 { margin: 10px 0 4px; font-family: var(--font-display); font-size: 1.35rem; }
.risk-policy-card > p { margin-bottom: 16px; color: var(--muted); font-size: .65rem; }
.manual-block-toggle { display: flex; gap: 9px; align-items: center; margin: 13px 0; padding: 12px; color: var(--danger); background: #f8e3e0; border-radius: 10px; font-size: .65rem; font-weight: 800; }
.customer-profile-hero { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 22px; border-top-width: 5px; }
.customer-profile-avatar { width: 76px; height: 76px; border-radius: 20px; font-size: 1.5rem; }
.customer-profile-copy h2 { margin: 5px 0 1px; font-family: var(--font-display); font-size: 1.65rem; }
.customer-profile-copy p { margin: 0; color: var(--ink-soft); font-size: .66rem; }
.customer-profile-copy > small { display: block; margin-top: 6px; color: var(--muted); font-size: .58rem; }
.customer-profile-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.customer-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 11px; margin: 14px 0; }
.customer-kpis article { display: flex; gap: 12px; align-items: center; padding: 15px; }
.customer-kpis article > span { display: grid; width: 42px; height: 42px; place-items: center; color: var(--coral-deep); background: #f9e7e0; border-radius: 12px; }
.customer-kpis article > div { display: grid; }
.customer-kpis small { color: var(--muted); font-size: .5rem; }
.customer-kpis strong { font-family: var(--font-display); font-size: 1.3rem; }
.customer-kpis p { margin: 1px 0 0; color: var(--ink-soft); font-size: .51rem; }
.customer-section-nav { position: sticky; z-index: 8; top: 104px; display: flex; gap: 5px; padding: 7px; overflow-x: auto; }
.customer-section-nav a { flex: 1; min-width: 145px; padding: 9px 12px; color: var(--ink-soft); background: var(--surface-soft); border-radius: 9px; text-align: center; font-size: .61rem; font-weight: 800; }
.customer-section-nav a:hover { color: white; background: var(--navy); }
.customer-section { padding-top: 24px; scroll-margin-top: 165px; }
.customer-general-grid { display: grid; grid-template-columns: .8fr 1.1fr 1.1fr; gap: 13px; align-items: start; }
.customer-contact-card, .customer-list-card { padding: 19px; }
.customer-contact-card h3, .customer-list-card h3, .customer-history-grid h3, .deposit-ledger h3 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.customer-contact-card dl { display: grid; gap: 11px; margin: 16px 0 0; }
.customer-contact-card dl div { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.customer-contact-card dt { color: var(--muted); font-size: .52rem; font-weight: 800; text-transform: uppercase; }
.customer-contact-card dd { margin: 3px 0 0; color: var(--ink-soft); font-size: .66rem; }
.customer-list-card > header, .deposit-ledger > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.customer-list-card header p, .deposit-ledger header p { margin: 2px 0 0; color: var(--muted); font-size: .57rem; }
.customer-list-card header > span { display: grid; width: 32px; height: 32px; place-items: center; color: var(--coral-deep); background: #f9e7e0; border-radius: 9px; font-weight: 900; }
.customer-list-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.customer-list-row > span { display: grid; width: 34px; height: 34px; place-items: center; color: var(--teal); background: #e4efec; border-radius: 9px; }
.customer-list-row > div { display: grid; min-width: 0; }
.customer-list-row strong { font-size: .67rem; }
.customer-list-row small { color: var(--muted); font-size: .56rem; }
.customer-list-row p { margin: 2px 0 0; color: var(--ink-soft); font-size: .55rem; }
.inline-create { margin-top: 12px; border: 1px dashed var(--line-strong); border-radius: 11px; }
.inline-create summary { display: flex; align-items: center; gap: 7px; padding: 11px; cursor: pointer; color: var(--coral-deep); font-size: .62rem; font-weight: 900; list-style: none; }
.inline-create[open] summary { border-bottom: 1px dashed var(--line-strong); }
.inline-create form { padding: 13px; }
.check-line { display: flex; gap: 7px; align-items: center; margin: 9px 0; font-size: .58rem; }
.customer-history-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 13px; align-items: start; }
.customer-history-grid article { min-width: 0; padding: 18px; }
.customer-history-grid article > h3 { margin-bottom: 12px; }
.inline-payment { display: flex; width: 125px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.inline-payment input { width: 88px; min-width: 0; padding: 6px; border: 0; outline: 0; font-size: .61rem; }
.inline-payment button { display: grid; width: 35px; place-items: center; color: var(--coral-deep); background: var(--surface-soft); border: 0; cursor: pointer; }
.customer-finance-grid { display: grid; grid-template-columns: 330px minmax(0,1fr); gap: 13px; align-items: start; }
.finance-balance-card { display: grid; padding: 22px; color: white; background: linear-gradient(145deg, var(--navy-light), var(--navy)); }
.finance-balance-card > span { display: grid; width: 45px; height: 45px; place-items: center; color: white; background: rgba(255,255,255,.12); border-radius: 13px; }
.finance-balance-card > small { margin-top: 16px; font-size: .57rem; opacity: .7; }
.finance-balance-card > strong { font-family: var(--font-display); font-size: 2.35rem; }
.finance-balance-card > div { display: grid; gap: 5px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); }
.finance-balance-card > div span { display: flex; justify-content: space-between; font-size: .58rem; }
.finance-balance-card p { margin: 15px 0 0; font-size: .58rem; opacity: .75; }
.deposit-ledger { padding: 19px; }
.deposit-ledger header > strong { color: var(--success); font-family: var(--font-display); }
.deposit-row { display: grid; grid-template-columns: minmax(130px,1fr) 135px minmax(160px,1fr) 38px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.deposit-row > div { display: grid; }
.deposit-row > div strong { font-size: .7rem; }
.deposit-row > div small { color: var(--muted); font-size: .52rem; }
.deposit-row select, .deposit-row input { min-width: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: .58rem; }

@media (max-width: 1120px) {
    .customer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .customer-form-layout { grid-template-columns: 1fr; }
    .customer-form-side { position: static; }
    .customer-general-grid { grid-template-columns: 1fr 1fr; }
    .customer-contact-card { grid-column: 1 / -1; }
    .customer-kpis { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 900px) {
    .customer-directory-head { grid-template-columns: 1fr auto; }
    .customer-search { grid-column: 1 / -1; grid-row: 2; }
    .customer-profile-hero { grid-template-columns: auto 1fr; }
    .customer-profile-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .customer-history-grid, .customer-finance-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .customer-directory-head { grid-template-columns: 1fr; padding: 18px; }
    .customer-directory-head > .button, .customer-search { grid-column: 1; grid-row: auto; width: 100%; }
    .customer-search { flex-direction: column; }
    .customer-grid { grid-template-columns: 1fr; }
    .customer-card footer .button { flex: 1; }
    .customer-profile-hero { grid-template-columns: 58px 1fr; padding: 17px; }
    .customer-profile-avatar { width: 58px; height: 58px; border-radius: 16px; font-size: 1.1rem; }
    .customer-profile-copy h2 { font-size: 1.3rem; }
    .customer-profile-actions .button { flex: 1 1 145px; }
    .customer-kpis { grid-template-columns: 1fr; }
    .customer-section-nav { top: 89px; margin-left: -14px; margin-right: -14px; border-radius: 0; }
    .customer-general-grid { grid-template-columns: 1fr; }
    .customer-contact-card { grid-column: 1; }
    .section-heading:has(.action-group) { align-items: stretch; flex-direction: column; }
    .section-heading .action-group .button { flex: 1; }
    .deposit-row { grid-template-columns: 1fr 1fr 38px; }
    .deposit-row > div { grid-column: 1 / -1; }
    .deposit-row > input { grid-column: 1 / 3; }
}

/* Incident notes */
.note-context { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px; }
.note-context h2 { margin: 3px 0; font-family: var(--font-display); font-size: 1.55rem; }
.note-context p { margin: 0; color: var(--muted); font-size: .7rem; }
.incident-note-form { display: grid; min-width: 0; gap: 18px; }
.note-builder { min-width: 0; padding: 22px; }
.note-builder .table-scroll { width: 100%; max-width: 100%; }
.note-lines-table .product-cell img { width: 52px; height: 52px; }
.note-lines-table .product-cell small { max-width: 520px; }
.compact-money { display: inline-flex; align-items: center; width: 150px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; }
.compact-money:focus-within { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(215,100,72,.1); }
.compact-money i { padding-left: 11px; color: var(--muted); font-style: normal; font-weight: 800; }
.compact-money input { width: 100%; padding: 9px 10px 9px 5px; background: transparent; border: 0; outline: 0; font-weight: 800; }
.note-issuance-grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 18px; align-items: start; }
.note-terms, .note-total-card { min-width: 0; padding: 24px; }
.note-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.note-terms > div, .note-terms .field:has(textarea) { grid-column: 1 / -1; }
.note-terms h2, .note-total-card h2 { margin: 3px 0; font-family: var(--font-display); }
.note-terms > div p { margin: 0; color: var(--muted); font-size: .68rem; }
.note-total-card { position: sticky; top: 132px; display: grid; }
.note-total-card > strong { margin: 7px 0 3px; color: var(--coral-deep); font-family: var(--font-display); font-size: 2.6rem; }
.note-total-card > p { margin: 0 0 18px; color: var(--muted); font-size: .65rem; }
.debt-toggle { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: center; padding: 14px; cursor: pointer; background: #f7ecd9; border: 1px solid #e6c894; border-radius: 13px; }
.debt-toggle > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.debt-toggle > span:first-of-type { display: grid; width: 42px; height: 42px; place-items: center; color: var(--warning); background: white; border-radius: 11px; }
.debt-toggle > span:last-child { display: grid; }
.debt-toggle strong { font-size: .7rem; }
.debt-toggle small { margin-top: 2px; color: var(--ink-soft); font-size: .56rem; line-height: 1.45; }
.debt-toggle:has(input:not(:checked)) { opacity: .62; filter: grayscale(.5); }
.note-total-card .form-actions { margin-top: 18px; }
.incident-note-document { padding: clamp(22px, 4vw, 46px); }
.note-document-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-bottom: 18px; border-bottom: 2px solid var(--navy); }
.note-brand { display: flex; align-items: center; gap: 13px; }
.note-brand img { width: 74px; height: 74px; padding: 3px; object-fit: cover; border: 1px solid var(--line); border-radius: 50%; }
.note-brand > div { display: grid; }
.note-brand span, .note-folio span { color: var(--coral-deep); font-size: .6rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.note-brand strong { font-family: var(--font-display); font-size: 1.6rem; }
.note-brand small, .note-folio small { color: var(--muted); font-size: .62rem; }
.note-folio { display: grid; justify-items: end; text-align: right; }
.note-folio strong { margin: 4px 0; font-family: var(--font-display); font-size: 1.4rem; }
.note-document-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 20px 0; }
.note-document-meta > span { display: grid; padding: 10px 12px; background: var(--surface-soft); border-radius: 9px; }
.note-document-meta small { color: var(--muted); font-size: .54rem; text-transform: uppercase; }
.note-document-meta strong { margin-top: 2px; font-size: .67rem; }
.note-document-lines { border: 1px solid var(--line); }
.note-document-footer { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.note-document-footer > div:first-child span { color: var(--muted); font-size: .6rem; font-weight: 900; text-transform: uppercase; }
.note-document-footer p { max-width: 650px; margin: 5px 0 0; color: var(--ink-soft); font-size: .68rem; }
.note-document-total { display: grid; min-width: 210px; justify-items: end; }
.note-document-total span, .note-document-total small { color: var(--muted); font-size: .6rem; }
.note-document-total strong { color: var(--coral-deep); font-family: var(--font-display); font-size: 2.1rem; }
.faltantes-document-header { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding-bottom: 28px; }
.faltantes-logo { display: grid; width: 128px; height: 128px; padding: 12px; place-items: center; overflow: hidden; background: #f5822a; }
.faltantes-logo img { width: 100%; height: 100%; padding: 4px; object-fit: contain; background: white; border-radius: 50%; }
.faltantes-document-header h2 { margin: 0; font-family: var(--font-body); font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.faltantes-document-header p { margin: 5px 0 0; color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.faltantes-folio { display: grid; justify-items: end; align-self: start; padding: 10px 0; text-align: right; }
.faltantes-folio small { color: var(--muted); font-size: .55rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.faltantes-folio strong { margin: 3px 0; font-size: .75rem; }
.faltantes-folio span { color: var(--muted); font-size: .6rem; }
.faltantes-client { margin: 2px 0 0; padding: 13px 5px; border-bottom: 2px solid var(--ink); }
.faltantes-client > strong { display: block; font-size: 1rem; font-weight: 900; text-transform: uppercase; }
.faltantes-client > div { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 3px; color: var(--muted); font-size: .6rem; }
.faltantes-client > div span + span::before { margin-right: 16px; content: "·"; }
.faltantes-lines { border: 1px solid var(--ink); border-top: 0; }
.faltantes-lines th, .faltantes-lines td { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.faltantes-lines th:last-child, .faltantes-lines td:last-child { border-right: 0; }
.faltantes-lines th { color: var(--ink); background: #e2e2e2; font-size: .68rem; font-weight: 700; vertical-align: bottom; }
.faltantes-lines th:first-child, .faltantes-lines td:first-child { width: 15%; text-align: center; }
.faltantes-lines th:nth-child(2) { width: 45%; }
.faltantes-lines th:nth-child(3), .faltantes-lines th:nth-child(4) { width: 20%; }
.faltantes-lines td { padding-top: 11px; padding-bottom: 11px; font-size: .74rem; }
.faltantes-lines td small { display: block; margin-top: 2px; color: var(--muted); font-size: .55rem; }
.currency-value { display: grid; grid-template-columns: 18px 1fr; gap: 4px; align-items: center; }
.currency-value i { font-style: normal; font-weight: 500; text-align: left; }
.faltantes-document-footer { display: grid; grid-template-columns: 1fr minmax(230px, 32%); gap: 28px; align-items: start; margin-top: 28px; }
.faltantes-document-footer > div:first-child > span { color: var(--muted); font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.faltantes-document-footer p { margin: 5px 0 0; color: var(--ink-soft); font-size: .66rem; }
.faltantes-grand-total { display: grid; grid-template-columns: auto 1fr; align-items: center; padding: 11px 14px; background: #e2e2e2; }
.faltantes-grand-total > span { font-size: .82rem; font-weight: 900; text-transform: uppercase; }
.faltantes-grand-total > strong { display: grid; grid-template-columns: 20px 1fr; gap: 5px; justify-self: end; font-size: 1rem; }
.faltantes-grand-total i { font-style: normal; }
.faltantes-grand-total small { grid-column: 1 / -1; justify-self: end; color: var(--muted); font-size: .54rem; }
.note-status-pending { color: var(--danger); background: #f8e3e0; }
.note-status-paid, .note-status-replaced { color: var(--success); background: #e3f0eb; }
.note-status-informative, .note-status-waived { color: #416d89; background: #e4eef4; }
.note-financial-panel { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); gap: 24px; align-items: center; margin-top: 18px; padding: 22px; }
.note-financial-panel h2 { margin: 3px 0; font-family: var(--font-display); font-size: 1.4rem; }
.note-financial-panel p { margin: 0; color: var(--muted); font-size: .66rem; }
.note-financial-panel > div > small { display: block; margin-top: 7px; color: var(--ink-soft); font-size: .58rem; }
.note-settlement-form { display: grid; grid-template-columns: .65fr 1.35fr auto; gap: 12px; align-items: end; }
.note-settlement-form .button { margin-bottom: 1px; }
.incident-note-link { margin-top: 12px !important; }
.incident-card-action .button + .button { margin-top: 6px; }
.reservation-debt { display: block; margin-top: 3px; color: var(--danger); font-size: .58rem; font-weight: 900; }
.reservation-debt:hover { color: var(--coral-deep); text-decoration: underline; }
.print-note-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 2px solid #304a4f; }
.print-note-brand { display: flex; align-items: center; gap: 13px; }
.print-note-brand img { width: 78px; height: 78px; object-fit: cover; border-radius: 50%; }
.print-note-brand > div, .print-note-folio { display: grid; }
.print-note-brand strong { font-size: 1.35rem; letter-spacing: .08em; }
.print-note-brand span, .print-note-brand small, .print-note-folio span, .print-note-folio small { color: #657579; font-size: .65rem; }
.print-note-folio { justify-items: end; }
.print-note-folio strong { margin: 4px 0; color: #b95039; font-size: 1.2rem; }
.print-note-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin: 22px 0; }
.print-note-meta p { margin: 0; font-size: .72rem; }
.print-note-lines th { color: white; background: #657173; }
.print-note-lines td small { display: block; margin-top: 2px; color: #657579; font-size: .62rem; }
.print-note-summary { display: grid; grid-template-columns: 1fr 220px; gap: 25px; margin-top: 22px; }
.print-note-summary > div:first-child { padding: 13px; border: 1px solid #d8d8d8; }
.print-note-summary p { margin: 5px 0 0; font-size: .7rem; }
.print-note-summary > div:last-child { display: grid; align-content: center; padding: 14px; color: white; background: #657173; text-align: right; }
.print-note-summary > div:last-child strong { font-size: 1.65rem; }
.print-note-summary > div:last-child small { font-size: .62rem; }
.print-note-legend { margin: 20px 0 30px; color: #657579; font-size: .62rem; line-height: 1.5; }
.print-note-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; margin-top: 50px; text-align: center; }
.print-note-signatures span { display: grid; }
.print-note-signatures i { border-top: 1px solid #6b7476; }
.print-note-signatures strong { margin-top: 6px; font-size: .65rem; }
.print-note-signatures small { color: #657579; font-size: .62rem; }
.print-faltantes-header { display: grid; grid-template-columns: 138px 1fr auto; gap: 24px; align-items: center; min-height: 150px; padding-bottom: 24px; }
.print-faltantes-logo { display: grid; width: 138px; height: 138px; padding: 12px; place-items: center; background: #f5822a; }
.print-faltantes-logo img { width: 100%; height: 100%; padding: 4px; object-fit: contain; background: white; border-radius: 50%; }
.print-faltantes-header h1 { margin: 0; font-family: Arial, sans-serif; font-size: 18pt; font-weight: 800; }
.print-faltantes-header p { margin: 5px 0 0; color: #666; font-size: 7pt; font-weight: 700; letter-spacing: .13em; }
.print-faltantes-header > div:last-child { display: grid; justify-items: end; align-self: start; padding-top: 10px; }
.print-faltantes-header > div:last-child small { color: #777; font-size: 7pt; font-weight: 700; }
.print-faltantes-header > div:last-child strong { margin: 4px 0; font-size: 8pt; }
.print-faltantes-header > div:last-child span { color: #777; font-size: 7pt; }
.print-faltantes-client { padding: 12px 4px 8px; border-bottom: 1.5px solid #111; }
.print-faltantes-client > strong { display: block; font-size: 12pt; font-weight: 800; text-transform: uppercase; }
.print-faltantes-client > div { display: flex; gap: 14px; margin-top: 3px; color: #666; font-size: 7pt; }
.print-faltantes-lines { border: 1px solid #111; border-top: 0; }
.print-faltantes-lines th, .print-faltantes-lines td { border-right: 1px solid #111; border-bottom: 1px solid #111; }
.print-faltantes-lines th:last-child, .print-faltantes-lines td:last-child { border-right: 0; }
.print-faltantes-lines th { color: #111; background: #e2e2e2; font-size: 9pt; font-weight: 500; vertical-align: bottom; }
.print-faltantes-lines th:first-child, .print-faltantes-lines td:first-child { width: 18%; text-align: center; }
.print-faltantes-lines th:nth-child(2) { width: 44%; }
.print-faltantes-lines th:nth-child(3), .print-faltantes-lines th:nth-child(4) { width: 19%; }
.print-faltantes-lines td { padding: 6px 8px; font-size: 9pt; }
.print-faltantes-lines td:nth-child(3), .print-faltantes-lines td:nth-child(4) { text-align: right; }
.print-currency { display: grid; grid-template-columns: 16px 1fr; align-items: center; }
.print-currency i { font-style: normal; text-align: left; }
.print-currency b { font-weight: 400; text-align: right; }
.print-faltantes-summary { display: grid; grid-template-columns: 1fr 255px; gap: 30px; margin-top: 30px; }
.print-faltantes-summary > div:first-child { padding-top: 8px; }
.print-faltantes-summary > div:first-child strong { font-size: 7pt; }
.print-faltantes-summary > div:first-child p { margin: 4px 0 0; color: #555; font-size: 7pt; }
.print-faltantes-summary > div:last-child { display: grid; grid-template-columns: auto 1fr; align-items: center; padding: 8px 12px; background: #e2e2e2; }
.print-faltantes-summary > div:last-child > span { font-size: 10pt; font-weight: 800; }
.print-faltantes-summary > div:last-child > strong { display: grid; grid-template-columns: 20px 1fr; justify-self: end; font-size: 11pt; }
.print-faltantes-summary i { font-style: normal; }
.print-faltantes-summary small { grid-column: 1 / -1; justify-self: end; color: #666; font-size: 6pt; }

@media (max-width: 900px) {
    .note-issuance-grid, .note-financial-panel { grid-template-columns: 1fr; }
    .note-total-card { position: static; }
    .note-settlement-form { grid-template-columns: 1fr 1fr; }
    .note-settlement-form .button { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .note-context { align-items: flex-start; flex-direction: column; padding: 19px; }
    .note-context .context-facts { width: 100%; }
    .note-builder { padding: 16px; }
    .note-terms { grid-template-columns: 1fr; padding: 19px; }
    .note-terms > div, .note-terms .field:has(textarea) { grid-column: 1; }
    .note-total-card { padding: 19px; }
    .note-total-card > strong { font-size: 2.2rem; }
    .note-total-card .form-actions .button { width: 100%; }
    .incident-note-document { padding: 17px; }
    .note-document-header { align-items: flex-start; }
    .note-brand img { width: 54px; height: 54px; }
    .note-brand strong { font-size: 1.2rem; }
    .note-folio strong { font-size: 1rem; }
    .note-document-meta { grid-template-columns: 1fr 1fr; }
    .note-document-footer { grid-template-columns: 1fr; }
    .note-document-total { justify-items: start; }
    .note-settlement-form { grid-template-columns: 1fr; }
    .note-settlement-form .button { grid-column: 1; width: 100%; }
    .faltantes-document-header { grid-template-columns: 82px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; }
    .faltantes-logo { width: 82px; height: 82px; padding: 8px; }
    .faltantes-document-header h2 { font-size: 1.05rem; }
    .faltantes-document-header p { font-size: .5rem; }
    .faltantes-folio { grid-column: 1 / -1; grid-row: 2; align-items: center; justify-items: start; grid-template-columns: auto auto 1fr; gap: 7px; width: 100%; padding: 8px 10px; background: var(--surface-soft); border-radius: 8px; text-align: left; }
    .faltantes-folio span { justify-self: end; }
    .faltantes-client > div { display: grid; gap: 2px; }
    .faltantes-client > div span + span::before { display: none; }
    .faltantes-document-footer { grid-template-columns: 1fr; }
    .faltantes-grand-total { width: 100%; }
}

@media print {
    @page { size: letter; margin: 13mm; }
    .incident-note-print { font-size: 10pt; }
}

/* Cobros / Caja */
.cashbox-hero { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 16px; padding: 24px; background: linear-gradient(125deg, var(--navy), #294e52); color: white; }
.cashbox-hero h2 { margin: 3px 0; font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.5rem); }
.cashbox-hero p { margin: 0; color: rgba(255,255,255,.7); font-size: .68rem; }
.cashbox-hero .section-kicker { color: #efb29d; }
.cashbox-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.cashbox-table-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 20px; }
.cashbox-table-head h2 { margin: 3px 0 0; font-family: var(--font-display); }
.cashbox-filter { display: flex; gap: 8px; align-items: center; }
.cashbox-filter input { min-width: 140px; padding: 9px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-size: .65rem; }
.cashbox-sidebar { position: sticky; top: 128px; display: grid; gap: 14px; }
.receivable-card { display: grid; padding: 22px; }
.receivable-card > strong { margin: 7px 0 2px; color: var(--danger); font-family: var(--font-display); font-size: 2.15rem; }
.receivable-card > p { margin: 0 0 16px; color: var(--muted); font-size: .62rem; }
.receivable-card > div { display: grid; gap: 7px; margin-bottom: 18px; padding: 13px; background: var(--surface-soft); border-radius: 11px; }
.receivable-card > div span { display: flex; justify-content: space-between; gap: 8px; font-size: .61rem; }
.cash-closure-card { display: grid; padding: 20px; }
.cash-closure-card h3 { margin: 7px 0 2px; font-family: var(--font-display); }
.cash-closure-card > strong { font-family: var(--font-display); font-size: 1.8rem; }
.cash-closure-card > p, .cash-closure-card > small { margin: 2px 0; color: var(--muted); font-size: .57rem; }
.cash-closure-card form { display: grid; gap: 9px; margin-top: 14px; }
.cash-closure-card .reopen-alert { padding: 9px; color: var(--warning); background: #f7ecd9; border-radius: 8px; }
.payment-concept { display: inline-flex; padding: 4px 7px; color: var(--navy); background: #e7efef; border-radius: 6px; font-size: .55rem; font-weight: 900; text-transform: uppercase; }
.payment-status-confirmed { color: var(--success); background: #e3f0eb; }
.payment-status-voided { color: var(--danger); background: #f8e3e0; }
.text-strike { text-decoration: line-through; }
.text-muted { color: var(--muted) !important; }

.payment-form { display: grid; gap: 18px; }
.payment-builder { padding: 24px; }
.payment-builder .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .66rem; }
.payment-concept-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.payment-concept-option { cursor: pointer; }
.payment-concept-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.payment-concept-option > span { display: grid; min-height: 120px; align-content: start; padding: 16px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; transition: .18s ease; }
.payment-concept-option .icon { width: 23px; height: 23px; margin-bottom: 13px; color: var(--coral-deep); }
.payment-concept-option strong { font-size: .7rem; }
.payment-concept-option small { margin-top: 4px; color: var(--muted); font-size: .55rem; line-height: 1.45; }
.payment-concept-option input:checked + span { background: #fff6f1; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(215,100,72,.1); transform: translateY(-2px); }
.payment-targets { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.payment-targets > [hidden], [data-deposit-selector][hidden] { display: none; }
.payment-entry-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; align-items: start; }
.payment-amount-field .money-input { display: grid; grid-template-columns: auto 1fr; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 11px; }
.payment-amount-field .money-input:focus-within { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(215,100,72,.1); }
.payment-amount-field .money-input i { padding-left: 13px; color: var(--coral-deep); font-style: normal; font-weight: 900; }
.payment-amount-field .money-input input { border: 0; outline: 0; }
.payment-amount-field > small { min-height: 14px; color: var(--success); font-size: .54rem; }
.payment-confirm-card { position: sticky; top: 128px; display: grid; justify-items: start; padding: 24px; color: white; background: linear-gradient(145deg, var(--navy), #294d51); }
.payment-confirm-card > span { display: grid; width: 46px; height: 46px; margin-bottom: 14px; place-items: center; color: white; background: rgba(255,255,255,.12); border-radius: 13px; }
.payment-confirm-card > small { color: #efb29d; font-size: .55rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.payment-confirm-card h2 { margin: 5px 0; font-family: var(--font-display); }
.payment-confirm-card p { margin: 0 0 20px; color: rgba(255,255,255,.7); font-size: .62rem; line-height: 1.6; }
.payment-confirm-card .button-secondary { margin-top: 7px; color: white; background: transparent; border-color: rgba(255,255,255,.25); }

.payment-receipt { position: relative; overflow: hidden; padding: clamp(24px, 4vw, 48px); }
.payment-receipt > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 2px solid var(--navy); }
.payment-receipt-brand { display: flex; align-items: center; gap: 13px; }
.payment-receipt-brand img { width: 76px; height: 76px; object-fit: cover; border-radius: 50%; }
.payment-receipt-brand > div, .payment-receipt-folio { display: grid; }
.payment-receipt-brand span { color: var(--coral-deep); font-size: .58rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.payment-receipt-brand strong { font-family: var(--font-display); font-size: 1.55rem; }
.payment-receipt-brand small, .payment-receipt-folio small, .payment-receipt-folio span { color: var(--muted); font-size: .58rem; }
.payment-receipt-folio { justify-items: end; }
.payment-receipt-folio strong { margin: 4px 0; font-size: .78rem; }
.payment-receipt-client { display: grid; margin-top: 24px; }
.payment-receipt-client small, .payment-receipt-details small, .payment-receipt footer small { color: var(--muted); font-size: .55rem; font-weight: 900; text-transform: uppercase; }
.payment-receipt-client strong { margin: 4px 0; font-size: 1rem; }
.payment-receipt-client span { color: var(--muted); font-size: .62rem; }
.payment-receipt-amount { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 10px; margin: 24px 0; padding: 22px; color: white; background: linear-gradient(120deg, var(--coral-deep), var(--coral)); border-radius: 15px; }
.payment-receipt-amount span { align-self: center; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.payment-receipt-amount strong { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }
.payment-receipt-amount small { font-size: .58rem; }
.payment-receipt-details { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.payment-receipt-details > span { display: grid; padding: 13px; background: var(--surface-soft); border-radius: 10px; }
.payment-receipt-details strong { margin-top: 4px; font-size: .66rem; }
.payment-receipt footer { display: grid; grid-template-columns: 1fr 220px; gap: 40px; align-items: end; margin-top: 32px; }
.payment-receipt footer p { margin: 5px 0 0; color: var(--ink-soft); font-size: .64rem; }
.receipt-signature { display: grid; text-align: center; }
.receipt-signature i { margin-bottom: 7px; border-top: 1px solid var(--ink); }
.receipt-signature strong { font-size: .65rem; }
.void-watermark { position: absolute; inset: 42% auto auto 50%; z-index: 2; color: rgba(181,72,62,.18); font-size: clamp(3rem, 10vw, 7rem); font-weight: 900; transform: translate(-50%,-50%) rotate(-18deg); pointer-events: none; }
.payment-receipt.is-voided { filter: grayscale(.7); }
.payment-void-panel { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 22px; }
.payment-void-panel h2 { margin: 3px 0; font-family: var(--font-display); }
.payment-void-panel p { margin: 0; color: var(--muted); font-size: .62rem; }
.payment-void-panel form { display: grid; grid-template-columns: minmax(260px,1fr) auto; gap: 10px; align-items: end; }

.print-payment-receipt { position: relative; max-width: 850px; margin: 0 auto; padding: 12mm; color: #172f35; font-family: Arial, sans-serif; }
.print-payment-receipt > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 2px solid #172f35; }
.print-payment-receipt > header > div { display: flex; align-items: center; gap: 12px; }
.print-payment-receipt header img { width: 70px; height: 70px; object-fit: cover; border-radius: 50%; }
.print-payment-receipt header span, .print-payment-receipt header section { display: grid; }
.print-payment-receipt header section { justify-items: end; }
.print-payment-receipt header strong { font-size: 12pt; }
.print-payment-receipt header small, .print-payment-receipt header section span { color: #667679; font-size: 7pt; }
.print-payment-client { display: grid; margin-top: 22px; }
.print-payment-client small, .print-payment-grid small, .print-payment-notes small { color: #667679; font-size: 7pt; }
.print-payment-client strong { margin: 4px 0; font-size: 12pt; }
.print-payment-client span { color: #667679; font-size: 8pt; }
.print-payment-amount { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: end; margin: 22px 0; padding: 16px; color: white; background: #c84f34; }
.print-payment-amount small { align-self: center; font-size: 8pt; font-weight: 800; }
.print-payment-amount strong { font-size: 24pt; }
.print-payment-amount span { font-size: 8pt; }
.print-payment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.print-payment-grid > span { display: grid; padding: 11px; background: #f2eee7; }
.print-payment-grid strong { margin-top: 3px; font-size: 9pt; }
.print-payment-notes { margin-top: 18px; padding: 12px; border: 1px solid #d8d1c8; }
.print-payment-notes p { margin: 5px 0 0; font-size: 8pt; }
.print-payment-receipt footer { display: grid; grid-template-columns: 220px 1fr; gap: 50px; align-items: end; margin-top: 50px; }
.print-payment-receipt footer > span { display: grid; text-align: center; }
.print-payment-receipt footer i { border-top: 1px solid #172f35; }
.print-payment-receipt footer strong, .print-payment-receipt footer small, .print-payment-receipt footer p { margin-top: 5px; font-size: 7pt; }
.print-payment-receipt footer p { color: #667679; }
.print-void-watermark { position: absolute; top: 42%; left: 50%; color: rgba(181,72,62,.18); font-size: 70pt; font-weight: 900; transform: translate(-50%,-50%) rotate(-18deg); }
.print-payment-receipt.is-voided { filter: grayscale(.7); }

@media (max-width: 1000px) {
    .cashbox-layout, .payment-entry-grid { grid-template-columns: 1fr; }
    .cashbox-sidebar, .payment-confirm-card { position: static; }
    .payment-concept-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 680px) {
    .cashbox-hero, .cashbox-table-head, .payment-void-panel { align-items: stretch; flex-direction: column; }
    .cashbox-hero .button { width: 100%; }
    .cashbox-filter { display: grid; grid-template-columns: 1fr; }
    .cashbox-filter input, .cashbox-filter .button { width: 100%; }
    .payment-builder { padding: 18px; }
    .payment-concept-grid, .payment-targets { grid-template-columns: 1fr; }
    .payment-concept-option > span { min-height: 0; grid-template-columns: auto 1fr; gap: 3px 10px; }
    .payment-concept-option .icon { grid-row: 1 / 3; margin: 0; }
    .payment-receipt { padding: 19px; }
    .payment-receipt-brand img { width: 56px; height: 56px; }
    .payment-receipt-brand strong { font-size: 1.12rem; }
    .payment-receipt > header { align-items: flex-start; }
    .payment-receipt-amount { grid-template-columns: 1fr auto; }
    .payment-receipt-amount span { grid-column: 1 / -1; }
    .payment-receipt-amount strong { font-size: 1.8rem; }
    .payment-receipt-details { grid-template-columns: 1fr 1fr; }
    .payment-receipt footer { grid-template-columns: 1fr; }
    .payment-void-panel form { grid-template-columns: 1fr; }
}

/* Informes y analitica */
.report-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; margin-bottom: 16px; padding: 26px 28px; color: white; background: linear-gradient(125deg, #17363b 0%, #28545a 64%, #35676a 100%); }
.report-hero::after { position: absolute; top: -80px; right: 18%; width: 190px; height: 190px; content: ''; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 30px rgba(255,255,255,.025), 0 0 0 65px rgba(255,255,255,.018); }
.report-hero > div, .report-hero > a { position: relative; z-index: 1; }
.report-hero .section-kicker { color: #efb29d; }
.report-hero h2 { margin: 4px 0 3px; font-family: var(--font-display); font-size: clamp(1.55rem, 2.7vw, 2.2rem); }
.report-hero p { max-width: 650px; margin: 0; color: rgba(255,255,255,.68); font-size: .67rem; line-height: 1.55; }
.report-export { min-width: 205px; color: var(--navy); background: #fffaf5; box-shadow: 0 12px 30px rgba(4,23,27,.18); }
.report-export:hover { color: var(--navy); background: white; }
.report-export > span { display: grid; text-align: left; }
.report-export small { color: var(--muted); font-size: .5rem; font-weight: 700; }
.report-filter-panel { margin-bottom: 16px; padding: 18px; }
.report-filter-panel form { display: grid; grid-template-columns: repeat(4, minmax(135px,1fr)); gap: 11px; align-items: end; }
.report-filter-panel .field { min-width: 0; }
.report-customer-field { grid-column: span 2; }
.report-filter-actions { display: flex; justify-content: flex-end; gap: 8px; }
.report-kpis .metric-copy strong em { color: var(--muted); font-family: var(--font-body); font-size: .62rem; font-style: normal; }
.report-data { overflow: hidden; }
.report-tabs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); padding: 7px; background: #eee9e1; border-bottom: 1px solid var(--line); }
.report-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 44px; padding: 9px 12px; color: var(--muted); border-radius: 10px; font-size: .62rem; font-weight: 850; text-align: center; transition: .18s ease; }
.report-tab:hover { color: var(--navy); background: rgba(255,255,255,.55); }
.report-tab.is-active { color: var(--navy); background: var(--surface); box-shadow: 0 4px 12px rgba(19,46,51,.08); }
.report-tab small { display: grid; min-width: 22px; height: 22px; padding: 0 6px; place-items: center; color: var(--coral-deep); background: #f9e4dc; border-radius: 999px; font-size: .52rem; }
.report-table-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 22px 22px 14px; }
.report-table-heading h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 1.35rem; }
.report-table-heading > p { max-width: 370px; margin: 0; color: var(--muted); font-size: .59rem; text-align: right; }
.report-table th { white-space: nowrap; }
.report-table td { vertical-align: middle; }
.report-table td > small, .report-table td a > small { display: block; margin-top: 3px; color: var(--muted); font-size: .52rem; }
.report-progress { width: 92px; height: 5px; overflow: hidden; margin-bottom: 4px; background: #e9e4dc; border-radius: 999px; }
.report-progress span { display: block; width: var(--progress); height: 100%; background: linear-gradient(90deg, var(--coral), var(--danger)); border-radius: inherit; }

@media (max-width: 1120px) {
    .report-filter-panel form { grid-template-columns: repeat(3, minmax(140px,1fr)); }
    .report-customer-field { grid-column: span 1; }
    .report-filter-actions { grid-column: span 2; }
}

@media (max-width: 820px) {
    .report-hero { align-items: stretch; flex-direction: column; }
    .report-export { width: fit-content; }
    .report-filter-panel form { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .report-filter-actions { grid-column: span 2; }
    .report-tabs { display: flex; overflow-x: auto; }
    .report-tab { min-width: 170px; }
    .report-table-heading { align-items: flex-start; flex-direction: column; }
    .report-table-heading > p { text-align: left; }
}

@media (max-width: 560px) {
    .report-hero { padding: 21px; }
    .report-export { width: 100%; }
    .report-filter-panel { padding: 14px; }
    .report-filter-panel form { grid-template-columns: 1fr; }
    .report-filter-actions { grid-column: 1; }
    .report-filter-actions .button { flex: 1; }
    .report-kpis { grid-template-columns: 1fr 1fr; }
}

/* Modulo financiero */
.finance-nav { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 6px; margin-bottom: 16px; padding: 7px; background: rgba(255,253,249,.72); }
.finance-nav-link { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 43px; padding: 8px 10px; color: var(--muted); border-radius: 11px; font-size: .65rem; font-weight: 800; text-align: center; transition: .18s ease; }
.finance-nav-link:hover { color: var(--navy); background: var(--surface-soft); }
.finance-nav-link.is-active { color: white; background: linear-gradient(135deg, var(--navy-light), var(--navy)); box-shadow: 0 7px 17px rgba(23,47,53,.16); }
.finance-nav-link .icon { width: 16px; height: 16px; }
.finance-hero { position: relative; display: grid; grid-template-columns: minmax(0,1.5fr) minmax(245px,.5fr); gap: 28px; overflow: hidden; margin-bottom: 16px; padding: 32px; color: white; background: radial-gradient(circle at 82% 0%, rgba(237,104,72,.34), transparent 17rem), linear-gradient(130deg, #1e464b, #132e34 68%); }
.finance-hero::after { position: absolute; inset: 0; content: ''; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.12) 1px,transparent 1px); background-size: 32px 32px; pointer-events: none; }
.finance-hero > * { position: relative; z-index: 1; }
.finance-hero .section-kicker { color: #f1b7a8; }
.finance-hero h2 { max-width: 700px; margin: 4px 0 8px; font-family: var(--font-display); font-size: clamp(1.8rem,3vw,2.7rem); line-height: 1; }
.finance-hero p { max-width: 660px; margin: 0 0 21px; color: rgba(255,255,255,.66); font-size: .72rem; }
.finance-hero-balance { display: grid; align-content: center; justify-items: end; padding-left: 24px; border-left: 1px solid rgba(255,255,255,.14); text-align: right; }
.finance-hero-balance small { color: rgba(255,255,255,.55); font-size: .58rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.finance-hero-balance strong { margin: 5px 0; font-family: var(--font-display); font-size: clamp(2rem,3.4vw,3.2rem); }
.finance-hero-balance strong.is-negative { color: #ffaf9b; }
.finance-hero-balance span { color: rgba(255,255,255,.55); font-size: .58rem; }
.finance-filter { margin-bottom: 16px; padding: 15px 17px; }
.finance-filter form { display: grid; grid-template-columns: repeat(3,minmax(145px,.65fr)) minmax(180px,1fr) auto; gap: 10px; align-items: end; }
.finance-filter form > .button { margin-bottom: 1px; }
.finance-search-field { min-width: 180px; }
.finance-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(270px,.45fr); gap: 16px; align-items: start; }
.finance-ledger-card, .finance-accounts-card, .finance-receivables-card { padding: 20px; }
.finance-ledger-card .section-heading { margin-bottom: 11px; }
.finance-movement-list { display: grid; }
.finance-movement-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 11px; align-items: center; min-width: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.finance-movement-row:last-child { border-bottom: 0; }
.finance-movement-row > div { min-width: 0; }
.finance-movement-row > div strong, .finance-movement-row > div small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.finance-movement-row > div strong { font-size: .68rem; }
.finance-movement-row > div small { margin-top: 2px; color: var(--muted); font-size: .53rem; }
.finance-movement-row > b { font-size: .7rem; white-space: nowrap; }
.finance-movement-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; }
.finance-movement-icon.is-income { color: var(--success); background: #e1efe9; }
.finance-movement-icon.is-expense { color: var(--danger); background: #f7e4e1; }
.finance-movement-icon .icon { width: 16px; }
.finance-source-badge { padding: 4px 7px; color: var(--muted); background: var(--surface-soft); border-radius: 7px; font-size: .49rem; font-weight: 850; }
.finance-side-stack { display: grid; gap: 14px; }
.finance-accounts-card header h2 { margin: 2px 0 12px; font-family: var(--font-display); }
.finance-account-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.finance-account-row:last-child { border-bottom: 0; }
.finance-account-row > span { display: grid; width: 32px; height: 32px; place-items: center; color: var(--teal); background: #e5efed; border-radius: 9px; }
.finance-account-row > span .icon { width: 15px; }
.finance-account-row div strong, .finance-account-row div small { display: block; }
.finance-account-row div strong { font-size: .63rem; }
.finance-account-row div small { color: var(--muted); font-size: .5rem; }
.finance-account-row > b { font-size: .63rem; }
.finance-receivables-card { display: grid; }
.finance-receivables-card > strong { margin: 4px 0 10px; color: var(--coral-deep); font-family: var(--font-display); font-size: 2rem; }
.finance-receivables-card > div { display: grid; gap: 5px; margin-bottom: 14px; padding: 11px; background: var(--surface-soft); border-radius: 10px; }
.finance-receivables-card > div span { display: flex; justify-content: space-between; font-size: .57rem; }
.finance-list-head, .finance-cash-head, .finance-report-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 22px; }
.finance-list-head h2, .finance-cash-head h2, .finance-report-head h2 { margin: 3px 0; font-family: var(--font-display); font-size: 1.5rem; }
.finance-list-head p, .finance-cash-head p, .finance-report-head p { max-width: 620px; margin: 0; color: var(--muted); font-size: .64rem; }
.finance-cash-head form, .finance-report-head form { display: flex; align-items: end; gap: 9px; }
.finance-table-panel { position: relative; }
.finance-table-panel .data-table td { vertical-align: middle; }
.finance-table-panel .data-table td > small { display: block; margin-top: 3px; color: var(--muted); font-size: .5rem; }
.finance-category-chip { display: inline-flex; padding: 4px 7px; color: #4f6670; background: #e6eeee; border-radius: 7px; font-size: .52rem; font-weight: 850; }
.is-voided-row { opacity: .55; text-decoration: line-through; }
.finance-void-menu { position: relative; }
.finance-void-menu summary { list-style: none; }
.finance-void-menu summary::-webkit-details-marker { display: none; }
.finance-void-menu form { position: absolute; z-index: 8; top: 42px; right: 0; display: grid; gap: 8px; width: 260px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.finance-entry-form { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 17px; align-items: start; }
.finance-entry-main { padding: 24px; }
.finance-entry-main .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .63rem; }
.finance-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.finance-entry-side { position: sticky; top: 128px; }
.finance-entry-confirm { display: grid; justify-items: start; padding: 24px; color: white; background: linear-gradient(145deg,var(--navy),#294e52); }
.finance-entry-confirm > span { display: grid; width: 46px; height: 46px; margin-bottom: 14px; place-items: center; color: white; background: rgba(255,255,255,.12); border-radius: 13px; }
.finance-entry-confirm > small { color: #efb29d; font-size: .54rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.finance-entry-confirm h2 { margin: 5px 0; font-family: var(--font-display); }
.finance-entry-confirm p { margin: 0 0 16px; color: rgba(255,255,255,.67); font-size: .61rem; line-height: 1.55; }
.finance-entry-confirm .button-secondary { margin-top: 7px; color: white; background: transparent; border-color: rgba(255,255,255,.25); }
.finance-cash-toggle { display: flex; gap: 9px; align-items: flex-start; width: 100%; margin-bottom: 18px; padding: 11px; background: rgba(255,255,255,.09); border-radius: 10px; cursor: pointer; }
.finance-cash-toggle input { margin-top: 3px; accent-color: var(--coral); }
.finance-cash-toggle span strong, .finance-cash-toggle span small { display: block; }
.finance-cash-toggle span strong { font-size: .62rem; }
.finance-cash-toggle span small { color: rgba(255,255,255,.58); font-size: .51rem; }
.finance-money-input { display: grid; grid-template-columns: auto 1fr; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; }
.finance-money-input:focus-within { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(237,104,72,.1); }
.finance-money-input i { padding-left: 12px; color: var(--coral-deep); font-style: normal; font-weight: 900; }
.finance-money-input input { border: 0; outline: 0; }
.finance-cash-grid { display: grid; grid-template-columns: minmax(430px,.9fr) minmax(0,1.1fr); gap: 16px; align-items: start; }
.finance-denomination-card, .finance-cash-ledger { padding: 22px; }
.finance-denomination-card > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.finance-denomination-card h2, .finance-cash-ledger h2 { margin: 2px 0; font-family: var(--font-display); }
.denomination-table { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.denomination-header, .denomination-row { display: grid; grid-template-columns: 1fr 120px 130px; gap: 10px; align-items: center; padding: 8px 13px; }
.denomination-header { color: var(--muted); background: var(--surface-soft); font-size: .5rem; font-weight: 900; text-transform: uppercase; }
.denomination-row { border-top: 1px solid var(--line); }
.denomination-row strong, .denomination-row b { font-size: .65rem; }
.denomination-row b { text-align: right; }
.denomination-row input { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: .62rem; }
.cash-count-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 13px 0; }
.cash-count-summary > span { display: grid; padding: 11px; background: var(--surface-soft); border-radius: 10px; }
.cash-count-summary small { color: var(--muted); font-size: .5rem; }
.cash-count-summary strong { font-size: .72rem; }
.cash-count-fields { display: grid; grid-template-columns: .8fr 1.2fr; gap: 9px; margin-bottom: 12px; }
.finance-cash-ledger { position: sticky; top: 128px; }
.finance-expected-balance { display: grid; margin-top: 16px; padding: 18px; color: white; background: linear-gradient(135deg,var(--teal),#245e5a); border-radius: 14px; }
.finance-expected-balance small, .finance-expected-balance span { font-size: .54rem; opacity: .7; }
.finance-expected-balance strong { font-family: var(--font-display); font-size: 2rem; }
.finance-flow-kpis { margin-top: 0; }
.finance-flow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.finance-flow-column { padding: 22px; }
.finance-flow-column > header { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; margin-bottom: 12px; }
.finance-flow-column h2 { margin: 2px 0; font-family: var(--font-display); font-size: 1.2rem; }
.finance-flow-column header > strong { font-size: .78rem; }
.finance-flow-symbol { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; font-size: 1.2rem; font-weight: 500; }
.finance-flow-symbol.is-income { color: var(--success); background: #e1efe9; }
.finance-flow-symbol.is-expense { color: var(--danger); background: #f7e4e1; }
.finance-flow-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 3px; border-top: 1px solid var(--line); font-size: .63rem; }
.finance-ending-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 22px; }
.finance-ending-card h2 { margin: 2px 0; font-family: var(--font-display); }
.finance-ending-card p { margin: 0; color: var(--muted); font-size: .58rem; }
.finance-ending-card > strong { font-family: var(--font-display); font-size: 2rem; }
.finance-statement-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 16px; align-items: start; }
.finance-statement { padding: clamp(20px,3vw,36px); }
.finance-statement > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--navy); }
.finance-statement > header > div { display: flex; align-items: center; gap: 11px; }
.finance-statement header img { width: 58px; height: 58px; object-fit: cover; border-radius: 50%; }
.finance-statement header span strong, .finance-statement header span small { display: block; }
.finance-statement header span strong { font-family: var(--font-display); font-size: 1.25rem; }
.finance-statement header span small { color: var(--muted); font-size: .55rem; }
.statement-section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.statement-title, .statement-line, .statement-subtotal { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.statement-title { margin-bottom: 8px; }
.statement-title strong, .statement-title b { font-size: .72rem; }
.statement-line { padding: 5px 12px; color: var(--muted); font-size: .59rem; }
.statement-subtotal { padding: 14px 0; font-size: .75rem; }
.statement-result { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 20px; color: white; background: linear-gradient(130deg,var(--teal),#265c58); border-radius: 14px; }
.statement-result.is-negative { background: linear-gradient(130deg,#a3443b,#c35b49); }
.statement-result span small, .statement-result span strong { display: block; }
.statement-result span small { font-size: .5rem; opacity: .7; text-transform: uppercase; }
.statement-result span strong { font-size: .7rem; }
.statement-result > b { font-family: var(--font-display); font-size: 1.8rem; }
.finance-result-side { display: grid; gap: 14px; }
.finance-margin-card, .finance-result-note { padding: 22px; }
.finance-margin-card { display: grid; justify-items: start; }
.finance-margin-card > span { display: grid; width: 43px; height: 43px; margin-bottom: 14px; place-items: center; color: var(--teal); background: #e4efec; border-radius: 12px; }
.finance-margin-card > small { color: var(--muted); font-size: .55rem; font-weight: 850; text-transform: uppercase; }
.finance-margin-card > strong { font-family: var(--font-display); font-size: 2.4rem; }
.finance-margin-card p, .finance-result-note p { margin: 5px 0 0; color: var(--muted); font-size: .58rem; line-height: 1.55; }
.finance-result-note h3 { margin: 4px 0; font-family: var(--font-display); }

@media (max-width: 1100px) {
    .finance-nav { display: flex; overflow-x: auto; }
    .finance-nav-link { min-width: 150px; }
    .finance-hero { grid-template-columns: 1fr 230px; }
    .finance-dashboard-grid, .finance-entry-form, .finance-statement-layout { grid-template-columns: 1fr; }
    .finance-entry-side, .finance-cash-ledger { position: static; }
    .finance-side-stack { grid-template-columns: 1fr 1fr; }
    .finance-filter form { grid-template-columns: repeat(3,minmax(140px,1fr)); }
    .finance-search-field { grid-column: span 2; }
}

@media (max-width: 820px) {
    .finance-hero { grid-template-columns: 1fr; }
    .finance-hero-balance { align-items: start; justify-items: start; padding: 19px 0 0; border-top: 1px solid rgba(255,255,255,.14); border-left: 0; text-align: left; }
    .finance-list-head, .finance-cash-head, .finance-report-head { align-items: stretch; flex-direction: column; }
    .finance-cash-head form, .finance-report-head form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .finance-cash-grid, .finance-flow-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .finance-nav-link { min-width: 130px; }
    .finance-hero { padding: 23px; }
    .finance-hero .action-group, .finance-hero .button { width: 100%; }
    .finance-filter form, .finance-form-grid { grid-template-columns: 1fr; }
    .finance-search-field { grid-column: 1; }
    .finance-side-stack { grid-template-columns: 1fr; }
    .finance-movement-row { grid-template-columns: auto minmax(0,1fr) auto; }
    .finance-movement-row .finance-source-badge { display: none; }
    .finance-list-head .button { width: 100%; }
    .finance-entry-main, .finance-denomination-card, .finance-cash-ledger { padding: 17px; }
    .finance-cash-head form, .finance-report-head form { grid-template-columns: 1fr; }
    .denomination-header, .denomination-row { grid-template-columns: 1fr 90px 105px; padding: 8px 9px; }
    .cash-count-summary, .cash-count-fields { grid-template-columns: 1fr; }
    .finance-ending-card, .statement-result { align-items: flex-start; flex-direction: column; }
    .finance-statement > header { align-items: flex-start; }
}

/* Operational accessibility baseline */
.field > span, .line-field > span { font-size: .875rem; }
.data-table th { font-size: .72rem; }
.data-table td { font-size: .82rem; }
.data-table td > small, .form-note, .availability-status { font-size: .75rem; }
.finance-margin-card p, .finance-result-note p { font-size: .75rem; }

@media (max-width: 760px) {
    button, .button, .icon-button, .button-small, .page-button { min-height: 44px; }
    .icon-button, .page-button { min-width: 44px; }
}

/* Usuarios y roles */
.user-admin-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; overflow: hidden; margin-bottom: 16px; padding: 28px 30px; color: white; background: radial-gradient(circle at 82% 5%, rgba(237,104,72,.38), transparent 15rem), linear-gradient(130deg, #1f4a4e, #142f35 72%); }
.user-admin-hero::after { position: absolute; inset: 0; content: ''; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.14) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.14) 1px,transparent 1px); background-size: 30px 30px; pointer-events: none; }
.user-admin-hero > * { position: relative; z-index: 1; }
.user-admin-hero .section-kicker { color: #efb29d; }
.user-admin-hero h2 { max-width: 720px; margin: 4px 0 7px; font-family: var(--font-display); font-size: clamp(1.65rem,3vw,2.45rem); line-height: 1.04; }
.user-admin-hero p { max-width: 680px; margin: 0; color: rgba(255,255,255,.68); font-size: .78rem; line-height: 1.55; }
.user-admin-hero .button { flex: 0 0 auto; }
.user-metrics { margin-bottom: 24px; }
.role-directory { margin-bottom: 22px; }
.role-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 11px; }
.role-card { position: relative; min-width: 0; overflow: hidden; padding: 17px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--role-accent,#536e79); border-radius: 16px; box-shadow: var(--shadow-sm); }
.role-card.role-admin { --role-accent: var(--coral-deep); }
.role-card.role-viewer { --role-accent: #9a762e; }
.role-card.role-warehouse { --role-accent: var(--teal); }
.role-card.role-operations { --role-accent: #456f86; }
.role-card.role-finance { --role-accent: #367862; }
.role-card header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; }
.role-card header > span { display: grid; width: 34px; height: 34px; place-items: center; color: var(--role-accent); background: color-mix(in srgb,var(--role-accent) 12%,white); border-radius: 10px; }
.role-card header .icon { width: 16px; }
.role-card header strong { min-width: 0; font-family: var(--font-display); font-size: .87rem; line-height: 1.08; }
.role-card header b { display: grid; min-width: 23px; height: 23px; padding: 0 6px; place-items: center; color: var(--role-accent); background: color-mix(in srgb,var(--role-accent) 10%,white); border-radius: 999px; font-size: .58rem; }
.role-card > p { min-height: 55px; margin: 13px 0; color: var(--muted); font-size: .65rem; line-height: 1.45; }
.role-card ul { display: grid; gap: 6px; margin: 0; padding: 11px 0 0; border-top: 1px solid var(--line); list-style: none; }
.role-card li { display: flex; gap: 6px; color: var(--ink-soft); font-size: .58rem; line-height: 1.35; }
.role-card li .icon { width: 12px; flex: 0 0 12px; color: var(--role-accent); }
.user-list-panel { overflow: hidden; }
.user-list-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 21px; }
.user-list-head h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 1.4rem; }
.user-filter-form { display: grid; grid-template-columns: minmax(185px,1fr) 175px 135px auto; gap: 9px; align-items: end; width: min(760px,68%); }
.user-search-field { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.user-search-field:focus-within { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(237,104,72,.1); }
.user-search-field .icon { width: 17px; color: var(--muted); }
.user-search-field input { width: 100%; padding: 0; border: 0; outline: 0; background: transparent; }
.user-table td { vertical-align: middle; }
.user-actions-heading { text-align: right !important; }
.user-identity { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.user-identity > span { display: grid; width: 39px; height: 39px; flex: 0 0 39px; place-items: center; color: white; background: linear-gradient(135deg,var(--teal),var(--navy)); border-radius: 12px; font-size: .68rem; font-weight: 900; }
.user-identity div strong,.user-identity div small { display: block; }
.user-role-badge,.user-status-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 5px 9px; border-radius: 8px; font-size: .63rem; font-weight: 850; white-space: nowrap; }
.user-role-badge.role-admin { color: var(--coral-deep); background: #fbe5de; }
.user-role-badge.role-viewer { color: #85631f; background: #f4ead5; }
.user-role-badge.role-warehouse { color: var(--teal); background: #e1eee9; }
.user-role-badge.role-operations { color: #456f86; background: #e5edf1; }
.user-role-badge.role-finance { color: #367862; background: #e1eee9; }
.user-status-badge { gap: 6px; color: var(--success); background: #e1eee9; }
.user-status-badge i { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.user-status-badge.is-inactive { color: var(--muted); background: #ece9e3; }
.user-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.user-row-actions form { display: contents; }
.user-row-actions .button .icon { width: 14px; }
.user-row-actions .icon-button:disabled { opacity: .35; cursor: not-allowed; }
.user-deactivate { color: var(--danger); background: #fae9e6; }
.user-activate { color: var(--success); background: #e5f1ed; }
.user-empty { min-height: 300px; padding: 35px; border-top: 1px solid var(--line); }
.user-form-toolbar { margin-bottom: 13px; }
.user-form-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 17px; align-items: start; }
.user-form-main { padding: clamp(20px,3vw,30px); }
.user-fields-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding-bottom: 25px; }
.username-input { display: grid; grid-template-columns: auto 1fr; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.username-input:focus-within { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(237,104,72,.1); }
.username-input i { padding-left: 12px; color: var(--coral-deep); font-style: normal; font-weight: 900; }
.username-input input { border: 0; outline: 0; box-shadow: none; }
.role-selector { margin: 0; padding: 24px 0; border: 0; border-top: 1px solid var(--line); }
.role-selector legend { display: grid; gap: 4px; width: 100%; margin-bottom: 14px; }
.role-selector legend strong { font-family: var(--font-display); font-size: 1.25rem; }
.role-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.role-choice { position: relative; cursor: pointer; }
.role-choice input { position: absolute; opacity: 0; pointer-events: none; }
.role-choice > span { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; min-height: 105px; padding: 15px; border: 1px solid var(--line-strong); border-radius: 13px; transition: .18s ease; }
.role-choice > span > i { display: grid; grid-row: span 2; width: 36px; height: 36px; place-items: center; color: var(--teal); background: #e5efed; border-radius: 10px; }
.role-choice > span > i .icon { width: 17px; }
.role-choice > span strong { align-self: end; font-family: var(--font-display); font-size: .92rem; }
.role-choice > span small { color: var(--muted); font-size: .64rem; line-height: 1.45; }
.role-choice input:checked + span { border-color: var(--coral); background: #fff8f4; box-shadow: 0 0 0 3px rgba(237,104,72,.1); }
.role-choice input:focus-visible + span { outline: 3px solid rgba(237,104,72,.25); outline-offset: 2px; }
.user-form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 20px; border-top: 1px solid var(--line); }
.user-access-guide { position: sticky; top: 128px; overflow: hidden; padding: 25px; color: white; background: radial-gradient(circle at 100% 0,rgba(237,104,72,.3),transparent 12rem),linear-gradient(145deg,var(--navy),#294e52); }
.user-guide-icon { display: grid; width: 48px; height: 48px; margin-bottom: 18px; place-items: center; background: rgba(255,255,255,.1); border-radius: 14px; }
.user-guide-icon .icon { width: 23px; }
.user-access-guide .section-kicker { color: #efb29d; }
.user-access-guide h2 { margin: 5px 0 8px; font-family: var(--font-display); font-size: 1.45rem; }
.user-access-guide > p { margin: 0 0 20px; color: rgba(255,255,255,.65); font-size: .68rem; line-height: 1.55; }
.user-guide-rules { display: grid; gap: 1px; overflow: hidden; border-radius: 12px; }
.user-guide-rules > span { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 12px; background: rgba(255,255,255,.08); }
.user-guide-rules .icon { grid-row: span 2; width: 14px; color: #8bd2b5; }
.user-guide-rules strong { font-size: .65rem; }
.user-guide-rules small { color: rgba(255,255,255,.58); font-size: .55rem; line-height: 1.4; }

@media (max-width: 1180px) {
    .role-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .user-list-head { align-items: stretch; flex-direction: column; }
    .user-filter-form { width: 100%; }
}
@media (max-width: 850px) {
    .user-admin-hero { align-items: flex-start; flex-direction: column; }
    .user-form-layout { grid-template-columns: 1fr; }
    .user-access-guide { position: static; }
    .role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
    .user-admin-hero { padding: 23px; }
    .user-admin-hero .button { width: 100%; }
    .user-filter-form,.user-fields-grid,.role-choice-grid { grid-template-columns: 1fr; }
    .role-grid { display: flex; margin-right: -16px; padding-right: 16px; overflow-x: auto; scroll-snap-type: x mandatory; }
    .role-card { min-width: 245px; scroll-snap-align: start; }
    .user-form-actions { flex-direction: column-reverse; }
    .user-form-actions .button { width: 100%; }
}

/* Categorias de dano en la nota de incidencias (decision 2026-09-29). */
.note-damage-cell { min-width: 220px; }
.note-damage-cell select { width: 100%; max-width: 260px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 700; }
.note-damage-cell .compact-percent { display: flex; width: 150px; margin-top: 6px; }
.note-damage-cell .compact-percent[hidden] { display: none; }
.note-damage-cell .compact-percent i { padding: 0 11px 0 0; }
.note-damage-cell .compact-percent input { padding-left: 11px; }
.note-damage-hint { display: block; margin-top: 6px; color: var(--muted); font-size: .72rem; }
.note-damage-tag { display: block; color: var(--muted); font-size: .72rem; }

/* Edicion de precios cerrada por el administrador (2026-09-29). */
.price-lock-note { display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 9px 12px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: .72rem; text-align: left; }
.price-lock-note svg { flex: 0 0 auto; width: 16px; height: 16px; }
input[readonly][data-unit-price], .input-prefix input[readonly] { background: rgba(0,0,0,.035); cursor: not-allowed; }
.price-lock-panel { display: grid; gap: 14px; }
