@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');
:root {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: #172033;
    background: #e8edf1;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: linear-gradient(150deg, #030b14 0%, #04101f 42%, #061932 100%);
}

button,
input,
select {
    font: inherit;
}

.aiventas-auth-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, #040d18 0%, #071a2e 42%, #0a2f52 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.aiventas-auth-transition.is-active {
    opacity: 1;
}

.aiventas-auth-transition-stage {
    position: relative;
    width: min(290px, 70vw);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: radial-gradient(circle, rgba(0, 217, 255, .24) 0%, rgba(0, 217, 255, .05) 40%, rgba(11, 85, 255, .04) 62%, rgba(10, 19, 31, 0) 86%);
    border: 1px solid rgba(94, 221, 255, .22);
    box-shadow: 0 20px 45px rgba(2, 7, 19, .48), inset 0 0 0 1px rgba(255, 255, 255, .08);
    animation: aiventas-auth-pulse .9s ease-in-out infinite;
}

.aiventas-auth-transition-stage img {
    width: 66%;
    height: 66%;
    object-fit: contain;
    filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .45));
}

@keyframes aiventas-auth-pulse {
    0% {
        transform: scale(.99);
        opacity: .85;
    }

    50% {
        transform: scale(1.02);
        opacity: 1;
    }

    100% {
        transform: scale(.99);
        opacity: .85;
    }
}
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }.page-heading h2 { margin: 4px 0; color: #10233f; font-size: 30px; letter-spacing: -.035em; }.page-heading p { margin: 0; color: #667085; }.primary-action { border: 0; border-radius: 7px; background: #f59e0b; color: #10233f; padding: 11px 17px; font-weight: 700; cursor: pointer; }
.cash-modal-backdrop { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(7,24,48,.68); backdrop-filter: blur(3px); }
.cash-modal { width: min(680px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; padding: 24px; border: 1px solid #d5e0ed; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(7,24,48,.3); }
.cash-open-modal { width: min(470px, 100%); }
.cash-open-modal .cash-modal-copy { margin: 14px 0 0; }
.cash-open-modal .modal-field { display: grid; gap: 8px; margin-top: 20px; color: #173454; font-weight: 700; }
.cash-open-modal .modal-field input { width: 100%; padding: 14px 16px; border: 2px solid #bfd2e6; border-radius: 10px; color: #10233f; font-size: 1.35rem; font-weight: 700; outline: none; }
.cash-open-modal .modal-field input:focus { border-color: #2563eb; box-shadow: 0 0 0 4px #dbeafe; }
.cash-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }.cash-modal-header h2 { margin: 4px 0 0; color: #10233f; }.cash-modal-copy { color: #627d98; line-height: 1.5; }.cash-close-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; padding: 12px; border-radius: 10px; background: #f8fafc; }.cash-close-summary div { display: grid; gap: 3px; }.cash-close-summary span { color: #627d98; font-size: .75rem; }.cash-close-summary strong { color: #102a43; }.cash-close-sales { margin-top: 12px; }.cash-close-sales h3 { margin: 0 0 8px; color: #102a43; }.cash-close-sales-table { margin: 0; min-width: 520px; }.cash-close-sales-table thead th { white-space: nowrap; }.cash-close-sales-table tbody td { white-space: nowrap; }.cash-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }.cash-modal-actions .confirm-button { width: auto; flex: 1 1 180px; margin-top: 0; }
.client-quick-modal { width: min(860px, 100%); }
.client-quick-identity { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(230px, 1fr) auto; align-items: end; gap: 12px; margin-top: 16px; }
.client-quick-identity label { display: grid; gap: 6px; color: #486581; font-size: .8rem; font-weight: 700; }
.client-quick-identity input, .client-quick-identity select { min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; color: #243b53; font-weight: 400; }
.client-quick-identity .button { min-width: 210px; min-height: 42px; margin: 0; }
.client-quick-section { margin-top: 14px; padding: 13px 14px 14px; border: 1px solid #e1e9f1; border-radius: 10px; background: #fbfdff; }
.client-quick-contact-section { margin-top: 10px; }
.client-quick-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.client-quick-section-heading strong { color: #173454; font-size: .82rem; }
.client-quick-section-heading small { color: #71869c; font-size: .7rem; }
.client-quick-tax-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; align-items: start; }
.client-quick-contact-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.client-quick-tax-grid label, .client-quick-contact-grid label { display: grid; align-content: start; gap: 6px; min-width: 0; color: #486581; font-size: .78rem; font-weight: 700; }
.client-quick-tax-grid input, .client-quick-contact-grid input { width: 100%; min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; color: #243b53; font-weight: 400; }
.client-quick-tax-grid input:focus, .client-quick-contact-grid input:focus, .client-quick-identity input:focus, .client-quick-identity select:focus { outline: 0; border-color: #2879b5; box-shadow: 0 0 0 3px #dbeafe; }
.client-quick-section .field-hint { min-height: 2.2em; margin: 0; line-height: 1.35; }
.client-quick-required-hint { display: block; margin-top: 9px; }
.client-quick-modal > .cash-modal-actions { align-items: center; justify-content: flex-end; padding-top: 14px; margin-top: 14px; border-top: 1px solid #e1e9f1; }
.client-quick-modal > .cash-modal-actions .button, .client-quick-modal > .cash-modal-actions .confirm-button { flex: 0 0 auto; width: auto; min-height: 40px; margin: 0; }
.client-quick-modal > .cash-modal-actions .confirm-button { min-width: 230px; }
:root[data-theme="dark"] .client-quick-section { border-color: #304a65; background: #0c192a; }
:root[data-theme="dark"] .client-quick-section-heading strong { color: #edf5fd; }
:root[data-theme="dark"] .client-quick-section-heading small, :root[data-theme="dark"] .client-quick-tax-grid label, :root[data-theme="dark"] .client-quick-contact-grid label { color: #9ab2c9; }
:root[data-theme="dark"] .client-quick-modal > .cash-modal-actions { border-color: #304a65; }
.payment-waiting { display: flex; align-items: center; gap: 12px; margin: 16px 0; padding: 13px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; color: #1e40af; }.payment-waiting div { display: grid; gap: 3px; }.payment-waiting small { color: #54708c; }.payment-spinner { width: 22px; height: 22px; flex: 0 0 22px; border: 3px solid #bfdbfe; border-top-color: #2563eb; border-radius: 50%; animation: payment-spin .8s linear infinite; }@keyframes payment-spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) { .client-quick-identity, .client-quick-tax-grid, .client-quick-contact-grid { grid-template-columns: 1fr; }.client-quick-identity .button { width: 100%; }.client-quick-section-heading { display: grid; gap: 3px; }.client-quick-section .field-hint { min-height: 0; }.client-quick-modal > .cash-modal-actions .button, .client-quick-modal > .cash-modal-actions .confirm-button { width: 100%; } }
@media (max-width: 640px) { .cash-modal-backdrop { padding: 12px; }.cash-modal { padding: 18px; }.cash-close-summary { grid-template-columns: 1fr; }.cash-modal-actions { flex-direction: column; }.cash-modal-actions button { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
    .aiventas-auth-transition,
    .aiventas-auth-transition-stage { animation: none !important; }

    .topbar-user-toggle,
    .topbar-user-chevron { transition: none !important; }
}
.sales-intelligence { margin-top: 16px; overflow: hidden; }.dashboard-period-badge { padding: 6px 10px; border-radius: 999px; background: #eaf2ff; color: #2563eb; font-size: .72rem; font-weight: 800; }.sales-intelligence-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; margin-top: 20px; }.top-products-list { display: grid; gap: 11px; }.top-product-row { display: flex; align-items: center; gap: 12px; }.top-product-rank { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: #10233f; color: #fff; font-size: .68rem; font-weight: 800; }.top-product-row:first-child .top-product-rank { background: linear-gradient(135deg, #f59e0b, #f97316); }.top-product-info { display: grid; gap: 3px; width: 100%; min-width: 0; }.top-product-info strong { overflow: hidden; color: #173454; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }.top-product-info small { color: #71869c; font-size: .68rem; }.top-product-track { display: block; height: 6px; overflow: hidden; border-radius: 99px; background: #edf2f7; }.top-product-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #38bdf8); }.commercial-pulse { position: relative; display: flex; align-items: center; gap: 18px; min-height: 230px; overflow: hidden; padding: 22px; border-radius: 16px; background: radial-gradient(circle at 18% 25%, rgba(56,189,248,.36), transparent 30%), linear-gradient(135deg, #10233f, #1f5d8f 68%, #2563eb); color: #fff; }.commercial-pulse::after { position: absolute; right: -48px; bottom: -58px; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; content: ''; }.pulse-orbit { display: grid; place-items: center; width: 100px; height: 100px; flex: 0 0 100px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; box-shadow: 0 0 0 12px rgba(255,255,255,.07), 0 0 0 24px rgba(255,255,255,.04); }.pulse-orbit span { color: #bae6fd; font-size: .64rem; font-weight: 800; letter-spacing: .12em; }.pulse-orbit strong { font-size: 1.55rem; }.pulse-copy { position: relative; z-index: 1; min-width: 0; }.pulse-copy .card-kicker { color: #bae6fd; }.pulse-copy h4 { margin: 7px 0 5px; overflow: hidden; font-size: 1.15rem; text-overflow: ellipsis; white-space: nowrap; }.pulse-copy p { color: #dbeafe; line-height: 1.4; }.pulse-copy a { display: inline-block; margin-top: 15px; color: #fff; font-size: .76rem; font-weight: 800; text-decoration: none; }
@media (max-width: 900px) { .sales-intelligence-grid { grid-template-columns: 1fr; }.commercial-pulse { min-height: 180px; } }
.ui-icon { display: inline-grid; place-items: center; color: currentColor; line-height: 0; }
.ui-icon svg { width: 100%; height: 100%; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { position: relative; overflow: hidden; background: #fff; border: 1px solid #e4e7ec; border-top: 3px solid #2563eb; border-radius: 12px; padding: 16px 18px 18px; box-shadow: 0 5px 16px rgba(16,35,63,.055); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.metric-link:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(16,35,63,.1); }
.metric-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-card .metric-card-heading > span { min-width: 0; color: #667085; font-size: 12px; font-weight: 600; }
.metric-card span, .metric-card small { display: block; color: #667085; font-size: 12px; }
.metric-card strong { display: block; color: #10233f; font-size: 26px; margin: 7px 0 5px; }
.metric-card small { color: #98a2b3; font-size: 11px; }
.metric-icon { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid rgba(255,255,255,.58); border-radius: 13px; padding: 10px; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 18px rgba(16,35,63,.15); transition: transform .18s ease, box-shadow .18s ease; }
.metric-card:hover .metric-icon { transform: translateY(-2px) scale(1.06); }
.metric-icon-blue { background: linear-gradient(135deg, #2563eb, #38bdf8); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(37,99,235,.28); }
.metric-icon-green { background: linear-gradient(135deg, #059669, #34d399); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(5,150,105,.26); }
.metric-icon-orange { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(249,115,22,.28); }
.metric-icon-navy { background: linear-gradient(135deg, #10233f, #2874a6); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 20px rgba(16,35,63,.27); }
.accent-green { border-top-color: #16a34a; }.accent-orange { border-top-color: #f59e0b; }.accent-navy { border-top-color: #10233f; }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-top: 16px; }.dashboard-card { background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; padding: 21px; }.dashboard-card h3 { margin: 4px 0 5px; color: #10233f; font-size: 18px; }.dashboard-card p { color: #667085; font-size: 13px; margin: 0; }.card-kicker { color: #2563eb; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }.flow-line { display: flex; align-items: center; gap: 10px; margin-top: 30px; color: #475467; font-size: 12px; }.flow-line i { flex: 1; height: 2px; background: #dbe5f0; }.card-header { display: flex; justify-content: space-between; align-items: start; }.card-header p { font-size: 12px; }.card-header a { color: #2563eb; font-size: 12px; text-decoration: none; }.status-row { display: flex; justify-content: space-between; border-bottom: 1px solid #f0f2f5; padding: 14px 0; color: #475467; font-size: 13px; }.status-row b { color: #10233f; }
@media (max-width: 900px) { .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.dashboard-grid { grid-template-columns: 1fr; } } @media (max-width: 560px) { .page-heading { display: block; }.primary-action { margin-top: 16px; }.metric-grid { grid-template-columns: 1fr; } }

/* Legacy login shell/card styles removed to avoid white fallback frame on /login.
   The real login look is now handled by LoginLayout.razor.css + Login.razor.css. */

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: .85rem; }
.history-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.history-summary-card { position: relative; min-width: 0; padding: 11px 58px 11px 14px; border: 1px solid #dce6f0; border-top: 3px solid #2563eb; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(16,35,63,.05); }
.history-summary-heading { display: block; }
.history-summary-card .history-summary-heading > span { min-width: 0; }
.history-summary-icon { position: absolute; top: 11px; right: 14px; width: 36px; height: 36px; padding: 8px; border: 1px solid rgba(255,255,255,.58); border-radius: 11px; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 6px 14px rgba(16,42,67,.15); transition: transform .18s ease, box-shadow .18s ease; }
.history-summary-card:hover .history-summary-icon { transform: translateY(-2px) scale(1.06); }
.summary-icon-total { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(249,115,22,.27); }
.summary-icon-net { background: linear-gradient(135deg, #2563eb, #38bdf8); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(37,99,235,.26); }
.summary-icon-tax { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(124,58,237,.26); }
.summary-icon-cash { background: linear-gradient(135deg, #059669, #34d399); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(5,150,105,.25); }
.summary-icon-transfer { background: linear-gradient(135deg, #0891b2, #22d3ee); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(8,145,178,.25); }
.summary-icon-debit { background: linear-gradient(135deg, #1d4ed8, #3b82f6); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(29,78,216,.25); }
.summary-icon-credit { background: linear-gradient(135deg, #db2777, #f472b6); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px rgba(219,39,119,.25); }
.summary-icon-other { background: linear-gradient(135deg, #475569, #94a3b8); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 20px rgba(71,85,105,.24); }
.history-summary-card span, .history-summary-card small { display: block; color: #66809b; font-size: .76rem; }
.history-summary-card strong { display: block; margin: 2px 0 1px; overflow: hidden; color: #102a43; font-size: clamp(1rem, 1.55vw, 1.25rem); line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.history-summary-card small { color: #98aabd; font-size: .68rem; }
.history-summary-card.summary-total { border-top-color: #f59e0b; background: linear-gradient(135deg, #fff, #fff9ed); }
.history-summary-card.summary-net { border-top-color: #2563eb; }
.history-summary-card.summary-tax { border-top-color: #7c3aed; }
.history-summary-card.summary-cash { border-top-color: #16a34a; }
.history-summary-card.summary-transfer { border-top-color: #0891b2; }
.history-summary-card.summary-debit { border-top-color: #1d4ed8; }
.history-summary-card.summary-credit { border-top-color: #db2777; }
.history-summary-card.summary-other { border-top-color: #64748b; }
@media (max-width: 1200px) { .history-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .history-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.history-summary-card { padding: 10px 52px 10px 11px; }.history-summary-icon { top: 10px; right: 11px; } }
@media (max-width: 460px) { .history-summary-grid { grid-template-columns: 1fr; } }
.eyebrow { color: #f59e0b; font-size: .72rem; font-weight: 800; letter-spacing: .12em; margin: 0 0 .4rem; }
.page-heading h1 { margin: 0; color: #102a43; font-size: clamp(1.55rem, 2.5vw, 2.05rem); line-height: 1.05; }
.page-heading p:not(.eyebrow) { margin: .25rem 0 0; color: #627d98; font-size: .88rem; }
.filter-card { display: flex; align-items: end; gap: 1rem; flex-wrap: wrap; padding: 1.15rem; margin-bottom: 1rem; background: #fff; border: 1px solid #d9e2ec; border-radius: 14px; box-shadow: 0 5px 18px rgba(16,42,67,.05); }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field.grow { flex: 1 1 360px; }
.field.compact { flex: 0 1 170px; }
.field label { color: #486581; font-size: .8rem; font-weight: 700; }
.field input, .field select { min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; color: #102a43; }
.check-field { display: flex; align-items: center; gap: .45rem; min-height: 42px; color: #486581; font-size: .86rem; white-space: nowrap; }
.button { border: 0; border-radius: 8px; min-height: 42px; padding: .65rem 1.1rem; font-weight: 700; cursor: pointer; }
.button.secondary { color: #fff; background: #1f5d8f; }
.table-card { overflow: hidden; background: #fff; border: 1px solid #d9e2ec; border-radius: 14px; box-shadow: 0 5px 18px rgba(16,42,67,.05); }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.15rem; color: #102a43; border-bottom: 1px solid #e6edf3; }
.result-count { color: #627d98; font-size: .85rem; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.data-table th { padding: .85rem 1rem; color: #486581; background: #f5f7fa; font-size: .78rem; text-align: left; white-space: nowrap; }
.data-table td { padding: .9rem 1rem; color: #243b53; border-top: 1px solid #edf2f7; vertical-align: middle; }
.data-table tr:hover td { background: #f8fbff; }
.data-table td strong, .data-table td small { display: block; }
.data-table td small { margin-top: .25rem; color: #829ab1; font-size: .76rem; }
.data-table .price { color: #102a43; font-weight: 800; }
.table-paginator { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .65rem .9rem; border-top: 1px solid #edf2f7; background: #f8fbff; color: #486581; font-size: .8rem; }
.table-paginator .table-paginator-select { display: inline-flex; align-items: center; gap: .4rem; margin-right: auto; }
.table-paginator .table-paginator-select select { min-height: 31px; padding: .15rem .4rem; border: 1px solid #bfd5e6; border-radius: 6px; background: #fff; color: #102a43; }
.table-paginator .table-paginator-info { margin-right: .3rem; font-weight: 700; }
.table-paginator button { min-height: 31px; padding: .28rem .58rem; border: 1px solid #bfd5e6; border-radius: 7px; background: #fff; color: #1f5d8f; cursor: pointer; }
.table-paginator button:disabled { opacity: .55; cursor: not-allowed; }
.form-field-valid, .text-input.form-field-valid { border-color: #16a34a !important; background: #f0fdf4 !important; box-shadow: 0 0 0 2px #dcfce7; }
.form-field-invalid, .text-input.form-field-invalid { border-color: #dc2626 !important; background: #fef2f2 !important; box-shadow: 0 0 0 2px #fee2e2; }
.form-field-feedback { margin-top: 4px; font-size: .72rem; line-height: 1.1; }
.form-field-feedback.form-field-valid { color: #15803d; }
.form-field-feedback.form-field-invalid { color: #b91c1c; }
.agenda-layout { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.42fr); gap: 1rem; align-items: start; }
.agenda-tabs { display: flex; gap: .35rem; padding: .8rem 1.15rem 0; border-bottom: 1px solid #e6edf3; }
.agenda-tabs button { border: 0; border-bottom: 3px solid transparent; padding: .7rem .8rem; background: transparent; color: #627d98; font-weight: 700; cursor: pointer; }
.agenda-tabs button.active { color: #1f5d8f; border-bottom-color: #f59e0b; }
.agenda-form { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; padding: 1.15rem; }
.agenda-form label { display: grid; gap: .35rem; color: #486581; font-size: .8rem; font-weight: 700; }
.agenda-form label.wide { grid-column: 1 / -1; }
.agenda-form input, .agenda-form select, .agenda-form textarea { width: 100%; min-height: 40px; padding: .6rem .7rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; color: #102a43; }
.agenda-form textarea { min-height: 70px; resize: vertical; }
.agenda-client-field { display: grid; gap: .35rem; }
.agenda-client-field.wide { grid-column: 1 / -1; }
.agenda-client-field > label { color: #486581; font-size: .8rem; font-weight: 700; }
.agenda-client-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.agenda-client-entry .button { width: auto; white-space: nowrap; }
.agenda-client-hint, .agenda-client-status { color: #627d98; font-size: .7rem; }
.agenda-client-status { color: #147d64; font-weight: 700; }
.agenda-client-search { display: grid; gap: .5rem; padding: .65rem; border: 1px solid #cbdbea; border-radius: 10px; background: #f7fafc; }
.agenda-client-results { display: grid; gap: .35rem; max-height: 190px; overflow-y: auto; }
.agenda-client-results button { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .65rem; border: 1px solid #d9e2ec; border-radius: 8px; background: #fff; color: #243b53; text-align: left; cursor: pointer; }
.agenda-client-results button:hover { border-color: #93c5fd; background: #eff6ff; }
.agenda-client-results button small { color: #627d98; font-size: .68rem; text-align: right; }
.agenda-client-results > span { padding: .55rem; color: #627d98; font-size: .74rem; text-align: center; }
.agenda-editor .confirm-button { width: auto; margin: 0 1.15rem 1.15rem; padding: 0 1rem; }
.agenda-nav { display: flex; gap: .35rem; }
.icon-button { min-width: 34px; min-height: 32px; border: 1px solid #bcccdc; border-radius: 7px; background: #fff; color: #1f5d8f; cursor: pointer; }
.agenda-week { display: grid; grid-template-columns: repeat(7, minmax(74px, 1fr)); gap: .45rem; padding: 1rem; border-bottom: 1px solid #e6edf3; }
.agenda-day { display: grid; gap: .2rem; min-height: 78px; padding: .65rem .35rem; border: 1px solid #e6edf3; border-radius: 9px; background: #f8fafc; color: #627d98; cursor: pointer; }
.agenda-day strong { color: #102a43; font-size: 1.25rem; }.agenda-day small { font-size: .68rem; }.agenda-day.today { border-color: #2563eb; background: #eff6ff; }.agenda-day:hover { border-color: #93c5fd; }
.agenda-list { min-height: 300px; }.agenda-legend { display: flex; gap: 1rem; padding: .8rem 1.15rem .2rem; color: #627d98; font-size: .76rem; }.agenda-legend span { display: inline-flex; align-items: center; gap: .35rem; }.agenda-legend i { width: 9px; height: 9px; border-radius: 50%; }.agenda-legend-service { background: #2563eb; }.agenda-legend-reminder { background: #f59e0b; }.agenda-event { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.15rem; border-left: 4px solid #2563eb; border-bottom: 1px solid #edf2f7; }.agenda-event > div:first-child { flex: 1 1 auto; min-width: 0; }.agenda-event-service { background: #f5f9ff; border-left-color: #2563eb; }.agenda-event-reminder { background: #fffbeb; border-left-color: #f59e0b; }.agenda-event strong, .agenda-event small { display: block; }.agenda-event small { margin-top: .22rem; color: #829ab1; font-size: .76rem; }.agenda-actions { display: grid; flex: 0 0 190px; width: 190px; gap: .38rem; align-items: stretch; }.agenda-actions select { width: 100%; min-height: 34px; padding: .3rem .55rem; border: 1px solid #bcccdc; border-radius: 7px; background: #fff; color: #243b53; font-size: .78rem; }.agenda-actions .button { width: 100%; min-width: 0; min-height: 34px; justify-content: center; padding-right: .6rem; padding-left: .6rem; white-space: normal; line-height: 1.15; }.agenda-actions .icon-button { justify-self: end; }
@media (max-width: 980px) { .agenda-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .agenda-form { grid-template-columns: 1fr; }.agenda-form label.wide, .agenda-client-field.wide { grid-column: auto; }.agenda-client-entry { grid-template-columns: 1fr; }.agenda-client-entry .button { width: 100%; }.agenda-week { overflow-x: auto; grid-template-columns: repeat(7, 90px); }.agenda-event { align-items: flex-start; flex-direction: column; }.agenda-actions { width: 100%; flex-basis: auto; } }
.status-dot { color: #147d64; font-size: .82rem; font-weight: 700; }
.loading-card, .empty-state { padding: 2.5rem; color: #627d98; text-align: center; }
.empty-page { max-width: 620px; padding: 4rem 1rem; margin: 0 auto; text-align: center; }.empty-page h1 { color: #102a43; }.empty-page p:not(.eyebrow) { color: #627d98; margin-bottom: 1.5rem; }
@media (max-width: 720px) { .page-heading { align-items: flex-start; } .filter-card { align-items: stretch; } .field.grow, .field.compact { flex-basis: 100%; } .button.secondary { width: 100%; } }

.notice { padding: .85rem 1rem; margin-bottom: 1rem; border-radius: 10px; font-weight: 700; }
.notice-error { color: #9b2c2c; background: #fff5f5; border: 1px solid #feb2b2; }
.notice-success { color: #146c43; background: #ecfdf3; border: 1px solid #a7f3d0; }
.history-detail-modal { width: min(900px, 100%); }
.history-detail-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.history-detail-summary span { display: grid; gap: 3px; min-width: 130px; padding: 10px 12px; border-radius: 9px; background: #f8fafc; color: #627d98; font-size: .78rem; }
.history-detail-summary strong { color: #10233f; font-size: 1rem; }
.history-tax-documents { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid #dfe7ef; }
.history-tax-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.history-tax-heading h3 { margin: .15rem 0 0; color: #10233f; font-size: 1.05rem; }
.history-tax-heading small { color: #627d98; }
.history-tax-chain { display: grid; gap: .65rem; }
.history-tax-document { padding: .9rem 1rem; border: 1px solid #d9e4ef; border-left: 4px solid #2878b5; border-radius: 10px; background: #fbfdff; }
.history-tax-document.credit-note { border-left-color: #7c3aed; background: #fcfaff; }
.history-tax-document.debit-note { border-left-color: #d97706; background: #fffdf8; }
.history-tax-document > header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.history-tax-document > header div { display: grid; gap: .15rem; }
.history-tax-document > header span { color: #627d98; font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.history-tax-document > header strong, .history-tax-document > header b { color: #10233f; }
.history-tax-metadata { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .75rem; }
.history-tax-metadata span { display: grid; gap: .15rem; min-width: 135px; color: #829ab1; font-size: .72rem; }
.history-tax-metadata strong { overflow-wrap: anywhere; color: #334e68; font-size: .82rem; }
.history-tax-document > p { margin: .7rem 0 0; color: #486581; font-size: .82rem; }
.history-tax-document > footer { display: flex; gap: .45rem; margin-top: .75rem; }
.history-tax-document > footer .button { min-height: 32px; padding: .35rem .7rem; font-size: .75rem; text-decoration: none; }
.history-tax-relation { display: flex; align-items: center; gap: .55rem; padding-left: 1rem; color: #627d98; font-size: .78rem; }
.history-tax-relation span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 999px; background: #e9eff6; color: #334e68; }
@media (max-width: 640px) {
  .history-tax-heading, .history-tax-document > header { align-items: start; flex-direction: column; }
  .history-tax-metadata { display: grid; grid-template-columns: 1fr 1fr; }
}
.catalog-selection-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 0 10px; color: #627d98; font-size: .78rem; }
.selection-column { width: 38px; text-align: center; }
.selection-column input { width: 16px; height: 16px; accent-color: #2563eb; }
.delete-confirm-modal { width: min(560px, 100%); }
.delete-confirm-list { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; margin: 16px 0; padding: 12px; border: 1px solid #dbe5ef; border-radius: 9px; background: #f8fafc; color: #173454; }
.delete-confirm-list span { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.delete-confirm-list small { color: #71869c; font-weight: 400; }
.app-toast { position: fixed !important; top: 20px !important; right: 24px !important; left: auto !important; bottom: auto !important; z-index: 10000 !important; display: flex; align-items: flex-start; gap: 14px; width: min(520px, calc(100vw - 48px)); margin: 0 !important; padding: 15px 16px; white-space: pre-line; box-shadow: 0 16px 45px rgba(16,35,63,.2); animation: app-toast-in .22s ease-out both; }
.app-toast > span { flex: 1; line-height: 1.45; }
.app-toast > button { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(16,35,63,.08); color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.app-toast > button:hover { background: rgba(16,35,63,.15); }
@keyframes app-toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 640px) { .app-toast { top: 12px !important; right: 12px !important; width: calc(100vw - 24px); } }
.app-auth-toast { position: fixed !important; top: 20px !important; right: 24px !important; left: auto !important; bottom: auto !important; z-index: 10000 !important; width: min(520px, calc(100vw - 48px)); margin: 0 !important; box-shadow: 0 16px 45px rgba(16,35,63,.2); animation: app-toast-in .22s ease-out both; }
@media (max-width: 640px) { .app-auth-toast { top: 12px !important; right: 12px !important; width: calc(100vw - 24px); } }

/* Convención global de diálogos: la capa siempre se calcula contra la ventana
   visible y su único contenido queda centrado, incluso después de hacer scroll. */
:where(.help-modal-backdrop, .modal-backdrop, .cash-modal-backdrop, .finance-confirm-backdrop, .catalog-modal-backdrop, .client-history-backdrop, .inventory-detail-backdrop, .print-agent-modal-backdrop, .cleanup-overlay) {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2000 !important;
    display: grid !important;
    place-items: center !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 24px !important;
    overflow: auto !important;
    overscroll-behavior: contain;
}
:where(.help-modal-backdrop, .modal-backdrop, .cash-modal-backdrop, .finance-confirm-backdrop, .catalog-modal-backdrop, .client-history-backdrop, .inventory-detail-backdrop, .print-agent-modal-backdrop, .cleanup-overlay) > * {
    margin: auto !important;
    max-height: calc(100dvh - 48px);
}
@media (max-width: 640px) {
    :where(.help-modal-backdrop, .modal-backdrop, .cash-modal-backdrop, .finance-confirm-backdrop, .catalog-modal-backdrop, .client-history-backdrop, .inventory-detail-backdrop, .print-agent-modal-backdrop, .cleanup-overlay) { padding: 12px !important; }
    :where(.help-modal-backdrop, .modal-backdrop, .cash-modal-backdrop, .finance-confirm-backdrop, .catalog-modal-backdrop, .client-history-backdrop, .inventory-detail-backdrop, .print-agent-modal-backdrop, .cleanup-overlay) > * { max-height: calc(100dvh - 24px); }
}
.sii-file-confirm-backdrop { width: 100vw; min-height: 100dvh; }
.sii-file-confirm-modal { width: min(620px, 100%); margin: auto; }
.sii-file-confirm-modal .help-modal-note { margin-top: 18px; }
.sii-confirm-action { min-height: 40px; padding: 9px 15px; font-weight: 900; }
.sii-manual-next { display: inline-flex; margin-top: 16px; text-decoration: none; }
.invoice-result-modal { width: min(650px, 100%); }.invoice-result-steps { display: grid; gap: 10px; margin: 18px 0; }.invoice-result-steps article { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #dce6ef; border-radius: 11px; background: #f8fafc; }.invoice-result-steps article > span { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; font-weight: 900; }.invoice-result-steps article > div { display: grid; gap: 3px; }.invoice-result-steps article small { color: #60758c; line-height: 1.4; }.invoice-result-steps article.complete { border-color: #a7e0bd; background: #effbf4; }.invoice-result-steps article.complete > span { background: #16864b; color: #fff; }.invoice-result-steps article.pending { border-color: #b9d5f0; background: #f1f7fd; }.invoice-result-steps article.pending > span { background: #24679a; color: #fff; }.invoice-result-steps article.warning { border-color: #f2c66d; background: #fff8e8; }.invoice-result-steps article.warning > span { background: #d98600; color: #fff; }.invoice-result-reference { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin-bottom: 18px; padding: 12px 14px; border-radius: 9px; background: #f3f6fa; }.invoice-result-reference span { color: #60758c; font-size: .75rem; font-weight: 800; }.invoice-result-reference strong { text-align: right; }.invoice-result-reference small { grid-column: 1 / -1; color: #60758c; overflow-wrap: anywhere; }
.cash-banner { display: flex; justify-content: space-between; align-items: center; gap: .75rem; width: min(520px, 100%); padding: .6rem .75rem; margin: 0 0 .8rem auto; background: #fff; border: 1px solid #d9e2ec; border-radius: 10px; box-shadow: 0 3px 12px rgba(16,42,67,.04); }
.cash-banner > div:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 .45rem; min-width: 0; }
.cash-banner > div:first-child strong { font-size: .82rem; }
.cash-banner small { grid-column: 2; margin: 0; overflow: hidden; color: #627d98; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.cash-banner .cash-actions { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; flex: 0 0 auto; }
.cash-banner .badge { padding: .3rem .5rem; font-size: .66rem; }
.cash-banner .button { min-height: 31px; padding: .4rem .65rem; border-radius: 7px; font-size: .72rem; }
.sales-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.sales-topbar .page-heading { margin-bottom: 0; }
.sales-topbar .cash-banner { align-self: center; width: min(520px, 46%); margin: 0; }
.cash-indicator { width: 10px; height: 10px; background: #22c55e; border-radius: 50%; }
.badge { padding: .4rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.badge.success { color: #147d64; background: #ecfdf3; }
.badge.warning { color: #9a6700; background: #fff7e6; }
.sales-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 1rem; align-items: start; }
.sale-guide-origin { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; padding: .9rem 1rem; border: 1px solid #93c5fd; border-radius: 12px; color: #1e4e78; background: #eff6ff; }.sale-guide-origin > div { display: grid; gap: .2rem; }.sale-guide-origin span { color: #5b7288; font-size: .78rem; }
.product-picker, .sale-card { min-height: 560px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem; border-bottom: 1px solid #e6edf3; }
.section-title h2 { margin: 0; color: #102a43; font-size: 1.05rem; }
.section-title p { margin: .25rem 0 0; color: #829ab1; font-size: .82rem; }
.sale-card .sale-header { display: grid; gap: .7rem; padding: .9rem 1rem .75rem; background: linear-gradient(180deg, #fff, #fbfdff); }
.sale-header-main { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 0; }
.sale-header-copy { min-width: 0; }
.sale-header-copy p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale-options-toggle { display: inline-flex; align-items: center; gap: .35rem; min-height: 28px; padding: .25rem .5rem; border: 1px solid #c7d7e7; border-radius: 7px; background: #f5f9fd; color: #315f86; font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sale-options-toggle:hover { border-color: #8fb7d8; background: #ebf5fd; }
.sale-options-toggle.open { border-color: #f2b84b; background: #fff4d6; color: #8a5700; box-shadow: inset 0 0 0 1px rgba(242,184,75,.15); }
.sale-options-toggle.open:hover { border-color: #e5a62d; background: #ffedbd; }
.sale-options-toggle b { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: #f59e0b; color: #102a43; font-size: .6rem; }
.sale-tools { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-start; gap: .32rem; padding-top: .55rem; border-top: 1px solid #e6edf3; animation: sale-options-in .14s ease-out both; }
@keyframes sale-options-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
.sale-tool-group { display: flex; align-items: center; gap: .15rem; min-height: 28px; padding: 1px; border: 1px solid #dbe5ef; border-radius: 7px; background: #fff; box-shadow: 0 1px 2px rgba(16,42,67,.04); }
.sale-quick-group { flex: 0 0 auto; border: 0; background: transparent; box-shadow: none; }
.sale-tools .sale-option-label { min-height: 24px; padding: .1rem .35rem; border: 0; border-radius: 5px; background: transparent; font-size: .7rem; white-space: nowrap; }
.sale-tools .sale-option-label input[type="checkbox"] { width: 13px; height: 13px; min-height: 13px; margin: 0; }
.sale-tools .discount-input { gap: .2rem; padding-left: .1rem; border-left: 1px solid #dbe5ef; border-radius: 0 5px 5px 0; }
.sale-tools .discount-input span { color: #627d98; font-size: .64rem; font-weight: 800; }
.sale-tools .sale-option-label input[type="text"] { width: 42px !important; min-height: 22px; padding: .12rem .3rem; border: 1px solid #9fb3c8; border-radius: 5px; background: #fff; color: #102a43; font-size: .68rem; text-align: right; }
.sale-header .icon-button { width: 22px; min-width: 22px; min-height: 22px; padding: 0; border: 0; border-radius: 5px; background: #e3f1ff; color: #1769aa; font-size: .64rem; font-weight: 800; }
.sale-header .quick-sale-trigger { min-height: 28px; padding: .25rem .55rem; border-color: #e79000; border-radius: 6px; background: #f59e0b; color: #102a43; font-size: .68rem; font-weight: 850; white-space: nowrap; }

/* Administracion de usuarios y permisos */
.users-page { display: grid; gap: 1rem; }
.users-page .card { overflow: hidden; background: #fff; border: 1px solid #d9e2ec; border-radius: 14px; box-shadow: 0 5px 18px rgba(16,42,67,.05); }
.split-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr); gap: 1rem; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; border-bottom: 1px solid #e6edf3; }
.section-heading h2 { margin: .25rem 0 0; color: #102a43; font-size: 1.15rem; }
.section-heading p { margin: .35rem 0 0; color: #627d98; font-size: .82rem; }
.stack-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; padding: 1.25rem; }
.stack-form label { display: grid; gap: .4rem; color: #486581; font-size: .8rem; font-weight: 700; }
.stack-form label:nth-of-type(4), .stack-form button { grid-column: 1 / -1; }
.stack-form input, .stack-form select { width: 100%; min-height: 42px; padding: .65rem .75rem; color: #243b53; background: #fff; border: 1px solid #bcccdc; border-radius: 8px; font: inherit; font-weight: 400; }
.stack-form input:focus, .stack-form select:focus { outline: 0; border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
.primary-button { min-height: 42px; padding: .65rem 1rem; border: 0; border-radius: 8px; background: #f59e0b; color: #102a43; font-weight: 800; cursor: pointer; }
.primary-button:disabled { cursor: wait; opacity: .65; }
.success-banner, .error-banner { margin: 1rem 1.25rem 0; padding: .75rem .9rem; border-radius: 8px; font-size: .82rem; }
.success-banner { color: #166534; background: #ecfdf3; border: 1px solid #bbf7d0; }
.error-banner { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; }
.compact-table { max-height: 340px; overflow: auto; }
.compact-table table { width: 100%; min-width: 620px; border-collapse: collapse; }
.compact-table th { padding: .75rem 1rem; color: #486581; background: #f5f7fa; font-size: .76rem; text-align: left; white-space: nowrap; }
.compact-table td { padding: .85rem 1rem; color: #243b53; border-top: 1px solid #edf2f7; vertical-align: middle; }
.compact-table td strong, .compact-table td small { display: block; }
.compact-table td small { margin-top: .25rem; color: #829ab1; font-size: .75rem; }
.user-status-filter { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.user-status-filter .row-button.active { border-color: #1f5f98; background: #eaf3fb; color: #164f7f; box-shadow: inset 0 0 0 1px rgba(31,95,152,.12); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; padding: 1.25rem; }
.role-card { min-width: 0; padding: 1rem; border: 1px solid #dbe5f0; border-radius: 12px; background: #fbfdff; }
.role-card-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.role-card-heading strong { color: #102a43; font-size: 1rem; }
.role-card-heading span { color: #627d98; font-size: .75rem; white-space: nowrap; }
.role-card > p { min-height: 2.5rem; margin: .65rem 0 1rem; color: #627d98; font-size: .82rem; line-height: 1.45; }
.permission-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.permission-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .5rem; border-radius: 999px; font-size: .7rem; line-height: 1.2; }
.permission-chip b { font-size: .65rem; }
.permission-on { color: #166534; background: #dcfce7; }
.permission-off { color: #829ab1; background: #eef2f6; }
.row-button { padding: .45rem .7rem; color: #1f5d8f; background: #fff; border: 1px solid #b6d7f5; border-radius: 7px; font-size: .76rem; cursor: pointer; }
.row-button:hover { background: #edf6ff; }
.role-editor-card { padding-bottom: 1.25rem; }
.permission-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: 1.25rem; }
.permission-editor .check-field { display: flex; align-items: flex-start; gap: .55rem; padding: .75rem; border: 1px solid #e6edf3; border-radius: 9px; background: #fbfdff; }
.permission-editor .check-field span { display: grid; gap: .25rem; }
.permission-editor small { color: #829ab1; font-size: .72rem; line-height: 1.35; }
.button-row { display: flex; justify-content: flex-end; gap: .65rem; padding: 0 1.25rem; }
@media (max-width: 900px) { .split-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .stack-form, .permission-editor { grid-template-columns: 1fr; }.stack-form label:nth-of-type(4), .stack-form button { grid-column: auto; }.button-row { flex-direction: column; }.button-row button { width: 100%; }.role-card > p { min-height: 0; } }
.scan-button { padding: .55rem .8rem; color: #1f5d8f; background: #edf6ff; border: 1px solid #b6d7f5; border-radius: 8px; font-weight: 700; cursor: pointer; }
.scan-row { display: flex; gap: .6rem; padding: 1rem 1.15rem; border-bottom: 1px solid #e6edf3; }
.scan-row input { flex: 1; min-width: 0; min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; }
.product-results { max-height: 430px; overflow-y: auto; }
.product-result { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: .85rem 1.15rem; color: #243b53; background: #fff; border: 0; border-bottom: 1px solid #edf2f7; text-align: left; cursor: pointer; }
.product-result:hover { background: #f5f9fd; }
.product-result strong, .product-result small, .product-meta b, .product-meta small { display: block; }
.product-result small, .product-meta small { margin-top: .25rem; color: #829ab1; font-size: .76rem; }
.product-meta { text-align: right; }
.product-meta b { color: #102a43; }
.sale-lines { max-height: 290px; overflow-y: auto; }
.sale-line { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: center; padding: 1rem 1.15rem; border-bottom: 1px solid #edf2f7; }
.sale-line strong, .sale-line small { display: block; }
.sale-line small { margin-top: .25rem; color: #829ab1; font-size: .76rem; }
.quantity { display: flex; align-items: center; gap: .5rem; }
.quantity button { min-width: 28px; min-height: 28px; border: 1px solid #bcccdc; background: #fff; cursor: pointer; }
.quantity .remove { margin-left: .35rem; color: #b42318; border: 0; font-size: .75rem; }
.sale-summary { padding: 1.15rem; background: #f8fafc; border-top: 1px solid #e6edf3; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: .55rem; color: #627d98; }
.summary-row.final { margin-top: .85rem; padding-top: .85rem; color: #102a43; border-top: 1px solid #d9e2ec; font-size: 1.2rem; }
.summary-row.final strong { font-size: 1.55rem; }
.summary-row.warning { color: #9a6700; }
.discount-row, .payment-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .85rem; color: #486581; font-size: .86rem; }
.discount-row input, .payment-row select { width: 180px; min-height: 38px; padding: .5rem; border: 1px solid #bcccdc; border-radius: 7px; background: #fff; }
.confirm-button { width: 100%; min-height: 48px; margin-top: 1.25rem; color: #fff; background: #f59e0b; border: 0; border-radius: 9px; font-size: .98rem; font-weight: 800; cursor: pointer; }
.confirm-button:disabled { opacity: .55; cursor: not-allowed; }
.customer-row, .document-row { display: grid; gap: .4rem; margin-top: .85rem; color: #486581; font-size: .86rem; }
.customer-row > label, .document-row { font-weight: 600; }
.customer-row > .check-field { display: flex; align-items: center; justify-content: flex-start; width: fit-content; min-height: 36px; padding: .35rem .6rem; border: 1px solid #dbe5ef; border-radius: 8px; background: #fff; font-weight: 600; }
.customer-row > .check-field { min-height: 28px; padding: .2rem .45rem; border-radius: 6px; font-size: .74rem; }
.customer-row input, .customer-row select, .document-row select { width: 100%; min-height: 38px; padding: .5rem .65rem; border: 1px solid #bcccdc; border-radius: 7px; background: #fff; color: #243b53; }
.customer-row input:focus, .customer-row select:focus, .document-row select:focus { outline: 0; border-color: #2b7ab5; box-shadow: 0 0 0 3px #dbeafe; }
.document-hint { margin-top: .55rem; padding: .55rem .7rem; border-radius: 7px; color: #9a6700; background: #fff7e6; font-size: .76rem; }
.sale-empty-state { min-height: 62px; padding: .75rem 1rem; color: #829ab1; font-size: .78rem; }
.quick-sale-modal { width: min(800px, 100%); }
.quick-sale-modal .cash-modal-copy { margin: .7rem 0 1.15rem; }
.quick-sale-form { display: grid; grid-template-columns: minmax(190px, 1.65fr) minmax(150px, 1.15fr) 100px 135px auto; align-items: end; gap: .75rem; padding: 1rem; border: 1px solid #dbe5ef; border-radius: 12px; background: #f8fafc; }
.quick-sale-form label { display: grid; gap: .4rem; min-width: 0; color: #486581; font-size: .78rem; font-weight: 700; }
.quick-sale-form input { width: 100%; min-height: 42px; padding: .65rem .7rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; color: #243b53; }
.quick-sale-form input:focus { outline: 0; border-color: #2b7ab5; box-shadow: 0 0 0 3px #dbeafe; }
.quick-sale-form button { min-height: 42px; margin: 0; white-space: nowrap; }
.quick-sale-lines { display: grid; gap: .6rem; max-height: 270px; overflow-y: auto; margin-top: 1rem; padding-right: .15rem; }
.quick-sale-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; border: 1px solid #dbe5ef; border-radius: 10px; background: #fff; }
.quick-sale-line > div:first-child { min-width: 0; }
.quick-sale-line strong, .quick-sale-line small { display: block; }
.quick-sale-line small { margin-top: .25rem; color: #829ab1; font-size: .76rem; }
.quick-sale-line .quantity { flex: 0 0 auto; }
.quick-sale-modal .empty-state { padding: 1.2rem; border: 1px dashed #bfd0e0; border-radius: 10px; background: #f8fafc; }
@media (max-width: 980px) { .sales-topbar { align-items: stretch; flex-direction: column; } .sales-topbar .cash-banner { width: 100%; } .sales-grid { grid-template-columns: 1fr; } .product-picker, .sale-card { min-height: auto; } }
@media (max-width: 760px) { .quick-sale-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quick-sale-form button { grid-column: 1 / -1; } }
@media (max-width: 560px) { .cash-banner { align-items: flex-start; flex-direction: column; } .section-title { align-items: flex-start; flex-direction: column; } .sale-header-main { align-items: flex-start; width: 100%; } .sale-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; } .sale-tools .sale-tool-group { min-width: 0; } .sale-tools .sale-option-label { flex: 1 1 auto; } .sale-tool-group.sale-discount-group { justify-content: flex-start; } .scan-row { flex-direction: column; } .sale-line { grid-template-columns: 1fr auto; } .sale-line > strong { grid-column: 2; grid-row: 1; } .quantity { grid-column: 1 / -1; justify-content: flex-start; } .quick-sale-form { grid-template-columns: 1fr; } .quick-sale-form button { grid-column: auto; width: 100%; } .quick-sale-line { align-items: flex-start; flex-direction: column; } .quick-sale-line .quantity { width: 100%; } }
@media (max-width: 560px) { .cash-banner { width: 100%; margin-left: 0; } .cash-banner .cash-actions { width: 100%; justify-content: flex-start; } }

.web-tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid #d9e2ec; }
.web-tabs button { padding: .75rem 1rem; color: #486581; background: transparent; border: 0; border-bottom: 3px solid transparent; font-weight: 700; cursor: pointer; }
.web-tabs button.active { color: #1f5d8f; border-bottom-color: #f59e0b; }
.budget-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.15rem; }
.budget-form label, .budget-line-add { display: flex; flex-direction: column; gap: .4rem; color: #486581; font-size: .8rem; font-weight: 700; }
.budget-form label.wide { grid-column: 1 / -1; }
.budget-form input, .budget-form select, .budget-form textarea, .budget-line-add select, .budget-line-add input { min-height: 42px; padding: .65rem .75rem; color: #243b53; background: #fff; border: 1px solid #bcccdc; border-radius: 8px; font: inherit; font-weight: 400; }
.budget-form textarea { min-height: 70px; resize: vertical; }
.budget-vehicle-panel { min-width: 0; margin: 0 1.15rem 1rem; padding: .35rem 1rem .9rem; border: 1px solid #bad4c5; border-radius: 12px; background: linear-gradient(135deg, #f4fbf6, #edf7f0); }
.budget-vehicle-panel legend { padding: 0 .45rem; color: #17633a; font-weight: 800; }
.budget-vehicle-panel .budget-form { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; padding: .55rem 0 0; }
.budget-vehicle-panel label { min-width: 0; }
.budget-vehicle-panel input { width: 100%; }
.budget-vehicle-summary { margin-top: .55rem; padding: .65rem .8rem; border-left: 4px solid #2f855a; border-radius: 6px; background: #f0fff4; color: #22543d; }
.budget-line-add { flex-direction: row; align-items: end; padding: 0 1.15rem 1rem; }
.budget-line-add select { flex: 1; }
.budget-line-add input { width: 90px; }
.budget-line-add .budget-new-item-toggle { white-space: nowrap; }
.budget-line-add .budget-line-search { flex: 1.05; width: auto; min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; color: #243b53; font: inherit; font-weight: 400; }
.budget-line-add .budget-line-search::placeholder { color: #8fa8c2; }
.budget-new-item { margin: 0 1.15rem 1rem; padding: 1rem; border: 1px solid #b9d9c8; border-radius: 12px; background: #f2faf5; }
.budget-new-item-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.budget-new-item-heading h3 { margin: .15rem 0 0; color: #173f35; }
.budget-new-item-heading small, .budget-new-item .field-help { color: #53776c; }
.budget-new-item-form { display: grid; grid-template-columns: minmax(220px, 1.8fr) minmax(160px, 1.15fr) 130px 105px 145px auto; align-items: end; gap: .75rem; }
.budget-new-item-form label { display: grid; gap: .4rem; min-width: 0; color: #486581; font-size: .78rem; font-weight: 700; }
.budget-new-item-form input, .budget-new-item-form select { width: 100%; min-height: 42px; padding: .65rem .7rem; border: 1px solid #a9c8b8; border-radius: 8px; background: #fff; color: #243b53; font: inherit; font-weight: 400; }
.budget-new-item-form input:focus, .budget-new-item-form select:focus { outline: 0; border-color: #238060; box-shadow: 0 0 0 3px #d8f1e5; }
.budget-new-item-form button { min-height: 42px; margin: 0; white-space: nowrap; }
.budget-new-item .field-help { margin: .75rem 0 0; }
.budget-lines em { color: #207559; font-style: normal; font-weight: 700; }
.budget-lines { min-height: 90px; margin: 0 1.15rem; border-top: 1px solid #e6edf3; }
.budget-lines > div { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid #edf2f7; }
.budget-lines > div span { flex: 1; }.budget-lines strong, .budget-lines small { display: block; }.budget-lines small { margin-top: .2rem; color: #829ab1; font-size: .76rem; }
.link-danger { color: #b42318; background: transparent; border: 0; cursor: pointer; font-size: .78rem; }
.budget-total { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; padding: 1.15rem; margin-top: 1rem; color: #627d98; background: #f8fafc; border-top: 1px solid #e6edf3; }.budget-total strong { color: #102a43; font-size: 1.4rem; }.confirm-button.compact { width: auto; min-height: 42px; margin-top: 0; padding: 0 1.2rem; }
.state-pill { display: inline-block; padding: .3rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 800; }.state-1 { color: #1d4ed8; background: #eff6ff; }.state-2 { color: #9a6700; background: #fff7e6; }.state-3 { color: #6d28d9; background: #f5f3ff; }.state-4 { color: #b45309; background: #fff7ed; }.state-6 { color: #b42318; background: #fff1f2; }.state-5 { color: #147d64; background: #ecfdf3; }.state-7 { color: #52606d; background: #f0f4f8; }
.row-actions { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 220px; }.row-actions button { padding: .35rem .5rem; color: #1f5d8f; background: #fff; border: 1px solid #b6d7f5; border-radius: 6px; font-size: .74rem; cursor: pointer; }.row-actions button:hover { background: #edf6ff; }.detail-card { margin-top: 1rem; }.history-list { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.15rem; color: #627d98; font-size: .78rem; }
.budget-board { padding: 1.15rem; background: #fff; border: 1px solid #d9e2ec; border-radius: 14px; }.board-header h2 { margin: 0; color: #102a43; }.board-header p { margin: .35rem 0 1rem; color: #627d98; }.board-columns { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: .75rem; overflow-x: auto; }.board-column { min-height: 320px; padding: .7rem; background: #f8fafc; border-radius: 10px; }.board-column header { display: flex; justify-content: space-between; padding: .35rem .25rem .7rem; color: #486581; font-size: .8rem; font-weight: 800; }.board-column header b { color: #102a43; }.board-column { transition: background-color .15s ease, box-shadow .15s ease; }.board-column.drop-target { box-shadow: inset 0 0 0 1px #bcccdc; }.board-column.drop-target-active { background: #eaf2fb; box-shadow: inset 0 0 0 2px #2f6fb0; }.board-column-empty { padding: .75rem; color: #9fb3c8; font-size: .78rem; text-align: center; }.board-card { display: block; width: 100%; padding: .75rem; margin-bottom: .55rem; color: #243b53; background: #fff; border: 1px solid #d9e2ec; border-radius: 8px; text-align: left; cursor: pointer; }.board-card:hover { border-color: #7aa7cc; }.board-card:focus-visible { outline: 2px solid #2f6fb0; outline-offset: 1px; }.board-card.draggable { cursor: grab; }.board-card.draggable:active { cursor: grabbing; }.board-card strong, .board-card small, .board-card b, .board-card em { display: block; }.board-card small { margin: .3rem 0; color: #829ab1; }.board-card b { color: #1f5d8f; }.board-card em { margin-top: .3rem; color: #9fb3c8; font-size: .72rem; font-style: normal; }
@media (max-width: 980px) { .budget-vehicle-panel .budget-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .budget-new-item-form { grid-template-columns: repeat(3, minmax(0, 1fr)); } .budget-new-item-form button { grid-column: 1 / -1; } }
@media (max-width: 720px) { .budget-form { grid-template-columns: 1fr; }.budget-form label.wide { grid-column: auto; }.budget-vehicle-panel { margin: 0 .75rem .85rem; padding: .35rem .75rem .75rem; }.budget-vehicle-panel .budget-form { grid-template-columns: 1fr; }.budget-line-add { align-items: stretch; flex-direction: column; }.budget-line-add input { width: auto; }.budget-new-item { margin: 0 .75rem .85rem; }.budget-new-item-heading { align-items: flex-start; flex-direction: column; }.budget-new-item-form { grid-template-columns: 1fr; }.budget-new-item-form button { grid-column: auto; width: 100%; }.budget-total { align-items: stretch; flex-direction: column; }.confirm-button.compact { width: 100%; } }
.row-button { display: inline-flex; align-items: center; padding: .35rem .5rem; color: #1f5d8f; background: #edf6ff; border: 1px solid #b6d7f5; border-radius: 6px; font-size: .74rem; text-decoration: none; }
.financial-card { margin-top: 1rem; }.financial-bars { display: flex; align-items: end; gap: .35rem; height: 230px; padding: 1.5rem 1.2rem .8rem; overflow-x: auto; }.financial-bar { display: flex; flex-direction: column; justify-content: end; align-items: center; min-width: 24px; height: 100%; gap: .35rem; }.financial-bar span { width: 100%; min-height: 8px; background: linear-gradient(180deg, #2b7ab5, #1f5d8f); border-radius: 5px 5px 2px 2px; }.financial-bar small { color: #829ab1; font-size: .65rem; white-space: nowrap; transform: rotate(-45deg) translate(-.3rem, .3rem); }
.client-history-card { margin-top: 1rem; }.history-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 1.15rem; }.history-tabs > div { min-height: 120px; padding: .9rem; background: #f8fafc; border-radius: 9px; }.history-tabs h3 { margin: 0 0 .7rem; color: #1f5d8f; font-size: .95rem; }.history-tabs p { margin: .45rem 0; color: #627d98; font-size: .78rem; }.history-tabs p strong, .history-tabs p b { color: #243b53; }
@media (max-width: 800px) { .history-tabs { grid-template-columns: 1fr; } }
.purchase-line-add { display: flex; align-items: end; gap: .6rem; padding: 0 1.15rem 1rem; }.purchase-line-add select { flex: 1; min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; }.purchase-line-add input { width: 120px; min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; }.purchase-check { align-self: end; }.purchase-history { margin-top: 1rem; }
@media (max-width: 720px) { .purchase-line-add { align-items: stretch; flex-direction: column; }.purchase-line-add input { width: auto; } }
.product-history-card { margin-top: 1rem; }.price-legend { display: flex; gap: 1rem; padding: 0 1.15rem; color: #486581; font-size: .8rem; }.legend-sale::before, .legend-cost::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: .35rem; border-radius: 50%; background: #2563eb; }.legend-cost::before { background: #f59e0b; }.price-timeline { display: flex; flex-direction: column; gap: .65rem; padding: 1rem 1.15rem; }.price-point { display: grid; grid-template-columns: 72px minmax(100px, 1fr) 85px; gap: .7rem; align-items: center; }.point-date { color: #829ab1; font-size: .75rem; }.point-line { display: block; height: 9px; border-radius: 999px; }.point-line.sale { background: #2563eb; }.point-line.cost { background: #f59e0b; }.price-point strong { color: #102a43; text-align: right; }.price-point small { grid-column: 2 / -1; color: #829ab1; font-size: .72rem; }
.help-modal-backdrop{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(7,24,48,.68);backdrop-filter:blur(3px)}
.help-modal{width:min(680px,100%);max-height:calc(100vh - 48px);overflow:auto;padding:28px;border:1px solid #d5e0ed;border-radius:18px;background:#fff;box-shadow:0 24px 80px rgba(7,24,48,.3)}
.help-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;border-bottom:1px solid #e5ebf2;padding-bottom:16px;margin-bottom:18px}
.help-modal h2{margin:4px 0 0;color:#0b2a4a}
.help-modal p{color:#506982;line-height:1.55}
.help-steps{display:grid;gap:12px;margin:20px 0;padding-left:24px;color:#203f5d;line-height:1.5}
.help-steps li::marker{color:#f59d0b;font-weight:700}
.help-modal code{padding:3px 6px;border-radius:5px;background:#eef4fa;color:#0b2a4a;font-size:.9em}
.help-modal-note{padding:14px 16px;border-left:4px solid #f59d0b;border-radius:8px;background:#fff8e8;color:#6b4a08}
.help-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.modal-close-button{width:32px;height:32px;border:0;border-radius:50%;background:#eef3f8;color:#31516f;font-weight:700;cursor:pointer}
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(7,24,48,.68); backdrop-filter: blur(3px); }
.modal-card { width: min(980px, 100%); max-height: calc(100vh - 48px); max-width: 100%; overflow: auto; padding: 24px; border: 1px solid #d5e0ed; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(7,24,48,.3); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid #e5ebf2; }
.modal-header h2 { margin: 4px 0 0; color: #10233f; }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #eef3f8; color: #31516f; font-size: 1.15rem; font-weight: 700; cursor: pointer; }
.modal-actions { margin-top: 18px; }
.sii-document-sent-data { margin-top: 1rem; padding-top: .95rem; border-top: 1px solid #e5ebf2; }
.sii-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .9rem; }
.sii-data-grid > div { border: 1px solid #dce6ef; border-radius: 9px; padding: .65rem .7rem; background: #f8fafc; }
.sii-data-grid span { display: block; color: #6e86a0; font-size: .72rem; margin-bottom: .15rem; }
.sii-data-grid strong { color: #102a43; display: block; overflow-wrap: anywhere; }
.sii-data-grid small { color: #71869c; display: block; margin-top: .2rem; }
@media (max-width: 760px) { .modal-card { padding: 18px; max-height: calc(100vh - 24px); } .modal-backdrop { padding: 12px; } .sii-data-grid { grid-template-columns: 1fr; } }
@media (max-width:640px){.help-modal-backdrop{padding:12px}.help-modal{padding:20px}.help-modal-actions{flex-direction:column}.help-modal-actions .button{width:100%;text-align:center}}

.sii-source-list{display:grid;gap:10px;margin:18px 0}
.sii-source-list article{display:flex;align-items:flex-start;gap:12px;padding:13px 14px;border:1px solid #d9e5f0;border-radius:10px;background:#f8fbfe}
.sii-source-icon{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:8px;background:#e7f0fb;color:#1d5d92;font-size:.68rem;font-weight:800}
.sii-source-list article > div{min-width:0}
.sii-source-list strong{color:#173454;font-size:.85rem}
.sii-source-list p{margin:4px 0 7px;color:#60758c;font-size:.76rem;line-height:1.45}
.sii-source-list a{color:#1268a0;font-size:.73rem;font-weight:700;text-decoration:none}
.sii-source-list a:hover{text-decoration:underline}
.sii-help-route small{color:#60758c;font-size:.76rem;line-height:1.45}
.client-editor { display: block; }
.client-editor { padding: .75rem 1rem; }
.client-editor .section-heading { padding: 0 0 .55rem; }
.client-editor .filter-row { gap: .7rem; margin-top: .65rem; }
.client-editor .giro-field { min-width: 0; }
.giro-picker { position: relative; }
.giro-picker > input { width: 100%; }
.giro-suggestions { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; overflow-y: auto; padding: 5px; border: 1px solid #b8cde2; border-radius: 9px; background: #fff; box-shadow: 0 12px 30px rgba(16,35,63,.16); }
.giro-suggestions button { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; width: 100%; gap: 8px; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: #173454; text-align: left; cursor: pointer; }
.giro-suggestions button:hover { background: #edf5ff; }
.giro-suggestions strong { color: #1d5d92; font-size: .72rem; }
.giro-suggestions span { color: #345873; font-size: .76rem; line-height: 1.3; }
.field-hint { color: #7890a5; font-size: .68rem; line-height: 1.3; }
@media (min-width: 1050px) { .client-editor .filter-row:nth-of-type(2) { grid-template-columns: minmax(190px, 1fr) minmax(340px, 1.75fr) minmax(230px, 1.15fr); } }
.sii-manual-field input, .sii-manual-field select { border-color: #22c55e; background: #f0fdf4; box-shadow: 0 0 0 2px rgba(34,197,94,.12); }
.sii-manual-field label { color: #15803d; }
.sii-loading { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; padding: 10px 12px; border: 1px solid #bfdbfe; border-radius: 9px; background: #eff6ff; color: #1d4ed8; }
.sii-loading div { display: grid; gap: 2px; }
.sii-loading strong { font-size: .78rem; }
.sii-loading small { color: #54708c; font-size: .7rem; }
.sii-loading-spinner { width: 19px; height: 19px; flex: 0 0 19px; border: 3px solid #bfdbfe; border-top-color: #2563eb; border-radius: 50%; animation: sii-spin .8s linear infinite; }
@keyframes sii-spin { to { transform: rotate(360deg); } }
.comuna-field { min-width: 0; }
.comuna-field .comuna-search { min-height: 34px; padding: .45rem .65rem; font-size: .78rem; }
.comuna-field select { min-width: 0; }
.client-editor + .filter-card { padding: .8rem 1rem; margin-bottom: .8rem; }
.client-table th, .client-table td { padding: .65rem .8rem; }
.client-table-toolbar { align-items: center; gap: 1rem; }
.client-bulk-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .65rem; }
.client-bulk-actions .check-field { white-space: nowrap; }
.client-selected-count { color: #1d5d92; font-size: .76rem; font-weight: 700; }
.client-selection-column { width: 48px; min-width: 48px; text-align: center; }
.client-selection-column input { width: 16px; height: 16px; accent-color: #1d66a0; }
.client-table .row-button.danger { color: #b42318; border-color: #f3b5ae; }
.client-table .row-button.danger:hover { background: #fff2f0; }
.client-delete-modal { max-width: 560px; }
.client-delete-modal h2 { margin: .25rem 0 .65rem; color: #102a43; }
.client-delete-list { max-height: 150px; margin: .8rem 0; padding: .65rem .9rem .65rem 1.8rem; overflow-y: auto; border: 1px solid #e1eaf3; border-radius: 9px; background: #f8fbfe; color: #173454; }
.client-delete-list li { padding: .2rem 0; }
.client-delete-list small { margin-left: .4rem; color: #7890a5; }
.config-tabs { display: flex; gap: 4px; margin: 1rem 0 0; padding: 5px; border: 1px solid #d5e0ed; border-radius: 12px 12px 0 0; background: #edf4fb; overflow-x: auto; }
.config-tab { border: 0; border-radius: 8px; padding: .75rem 1.2rem; color: #486581; background: transparent; font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.config-tab:hover { color: #0b2a4a; background: #fff; }.config-tab.active { color: #0b2a4a; background: #fff; box-shadow: 0 2px 8px rgba(16,42,67,.1); }
.config-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.config-section-card { display: flex; min-height: 210px; flex-direction: column; justify-content: space-between; min-width: 0; padding: 1.25rem; border: 1px solid #d5e0ed; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(16,42,67,.05); }
.config-section-card h2 { margin: .25rem 0 .5rem; color: #102a43; }.config-section-card p:not(.eyebrow) { color: #627d98; line-height: 1.45; }.config-section-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }.config-status { color: #486581; font-size: .76rem; }.config-section-footer .button { white-space: nowrap; }
.config-section-card-expanded { grid-column: 1 / -1; }
@media (max-width: 640px) { .config-sections { grid-template-columns: 1fr; } }
.company-config-card { overflow: hidden; }
.company-config-card .section-title { padding: 1.25rem 1.25rem .15rem; }
.company-config-card .section-title h2 { margin: 0; color: #102a43; }
.company-config-card .section-title p { margin: .35rem 0 0; color: #627d98; font-size: .82rem; }
.company-config-card .budget-form { margin: .85rem 1.15rem 0; padding: 1.15rem; border: 1px solid #e1eaf3; border-radius: 12px; background: linear-gradient(135deg, #f8fbff, #f3f7fb); }
.company-config-card .budget-form label { color: #35516f; }
.company-config-card .budget-form input, .company-config-card .budget-form select, .company-config-card .budget-form textarea { width: 100%; min-height: 42px; padding: .65rem .75rem; color: #102a43; background: #fff; border: 1px solid #b9cce0; border-radius: 8px; font: inherit; font-weight: 400; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.company-config-card .budget-form input:hover, .company-config-card .budget-form select:hover, .company-config-card .budget-form textarea:hover { border-color: #7fa6c9; }
.company-config-card .budget-form input:focus, .company-config-card .budget-form select:focus, .company-config-card .budget-form textarea:focus { outline: 0; border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px #dbeafe; }
.company-config-card .budget-form textarea { min-height: 86px; resize: vertical; }
.operational-profile-grid .check-field { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .7rem; min-height: 82px; padding: .9rem; white-space: normal; border: 1px solid #d7e3ef; border-radius: 10px; background: #fff; }
.operational-profile-grid .check-field input { width: 18px !important; min-height: 18px !important; margin: .15rem 0 0; }
.operational-profile-grid .check-field span { display: grid; gap: .2rem; }
.operational-profile-grid .check-field strong { color: #243b53; font-size: .86rem; }
.operational-profile-grid .check-field small { color: #64809a; font-size: .74rem; font-weight: 500; line-height: 1.35; }
.operational-profile-options { grid-column: 1 / -1; margin: 0; padding: 1rem; border: 1px solid #d7e3ef; border-radius: 12px; background: #f7fafc; }
.operational-profile-options legend { padding: 0 .4rem; color: #243b53; font-size: .86rem; font-weight: 800; }
.operational-profile-options > p { margin: 0 0 .85rem; color: #64809a; font-size: .78rem; }
.operational-profile-options > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.operational-profile-options .check-field { min-height: 68px; background: #fff; }
.operational-profile-options .check-field:has(input:checked) { border-color: #5aa6d8; box-shadow: 0 0 0 2px rgba(46, 145, 205, .1); }
.operational-profile-summary { display: block; margin-top: .8rem; color: #315b78; font-weight: 700; }
@media (max-width: 900px) { .operational-profile-options > div { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .operational-profile-options { grid-column: auto; }.operational-profile-options > div { grid-template-columns: 1fr; } }
.config-savebar { margin-top: 1.1rem; padding: 1rem 1.25rem; background: #eef6ff; border-top: 1px solid #d7e7f7; }
.config-savebar > span { display: flex; flex-direction: column; gap: .2rem; }
.config-savebar small { color: #627d98; font-size: .72rem; }
.config-savebar strong { color: #102a43; font-size: 1.05rem; }
.config-section-card { position: relative; overflow: hidden; background: linear-gradient(145deg, #fff, #fbfdff); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.config-section-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: #2563eb; }
.config-section-card:nth-child(2)::before { background: #f59e0b; }
.config-section-card:nth-child(3)::before { background: #7c3aed; }
.config-section-card:nth-child(4)::before { background: #16a34a; }
.config-section-card:hover { transform: translateY(-2px); border-color: #b6d7f5; box-shadow: 0 12px 28px rgba(16,42,67,.1); }
.config-section-card-wide { grid-column: 1 / -1; min-height: 0; }
.config-section-card-wide > div:first-child { margin-bottom: .8rem; }
.config-checklist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: .2rem 0 1rem; }
.config-checklist .config-status { padding: .7rem .8rem; border: 1px solid #d7e5f2; border-radius: 9px; background: #f7fbff; font-weight: 700; }
.config-pos-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem .85rem; margin-top: .25rem; }
.config-pos-form label, .config-upload-grid label { display: grid; gap: .35rem; color: #35516f; font-size: .8rem; font-weight: 700; }
.config-pos-form input, .config-pos-form select, .config-upload-grid input, .config-upload-grid select { width: 100%; min-width: 0; min-height: 36px; padding: .45rem .6rem; border: 1px solid #b9cce0; border-radius: 8px; background: #fff; color: #102a43; font: inherit; font-weight: 400; }
.config-inline-options { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; margin-top: 1rem; padding: .8rem; border: 1px solid #e1eaf3; border-radius: 9px; background: #f8fbff; color: #35516f; font-size: .82rem; }
.config-inline-options label { display: inline-flex; align-items: center; gap: .45rem; }
.config-inline-options input[type=checkbox] { width: 16px; height: 16px; accent-color: #2563eb; }
.config-example { display: grid; gap: .2rem; margin-top: 1rem; padding: .8rem 1rem; border-left: 4px solid #f59e0b; border-radius: 8px; background: #fff8e8; color: #6b4a08; font-size: .82rem; line-height: 1.45; }
.pos-machines-list { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid #e1eaf3; color: #35516f; font-size: .8rem; }
.pos-machine-chip { display: grid; gap: .1rem; padding: .55rem .7rem; border: 1px solid #cfe0ef; border-radius: 9px; background: #f7fbff; }.pos-machine-chip b { color: #102a43; }.pos-machine-chip small { color: #627d98; }
.pos-summary { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .2rem 0 1rem; padding: .75rem .9rem; border: 1px solid #d7e5f2; border-radius: 9px; background: #f7fbff; color: #486581; font-size: .8rem; }.pos-summary span:first-child { margin-right: auto; }.pos-summary b { color: #102a43; font-size: 1.05rem; }.pos-machines-grid { margin: 1rem 0; overflow-x: auto; border: 1px solid #d7e5f2; border-radius: 10px; }.pos-grid-header, .pos-grid-row { display: grid; grid-template-columns: 1.2fr 1.3fr 1.3fr .8fr .8fr auto; align-items: center; gap: .75rem; min-width: 720px; padding: .75rem .9rem; }.pos-grid-header { background: #f1f6fb; color: #486581; font-size: .72rem; font-weight: 800; text-transform: uppercase; }.pos-grid-row { border-top: 1px solid #e5edf5; color: #35516f; font-size: .8rem; }.pos-grid-row strong { color: #102a43; }.pos-enabled { color: #047857; font-weight: 700; }.pos-disabled { color: #9f1239; font-weight: 700; }.pos-empty-state { margin: 1rem 0; padding: 1rem; border: 1px dashed #b9cce0; border-radius: 9px; background: #f8fbff; color: #627d98; font-size: .82rem; }
.checkout-editor-grid { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(240px, .7fr) minmax(300px, 1.2fr) minmax(300px, 1.25fr); gap: .75rem; align-items: stretch; }
.checkout-editor-grid > label { display: grid; align-content: start; gap: .35rem; color: #35516f; font-size: .8rem; font-weight: 700; }
.field-label-with-help { display: inline-flex; align-items: center; gap: .4rem; }
.field-help-button { display: inline-grid; place-items: center; width: 19px; height: 19px; padding: 0; border: 1px solid #9cb6d0; border-radius: 50%; background: #f4f8fc; color: #245d91; font-size: .68rem; font-weight: 900; line-height: 1; cursor: pointer; }
.field-help-button:hover { border-color: #3979b5; background: #e9f3fc; }
.checkout-editor-grid input[type="text"], .checkout-editor-grid > label input { width: 100%; min-height: 38px; padding: .45rem .6rem; border: 1px solid #b9cce0; border-radius: 8px; background: #fff; color: #102a43; font: inherit; font-weight: 400; }
.checkout-editor-grid fieldset, .checkout-switches { display: flex; align-content: flex-start; align-items: flex-start; gap: .45rem .9rem; flex-wrap: wrap; min-width: 0; margin: 0; padding: .65rem .75rem; border: 1px solid #d7e5f2; border-radius: 9px; background: #f8fbff; }
.checkout-editor-grid legend { padding: 0 .3rem; color: #35516f; font-size: .76rem; font-weight: 800; }
.checkout-editor-grid fieldset label, .checkout-switches label { display: inline-flex; align-items: center; gap: .4rem; color: #35516f; font-size: .78rem; font-weight: 650; }
.checkout-pos-options { grid-column: 1 / -1; }
.checkout-list { display: grid; margin-top: 1rem; overflow: hidden; border: 1px solid #d7e5f2; border-radius: 10px; }
.checkout-list-row { display: grid; grid-template-columns: 1.1fr 1fr 1.25fr .8fr 1fr .8fr auto; gap: .75rem; align-items: center; padding: .7rem .85rem; border-top: 1px solid #e5edf5; color: #35516f; font-size: .78rem; }
.checkout-list-row:first-child { border-top: 0; }.checkout-list-row > span { display: grid; gap: .18rem; min-width: 0; }.checkout-list-row small { color: #829ab1; font-size: .68rem; }
.sale-checkout-current { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .5rem 0; padding: .55rem .7rem; border: 1px solid #cfe1f2; border-radius: 8px; background: #f7fbff; color: #486581; font-size: .78rem; }.sale-checkout-current strong { color: #102a43; }
.manual-payment-warning { display: grid; gap: .45rem; margin: .8rem 0; padding: 1rem; border: 1px solid #f6bf55; border-left: 4px solid #f59e0b; border-radius: 10px; background: #fff8e8; color: #744210; }.manual-payment-warning span { color: #8a5a12; line-height: 1.45; }
.manual-sale-payment-modal { width: min(680px, 100%); }
.config-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin: 1rem 0; }
.config-upload-grid input[type=file] { padding: .45rem .55rem; }
.uploaded-files-list { display: flex; flex-wrap: wrap; gap: .65rem; margin: .8rem 0; }
.uploaded-file-chip { display: inline-flex; align-items: center; gap: .65rem; min-width: 240px; max-width: 100%; padding: .65rem .75rem; border: 1px solid #cfe0ef; border-radius: 11px; background: #f8fbff; box-shadow: 0 4px 12px rgba(16,42,67,.06); }
.uploaded-file-chip > span:nth-child(2) { display: grid; gap: .15rem; min-width: 0; }
.uploaded-file-chip strong, .uploaded-file-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploaded-file-chip strong { color: #102a43; font-size: .82rem; }.uploaded-file-chip small { color: #627d98; font-size: .72rem; }
.file-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 9px; background: #e5efff; color: #2563eb; font-size: .66rem; font-weight: 800; }
.certificate-chip .file-icon { background: #e9e1ff; color: #6d28d9; }.file-remove { width: 25px; height: 25px; margin-left: auto; border: 0; border-radius: 50%; background: #fee2e2; color: #b91c1c; cursor: pointer; }
.config-upload-grid.single-upload { grid-template-columns: minmax(0, 1fr); }
.certification-set-list { align-items: stretch; }
.certification-set-chip { flex: 1 1 390px; }
.certification-set-chip .file-icon { background: #dcfce7; color: #087a3f; }
.certification-set-chip > span:nth-child(2) { flex: 1; }
@media (max-width: 1100px) { .checkout-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .checkout-list-row { grid-template-columns: 1fr 1fr; } .checkout-list-row .pos-row-actions { justify-content: flex-start; } }
@media (max-width: 800px) { .config-checklist, .config-pos-form, .config-upload-grid, .checkout-editor-grid { grid-template-columns: 1fr; } .checkout-pos-options { grid-column: auto; } .checkout-list-row { grid-template-columns: 1fr; } }
.pos-row-actions { display: flex; gap: .35rem; }.row-button.danger { color: #b91c1c; border-color: #fecaca; }
.catalog-bulk-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }.upload-excel { position: relative; overflow: hidden; cursor: pointer; }.upload-excel input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }.import-preview-card { display: none; margin-top: 1rem; }.import-preview-card .table-toolbar > span { color: #627d98; font-size: .75rem; }
.company-logo-field { grid-column: 1 / -1; display: grid; gap: .55rem; padding-top: .25rem; }
.company-logo-label { color: #35516f; font-size: .8rem; font-weight: 700; }
.company-logo-control { display: flex; align-items: center; gap: 1rem; padding: .8rem; border: 1px dashed #9fb9d2; border-radius: 10px; background: rgba(255,255,255,.72); }
.company-logo-preview, .company-logo-placeholder { width: 112px; height: 64px; object-fit: contain; border-radius: 7px; border: 1px solid #d5e0ed; background: #fff; }
.company-logo-placeholder { display: grid; place-items: center; color: #829ab1; font-size: .75rem; }
.company-logo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; color: #627d98; font-size: .75rem; }
.company-logo-actions input[type=file] { min-height: auto !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.company-logo-actions small { color: #829ab1; }
@media (max-width: 560px) { .company-logo-control { align-items: flex-start; flex-direction: column; } }
.budget-breakdown { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; color: #627d98; font-size: .82rem; }
.budget-breakdown span { display: flex; gap: .35rem; align-items: baseline; }.budget-breakdown strong { color: #486581; }.budget-breakdown .budget-final-label { color: #102a43; font-size: 1rem; }.budget-breakdown .budget-final-label strong { color: #102a43; font-size: 1.35rem; }
.ebitda-month-chart { display: flex; align-items: end; gap: .65rem; min-height: 210px; padding: 1.25rem 1.2rem .9rem; overflow-x: auto; border-bottom: 1px solid #e6edf3; }.ebitda-month-bar { display: flex; flex-direction: column; justify-content: end; align-items: center; gap: .3rem; min-width: 58px; height: 180px; }.ebitda-month-bar strong { color: #102a43; font-size: .68rem; white-space: nowrap; }.ebitda-month-bar span { width: 30px; min-height: 6px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #16a34a, #15803d); }.ebitda-month-bar span.negative { background: linear-gradient(180deg, #ef4444, #b91c1c); }.ebitda-month-bar small { color: #829ab1; font-size: .7rem; white-space: nowrap; }
.finance-confirm-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(7,24,48,.68); backdrop-filter: blur(3px); }.finance-confirm-modal { width: min(620px, 100%); padding: 24px; border: 1px solid #d5e0ed; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(7,24,48,.3); }.finance-confirm-modal p { color: #627d98; line-height: 1.5; }.finance-confirm-values { display: grid; gap: .55rem; margin: 1rem 0; padding: .9rem; border-radius: 9px; background: #f8fafc; }.finance-confirm-values span { display: flex; justify-content: space-between; gap: 1rem; color: #627d98; }.finance-confirm-values strong { color: #102a43; }
.client-editor .section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.client-editor .section-heading h2 { margin: .25rem 0 0; color: #102a43; }
.client-editor .filter-row { display: grid; grid-template-columns: minmax(130px, .6fr) minmax(220px, 1.2fr) auto; align-items: end; gap: 1rem; margin-top: 1rem; }
.client-editor .filter-row:nth-of-type(2) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.client-editor .filter-row:nth-of-type(3) { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
.client-editor .client-identity-row { grid-template-columns: minmax(160px, .55fr) minmax(240px, 1.15fr) minmax(220px, .9fr); }
.client-editor .filter-row:nth-of-type(2) { align-items: start; }
.client-editor .filter-row:nth-of-type(2) .field > label { white-space: nowrap; }
.client-editor .client-data-row { align-items: start; }
.client-editor .client-data-row .field > label { white-space: nowrap; }
.client-editor .client-contact-row { align-items: start; }
.client-editor .client-contact-row > .check-field,
.client-editor .client-contact-row > .button { align-self: end; }
.filter-live { align-self: center; color: #627d98; font-size: .78rem; white-space: nowrap; }
.client-history-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(7,24,48,.68); backdrop-filter: blur(3px); }
.client-history-modal { width: min(1050px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 24px; border: 1px solid #d5e0ed; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(7,24,48,.3); }
.inventory-detail-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(7,24,48,.68); backdrop-filter: blur(3px); }
.catalog-modal { width: min(1120px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 24px; border: 1px solid #d5e0ed; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(7,24,48,.3); }
.inventory-detail-modal { width: min(1050px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 24px; border: 1px solid #d5e0ed; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(7,24,48,.3); }
.client-history-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 16px; margin-bottom: 12px; border-bottom: 1px solid #e5ebf2; }
.client-history-modal-header h2, .inventory-detail-modal h2 { margin: 4px 0 0; color: #0b2a4a; }
.client-history-summary { display: flex; gap: .6rem; flex-wrap: wrap; padding: .7rem 0; color: #1f5d8f; font-size: .82rem; font-weight: 700; }
.client-history-summary span { display: inline-flex; gap: .45rem; padding: .35rem .65rem; border-radius: 999px; background: #eef6ff; }.client-history-summary strong { color: #102a43; }
.history-tabs p { display: flex; flex-direction: column; gap: .2rem; padding: .55rem 0; border-bottom: 1px solid #e5ebf2; }.history-tabs p:last-child { border-bottom: 0; }.history-tabs p small, .history-tabs p span { color: #627d98; }.history-tabs p strong { color: #102a43; }
.inventory-detail-modal h3 { margin: 1.3rem 0 .7rem; color: #102a43; }
.inventory-detail-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .7rem; }
.inventory-detail-grid div { padding: .8rem; border-radius: 9px; background: #f8fafc; }
.inventory-detail-grid span, .inventory-detail-grid strong { display: block; }
.inventory-detail-grid span { color: #627d98; font-size: .72rem; }
.inventory-detail-grid strong { margin-top: .3rem; color: #102a43; font-size: .86rem; }
.inventory-history-list { display: grid; gap: .35rem; }
.inventory-history-list div { display: grid; grid-template-columns: 150px 1fr auto; gap: .8rem; padding: .65rem .8rem; border-bottom: 1px solid #edf2f7; color: #627d98; font-size: .8rem; }
.inventory-history-list b { color: #1f5d8f; }.inventory-history-list strong { color: #102a43; text-align: right; }
.stock-movement-list div { grid-template-columns: 145px 1fr 140px 150px; }.stock-movement-list small { grid-column: 2 / -1; color: #829ab1; }

.product-result.out-of-stock { background: #fff7f7; border-color: #fecaca; }
.product-result.out-of-stock strong { color: #b42318; }
.product-result .stock-unavailable { color: #dc2626; font-weight: 700; }
.row-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.price-chart-wrap { overflow-x: auto; padding: 1rem 1.15rem 1.3rem; }
.price-chart { display: block; width: 100%; min-width: 700px; height: 330px; overflow: visible; background: linear-gradient(180deg, #fbfdff, #f5f9fd); border-radius: 12px; }
.chart-axis { stroke: #8da6bd; stroke-width: 1.2; }.chart-grid { stroke: #dfe9f2; stroke-width: 1; stroke-dasharray: 3 5; }.chart-label { fill: #627d98; font-size: 11px; }.chart-tick { text-anchor: middle; }
.chart-sale-line, .chart-cost-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }.chart-sale-line { stroke: #2563eb; }.chart-cost-line { stroke: #f59e0b; }.chart-sale-point { fill: #2563eb; stroke: #fff; stroke-width: 2; }.chart-cost-point { fill: #f59e0b; stroke: #fff; stroke-width: 2; }.chart-axis-note { margin-left: auto; color: #829ab1; font-size: .74rem; }
@media (max-width: 720px) { .client-editor .section-heading { align-items: flex-start; flex-direction: column; }.client-editor .filter-row, .client-editor .filter-row:nth-of-type(2), .client-editor .filter-row:nth-of-type(3) { grid-template-columns: 1fr; }.client-editor .filter-row:nth-of-type(2) .field > label { white-space: normal; }.client-editor .button { width: 100%; }.inventory-detail-grid { grid-template-columns: repeat(2, 1fr); }.inventory-history-list div { grid-template-columns: 1fr; gap: .25rem; }.inventory-history-list strong { text-align: left; }.client-history-backdrop, .inventory-detail-backdrop { align-items: center; padding: 12px; }.client-history-modal, .inventory-detail-modal { padding: 18px; } }

.purchase-line-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr) auto; gap: 12px; align-items: end; margin: 16px 0 10px; padding: 0 1.15rem; }
.purchase-line-tools label { display: flex; flex-direction: column; gap: 6px; color: #486581; font-size: .8rem; font-weight: 700; }
.purchase-line-tools input { min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; color: #243b53; font-weight: 400; }
.purchase-summary { display: flex; gap: 28px; align-items: end; justify-content: flex-end; }
.purchase-summary > div { display: flex; flex-direction: column; gap: 4px; }
.purchase-summary > div span { color: #627d98; font-size: .86rem; }
.purchase-summary > div strong { font-size: 1rem; }
.purchase-card .budget-form { grid-template-columns: 1.45fr .9fr .9fr .7fr; gap: .7rem; padding: .85rem 1rem; }
.purchase-card .budget-form textarea { min-height: 54px; }
.purchase-card .budget-form > label.wide { grid-column: 1 / span 3; }
.purchase-card .budget-form > label.purchase-check { grid-column: 4; align-self: start; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding-top: 26px; }
.purchase-card .budget-form > label.purchase-check input { width: 16px; min-height: 16px; margin: 0; }
.purchase-card .budget-form > label.purchase-check { line-height: 1.25; }
.purchase-card .section-title { padding: .85rem 1rem; }
.purchase-card .purchase-line-tools { margin-top: 10px; margin-bottom: 8px; padding-left: 1rem; padding-right: 1rem; }
.purchase-card .purchase-line-add { padding-left: 1rem; padding-right: 1rem; padding-bottom: .75rem; }
.purchase-history .data-table th, .purchase-history .data-table td { padding-top: .65rem; padding-bottom: .65rem; }
@media (max-width: 720px) { .purchase-line-tools, .purchase-summary { display: grid; grid-template-columns: 1fr; }.purchase-line-tools .button { width: 100%; }.purchase-summary { gap: 12px; } }
@media (max-width: 720px) { .purchase-card .budget-form { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .purchase-card .budget-form > label.wide, .purchase-card .budget-form > label.purchase-check { grid-column: auto; }.purchase-card .budget-form > label.purchase-check { padding-top: 0; } }
.client-editor .filter-row { gap: .7rem; margin-top: .65rem; }

.modal-field { display: grid; gap: .45rem; color: #486581; font-size: .82rem; font-weight: 700; }.modal-field input { min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; color: #243b53; font-weight: 400; }
.modal-checkbox { display: flex; align-items: flex-start; gap: .5rem; color: #486581; font-size: .82rem; font-weight: 600; margin: .5rem 0; }.modal-checkbox input[type=checkbox] { width: 16px; height: 16px; margin-top: 2px; accent-color: #2563eb; }

.state-action-select { min-height: 32px; max-width: 150px; padding: .35rem .5rem; color: #243b53; background: #fff; border: 1px solid #b6d7f5; border-radius: 6px; font-size: .74rem; }
.catalog-modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(7,24,48,.68); backdrop-filter: blur(3px); }
.catalog-editor-backdrop, .inventory-detail-backdrop { align-items: center; overflow-y: auto; overscroll-behavior: contain; }
.catalog-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid #e5ebf2; }.catalog-modal-header h2 { margin: 4px 0; color: #0b2a4a; }.catalog-modal-header p:not(.eyebrow) { margin: 0; color: #627d98; }
.catalog-editor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }.catalog-editor-grid label { display: grid; gap: 6px; color: #486581; font-size: .8rem; font-weight: 700; }.catalog-editor-grid input, .catalog-editor-grid select { min-height: 42px; padding: .65rem .75rem; border: 1px solid #bcccdc; border-radius: 8px; background: #fff; color: #243b53; font-weight: 400; }.catalog-editor-grid .check-field { display: flex; align-items: center; align-self: end; }.catalog-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }.catalog-modal-actions .confirm-button { margin-top: 0; }
@media (max-width: 720px) { .catalog-modal-backdrop { align-items: center; padding: 12px; }.catalog-modal, .inventory-detail-modal, .client-history-modal { width: min(1120px, 100%); padding: 18px; }.catalog-editor-grid { grid-template-columns: 1fr; }.catalog-modal-actions { flex-direction: column; }.catalog-modal-actions .button { width: 100%; } }
@media (max-width: 720px) { .inventory-detail-backdrop { align-items: center; padding: 12px; } }
@media (max-width: 720px) { .catalog-editor-backdrop, .inventory-detail-backdrop { align-items: center; } }

.config-section-card-expanded { scroll-margin-top: 24px; }
.config-inline-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.config-inline-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; color: #10233f; }
.config-inline-form input, .config-inline-form select { min-height: 40px; border: 1px solid #b9cbe0; border-radius: 8px; padding: 9px 11px; background: #fff; color: #10233f; }
.config-inline-form .check-field { flex-direction: row; align-items: center; padding-top: 28px; }
.config-inline-form .check-field input { min-height: auto; width: 17px; }
.config-inline-form .config-section-footer { grid-column: 1 / -1; }
.certificate-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.certificate-status-grid div { display: grid; gap: 5px; padding: 14px; border: 1px solid #d8e3ef; border-radius: 10px; background: #f7faff; }
.certificate-status-grid span { color: #667085; font-size: .85rem; }
.certificate-status-grid strong { color: #10233f; }
@media (max-width: 1100px) { .config-inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .config-sections, .config-inline-form, .certificate-status-grid { grid-template-columns: 1fr; } .config-section-card-expanded { grid-column: auto; } .config-inline-form .config-section-footer { grid-column: auto; } }
.agenda-view-button { border: 1px solid #d5e0ed; border-radius: 7px; padding: .35rem .6rem; background: #fff; color: #486581; font-size: .75rem; font-weight: 700; cursor: pointer; }.agenda-view-button.active { background: #e8f1ff; border-color: #93c5fd; color: #1d4ed8; }
.agenda-month { padding: 1rem; }.agenda-month-weekdays, .agenda-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }.agenda-month-weekdays { margin-bottom: .35rem; color: #627d98; font-size: .7rem; text-align: center; text-transform: uppercase; }.agenda-month-day { display: flex; align-items: flex-start; justify-content: space-between; min-height: 58px; padding: .55rem; border: 1px solid #e6edf3; border-radius: 8px; background: #fff; color: #243b53; cursor: pointer; }.agenda-month-day:hover, .agenda-month-day.today { border-color: #2563eb; background: #eff6ff; }.agenda-month-day.muted { color: #9fb3c8; background: #f8fafc; }.agenda-month-day b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #f59e0b; color: #fff; font-size: .68rem; }
.brand { display: flex; align-items: center; gap: 11px; }.aiventas-system-logo { display: block; width: 56px; height: 56px; flex: 0 0 56px; object-fit: contain; border-radius: 0; background: transparent; }.topbar-brand { display: flex; align-items: center; gap: 10px; }.topbar-system-logo { display: block; width: 46px; height: 46px; flex: 0 0 46px; object-fit: contain; border-radius: 0; background: transparent; }
.inventory-status { display: inline-block; padding: .28rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }.inventory-ok { color: #047857; background: #dcfce7; }.inventory-low { color: #b45309; background: #fef3c7; }.inventory-out { color: #b91c1c; background: #fee2e2; }
.metric-link { color: inherit; text-decoration: none; cursor: pointer; }
.metric-card-disabled { cursor: default; opacity: .78; }
.product-catalog-table td:nth-child(3), .inventory-table td:nth-child(3) { font-weight: 800; color: #174f82; }
.product-catalog-table td:nth-child(3)::before, .inventory-table td:nth-child(3)::before { content: "⌖ "; color: #f59e0b; }
.compact-alert-card { padding-top: 12px; padding-bottom: 12px; }
.compact-alert-card strong { margin-top: 5px; margin-bottom: 2px; }
.compact-alert-report { padding-top: 12px; padding-bottom: 12px; }
.compact-alert-report h2 { margin: 2px 0 3px; }
.compact-alert-report p:not(.eyebrow) { margin: 0; }
.inventory-alert-report { padding-top: 12px; padding-bottom: 12px; }
.inventory-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; }
.inventory-kpi { background: #fff; border: 1px solid #e4e7ec; border-top: 3px solid #2563eb; border-radius: 12px; padding: 16px 18px; box-shadow: 0 3px 12px rgba(16,35,63,.04); }
.inventory-kpi span, .inventory-kpi small { display: block; color: #667085; font-size: 12px; }
.inventory-kpi strong { display: block; color: #10233f; font-size: 24px; margin: 8px 0 4px; }
.inventory-kpi small { color: #98a2b3; font-size: 11px; }
.inventory-view-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.inventory-view-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 10px 14px; border: 1px solid #d7e2ee; border-top: 3px solid #1f5d8f; border-radius: 10px; background: #fff; color: #173454; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.inventory-view-card span, .inventory-view-card small { overflow: hidden; color: #60758c; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.inventory-view-card strong { grid-column: 2; grid-row: 1 / span 2; color: #10233f; font-size: 1.35rem; }
.inventory-view-card small { grid-column: 1; }
.inventory-view-card:hover, .inventory-view-card.active { border-color: #2563eb; background: #f5f9ff; box-shadow: 0 4px 12px rgba(37,99,235,.12); }
.inventory-view-card.active { box-shadow: inset 0 0 0 1px rgba(37,99,235,.16), 0 4px 12px rgba(37,99,235,.12); }
.inventory-view-card.accent-orange { border-top-color: #f59e0b; }
.inventory-view-card.accent-purple { border-top-color: #8b5cf6; }
.inventory-view-card.accent-navy { border-top-color: #10233f; }
@media (max-width: 900px) { .inventory-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .inventory-view-nav { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .inventory-kpi-grid { grid-template-columns: 1fr; } }
.metric-link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 54, 91, .12); }
.inventory-alert-report { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 20px 24px; border: 1px solid #f4c36a; border-left: 4px solid #f59e0b; border-radius: 14px; background: linear-gradient(110deg, #fffaf0, #fff); }
.inventory-alert-report h2 { margin: 0 0 4px; color: #163b61; }
.inventory-alert-report p { margin: 0; color: #607d9d; }
.inventory-report-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 720px) { .inventory-alert-report { align-items: flex-start; flex-direction: column; } }
.facturacion-actions { display: flex; align-items: end; gap: 10px; white-space: nowrap; }
.facturacion-actions .button { width: auto; min-width: 130px; }
.facturacion-config-card { display: block; }
.facturacion-config-card .section-heading { align-items: center; }
.facturacion-config-row { display: flex; align-items: end; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.facturacion-config-row .field { flex: 1 1 170px; }
.facturacion-config-row .check-field { flex: 1 1 190px; }
.facturacion-config-row .facturacion-actions { flex: 0 0 auto; }
@media (max-width: 760px) { .facturacion-actions { width: 100%; flex-wrap: wrap; }.facturacion-actions .button { flex: 1 1 180px; } }
.sii-module-tabs { display: flex; align-items: stretch; gap: 5px; margin: -6px 0 18px; padding: 5px; overflow-x: auto; border: 1px solid #d8e3ef; border-radius: 12px; background: #eaf1f8; }
.sii-module-tabs button { display: inline-flex; align-items: center; gap: 7px; min-width: max-content; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: #45617d; font-size: .8rem; font-weight: 700; cursor: pointer; }.sii-module-tabs button span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: #dce7f2; color: #42627f; font-size: .62rem; }.sii-module-tabs button:hover { background: rgba(255,255,255,.65); }.sii-module-tabs button.active { background: #fff; color: #10233f; box-shadow: 0 2px 7px rgba(16,35,63,.1); }.sii-module-tabs button.active span { background: #2563eb; color: #fff; }.sii-module-tabs .emit-tab { margin-left: auto; color: #7c4a00; }.sii-module-tabs .emit-tab span, .sii-module-tabs .emit-tab.active span { background: #f59e0b; color: #10233f; }
.sii-workspace-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-bottom: 16px; padding: 22px; border: 1px solid #d8e3ef; border-radius: 14px; background: #fff; }.sii-workspace-card h2 { margin: 2px 0 4px; color: #10233f; }.sii-workspace-card p { margin: 0; color: #667085; }.sii-workspace-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; background: #e7f8ef; color: #087a3f; font-weight: 800; }.sii-workspace-icon.emit { background: #fff1cd; color: #8a5200; }
.sii-register-grid, .sii-emit-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }.sii-register-grid a, .sii-emit-options article { display: grid; gap: 7px; min-height: 145px; padding: 20px; border: 1px solid #d8e3ef; border-radius: 13px; background: #fff; text-decoration: none; box-shadow: 0 3px 12px rgba(16,35,63,.04); }.sii-register-grid span { color: #2563eb; font-size: .7rem; font-weight: 800; letter-spacing: .1em; }.sii-register-grid strong, .sii-emit-options strong { color: #10233f; font-size: 1.05rem; }.sii-register-grid small, .sii-emit-options p { color: #667085; line-height: 1.5; }.sii-register-grid a:hover { border-color: #93c5fd; transform: translateY(-1px); }
.sii-readiness-card { position: relative; display: grid; gap: 16px; margin-bottom: 18px; padding: 20px; overflow: hidden; border: 1px solid #f0b7b1; border-radius: 14px; background: linear-gradient(135deg, #fff 0%, #fff7f6 100%); box-shadow: 0 5px 18px rgba(16,35,63,.05); }.sii-readiness-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: #dc2626; }.sii-readiness-card.verde { border-color: #b7e4c7; background: linear-gradient(135deg, #fff 0%, #f2fcf5 100%); }.sii-readiness-card.verde::before { background: #16a34a; }.sii-readiness-card.amarillo { border-color: #f6d48b; background: linear-gradient(135deg, #fff 0%, #fff9ec 100%); }.sii-readiness-card.amarillo::before { background: #f59e0b; }
.sii-readiness-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }.sii-readiness-heading h2 { margin: 3px 0 5px; color: #10233f; font-size: 1.25rem; }.sii-readiness-heading p { margin: 0; color: #60758c; font-size: .82rem; }.sii-readiness-light { width: 18px; height: 18px; border: 4px solid #fee2e2; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 6px rgba(220,38,38,.08); }.sii-readiness-card.verde .sii-readiness-light { border-color: #dcfce7; background: #16a34a; box-shadow: 0 0 0 6px rgba(22,163,74,.08); }.sii-readiness-card.amarillo .sii-readiness-light { border-color: #fef3c7; background: #f59e0b; box-shadow: 0 0 0 6px rgba(245,158,11,.09); }.sii-readiness-status { padding: 6px 10px; border-radius: 99px; background: #fee2e2; color: #b42318; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }.sii-readiness-card.verde .sii-readiness-status { background: #dcfce7; color: #087a3f; }.sii-readiness-card.amarillo .sii-readiness-status { background: #fef3c7; color: #925600; }
.sii-readiness-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }.sii-readiness-checks article { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 11px 12px; border: 1px solid #dce6ef; border-radius: 10px; background: rgba(255,255,255,.86); }.sii-readiness-checks article > span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; font-size: .66rem; font-weight: 900; }.sii-readiness-checks article > div { display: grid; gap: 2px; min-width: 0; }.sii-readiness-checks article strong { color: #173454; font-size: .8rem; }.sii-readiness-checks article small { color: #60758c; font-size: .72rem; line-height: 1.35; }.sii-readiness-checks article.complete > span { background: #dcfce7; color: #087a3f; }.sii-readiness-checks article.pending > span { background: #fee2e2; color: #b42318; }.sii-production-approved, .sii-production-confirm { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 10px; background: #ecfdf3; color: #17623a; }.sii-production-approved { flex-wrap: wrap; }.sii-production-approved span { font-size: .76rem; }.sii-production-confirm label { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; }
.sii-readiness-card.production-enabled { gap: 8px; padding: 10px 14px; }
.sii-readiness-card.production-enabled .sii-readiness-heading { gap: 10px; }
.sii-readiness-card.production-enabled .sii-readiness-light { width: 14px; height: 14px; border-width: 3px; }
.sii-readiness-card.production-enabled .sii-readiness-heading .eyebrow { font-size: .6rem; letter-spacing: .12em; }
.sii-readiness-card.production-enabled .sii-readiness-heading h2 { margin: 1px 0 2px; font-size: 1rem; }
.sii-readiness-card.production-enabled .sii-readiness-heading p { font-size: .7rem; line-height: 1.25; }
.sii-readiness-card.production-enabled .sii-readiness-status { padding: 4px 8px; font-size: .62rem; }
.sii-readiness-card.production-enabled .sii-production-approved { gap: 8px; padding: 7px 10px; font-size: .76rem; }
.sii-readiness-card.production-enabled .sii-production-approved span { font-size: .66rem; }
.facturacion-heading { align-items: center; gap: 24px; }
.facturacion-heading > div:first-child { flex: 1 1 auto; min-width: 280px; }
.facturacion-heading .sii-readiness-card.heading-compact { flex: 0 1 620px; width: min(620px, 48vw); margin: 0; padding: 10px 12px; gap: 7px; border-radius: 11px; }
.sii-readiness-card.heading-compact::before { width: 4px; }
.sii-readiness-card.heading-compact .sii-readiness-heading { gap: 8px; }
.sii-readiness-card.heading-compact .sii-readiness-light { width: 12px; height: 12px; border-width: 3px; box-shadow: 0 0 0 4px rgba(220,38,38,.07); }
.sii-readiness-card.heading-compact.verde .sii-readiness-light { box-shadow: 0 0 0 4px rgba(22,163,74,.07); }
.sii-readiness-card.heading-compact.amarillo .sii-readiness-light { box-shadow: 0 0 0 4px rgba(245,158,11,.08); }
.sii-readiness-card.heading-compact .sii-readiness-heading .eyebrow { margin-bottom: 1px; font-size: .56rem; letter-spacing: .1em; }
.sii-readiness-card.heading-compact .sii-readiness-heading h2 { margin: 1px 0 2px; font-size: .88rem; }
.sii-readiness-card.heading-compact .sii-readiness-heading p { font-size: .66rem; line-height: 1.25; }
.sii-readiness-card.heading-compact .sii-readiness-status { padding: 4px 7px; font-size: .56rem; }
.sii-readiness-card.heading-compact .sii-readiness-checks { gap: 5px; }
.sii-readiness-card.heading-compact .sii-readiness-checks article { gap: 7px; padding: 6px 8px; border-radius: 8px; }
.sii-readiness-card.heading-compact .sii-readiness-checks article > span { width: 20px; height: 20px; flex-basis: 20px; border-radius: 6px; font-size: .58rem; }
.sii-readiness-card.heading-compact .sii-readiness-checks article strong { font-size: .68rem; }
.sii-readiness-card.heading-compact .sii-readiness-checks article small { font-size: .61rem; }
.sii-readiness-card.heading-compact .sii-production-approved,
.sii-readiness-card.heading-compact .sii-production-confirm { gap: 7px; padding: 6px 8px; font-size: .66rem; }
.sii-readiness-card.heading-compact .sii-production-approved span { font-size: .6rem; }
.sii-readiness-card.heading-compact .sii-production-confirm .button { min-height: 28px; padding: 5px 8px; font-size: .62rem; }
.sii-certification-card { margin-bottom: 18px; padding: 20px; border: 1px solid #cfe0f1; border-radius: 14px; background: linear-gradient(135deg, #fff 0%, #f7fbff 100%); box-shadow: 0 5px 18px rgba(16,35,63,.05); }
.sii-certification-heading { margin-bottom: 16px; }.sii-certification-heading h2 { margin: 2px 0 4px; color: #10233f; }.sii-certification-heading p { margin: 0; color: #667085; }
.sii-progress-summary { display: grid; grid-template-columns: auto 150px; align-items: center; gap: 5px 10px; min-width: 290px; }.sii-progress-summary strong { color: #173454; font-size: .8rem; }.sii-progress-summary > span { height: 8px; overflow: hidden; border-radius: 99px; background: #dce7f2; }.sii-progress-summary i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #16a34a); }.sii-progress-summary small { grid-column: 1 / -1; color: #71869c; text-align: right; font-size: .68rem; }
.sii-stage-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.sii-stage { display: flex; align-items: center; gap: 10px; min-height: 78px; padding: 12px; border: 1px solid #d8e3ef; border-radius: 11px; background: #fff; }
.sii-stage > span { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #e8eef5; color: #60758c; font-weight: 800; }.sii-stage div { display: grid; gap: 3px; min-width: 0; }.sii-stage strong { color: #15324f; font-size: .82rem; }.sii-stage small { color: #71869c; font-size: .68rem; }.sii-stage > button { display: grid; place-items: center; width: 23px; height: 23px; margin-left: auto; border: 1px solid #b9cbe0; border-radius: 50%; background: #fff; color: #2563eb; font-weight: 800; cursor: pointer; }.sii-stage > button:hover { border-color: #2563eb; background: #eff6ff; }
.sii-stage.done { border-color: #b7e4c7; background: #f3fcf6; }.sii-stage.done > span { background: #16a34a; color: #fff; }.sii-stage.current { border-color: #f6c86c; background: #fff9ec; }.sii-stage.current > span { background: #f59e0b; color: #10233f; }
.sii-stage { cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s; }.sii-stage:hover { transform: translateY(-1px); box-shadow: 0 5px 13px rgba(16,35,63,.08); }.sii-stage.selected { outline: 2px solid #2563eb; outline-offset: 2px; }.sii-stage.rejected { border-color: #f4b4ae; background: #fff5f4; }.sii-stage.rejected > span { background: #dc2626; color: #fff; }
.sii-stage-editor { margin-top: 14px; padding: 16px; border: 1px solid #bfd4ea; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(16,35,63,.05); }.sii-stage-editor-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }.sii-stage-editor-title h3 { margin: 2px 0 0; color: #10233f; }.sii-stage-editor-fields { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr .8fr; gap: 11px; }.sii-stage-editor-fields .wide { grid-column: span 2; }.sii-stage-editor-fields textarea { resize: vertical; }.sii-stage-evidence { display: grid; gap: 7px; margin-top: 12px; padding: 11px; border-radius: 9px; background: #f5f8fc; color: #173454; font-size: .76rem; }.sii-stage-evidence > div { display: flex; flex-wrap: wrap; gap: 6px; }.sii-stage-evidence span { max-width: 310px; overflow: hidden; padding: 5px 8px; border: 1px solid #d8e3ef; border-radius: 7px; background: #fff; color: #60758c; text-overflow: ellipsis; white-space: nowrap; }.sii-approval-confirm { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-left: 4px solid #16a34a; border-radius: 7px; background: #eefbf2; color: #17623a; font-size: .78rem; font-weight: 700; }.sii-stage-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 12px; }.sii-stage-editor-actions small { color: #71869c; }.sii-stage-editor-actions .button { min-width: 145px; }
.sii-readiness-grid { display: grid; grid-template-columns: .8fr .7fr 1.5fr; gap: 10px; margin-top: 12px; }.sii-readiness-grid > div { display: grid; gap: 4px; padding: 12px; border: 1px solid #d8e3ef; border-radius: 10px; background: #fff; }.sii-readiness-grid span { color: #71869c; font-size: .72rem; }.sii-readiness-grid strong, .sii-readiness-grid code { color: #173454; font-size: .78rem; overflow-wrap: anywhere; }.sii-readiness-grid .ready { color: #087a3f; }.sii-readiness-grid .missing { color: #b42318; }
.sii-exchange-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 14px; border-left: 4px solid #2563eb; border-radius: 9px; background: #edf5ff; }.sii-exchange-panel strong { color: #123454; }.sii-exchange-panel p { margin: 4px 0 0; color: #60758c; font-size: .78rem; }.sii-file-button { position: relative; flex: 0 0 auto; overflow: hidden; cursor: pointer; }.sii-file-button input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sii-print-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 10px; padding: 14px; border-left: 4px solid #f59e0b; border-radius: 9px; background: #fff8e8; }.sii-print-panel strong { color: #123454; }.sii-print-panel p { margin: 4px 0 0; color: #60758c; font-size: .78rem; }.sii-print-panel .button { flex: 0 0 auto; text-decoration: none; }
.sii-exchange-files { display: grid; gap: 7px; margin-top: 10px; }.sii-exchange-files article { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid #d8e3ef; border-radius: 9px; background: #fff; }.sii-exchange-files article > div { display: grid; min-width: 0; }.sii-exchange-files strong, .sii-exchange-files small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.sii-exchange-files small { color: #71869c; font-size: .7rem; }.sii-exchange-files .state-pill { margin-left: auto; white-space: nowrap; }
.sii-help-modal { width: min(820px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 32px)); overflow-y: auto; }.sii-format-box { display: grid; gap: 5px; margin: 15px 0; padding: 13px 15px; border-left: 4px solid #2563eb; border-radius: 8px; background: #edf5ff; }.sii-format-box strong { color: #173454; }.sii-format-box span { color: #54708c; font-size: .82rem; line-height: 1.45; }.sii-help-route, .sii-help-warning, .sii-no-template { display: grid; gap: 5px; margin: 14px 0; padding: 12px 14px; border-radius: 9px; }.sii-help-route { border: 1px solid #c6d9ee; background: #f6faff; }.sii-help-route span { color: #667f99; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.sii-help-route strong { color: #123454; font-size: .84rem; }.sii-help-warning { border-left: 4px solid #ef4444; background: #fff2f1; }.sii-help-warning strong { color: #a5261d; }.sii-help-warning span, .sii-no-template span { color: #60758c; font-size: .78rem; line-height: 1.45; }.sii-no-template { border: 1px dashed #c9d6e4; background: #f8fafc; }.sii-no-template strong { color: #425f7b; }.sii-file-map { display: grid; gap: 7px; margin: 14px 0; }.sii-file-map > div { display: grid; grid-template-columns: 58px minmax(0, 1fr) 1fr; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #d7e3ef; border-radius: 8px; background: #fff; }.sii-file-map span { color: #2563eb; font-size: .68rem; font-weight: 900; text-transform: uppercase; }.sii-file-map strong { color: #173454; font-size: .76rem; overflow-wrap: anywhere; }.sii-file-map small { color: #71869c; font-size: .7rem; }.sii-template-section { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 13px 14px; border: 1px solid #b9dfc7; border-radius: 10px; background: #f2fbf5; }.sii-template-section > div:first-child { display: grid; gap: 3px; }.sii-template-section strong { color: #17623a; }.sii-template-section small { color: #5f7869; font-size: .7rem; }.sii-template-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }.sii-template-links a { padding: 7px 10px; border: 1px solid #91caa6; border-radius: 7px; background: #fff; color: #126338; font-size: .72rem; font-weight: 800; text-decoration: none; }.sii-template-links a:hover { border-color: #16a34a; background: #ecfdf3; }.sii-help-modal .help-steps { margin: 14px 0; padding-left: 24px; }.sii-help-modal .help-steps li { margin: 7px 0; padding-left: 3px; color: #425f7b; font-size: .82rem; line-height: 1.45; }
@media (max-width: 640px) { .sii-file-map > div { grid-template-columns: 52px 1fr; }.sii-file-map small { grid-column: 2; }.sii-template-section { align-items: stretch; flex-direction: column; }.sii-template-links { justify-content: flex-start; } }
@media (max-width: 1250px) { .sii-stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1050px) { .sii-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.sii-readiness-grid { grid-template-columns: 1fr; }.sii-certification-heading { align-items: flex-start; flex-direction: column; }.sii-progress-summary { width: 100%; } }
@media (max-width: 1050px) { .facturacion-heading { align-items: stretch; flex-direction: column; }.facturacion-heading .sii-readiness-card.heading-compact { flex-basis: auto; width: 100%; } }
@media (max-width: 1050px) { .sii-stage-editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sii-workspace-card { grid-template-columns: auto 1fr; }.sii-workspace-card > :last-child { grid-column: 1 / -1; }.sii-register-grid, .sii-emit-options { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .sii-stage-grid { grid-template-columns: 1fr; }.sii-exchange-panel, .sii-print-panel { align-items: stretch; flex-direction: column; }.sii-exchange-files article { align-items: flex-start; flex-wrap: wrap; }.sii-exchange-files .state-pill { margin-left: 48px; } }
@media (max-width: 760px) { .sii-readiness-heading { grid-template-columns: auto 1fr; }.sii-readiness-status { grid-column: 1 / -1; justify-self: start; }.sii-readiness-checks { grid-template-columns: 1fr; }.sii-production-confirm { align-items: stretch; flex-direction: column; } }
@media (max-width: 640px) { .sii-stage-editor-fields { grid-template-columns: 1fr; }.sii-stage-editor-fields .wide { grid-column: auto; }.sii-stage-editor-actions { align-items: stretch; flex-direction: column; }.sii-stage-editor-actions .button { width: 100%; } }

.sii-prevalidation-panel { margin-top: 12px; padding: 15px; border: 1px solid #c9d9eb; border-radius: 11px; background: #fff; }.sii-prevalidation-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; }.sii-prevalidation-intro strong { color: #123454; }.sii-prevalidation-intro p { margin: 4px 0 0; color: #60758c; font-size: .78rem; }.sii-validation-result { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 13px; padding: 12px 14px; border-radius: 9px; }.sii-validation-result > div { display: grid; gap: 3px; }.sii-validation-result span { font-size: .67rem; font-weight: 900; letter-spacing: .08em; }.sii-validation-result small { opacity: .78; }.sii-validation-result.valid { border: 1px solid #a7e1bd; background: #effbf3; color: #126338; }.sii-validation-result.invalid { border: 1px solid #f1b0aa; background: #fff3f2; color: #a5261d; }.sii-validation-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }.sii-validation-checks article { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid #dce6ef; border-radius: 8px; background: #f8fafc; }.sii-validation-checks article > span { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; border-radius: 50%; background: #dce7f2; color: #49657f; font-size: .65rem; font-weight: 900; }.sii-validation-checks article > div { display: grid; gap: 2px; }.sii-validation-checks article strong { color: #173454; font-size: .76rem; }.sii-validation-checks article small { color: #60758c; font-size: .7rem; line-height: 1.35; }.sii-validation-checks article.correcto > span { background: #16a34a; color: #fff; }.sii-validation-checks article.advertencia > span { background: #f59e0b; color: #10233f; }.sii-validation-checks article.error > span { background: #dc2626; color: #fff; }.sii-validation-path { margin: 9px 0 0; color: #71869c; font-size: .7rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { .sii-prevalidation-intro, .sii-validation-result { align-items: stretch; flex-direction: column; }.sii-validation-checks { grid-template-columns: 1fr; } }
.sii-inbox-panel { margin-top: 12px; padding: 14px; border: 1px solid #cfe0f1; border-radius: 11px; background: #fff; }.sii-inbox-panel .section-heading { margin-bottom: 10px; }.sii-inbox-panel h3 { margin: 2px 0 3px; color: #10233f; }.sii-inbox-panel p { margin: 0; color: #60758c; font-size: .76rem; }.sii-inbox-table { min-width: 1050px; }.sii-inbox-table td > small { display: block; margin-top: 3px; color: #829ab1; }.sii-inbox-table select, .sii-inbox-table input { min-height: 36px; padding: 7px 9px; border: 1px solid #c6d6e6; border-radius: 7px; background: #fff; }.sii-inbox-table input { min-width: 230px; }
.sii-evidence-library { margin-top: 12px; padding: 14px; border: 1px solid #cfe0f1; border-radius: 11px; background: #fff; }.sii-evidence-library h3 { margin: 2px 0 3px; color: #10233f; }.sii-evidence-library .section-heading p { margin: 0; color: #60758c; font-size: .76rem; }.sii-evidence-columns { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; }.sii-evidence-column { overflow: hidden; border: 1px solid #dce6ef; border-radius: 10px; background: #f8fafc; }.sii-evidence-column-title { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid #dce6ef; color: #173454; }.sii-evidence-column-title span { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px; background: #e2ecf6; font-size: .7rem; font-weight: 800; }.sii-history-item { border-bottom: 1px solid #e1e8f0; background: #fff; }.sii-history-item:last-child { border-bottom: 0; }.sii-history-item summary { display: flex; align-items: center; gap: 9px; padding: 10px 12px; cursor: pointer; }.sii-history-item summary > div { display: grid; min-width: 0; }.sii-history-item summary strong, .sii-history-item summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.sii-history-item summary small { color: #71869c; font-size: .68rem; }.sii-history-item summary b { margin-left: auto; color: #54708c; font-size: .66rem; }.validation-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; }.validation-dot.valid { background: #16a34a; }.validation-dot.invalid { background: #dc2626; }.sii-history-checks { display: grid; gap: 5px; padding: 0 12px 11px 31px; }.sii-history-checks p { display: grid; grid-template-columns: 82px 110px 1fr; align-items: start; gap: 7px; margin: 0; font-size: .7rem; }.sii-history-checks p > span { font-weight: 800; }.sii-history-checks p > span.correcto { color: #087a3f; }.sii-history-checks p > span.advertencia { color: #a15c00; }.sii-history-checks p > span.error { color: #b42318; }.sii-history-checks small { color: #60758c; line-height: 1.35; }.sii-pdf-item { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid #e1e8f0; background: #fff; }.sii-pdf-item:last-child { border-bottom: 0; }.sii-pdf-item > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #fee2e2; color: #b42318; font-size: .65rem; font-weight: 900; }.sii-pdf-item > div { display: grid; min-width: 0; }.sii-pdf-item strong, .sii-pdf-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.sii-pdf-item small { color: #71869c; font-size: .68rem; }.sii-pdf-item a { margin-left: auto; text-decoration: none; }
@media (max-width: 900px) { .sii-evidence-columns { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .sii-history-checks p { grid-template-columns: 1fr; } }
.superadmin-badge { border: 1px solid #f59e0b; color: #9a5a00; background: #fff7e6; border-radius: 999px; padding: .55rem .9rem; font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.supervision-toolbar { display: flex; align-items: end; gap: 1rem; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; border: 1px solid #cfe0f1; border-radius: 14px; background: #fff; }
.supervision-toolbar > div { display: grid; gap: .2rem; flex: 1; }
.supervision-toolbar strong { color: #0d2d50; font-size: 1.15rem; }
.supervision-toolbar small { color: #6b85a0; }
.supervision-toolbar select { min-width: 290px; }
.supervision-toolbar { flex-wrap: wrap; }
.supervision-select { width: min(100%, 360px); min-width: 0 !important; min-height: 42px; padding: 10px 38px 10px 13px; border: 1px solid #bfd0e2; border-radius: 9px; background: #fff; color: #173454; font: inherit; }
.supervision-change-button { min-height: 42px; white-space: nowrap; }
.active-company-chip { display: grid; gap: 1px; padding-left: 9px; margin-left: 2px; border-left: 1px solid #d7e0ea; color: #173454; white-space: nowrap; }
.active-company-chip strong { font-size: 11px; }
.active-company-chip small { color: #6b85a0; font-size: 9px; }
@media (max-width: 760px) { .supervision-toolbar > div, .supervision-select, .supervision-change-button { width: 100%; } }
.supervision-metrics .metric-card strong { font-size: 1.65rem; }
.supervision-card { margin-top: 1.25rem; }
.status-pill, .contract-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: .3rem .65rem; background: #eef5ff; color: #22649a; font-size: .78rem; font-weight: 700; }
.supervision-table td small { display: block; color: #7890a8; margin-top: .2rem; }
.supervision-table .selected-row { background: #f4f9ff; }
.state-active { color: #087a4b; font-weight: 700; }
.state-inactive { color: #b42318; font-weight: 700; }
.supervision-title { display: flex; align-items: center; gap: 1rem; }
.supervision-logo { width: 64px; height: 64px; object-fit: contain; }
.tracking-environment.simulation {
    background: #fff3d6;
    color: #995d00;
}

.tracking-environment.production {
    background: #dff8e8;
    color: #08743d;
}

.tracking-code {
    white-space: nowrap;
    color: #1d5f94;
    font-family: Consolas, monospace;
    font-size: .78rem;
}
@media (max-width: 1400px) and (min-width: 801px) {
    .page-content { padding-left: 18px; padding-right: 18px; }
    .product-catalog-table { min-width: 0; table-layout: fixed; }
    .product-catalog-table th, .product-catalog-table td { padding: .62rem .5rem; font-size: .75rem; }
    .product-catalog-table th:nth-child(1) { width: 19%; }
    .product-catalog-table th:nth-child(2) { width: 10%; }
    .product-catalog-table th:nth-child(3) { width: 9%; }
    .product-catalog-table th:nth-child(4) { width: 8%; }
    .product-catalog-table th:nth-child(5) { width: 7%; }
    .product-catalog-table th:nth-child(6) { width: 9%; }
    .product-catalog-table th:nth-child(7) { width: 8%; }
    .product-catalog-table th:nth-child(8) { width: 5%; }
    .product-catalog-table th:nth-child(9) { width: 8%; }
    .product-catalog-table th:nth-child(10) { width: 17%; }
    .product-catalog-table td small { font-size: .66rem; }
    .product-catalog-table .row-actions { min-width: 0; gap: .2rem; }
    .product-catalog-table .row-actions .row-button { padding: .28rem .35rem; font-size: .66rem; }
}
.sales-chart-panel { min-height: 230px; padding: 18px; overflow: hidden; border: 1px solid #d5e4f2; border-radius: 16px; background: linear-gradient(145deg, #f8fbff, #eef7ff); }
.sales-chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sales-chart-heading > div { display: grid; gap: 3px; }
.sales-chart-heading strong { color: #102a43; font-size: 1.35rem; }
.sales-chart-heading small { color: #71869c; font-size: .68rem; }
.sales-chart-trend { padding: 5px 8px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.sales-chart { display: flex; align-items: flex-end; gap: 7px; height: 150px; margin-top: 15px; padding: 0 3px 5px; border-bottom: 1px solid #cbdbea; }
.sales-chart-column { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; height: 100%; flex: 1; flex-direction: column; }
.sales-chart-bar-wrap { display: flex; align-items: flex-end; width: 100%; max-width: 23px; height: 100%; flex: 1; }
.sales-chart-bar { display: block; width: 100%; min-height: 4px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #38bdf8, #2563eb); box-shadow: 0 4px 8px rgba(37,99,235,.18); transition: height .25s ease, filter .15s ease; }
.sales-chart-bar:hover { filter: brightness(1.12); }
.sales-chart-column small { color: #7890a7; font-size: .62rem; }
.sales-chart-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; color: #71869c; font-size: .68rem; }
.sales-chart-legend a { color: #2563eb; font-weight: 800; text-decoration: none; }
@media (max-width: 900px) { .sales-chart-panel { min-height: 210px; }.sales-chart { height: 130px; } }

/* Densidad visual por preferencia del usuario */
.topbar-actions { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1201; }
.density-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid #d5e1ed; border-radius: 999px; background: #f8fafc; color: #486581; font-size: .62rem; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.density-toggle strong { color: #1f5d8f; font-size: .62rem; line-height: 1; font-weight: 800; letter-spacing: .01em; }
.density-toggle:hover { border-color: #93c5fd; background: #eff6ff; }
.density-icon { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 999px; font-size: .62rem; background: #ebf5ff; color: #1d4ed8; }
.density-picker { position: relative; }
.density-chevron { color: #71869c; font-size: .85rem; line-height: 1; }
.density-menu { position: absolute; z-index: 50; top: calc(100% + 7px); right: 0; display: grid; width: 230px; padding: 5px; border: 1px solid #d5e1ed; border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(16,35,63,.16); }
.density-menu[hidden] { display: none; }
.density-menu button { display: grid; grid-template-columns: 19px 1fr; align-items: center; gap: 1px 7px; padding: 8px 9px; border: 0; border-radius: 7px; background: transparent; color: #173454; text-align: left; cursor: pointer; }
.density-menu button > span { grid-row: 1 / span 2; color: #8da2b7; font-size: 1.1rem; }
.density-menu button strong { font-size: .76rem; }
.density-menu button small { color: #71869c; font-size: .67rem; }
.density-menu button:hover, .density-menu button.active { background: #eff6ff; }
.density-menu button.active > span { color: #2563eb; }
.density-menu button.active > span::first-letter { color: #2563eb; }

.topbar-user-menu,
.topbar-user-menu summary {
    margin: 0;
    list-style: none;
}

.topbar-user-menu {
    position: relative;
    display: inline-block;
}

.topbar-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 30px;
    padding: 4px 9px 4px 4px;
    border: 1px solid #dbe6f2;
    border-radius: 999px;
    background: #fbfdff;
    color: #172f4e;
    font: inherit;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.topbar-user-toggle::-webkit-details-marker { display: none; }
.topbar-user-toggle::marker { content: ""; }
.topbar-user-toggle:hover,
.topbar-user-menu[open] .topbar-user-toggle {
    border-color: #bfd5ea;
    background: #f7fbff;
    box-shadow: 0 5px 16px rgba(23, 52, 84, .08);
}
.topbar-user-toggle:focus-visible { outline: 2px solid rgba(37, 99, 235, .45); outline-offset: 2px; }

.topbar-user-summary {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    min-width: 0;
}

.topbar-user-summary strong {
    display: block;
    color: #10233f;
    font-size: .74rem;
    font-weight: 800;
    line-height: 1.1;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-summary small {
    display: block;
    color: #667085;
    font-size: .62rem;
    line-height: 1;
}

.topbar-user-chevron {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 1px solid #dbe6f2;
    border-radius: 7px;
    background: #f3f8fd;
    color: #607991;
    transition: transform .24s cubic-bezier(.22, 1, .36, 1), color .18s ease, border-color .18s ease, background .18s ease;
}

.topbar-user-chevron::before {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-1px) rotate(45deg);
}

.topbar-user-toggle:hover .topbar-user-chevron {
    color: #2563eb;
    border-color: #bfd5ea;
    background: #eaf3fc;
}

.topbar-user-menu[open] .topbar-user-chevron {
    transform: rotate(180deg);
    color: #2563eb;
    border-color: #a9c9e7;
    background: #e6f1fb;
}

.topbar-user-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1305;
    display: grid;
    gap: 9px;
    min-width: 204px;
    padding: 12px;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 42, 70, .2);
    backdrop-filter: blur(2px);
}

.topbar-user-company {
    display: grid;
    gap: 2px;
    color: #10233f;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5edf4;
}

.topbar-user-company strong { font-size: .79rem; }
.topbar-user-company small { color: #607991; font-size: .64rem; }

.topbar-user-meta {
    display: grid;
    gap: 2px;
    color: #10233f;
}

.topbar-user-meta strong,
.topbar-user-meta small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user-meta strong { font-size: .77rem; }
.topbar-user-meta small { color: #607991; font-size: .63rem; }

.topbar-user-panel .logout-button {
    width: 100%;
    min-height: 32px;
    justify-content: center;
    border-color: #dbe5ef;
    background: #f8fafc;
    color: #b91c1c;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 700;
}

.topbar-user-panel .logout-button:hover { background: #fee2e2; border-color: #fca5a5; }

.active-company-chip { display: none; }
.density-compact .page-content { padding-top: 12px; padding-bottom: 24px; }
.density-compact .page-heading { margin-bottom: .55rem; }
.density-compact .page-heading h1 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); }
.density-compact .page-heading p:not(.eyebrow) { margin-top: .15rem; font-size: .8rem; }
.density-compact .filter-card { gap: .65rem; padding: .72rem; margin-bottom: .65rem; border-radius: 10px; }
.density-compact .field { gap: .25rem; }
.density-compact .field label { font-size: .72rem; }
.density-compact .field input, .density-compact .field select { min-height: 34px; padding: .45rem .6rem; border-radius: 6px; font-size: .82rem; }
.density-compact .check-field { min-height: 34px; font-size: .78rem; }
.density-compact .button, .density-compact .primary-button, .density-compact .logout-button { min-height: 34px; padding: .45rem .8rem; border-radius: 6px; font-size: .78rem; }
.density-compact .table-card, .density-compact .dashboard-card, .density-compact .inventory-kpi, .density-compact .metric-card, .density-compact .history-summary-card { border-radius: 10px; }
.density-compact .table-toolbar { padding: .65rem .85rem; }
.density-compact .result-count { font-size: .76rem; }
.density-compact .data-table th { padding: .58rem .72rem; font-size: .7rem; }
.density-compact .data-table td { padding: .62rem .72rem; font-size: .82rem; }
.density-compact .data-table td small { margin-top: .12rem; font-size: .68rem; }
.density-compact .section-heading, .density-compact .section-title { padding: .72rem .85rem; }
.density-compact .section-heading h2, .density-compact .section-title h2 { font-size: 1rem; }
.density-compact .section-heading p, .density-compact .section-title p { font-size: .74rem; }
.density-compact .inventory-kpi-grid, .density-compact .inventory-view-nav, .density-compact .metric-grid, .density-compact .history-summary-grid { gap: 8px; margin-bottom: 9px; }
.density-compact .inventory-kpi { padding: 10px 12px; }
.density-compact .inventory-kpi strong { margin: 4px 0 2px; font-size: 1.25rem; }
.density-compact .inventory-view-card { padding: 7px 10px; }
.density-compact .inventory-view-card strong { font-size: 1.1rem; }
.density-compact .cash-banner { padding: .7rem .85rem; margin-bottom: .65rem; border-radius: 10px; }
.density-compact .sales-grid, .density-compact .agenda-layout, .density-compact .dashboard-grid, .density-compact .split-grid { gap: .65rem; }
.density-compact .product-picker, .density-compact .sale-card { min-height: 480px; }
.density-compact .sale-line, .density-compact .agenda-event { padding: .62rem .85rem; }
.density-compact .agenda-form, .density-compact .stack-form { gap: .6rem; padding: .85rem; }
.density-compact .agenda-week { gap: .3rem; padding: .7rem; }
.density-compact .agenda-day { min-height: 64px; padding: .45rem .3rem; }
.density-compact .dashboard-card { padding: 15px; }
.density-compact .dashboard-card h3 { font-size: 1rem; }
@media (max-width: 800px) {
    .topbar-actions { gap: 8px; }
    .density-toggle { padding: 6px 8px; }
    .density-toggle span { display: none; }
    .topbar-user-summary { display: none; }
    .topbar-user-toggle { padding-inline: 5px; }
    .topbar-user-panel { min-width: 186px; }
    .density-compact .page-content { padding-left: 12px; padding-right: 12px; }
}

/* Ajustes específicos de densidad compacta */
.density-compact .metric-card { padding: 11px 13px; }
.density-compact .metric-card strong { margin: 4px 0 2px; font-size: 1.35rem; }
.density-compact .dashboard-grid { margin-top: 10px; }
.density-compact .dashboard-card { padding: 13px; }
.density-compact .flow-line { margin-top: 18px; }
.density-compact .status-row { padding: 9px 0; }
.density-compact .scan-row { gap: .45rem; padding: .65rem .85rem; }
.density-compact .scan-row input { min-height: 34px; padding: .45rem .6rem; }
.density-compact .sale-lines { max-height: 250px; }
.density-compact .sale-line { padding: .55rem .8rem; }
.density-compact .sale-summary { padding: .8rem; }
.density-compact .summary-row { padding: .3rem 0; }
.density-compact .customer-row, .density-compact .document-row { gap: .25rem; margin-top: .6rem; font-size: .78rem; }
.density-compact .customer-row input, .density-compact .customer-row select, .density-compact .document-row select, .density-compact .payment-row select { min-height: 34px; padding: .4rem .55rem; font-size: .8rem; }
.density-compact .payment-row { gap: .6rem; margin-top: .6rem; font-size: .78rem; }
.density-compact .confirm-button { min-height: 40px; margin-top: .8rem; font-size: .86rem; }
.density-compact .purchase-card .section-title { padding: .65rem .8rem; }
.density-compact .purchase-card .budget-form { gap: .45rem; padding: .6rem .7rem; margin: .45rem .7rem 0; }
.density-compact .purchase-card .budget-form input, .density-compact .purchase-card .budget-form select, .density-compact .purchase-card .budget-form textarea { min-height: 34px; padding: .42rem .55rem; }
.density-compact .purchase-card .budget-form textarea { min-height: 42px; }
.density-compact .purchase-line-tools { gap: 8px; margin-top: 7px; margin-bottom: 6px; padding-left: .7rem; padding-right: .7rem; }
.density-compact .purchase-line-tools input, .density-compact .purchase-line-add select, .density-compact .purchase-line-add input { min-height: 34px; padding: .42rem .55rem; }
.density-compact .purchase-line-add { gap: .45rem; padding-left: .7rem; padding-right: .7rem; padding-bottom: .55rem; }
.density-compact .purchase-summary { gap: 16px; padding: .75rem .8rem; }
.density-compact .purchase-history { margin-top: .65rem; }
.density-compact .financial-card { margin-top: .65rem; }
.density-compact .financial-bars { height: 180px; padding: .8rem .8rem .55rem; }
.density-compact .ebitda-month-chart { min-height: 170px; padding: .8rem .75rem .55rem; }
.density-compact .ebitda-month-bar { height: 145px; min-width: 48px; }
.density-compact .facturacion-config-card, .density-compact .facturacion-filter-card { padding: .7rem; }
.density-compact .facturacion-config-row { gap: .55rem; }
.density-compact .sii-module-tabs { margin-bottom: .55rem; }
.density-compact .company-config-card .section-title { padding: .7rem .8rem .05rem; }
.density-compact .company-config-card .budget-form { gap: .5rem; margin: .45rem .7rem 0; padding: .7rem; }
.density-compact .company-config-card .budget-form input, .density-compact .company-config-card .budget-form select, .density-compact .company-config-card .budget-form textarea { min-height: 34px; padding: .42rem .55rem; }
.density-compact .company-config-card .budget-form textarea { min-height: 58px; }
.density-compact .config-tabs { gap: 2px; margin-top: .65rem; padding: 3px; }
.density-compact .config-tab { padding: .5rem .8rem; font-size: .8rem; }
.density-compact .config-sections { gap: .65rem; margin-top: .65rem; }
.density-compact .config-section-card { min-height: 150px; padding: .8rem; border-radius: 10px; }
.density-compact .config-section-card h2 { margin: .15rem 0 .3rem; font-size: 1rem; }
.density-compact .config-section-card p:not(.eyebrow) { font-size: .78rem; line-height: 1.3; }
.density-compact .config-section-footer { gap: .45rem; margin-top: .65rem; }
.density-compact .config-pos-form { gap: .45rem .6rem; }
.density-compact .config-pos-form label, .density-compact .config-upload-grid label { gap: .25rem; font-size: .72rem; }
.density-compact .config-pos-form input, .density-compact .config-pos-form select, .density-compact .config-upload-grid input, .density-compact .config-upload-grid select { min-height: 32px; padding: .38rem .5rem; font-size: .78rem; }
.density-compact .checkout-editor-grid { gap: .5rem; }.density-compact .checkout-editor-grid fieldset, .density-compact .checkout-switches { padding: .45rem .6rem; }.density-compact .checkout-list-row { padding: .5rem .65rem; }
.density-compact .config-inline-options { gap: .45rem .8rem; margin-top: .65rem; padding: .55rem; font-size: .74rem; }
.density-compact .config-example { gap: .1rem; margin-top: .65rem; padding: .55rem .7rem; font-size: .74rem; }
.density-compact .users-page { gap: .65rem; }
.density-compact .users-page .card { border-radius: 10px; }
.density-compact .users-page .section-heading { padding: .75rem .85rem; }
.density-compact .users-page .stack-form, .density-compact .users-page .budget-form { gap: .55rem; padding: .75rem; }
.density-compact .users-page .stack-form input, .density-compact .users-page .stack-form select, .density-compact .users-page .budget-form input, .density-compact .users-page .budget-form select { min-height: 34px; padding: .42rem .55rem; }

/* Bandeja general de DTE recibidos */
.received-inbox-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; padding: 16px 18px; border: 1px solid #c8dceb; border-left: 4px solid #2563eb; border-radius: 12px; background: linear-gradient(120deg,#f4f9ff,#fff); }
.received-inbox-intro h2 { margin: 3px 0 5px; color: #102d4f; font-size: 1.08rem; }
.received-inbox-intro p:not(.eyebrow) { margin: 0; max-width: 820px; color: #607991; font-size: .78rem; line-height: 1.4; }
.received-inbox-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.imap-inbox-status { display: block; margin-top: 7px; color: #315f83; font-size: .72rem; font-weight: 700; }
.imap-sync-control { display: grid; gap: 5px; max-width: 430px; }
.imap-sync-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 154px; }
.imap-sync-progress { color: #315f83; font-size: .68rem; font-weight: 700; line-height: 1.35; }
.button-loading-spinner { width: 15px; height: 15px; flex: 0 0 15px; border: 2px solid rgba(37,99,235,.25); border-top-color: #2563eb; border-radius: 50%; animation: aiventas-button-spin .75s linear infinite; }
@keyframes aiventas-button-spin { to { transform: rotate(360deg); } }
.mail-config-tabs { display: flex; grid-column: 1 / -1; gap: 6px; padding: 5px; border: 1px solid #d5e0ed; border-radius: 11px; background: #eef5fb; }
.mail-config-tabs .config-tab { flex: 0 1 240px; }
.imap-maintainer { gap: 12px; }
.imap-mailbox-list { display: grid; gap: 8px; }
.imap-mailbox-row { display: grid; grid-template-columns: minmax(260px,1fr) auto auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid #cfe0ec; border-left: 4px solid #16a34a; border-radius: 10px; background: #f9fcff; }
.imap-mailbox-row.disabled { border-left-color: #94a3b8; opacity: .78; }
.imap-mailbox-main { display: grid; gap: 2px; min-width: 0; }.imap-mailbox-main strong { color: #102d4f; }.imap-mailbox-main span,.imap-mailbox-main small { overflow-wrap: anywhere; color: #627d98; font-size: .72rem; }.imap-mailbox-main em { color: #b42318; font-size: .7rem; font-style: normal; }
.imap-mailbox-state { padding: 4px 8px; border-radius: 999px; background: #dcfce7; color: #087a3e; font-size: .61rem; font-weight: 900; }.imap-mailbox-row.disabled .imap-mailbox-state { background: #e8edf2; color: #52697e; }
.imap-mailbox-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.imap-editor { margin-top: 4px; padding: 14px; border: 1px dashed #b8cee0; border-radius: 11px; background: #f8fbfe; }.imap-editor h3 { margin: 3px 0 0; color: #102d4f; }.imap-empty { padding: 13px; border: 1px dashed #b8cee0; border-radius: 10px; background: #f8fbfe; }
.user-license-card { display: grid; grid-template-columns: minmax(280px,1fr) auto auto; align-items: center; gap: 18px; margin-bottom: 14px; border-left: 4px solid #16a34a; }.user-license-card.limit-reached { border-left-color: #dc2626; }.user-license-card h2 { margin: 3px 0 4px; color: #102d4f; }.user-license-card p { margin: 0; color: #627d98; font-size: .78rem; }
.user-license-metrics { display: flex; gap: 8px; }.user-license-metrics span { display: grid; min-width: 80px; padding: 8px 12px; border-radius: 9px; background: #eef5fb; text-align: center; }.user-license-metrics small { color: #627d98; font-size: .63rem; text-transform: uppercase; }.user-license-metrics strong { color: #102d4f; font-size: 1.15rem; }
.user-extra-control { display: flex; align-items: flex-end; gap: 8px; }.user-extra-control label { display: grid; gap: 4px; color: #486581; font-size: .7rem; font-weight: 700; }.user-extra-control input { width: 110px; }.user-limit-note { max-width: 230px; padding: 9px 12px; border-radius: 8px; background: #fff0f0; color: #b42318; font-size: .74rem; font-weight: 800; }.active-session-device { display: block; color: #087a3e; font-size: .75rem; }
@media (max-width: 1000px) { .user-license-card { grid-template-columns: 1fr; }.user-license-metrics { flex-wrap: wrap; } }
@media (max-width: 900px) { .imap-mailbox-row { grid-template-columns: 1fr; }.imap-mailbox-actions { justify-content: flex-start; }.received-inbox-actions { justify-content: flex-start; } }
.received-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
.received-metrics article { display: grid; gap: 2px; padding: 11px 13px; border: 1px solid #d6e2ed; border-top: 3px solid #2563eb; border-radius: 10px; background: #fff; }
.received-metrics article:nth-child(2) { border-top-color: #f59e0b; }.received-metrics article:nth-child(3) { border-top-color: #dc2626; }.received-metrics article:nth-child(4) { border-top-color: #16a34a; }
.received-metrics span { color: #657f98; font-size: .6rem; font-weight: 900; letter-spacing: .08em; }.received-metrics strong { color: #102d4f; font-size: 1.15rem; }.received-metrics small { color: #71869b; font-size: .67rem; }
.received-filters { display: grid; grid-template-columns: minmax(260px,1fr) 190px 180px auto auto; align-items: end; gap: 9px; margin-bottom: 12px; }
.received-inbox-table td { vertical-align: middle; }.received-inbox-table td strong,.received-inbox-table td small { display: block; }.received-inbox-table td small { margin-top: 2px; color: #70869b; font-size: .68rem; }
.received-status,.provider-link-state { display: inline-flex; width: max-content; max-width: 220px; padding: 4px 7px; border-radius: 999px; font-size: .65rem; font-weight: 900; }
.received-status.pending { color: #92400e; background: #fef3c7; }.received-status.accepted { color: #166534; background: #dcfce7; }.received-status.objection { color: #9a4f00; background: #ffedd5; }.received-status.rejected { color: #991b1b; background: #fee2e2; }
.provider-link-state.missing { color: #991b1b; background: #fee2e2; }.provider-link-state.ready { overflow: hidden; color: #166534; background: #dcfce7; text-overflow: ellipsis; white-space: nowrap; }
.received-actions { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }.received-actions .row-button.secondary { color: #7a4d00; border-color: #e8c77d; background: #fffaf0; }
@media (max-width: 1050px) { .received-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }.received-filters .grow { grid-column: 1/-1; } }
@media (max-width: 700px) { .received-inbox-intro { align-items: stretch; flex-direction: column; }.received-metrics,.received-filters { grid-template-columns: 1fr; }.received-filters .grow { grid-column: auto; } }

.import-preview-backdrop { z-index: 1100; }
.import-preview-modal { width: min(1180px, 100%); }
.import-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.import-summary-grid article { display: grid; gap: .15rem; padding: .75rem .85rem; border: 1px solid #d5e0ed; border-top: 3px solid #2f80ed; border-radius: 10px; background: #f7faff; }
.import-summary-grid article:nth-child(2) { border-top-color: #f59e0b; }
.import-summary-grid article:nth-child(3) { border-top-color: #16a36a; }
.import-summary-grid article:nth-child(4) { border-top-color: #d14343; }
.import-summary-grid strong { color: #0b2a4a; font-size: 1.35rem; }
.import-summary-grid span { color: #627d98; font-size: .76rem; }
.import-replace-option { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: .75rem; padding: .75rem .85rem; border: 1px solid #f2c36b; border-radius: 10px; background: #fff8e7; color: #243b53; cursor: pointer; }
.import-replace-option input { margin-top: .2rem; accent-color: #e99100; }
.import-replace-option span { display: grid; gap: .2rem; }
.import-replace-option small { color: #627d98; font-size: .76rem; font-weight: 400; }
.import-warning { margin-bottom: .75rem; padding: .65rem .8rem; border-left: 3px solid #e99100; border-radius: 6px; background: #fff4d6; color: #704b00; font-size: .8rem; }
.import-preview-scroll { max-height: min(44vh, 430px); }
.import-preview-note { margin: .65rem 0 0; color: #627d98; font-size: .76rem; }
.import-action { display: inline-flex; padding: .22rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.import-action-crear { color: #086b47; background: #d9f7e8; }
.import-action-actualizar { color: #815000; background: #fff0bf; }
.import-action-sin-cambios { color: #486581; background: #e8eef5; }
.import-status { color: #486581; font-size: .76rem; font-weight: 700; }
.import-change-detail { min-width: 280px; color: #486581; font-size: .76rem; line-height: 1.35; }
@media (max-width: 760px) { .import-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .import-preview-modal { padding: 16px; } }

/* Diagnóstico técnico SII */
.sii-module-tabs .diagnostic-tab { display: inline-flex; align-items: center; gap: 7px; min-width: max-content; padding: 9px 12px; border-radius: 8px; color: #7c3aed; font-size: .8rem; font-weight: 800; text-decoration: none; }
.sii-module-tabs .diagnostic-tab:hover { background: rgba(255,255,255,.72); }
.sii-module-tabs .diagnostic-tab span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: #ede9fe; color: #6d28d9; font-size: .62rem; }
.diagnostic-heading { align-items: center; }
.diagnostic-guide { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 0 0 14px; }
.diagnostic-guide > div { display: grid; grid-template-columns: 34px 1fr; gap: 2px 9px; align-items: center; padding: 12px; border: 1px solid #dbe5ef; border-radius: 11px; background: linear-gradient(145deg,#fff,#f7faff); }
.diagnostic-guide > div > span { grid-row: 1/3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #102a43; color: #fff; font-weight: 900; }
.diagnostic-guide strong { color: #10233f; font-size: .88rem; }
.diagnostic-guide small { color: #6b7f93; line-height: 1.3; }
.diagnostic-filters { display: grid; grid-template-columns: 150px 150px minmax(260px,1fr) auto auto; align-items: end; gap: 10px; }
.diagnostic-filters .check-field { min-height: 38px; }
.diagnostic-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.diagnostic-row-alert { background: #fffaf2; }
.diagnostic-table td { vertical-align: middle; }
.diagnostic-state { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef2f6; color: #475467; font-size: .72rem; font-weight: 800; }
.diagnostic-state.success { background: #dcfce7; color: #166534; }.diagnostic-state.warning { background: #fef3c7; color: #92400e; }.diagnostic-state.error { background: #fee2e2; color: #991b1b; }
.diagnostic-modal-backdrop { z-index: 1100; }.diagnostic-modal { width: min(1120px,calc(100vw - 30px)); max-width: 1120px; max-height: calc(100vh - 30px); overflow-y: auto; }.diagnostic-loading { margin: 30px 0; }
.diagnostic-conclusion { display: grid; gap: 4px; margin: 10px 0 14px; padding: 13px 15px; border: 1px solid #d8e3ef; border-left: 5px solid #2563eb; border-radius: 10px; background: #f8fbff; }
.diagnostic-conclusion > span { color: #58718a; font-size: .68rem; font-weight: 900; letter-spacing: .09em; }.diagnostic-conclusion > strong { color: #102a43; line-height: 1.4; }.diagnostic-conclusion > small { color: #7a3e00; }
.diagnostic-conclusion.alert { border-left-color: #dc2626; background: #fff7f7; }.diagnostic-conclusion.success { border-left-color: #16a34a; background: #f3fff7; }
.diagnostic-stage-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.diagnostic-stage-grid article { display: grid; gap: 5px; min-height: 108px; padding: 13px; border: 1px solid #dbe5ef; border-top: 4px solid #94a3b8; border-radius: 10px; background: #fff; }
.diagnostic-stage-grid article > span { color: #64748b; font-size: .68rem; font-weight: 900; letter-spacing: .07em; }.diagnostic-stage-grid article > strong { color: #10233f; font-size: 1.05rem; }.diagnostic-stage-grid article > small { color: #667b8f; line-height: 1.35; overflow-wrap: anywhere; }
.diagnostic-stage-grid article.done { border-top-color: #16a34a; background: #f7fff9; }.diagnostic-stage-grid article.failed { border-top-color: #dc2626; background: #fff8f8; }.diagnostic-stage-grid article.pending { border-top-color: #f59e0b; background: #fffcf3; }
.diagnostic-counts { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; margin: 10px 0 16px; }.diagnostic-counts > div { padding: 9px 10px; border-radius: 8px; background: #edf3f8; }.diagnostic-counts span { display: block; color: #667b8f; font-size: .68rem; }.diagnostic-counts strong { display: block; margin-top: 3px; color: #10233f; font-size: .94rem; overflow-wrap: anywhere; }
.diagnostic-section { margin-top: 14px; padding: 14px; border: 1px solid #dbe5ef; border-radius: 11px; background: #fff; }.diagnostic-section-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }.diagnostic-section-title h3 { margin: 2px 0 0; color: #10233f; font-size: 1rem; }.diagnostic-section-title > span { color: #667b8f; font-size: .75rem; }.diagnostic-check-summary { padding: 5px 8px; border-radius: 999px; background: #eef4f9; }
.diagnostic-file-identity { display: grid; grid-template-columns: 1.5fr .7fr .7fr; gap: 8px; margin-bottom: 10px; }.diagnostic-file-identity > div { padding: 9px; border-radius: 8px; background: #f7f9fc; }.diagnostic-file-identity span { display: block; color: #6b7f93; font-size: .68rem; }.diagnostic-file-identity strong,.diagnostic-file-identity code { display: block; margin-top: 3px; color: #102a43; overflow-wrap: anywhere; }.diagnostic-file-identity .hash { grid-column: 1/-1; }.diagnostic-file-identity .hash code { font-size: .72rem; }
.diagnostic-check-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.diagnostic-check-list article { display: grid; grid-template-columns: 27px 1fr; gap: 8px; padding: 9px; border: 1px solid #e0e7ef; border-radius: 8px; }.diagnostic-check-list article > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #dcfce7; color: #166534; font-weight: 900; }.diagnostic-check-list article.advertencia > span { background: #fef3c7; color: #92400e; }.diagnostic-check-list article.error > span { background: #fee2e2; color: #991b1b; }.diagnostic-check-list strong,.diagnostic-check-list small { display: block; }.diagnostic-check-list strong { color: #17324d; font-size: .8rem; }.diagnostic-check-list small { margin-top: 2px; color: #6b7f93; line-height: 1.35; overflow-wrap: anywhere; }
.diagnostic-timeline { position: relative; display: grid; gap: 8px; padding-left: 15px; }.diagnostic-timeline::before { content: ""; position: absolute; left: 5px; top: 7px; bottom: 7px; width: 2px; background: #dbe5ef; }.diagnostic-timeline article { position: relative; display: grid; grid-template-columns: 145px 1fr; gap: 10px; padding: 7px 9px; border-radius: 7px; background: #f8fafc; }.diagnostic-timeline article::before { content: ""; position: absolute; left: -14px; top: 13px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #64748b; box-shadow: 0 0 0 1px #cbd5e1; }.diagnostic-timeline article.sii::before { background: #2563eb; }.diagnostic-timeline article.success::before { background: #16a34a; }.diagnostic-timeline time { color: #5f7489; font-size: .72rem; font-weight: 700; }.diagnostic-timeline strong,.diagnostic-timeline small { display: block; }.diagnostic-timeline strong { color: #17324d; font-size: .8rem; }.diagnostic-timeline small { margin-top: 2px; color: #6b7f93; }
.diagnostic-evidence-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 220px; overflow-y: auto; }.diagnostic-evidence-list > div { padding: 8px 9px; border-radius: 8px; background: #f7f9fc; }.diagnostic-evidence-list span,.diagnostic-evidence-list small { display: block; color: #6b7f93; font-size: .68rem; }.diagnostic-evidence-list strong { display: block; margin: 2px 0; color: #17324d; font-size: .76rem; overflow-wrap: anywhere; }
.diagnostic-actions { position: sticky; bottom: -14px; margin: 16px -14px -14px; padding: 12px 14px; border-top: 1px solid #dbe5ef; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); }
@media (max-width: 900px) { .diagnostic-guide,.diagnostic-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }.diagnostic-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }.diagnostic-filters .grow { grid-column: 1/-1; }.diagnostic-counts { grid-template-columns: repeat(3,minmax(0,1fr)); }.diagnostic-stage-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .diagnostic-guide,.diagnostic-metrics,.diagnostic-filters,.diagnostic-check-list,.diagnostic-evidence-list { grid-template-columns: 1fr; }.diagnostic-file-identity { grid-template-columns: 1fr; }.diagnostic-file-identity .hash { grid-column: auto; }.diagnostic-counts { grid-template-columns: repeat(2,minmax(0,1fr)); }.diagnostic-timeline article { grid-template-columns: 1fr; }.diagnostic-actions { position: static; margin: 14px 0 0; padding: 10px 0 0; }.diagnostic-modal { width: calc(100vw - 18px); } }
/* Ordenes de compra: una orden emitida aun no ha afectado el inventario. */
.purchase-submit-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .7rem;
}

.purchase-state-1 {
    color: #a16207;
    background: #fef3c7;
}

.purchase-state-2 {
    color: #047857;
    background: #d1fae5;
}

.purchase-state-3 {
    color: #b91c1c;
    background: #fee2e2;
}

[data-theme="dark"] .purchase-state-1 {
    color: #fde68a;
    background: #422006;
}

[data-theme="dark"] .purchase-state-2 {
    color: #6ee7b7;
    background: #052e24;
}

[data-theme="dark"] .purchase-state-3 {
    color: #fca5a5;
    background: #450a0a;
}

/* Ordenes de trabajo - modulo Lubricentro */
.ot-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.ot-summary-grid .metric-card:nth-child(2) { border-top-color: #2563eb; }
.ot-summary-grid .metric-card:nth-child(3) { border-top-color: #16a34a; }
.ot-summary-grid .metric-card:nth-child(4) { border-top-color: #64748b; }
.ot-create-card { margin-bottom: 16px; padding: 20px; }
.ot-create-card .section-title, .ot-detail-section .section-title { align-items: flex-start; }
.ot-create-card .section-title h2, .ot-detail-section h3 { margin: 3px 0 4px; }
.ot-create-card .section-title p, .ot-detail-section .section-title p { margin: 0; color: #667085; }
.ot-create-empty { padding: 14px 16px; border: 1px dashed #bfdbfe; border-radius: 10px; background: #eff6ff; color: #476582; }
.ot-create-empty a { color: #1d4ed8; font-weight: 700; }
.ot-create-form { display: grid; grid-template-columns: minmax(300px,2fr) repeat(2,minmax(140px,.6fr)); gap: 12px; margin-top: 18px; align-items: end; }
.ot-create-form label, .ot-reception-grid label { display: grid; gap: 6px; color: #476582; font-size: .78rem; font-weight: 700; }
.ot-create-form input, .ot-create-form select, .ot-create-form textarea, .ot-reception-grid input, .ot-reception-grid select, .ot-reception-grid textarea, .ot-filter-row input, .ot-filter-row select, .ot-check-item input, .ot-check-item select { width: 100%; border: 1px solid #bfd2e6; border-radius: 9px; background: #fff; color: #10233f; padding: 11px 12px; outline: none; }
.ot-create-form textarea, .ot-reception-grid textarea { min-height: 78px; resize: vertical; }
.ot-create-form .wide { grid-column: 1 / -2; }
.ot-create-form .confirm-button { width: auto; margin: 0; white-space: nowrap; }
.ot-workspace { display: grid; grid-template-columns: minmax(280px,.72fr) minmax(560px,1.6fr); gap: 16px; align-items: start; }
.ot-list-card { position: sticky; top: 92px; overflow: hidden; }
.ot-list-card > .section-title { padding: 18px 18px 12px; }
.ot-filter-row { display: grid; gap: 8px; padding: 0 18px 14px; }
.ot-list { display: grid; max-height: calc(100vh - 300px); overflow-y: auto; border-top: 1px solid #dce6f1; }
.ot-list-item { display: grid; gap: 5px; padding: 15px 18px; border: 0; border-bottom: 1px solid #e5edf5; background: #fff; color: #10233f; text-align: left; cursor: pointer; transition: background .16s ease,border-color .16s ease,transform .16s ease; }
.ot-list-item:hover { background: #f4f8fd; transform: translateX(2px); }
.ot-list-item.active { border-left: 4px solid #2563eb; padding-left: 14px; background: #edf5ff; }
.ot-list-item b { font-size: .86rem; }
.ot-list-item small { overflow: hidden; color: #71869c; text-overflow: ellipsis; white-space: nowrap; }
.ot-list-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ot-progress { height: 5px; overflow: hidden; border-radius: 99px; background: #dfe8f2; }
.ot-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2563eb,#38bdf8); }
.ot-state { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 99px; background: #e8eef5; color: #476582; font-size: .67rem; font-weight: 800; white-space: nowrap; }
.ot-state.state-recepcionada { background: #fff7db; color: #9a6700; }
.ot-state.state-enproceso { background: #dbeafe; color: #1d4ed8; }
.ot-state.state-listaparaentrega, .ot-state.state-cerrada { background: #dcfce7; color: #15803d; }
.ot-state.state-cancelada { background: #fee2e2; color: #b91c1c; }
.ot-detail-card { overflow: hidden; }
.ot-detail-header { display: flex; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid #dce6f1; }
.ot-detail-header h2 { margin: 3px 0 4px; color: #10233f; }
.ot-detail-header p { margin: 0; color: #71869c; }
.ot-stage-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 13px 22px; border-bottom: 1px solid #dce6f1; background: #f7faff; }
.ot-stage-actions button { width: auto; margin: 0; }
.ot-detail-section { padding: 20px 22px; border-bottom: 1px solid #dce6f1; }
.ot-reception-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.ot-reception-grid .wide { grid-column: 1 / -1; }
.ot-checklist { display: grid; gap: 8px; margin-top: 14px; }
.ot-check-item { display: grid; grid-template-columns: minmax(220px,1.2fr) 145px minmax(180px,1fr); gap: 10px; align-items: center; padding: 10px; border: 1px solid #dce6f1; border-left: 4px solid #cbd5e1; border-radius: 10px; background: #f9fbfd; }
.ot-check-item.status-conforme { border-left-color: #22c55e; }
.ot-check-item.status-observado { border-left-color: #f97316; background: #fff9ed; }
.ot-check-item.status-noaplica { border-left-color: #64748b; }
.ot-check-item div { display: grid; gap: 3px; }
.ot-check-item small { color: #71869c; font-size: .65rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.ot-check-item strong { color: #173454; font-size: .8rem; }
.ot-upload { position: relative; overflow: hidden; cursor: pointer; }
.ot-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ot-photo-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.ot-photo { position: relative; overflow: hidden; margin: 0; border: 1px solid #dce6f1; border-radius: 11px; background: #f7faff; }
.ot-photo img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.ot-photo figcaption { display: grid; gap: 2px; padding: 9px 36px 9px 10px; }
.ot-photo figcaption span { overflow: hidden; color: #173454; font-size: .72rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ot-photo figcaption small { color: #71869c; font-size: .65rem; }
.ot-photo figcaption button { position: absolute; right: 8px; bottom: 8px; width: 25px; height: 25px; border: 0; border-radius: 50%; background: #fee2e2; color: #b91c1c; font-size: 1rem; cursor: pointer; }
.ot-detail-empty { display: grid; place-items: center; min-height: 420px; padding: 40px; color: #71869c; text-align: center; }
.ot-detail-empty .ui-icon, .ot-module-disabled .ui-icon { width: 46px; height: 46px; color: #2d83bd; }
.ot-detail-empty h2 { margin: 12px 0 4px; color: #173454; }
.ot-detail-empty p { max-width: 440px; margin: 0; }
.ot-module-disabled { display: flex; align-items: center; gap: 18px; padding: 28px; }
.ot-module-disabled h2 { margin: 0 0 4px; }
.ot-module-disabled p { margin: 0; color: #667085; }
.budget-ot-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 13px 16px; border: 1px solid #93c5fd; border-left: 4px solid #2563eb; border-radius: 10px; background: #eff6ff; }
.budget-ot-callout div { display: grid; gap: 3px; }
.budget-ot-callout strong { color: #173454; }
.budget-ot-callout span { color: #55718d; font-size: .78rem; }
.budget-ot-callout a { white-space: nowrap; text-decoration: none; }
.budget-ot-reference { display: grid; justify-items: start; gap: 2px; width: auto; min-width: 108px; margin: 0; padding: 6px 9px; border: 1px solid #9bc9ee; border-radius: 8px; background: #edf7ff; color: #165f98; text-align: left; cursor: pointer; }
.budget-ot-reference:hover { border-color: #2f80bd; background: #dff1ff; }
.budget-ot-reference strong { font-size: .72rem; }
.budget-ot-reference small { color: #5e7890; font-size: .62rem; font-weight: 700; }
.budget-without-ot { color: #8a9aab; font-size: .7rem; }

[data-theme="dark"] .ot-create-card .section-title p, [data-theme="dark"] .ot-detail-section .section-title p, [data-theme="dark"] .ot-detail-header p, [data-theme="dark"] .ot-list-item small, [data-theme="dark"] .ot-check-item small { color: #9db0c5; }
[data-theme="dark"] .ot-create-empty { border-color: #294766; background: #0c2137; color: #b5c7da; }
[data-theme="dark"] .ot-create-form label, [data-theme="dark"] .ot-reception-grid label { color: #b5c7da; }
[data-theme="dark"] .ot-create-form input, [data-theme="dark"] .ot-create-form select, [data-theme="dark"] .ot-create-form textarea, [data-theme="dark"] .ot-reception-grid input, [data-theme="dark"] .ot-reception-grid select, [data-theme="dark"] .ot-reception-grid textarea, [data-theme="dark"] .ot-filter-row input, [data-theme="dark"] .ot-filter-row select, [data-theme="dark"] .ot-check-item input, [data-theme="dark"] .ot-check-item select { border-color: #35506d; background: #0c192b; color: #e6eef8; }
[data-theme="dark"] .ot-list, [data-theme="dark"] .ot-detail-header, [data-theme="dark"] .ot-detail-section, [data-theme="dark"] .ot-stage-actions { border-color: #2d435c; }
[data-theme="dark"] .ot-list-item { border-color: #263d56; background: #101d2f; color: #ecf3fb; }
[data-theme="dark"] .ot-list-item:hover, [data-theme="dark"] .ot-list-item.active { background: #142b44; }
[data-theme="dark"] .ot-progress { background: #263d56; }
[data-theme="dark"] .ot-detail-header h2, [data-theme="dark"] .ot-check-item strong, [data-theme="dark"] .ot-detail-empty h2 { color: #f1f6fb; }
[data-theme="dark"] .ot-stage-actions, [data-theme="dark"] .ot-check-item, [data-theme="dark"] .ot-photo { background: #0d1b2d; }
[data-theme="dark"] .ot-check-item, [data-theme="dark"] .ot-photo { border-color: #2d435c; }
[data-theme="dark"] .ot-check-item.status-observado { background: #2e220e; }
[data-theme="dark"] .ot-photo figcaption span { color: #dce8f5; }
[data-theme="dark"] .budget-ot-callout { border-color: #315b87; background: #0c2137; }
[data-theme="dark"] .budget-ot-callout strong { color: #edf5ff; }
[data-theme="dark"] .budget-ot-callout span { color: #a8bdd2; }
[data-theme="dark"] .budget-ot-reference { border-color: #365f82; background: #10283e; color: #9dd4ff; }
[data-theme="dark"] .budget-ot-reference:hover { border-color: #5ca8ed; background: #15334e; }
[data-theme="dark"] .budget-ot-reference small { color: #a9bfd3; }
[data-theme="dark"] .budget-without-ot { color: #72889d; }

@media (max-width: 1100px) { .ot-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.ot-workspace { grid-template-columns: 1fr; }.ot-list-card { position: static; }.ot-list { max-height: 460px; }.ot-create-form { grid-template-columns: 1fr 1fr; }.ot-create-form .ot-budget-select, .ot-create-form .wide { grid-column: 1/-1; } }
@media (max-width: 700px) { .ot-summary-grid, .ot-create-form, .ot-reception-grid { grid-template-columns: 1fr; }.ot-create-form .wide, .ot-reception-grid .wide { grid-column: auto; }.ot-check-item { grid-template-columns: 1fr; }.ot-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.ot-detail-header { display: grid; }.ot-create-form .confirm-button { width: 100%; }.budget-ot-callout { align-items: stretch; flex-direction: column; } }
@media (max-width: 430px) { .ot-photo-grid { grid-template-columns: 1fr; } }

/* Flujo integrado presupuesto -> orden de trabajo -> cobro */
.budget-workflow-backdrop { position: fixed; inset: 0; z-index: 1800; display: grid; place-items: center; padding: 16px; background: rgba(8,20,38,.68); backdrop-filter: blur(7px); }
.budget-workflow-modal { display: flex; flex-direction: column; width: min(1040px,calc(100vw - 32px)); max-height: min(760px,calc(100vh - 32px)); overflow: hidden; border: 1px solid #d5e1ed; border-radius: 15px; background: #f6f9fc; box-shadow: 0 30px 80px rgba(5,20,40,.35); }
.budget-workflow-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 16px; border-bottom: 1px solid #dce6f1; background: #fff; }
.budget-workflow-header h2 { margin: 2px 0; color: #10233f; font-size: 1.1rem; line-height: 1.15; }
.budget-workflow-header p { margin: 0; color: #698097; font-size: .74rem; }
.budget-workflow-header .eyebrow { margin-bottom: 2px; font-size: .62rem; }
.budget-workflow-header .modal-close { width: 30px; height: 30px; border: 1px solid #d3dfeb; border-radius: 50%; background: #f4f8fc; color: #173454; font-size: 1.1rem; cursor: pointer; }
.workflow-header-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.budget-workflow-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; padding: 13px 24px; border-bottom: 1px solid #dce6f1; background: #edf3f9; }
.budget-workflow-steps span { display: flex; align-items: center; gap: 8px; min-width: 0; color: #74879a; font-size: .72rem; font-weight: 750; }
.budget-workflow-steps b { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 50%; background: #d5e0ea; color: #587087; }
.budget-workflow-steps .done { color: #167647; }
.budget-workflow-steps .done b { background: #d9f5e5; color: #167647; }
.budget-workflow-steps .active { color: #175fa5; }
.budget-workflow-steps .active b { background: #2563eb; color: #fff; }
.budget-workflow-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: #f7f9fc; }
.budget-workflow-modal > .app-notice { margin: 12px 20px 0; }
.integrated-reception-card { overflow-y: auto; border: 0; background: #fff; }
.integrated-ot-header { background: #fff; }
.integrated-stage-actions { background: #edf4fb; }
.integrated-checklist { grid-template-columns: repeat(2,minmax(0,1fr)); }
.integrated-checklist .ot-check-item { grid-template-columns: minmax(150px,1fr) 125px; }
.integrated-checklist .ot-check-item input { grid-column: 1/-1; }
.budget-workflow-tabs { position: relative; display: flex; flex: 0 0 auto; min-height: 46px; overflow-x: auto; padding: 0 14px; border-bottom: 1px solid #dce6f1; background: #edf3f9; }
.budget-workflow-tabs.single { min-height: 42px; }
.budget-workflow-tabs > button, .budget-workflow-tabs > span { position: relative; display: inline-flex; align-items: center; gap: 7px; min-width: 150px; padding: 9px 14px 8px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #647b92; font: inherit; font-size: .74rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.budget-workflow-tabs > span { cursor: default; }
.budget-workflow-tabs b { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: #d6e1ec; color: #526b83; font-size: .68rem; }
.budget-workflow-tabs em { padding: 3px 6px; border-radius: 99px; background: #dce7f1; color: #607890; font-size: .61rem; font-style: normal; }
.budget-workflow-tabs > .active { border-bottom-color: #f59e0b; color: #174d79; background: rgba(255,255,255,.58); }
.budget-workflow-tabs > .active b { background: #2563eb; color: #fff; }
.budget-workflow-tabs > .complete em { background: #d9f5e5; color: #167647; }
.budget-workflow-tabs > .pending em { background: #fff0c2; color: #9a6300; }
.budget-workflow-tabs > .next-step { position: relative; z-index: 1; color: #174f80; background: #eaf5ff; box-shadow: inset 0 -3px #2f80ed, 0 0 0 2px rgba(47,128,237,.18); animation: workflow-next-pulse 1.8s ease-in-out infinite; }
.budget-workflow-tabs > .next-step b { background: #2563eb; color: #fff; }
.workflow-next-badge { margin-left: auto; padding: 4px 7px; border-radius: 99px; background: #2563eb; color: #fff; font-size: .6rem; font-style: normal; font-weight: 850; white-space: nowrap; }
@keyframes workflow-next-pulse { 0%,100% { box-shadow: inset 0 -3px #2f80ed, 0 0 0 2px rgba(47,128,237,.15); } 50% { box-shadow: inset 0 -3px #2f80ed, 0 0 0 5px rgba(47,128,237,.25); } }
.workflow-actionbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; min-height: 48px; padding: 7px 16px; border-bottom: 1px solid #dce6f1; background: #fff; }
.workflow-next-hint { color: #60778e; font-size: .72rem; font-weight: 700; }
.workflow-guidance { display: flex; align-items: center; gap: 10px; min-width: 0; }
.workflow-guidance > b { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border-radius: 50%; background: #e5f2ff; color: #1764a2; font-size: 1rem; }
.workflow-guidance > span { display: grid; gap: 1px; min-width: 0; }
.workflow-guidance small { color: #2c6f9f; font-size: .6rem; font-weight: 850; letter-spacing: .06em; }
.workflow-guidance strong { color: #4f687f; font-size: .73rem; line-height: 1.3; }
.workflow-primary-actions, .workflow-section-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.workflow-primary-actions button, .workflow-section-actions button, .workflow-section-actions label { width: auto; min-height: 32px; margin: 0; padding: 7px 10px; font-size: .72rem; }
.workflow-primary-actions > button { width: 174px; min-height: 40px; padding: 8px 12px; }
.workflow-primary-actions .workflow-equal-action { width: 158px; min-height: 40px; padding: 8px 12px; }
.workflow-primary-actions .ot-cancel-button { min-width: 112px; min-height: 38px; padding: 8px 14px; border: 1px solid #dc2626; background: #dc2626; color: #fff; font-size: .76rem; box-shadow: 0 4px 10px rgba(185,28,28,.18); }
.workflow-primary-actions .ot-cancel-button:hover { border-color: #b91c1c; background: #b91c1c; }
.workflow-primary-actions .workflow-top-action { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 184px; width: 184px; min-width: 184px; max-width: 184px; height: 40px; min-height: 40px; max-height: 40px; margin: 0; padding: 8px 12px; border-radius: 8px; box-sizing: border-box; font-size: .74rem; line-height: 1.1; white-space: nowrap; }
.workflow-section-actions .workflow-mini-action { min-height: 29px; padding: 5px 8px; font-size: .66rem; }
.workflow-tab-panel { min-height: 360px; padding: 15px 18px; border-bottom: 0; }
.workflow-section-title { gap: 14px; }
.workflow-section-title h3 { font-size: 1rem; }
.workflow-section-title p { font-size: .72rem; }
.service-detail-total { color: #123f66; font-size: 1.05rem; white-space: nowrap; }
.service-detail-add { display: grid; grid-template-columns: minmax(150px,.8fr) minmax(240px,1.5fr) 90px auto; align-items: end; gap: 9px; margin-top: 12px; padding: 11px; border: 1px solid #d5e2ee; border-radius: 10px; background: #f3f8fc; }
.service-detail-add label, .service-detail-lines label { display: grid; gap: 5px; color: #526f89; font-size: .67rem; font-weight: 800; }
.service-detail-add input, .service-detail-add select, .service-detail-lines input { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #bfd2e6; border-radius: 8px; background: #fff; color: #10233f; }
.service-detail-add button { width: auto; min-height: 36px; margin: 0; }
.service-detail-lines { display: grid; gap: 7px; margin-top: 10px; }
.service-detail-lines article { display: grid; grid-template-columns: minmax(180px,1fr) 92px 105px auto; align-items: center; gap: 12px; padding: 9px 11px; border: 1px solid #d8e4ef; border-radius: 9px; background: #fff; }
.service-detail-lines article > div { display: grid; gap: 2px; }
.service-detail-lines article strong { color: #173f66; font-size: .76rem; }
.service-detail-lines article small { color: #71869a; font-size: .66rem; }
.service-detail-lines article > b { color: #123f66; font-size: .82rem; text-align: right; }
.service-detail-lines .link-danger { width: auto; margin: 0; }
.service-detail-actions { align-items: center; justify-content: space-between; padding-top: 11px; border-top: 1px solid #d9e4ee; }
.service-detail-actions span { color: #536f88; font-size: .74rem; }
.workflow-requirement { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 11px; padding: 9px 12px; border: 1px solid; border-radius: 9px; font-size: .72rem; }
.workflow-requirement strong { font-size: .76rem; }
.workflow-requirement.pending { border-color: #efc15f; background: #fff8e5; color: #8a5700; }
.workflow-requirement.complete { border-color: #83d3a5; background: #effcf4; color: #08733c; }
.compact-reception-grid, .evidence-notes-grid { margin-top: 12px; }
.compact-reception-grid textarea, .evidence-notes-grid textarea { min-height: 68px; }
.compact-checklist { gap: 7px; margin-top: 10px; }
.compact-checklist .ot-check-item { gap: 7px; padding: 8px; }
.compact-checklist .ot-check-item input, .compact-checklist .ot-check-item select { min-height: 34px; padding: 7px 9px; font-size: .72rem; }
.compact-photo-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-top: 11px; }
.compact-photo-grid .ot-photo img { aspect-ratio: 16/10; }
.ot-photo-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d9e4ee; }
.ot-photo-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ot-photo-section-title strong { color: #294d6d; font-size: .78rem; }
.ot-photo-section-title span { color: #71869a; font-size: .7rem; font-weight: 750; }
.ot-photo-add-segment { position: relative; display: grid; place-items: center; align-content: center; min-height: 142px; padding: 16px; overflow: hidden; border: 2px dashed #9bb8d2; border-radius: 11px; background: #f4f9fd; color: #275f91; text-align: center; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.ot-photo-add-segment:hover { border-color: #2563eb; background: #eaf4ff; transform: translateY(-1px); }
.ot-photo-add-segment b { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 7px; border-radius: 50%; background: #dcecff; color: #165b98; font-size: 1.45rem; line-height: 1; }
.ot-photo-add-segment span { font-size: .76rem; font-weight: 800; }
.ot-photo-add-segment small { margin-top: 4px; color: #70869a; font-size: .62rem; }
.ot-diagnosis-presets { display: grid; gap: 8px; margin-top: 11px; padding: 11px 12px; border: 1px solid #d6e2ec; border-radius: 9px; background: #f8fbfe; }
.ot-diagnosis-presets > strong { color: #294d6d; font-size: .74rem; }
.ot-diagnosis-presets > div { display: flex; flex-wrap: wrap; gap: 7px; }
.ot-diagnosis-presets label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid #c8d8e7; border-radius: 99px; background: #fff; color: #4f6b84; font-size: .68rem; font-weight: 700; cursor: pointer; }
.ot-diagnosis-presets label:has(input:checked) { border-color: #71c49a; background: #eaf9f1; color: #11663d; }
.ot-diagnosis-presets input { width: 14px; height: 14px; margin: 0; }
.ot-no-photo-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 11px; padding: 10px 12px; border: 1px solid #e5bc63; border-radius: 9px; background: #fff8e8; color: #81550b; cursor: pointer; }
.ot-no-photo-check.selected { border-color: #75c79d; background: #edf9f2; color: #12643e; }
.ot-no-photo-check input { width: 17px; height: 17px; margin-top: 2px; }
.ot-no-photo-check span { display: grid; gap: 2px; }
.ot-no-photo-check strong { font-size: .76rem; }
.ot-no-photo-check small { font-size: .68rem; line-height: 1.35; }
.workflow-confirm-backdrop { position: fixed; inset: 0; z-index: 1820; display: grid; place-items: center; padding: 16px; background: rgba(7,20,36,.72); backdrop-filter: blur(5px); }
.workflow-confirm-dialog { width: min(520px,calc(100vw - 32px)); padding: 24px; border: 1px solid #d5e1ed; border-radius: 15px; background: #fff; box-shadow: 0 24px 70px rgba(5,20,40,.38); }
.workflow-confirm-dialog h2 { margin: 7px 0 9px; color: #10233f; }
.workflow-confirm-dialog > p { margin: 0; color: #61778d; line-height: 1.5; }
.workflow-confirm-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 17px 0; }
.workflow-confirm-summary span { display: grid; gap: 2px; padding: 10px; border-radius: 9px; background: #eef4fa; color: #60758a; font-size: .66rem; text-align: center; }
.workflow-confirm-summary b { color: #173f66; font-size: .9rem; }
.workflow-confirm-actions { display: flex; justify-content: flex-end; gap: 9px; }
.workflow-confirm-actions .button, .workflow-confirm-actions .confirm-button { width: auto; min-height: 39px; margin: 0; }
.budget-workflow-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.budget-workflow-actions button { width: auto; margin: 0; }
.budget-flow-help { width: min(620px,calc(100vw - 32px)); }
.page-heading .flow-help-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; width: auto; min-height: 34px; padding: 7px 11px; border: 1px solid color-mix(in srgb,#2f80bd 60%,transparent); border-radius: 9px; font-size: .76rem; line-height: 1; white-space: nowrap; }
.page-heading .flow-help-trigger .ui-icon { width: 15px; height: 15px; flex: 0 0 15px; }
.budget-flow-help-steps { display: grid; gap: 9px; margin: 18px 0; padding-left: 24px; }
.budget-flow-help-steps li { padding-left: 4px; color: #536d87; }
.budget-flow-choice { width: min(700px,calc(100vw - 32px)); }
.budget-flow-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 20px 0; }
.budget-flow-choice-card { display: grid; justify-items: start; gap: 8px; min-height: 170px; padding: 20px; border: 2px solid #b9d6f1; border-radius: 15px; background: #eef7ff; color: #123658; text-align: left; cursor: pointer; transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease; }
.budget-flow-choice-card.direct { border-color: #c9d6e3; background: #f5f8fb; }
.budget-flow-choice-card:hover { transform: translateY(-3px); border-color: #2473bb; background: #e6f3ff; box-shadow: 0 12px 26px rgba(20,73,120,.16); }
.budget-flow-choice-card:active { transform: translateY(0) scale(.985); }
.budget-flow-choice-card:focus-visible { outline: 3px solid color-mix(in srgb,#2f80ed 36%,transparent); outline-offset: 3px; }
.budget-flow-choice-card .ui-icon { width: 32px; height: 32px; color: #2473bb; }
.budget-flow-choice-card strong { color: #102d4b; font-size: 1.05rem; }
.budget-flow-choice-card span { color: #617991; line-height: 1.45; }
.board-header > .row-button { width: fit-content; margin-top: 10px; }

[data-theme="dark"] .budget-workflow-modal { border-color: #2b425b; background: #091526; }
[data-theme="dark"] .budget-workflow-header, [data-theme="dark"] .integrated-ot-header, [data-theme="dark"] .integrated-reception-card { border-color: #2b425b; background: #101e31; }
[data-theme="dark"] .budget-workflow-header h2 { color: #f2f7fc; }
[data-theme="dark"] .budget-workflow-header p { color: #9fb2c7; }
[data-theme="dark"] .budget-workflow-header .modal-close { border-color: #35506d; background: #14263b; color: #edf5ff; }
[data-theme="dark"] .budget-workflow-steps { border-color: #2b425b; background: #0c1a2b; }
[data-theme="dark"] .integrated-stage-actions { background: #0d2137; }
[data-theme="dark"] .budget-flow-help-steps li { color: #b4c6d9; }
[data-theme="dark"] .budget-workflow-tabs { border-color: #2b425b; background: #0c1a2b; }
[data-theme="dark"] .budget-workflow-tabs > button, [data-theme="dark"] .budget-workflow-tabs > span { color: #91a8be; }
[data-theme="dark"] .budget-workflow-tabs > .active { color: #dbeeff; background: #11253a; }
[data-theme="dark"] .budget-workflow-tabs > .next-step { color: #c9e7ff; background: #13314b; box-shadow: inset 0 -3px #60a5fa, 0 0 0 2px rgba(96,165,250,.2); }
[data-theme="dark"] .workflow-actionbar { border-color: #2b425b; background: #101e31; }
[data-theme="dark"] .workflow-next-hint { color: #a6bad0; }
[data-theme="dark"] .workflow-guidance > b { background: #173a58; color: #9fd4ff; }
[data-theme="dark"] .workflow-guidance small { color: #82c5f5; }
[data-theme="dark"] .workflow-guidance strong { color: #c0d1e1; }
[data-theme="dark"] .budget-workflow-content { background: #091526; }
[data-theme="dark"] .workflow-requirement.pending { border-color: #71551a; background: #2b220d; color: #f4cc74; }
[data-theme="dark"] .workflow-requirement.complete { border-color: #276644; background: #0c2b1d; color: #7be0a6; }
[data-theme="dark"] .service-detail-total, [data-theme="dark"] .service-detail-lines article strong, [data-theme="dark"] .service-detail-lines article > b { color: #dcecff; }
[data-theme="dark"] .service-detail-add { border-color: #304860; background: #0d1d2e; }
[data-theme="dark"] .service-detail-add label, [data-theme="dark"] .service-detail-lines label, [data-theme="dark"] .service-detail-actions span { color: #a9bdd2; }
[data-theme="dark"] .service-detail-add input, [data-theme="dark"] .service-detail-add select, [data-theme="dark"] .service-detail-lines input { border-color: #35506d; background: #0c192b; color: #e6eef8; }
[data-theme="dark"] .service-detail-lines article { border-color: #304860; background: #101e31; }
[data-theme="dark"] .service-detail-lines article small { color: #9fb3c6; }
[data-theme="dark"] .service-detail-actions { border-color: #2f465e; }
[data-theme="dark"] .ot-diagnosis-presets { border-color: #304860; background: #0d1d2e; }
[data-theme="dark"] .ot-diagnosis-presets > strong { color: #b7cee2; }
[data-theme="dark"] .ot-diagnosis-presets label { border-color: #38536d; background: #13263a; color: #afc3d6; }
[data-theme="dark"] .ot-diagnosis-presets label:has(input:checked) { border-color: #347755; background: #103321; color: #83ddb0; }
[data-theme="dark"] .ot-no-photo-check { border-color: #765b22; background: #2a220f; color: #f0ca77; }
[data-theme="dark"] .ot-no-photo-check.selected { border-color: #347755; background: #103321; color: #83ddb0; }
[data-theme="dark"] .ot-photo-section { border-color: #2f465e; }
[data-theme="dark"] .ot-photo-section-title strong { color: #d9e8f5; }
[data-theme="dark"] .ot-photo-section-title span { color: #9fb3c6; }
[data-theme="dark"] .ot-photo-add-segment { border-color: #476989; background: #12243a; color: #b8dcff; }
[data-theme="dark"] .ot-photo-add-segment:hover { border-color: #60a5fa; background: #16304d; }
[data-theme="dark"] .ot-photo-add-segment b { background: #1e4164; color: #b8dcff; }
[data-theme="dark"] .ot-photo-add-segment small { color: #9fb3c6; }
[data-theme="dark"] .workflow-confirm-dialog { border-color: #34506c; background: #101e31; }
[data-theme="dark"] .workflow-confirm-dialog h2 { color: #f2f7fc; }
[data-theme="dark"] .workflow-confirm-dialog > p { color: #a7bbcf; }
[data-theme="dark"] .workflow-confirm-summary span { background: #0c1a2b; color: #9eb3c7; }
[data-theme="dark"] .workflow-confirm-summary b { color: #e6f1fb; }
[data-theme="dark"] .budget-flow-choice-card { border-color: #345b7e; background: #10253a; color: #dcecff; }
[data-theme="dark"] .budget-flow-choice-card.direct { border-color: #33485f; background: #101e30; }
[data-theme="dark"] .budget-flow-choice-card:hover { border-color: #5ca8ed; background: #15304a; box-shadow: 0 12px 28px rgba(0,0,0,.28); }
[data-theme="dark"] .budget-flow-choice-card strong { color: #f2f7fc; }
[data-theme="dark"] .budget-flow-choice-card span { color: #a9bdd2; }

@media (max-width: 820px) {
    .budget-workflow-backdrop { padding: 8px; }
    .budget-workflow-modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 12px; }
    .integrated-checklist { grid-template-columns: 1fr; }
    .budget-flow-choice-grid { grid-template-columns: 1fr; }
    .page-heading .flow-help-trigger { width: auto; margin-top: 10px; }
    .workflow-actionbar, .workflow-section-title { align-items: flex-start; flex-direction: column; }
    .service-detail-add { grid-template-columns: 1fr 1fr; }
    .service-detail-lines article { grid-template-columns: minmax(160px,1fr) 88px; }
    .service-detail-lines article > b { text-align: left; }
    .service-detail-actions { align-items: stretch; flex-direction: column; }
    .workflow-guidance { width: 100%; }
    .workflow-primary-actions, .workflow-section-actions { width: 100%; }
    .workflow-primary-actions > button, .workflow-primary-actions .ot-cancel-button, .workflow-primary-actions .workflow-equal-action { width: 100%; }
    .workflow-primary-actions .workflow-top-action { flex-basis: auto; width: 100%; min-width: 0; max-width: none; }
    .compact-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .workflow-confirm-summary { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .service-detail-add, .service-detail-lines article { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { .budget-workflow-tabs > .next-step { animation: none; } }

/* Seguimiento de servicios */
.catalog-followup-label { display: block; margin-top: 4px; color: #167647; font-size: .62rem; font-weight: 800; }
.catalog-stock-hint { margin: 0 1.15rem 1rem; padding: 9px 11px; border: 1px solid #d6e2ed; border-radius: 8px; background: #f7fafc; color: #557087; font-size: .7rem; line-height: 1.4; }
.catalog-followup-config { margin: 0 1.15rem 1rem; padding: 13px; border: 1px solid #9fc8ea; border-radius: 10px; background: #f1f8ff; }
.catalog-followup-config > .check-field { align-items: flex-start; }
.catalog-followup-config > .check-field span { display: grid; gap: 2px; }
.catalog-followup-config > .check-field small { color: #64809a; font-weight: 500; }
.catalog-followup-config > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.catalog-followup-config label { display: grid; gap: 5px; color: #3f5f7c; font-size: .73rem; font-weight: 750; }
.catalog-followup-config label.wide { grid-column: 1/-1; }
.catalog-followup-config input, .catalog-followup-config textarea { width: 100%; padding: 9px 10px; border: 1px solid #b9cde0; border-radius: 8px; background: #fff; color: #172b42; }
.catalog-followup-config textarea { min-height: 68px; resize: vertical; }
.sale-followup-choice { margin-top: 8px; padding: 10px 11px; border: 1px solid #c8d8e6; border-radius: 9px; background: #f8fbfe; }
.sale-followup-choice.selected { border-color: #79b7e4; background: #eef8ff; box-shadow: inset 3px 0 #2684c7; }
.sale-followup-choice .check-field { align-items: flex-start; }
.sale-followup-choice .check-field span { display: grid; gap: 2px; }
.sale-followup-choice strong { color: #174f80; font-size: .76rem; }
.sale-followup-choice small { color: #66839c; font-size: .65rem; font-weight: 500; line-height: 1.35; }
.sale-followup-context { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; padding: 11px; border: 1px solid #9ec9eb; border-radius: 9px; background: #eff8ff; }
.sale-followup-context > strong, .sale-followup-context > small { grid-column: 1/-1; }
.sale-followup-context > strong { color: #174f80; font-size: .78rem; }
.sale-followup-context > small { color: #66839c; font-size: .65rem; }
.sale-followup-context label { display: grid; gap: 4px; color: #476783; font-size: .68rem; font-weight: 750; }
.sale-followup-context input, .sale-followup-context select { width: 100%; min-height: 36px; padding: 7px 8px; border: 1px solid #b8cbdd; border-radius: 7px; background: #fff; color: #172b42; }
.service-followup-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.service-followup-summary article { display: grid; gap: 2px; padding: 15px; border: 1px solid #d6e2ed; border-radius: 11px; background: #fff; }
.service-followup-summary strong { color: #173f66; font-size: 1.45rem; }
.service-followup-summary span { color: #314f6c; font-weight: 800; }
.service-followup-summary small { color: #7890a6; }
.service-followup-summary .overdue { border-color: #f0aaaa; background: #fff5f5; }
.service-followup-summary .overdue strong { color: #c62828; }
.service-followup-summary .soon { border-color: #efce86; background: #fffaf0; }
.service-followup-summary .soon strong { color: #a96800; }
.service-followup-summary .done { border-color: #9bd5b5; background: #f1fbf5; }
.service-followup-summary .done strong { color: #137447; }
.service-followup-table td { vertical-align: top; }
.service-followup-table td > strong, .service-followup-table td > small { display: block; }
.service-followup-table td > small { margin-top: 3px; color: #758ca1; }
.service-followup-table tr.followup-overdue { background: #fff6f6; }
.service-followup-table tr.followup-soon { background: #fffaf0; }
.followup-urgency { display: inline-block; margin-top: 6px; padding: 3px 6px; border-radius: 99px; background: #e9f1f8; color: #506d87; font-size: .61rem; font-weight: 800; }
.followup-overdue .followup-urgency { background: #fee2e2; color: #b42318; }
.followup-soon .followup-urgency { background: #fff0c2; color: #956000; }
.followup-origin, .followup-state { display: inline-flex; padding: 4px 7px; border-radius: 99px; background: #e8f2fb; color: #315f87; font-size: .63rem; font-weight: 800; }
.followup-state.state-avisado, .followup-state.state-agendado { background: #ddf6e8; color: #167647; }
.followup-state.state-cancelado { background: #f1f3f5; color: #718096; }
.followup-message { min-width: 220px; max-width: 340px; margin: 0; color: #4d657b; font-size: .7rem; line-height: 1.4; }
.followup-actions { min-width: 145px; }
.followup-actions .whatsapp { border-color: #7acba0; background: #ecfaf2; color: #147747; }
.followup-confirm-backdrop { position: fixed; inset: 0; z-index: 2200; display: grid; place-items: center; padding: 24px; overflow: auto; background: rgba(7,24,48,.7); backdrop-filter: blur(4px); }
.followup-confirm-dialog { width: min(610px,100%); margin: auto; padding: 24px; border: 1px solid #d5e1ed; border-radius: 16px; background: #fff; box-shadow: 0 24px 80px rgba(7,24,48,.35); }
.followup-confirm-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.followup-confirm-dialog h2 { margin: 4px 0 0; color: #102a43; }
.followup-confirm-dialog > p { color: #60758a; }
.followup-confirm-recipient { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 7px 12px; margin: 18px 0 12px; padding: 13px; border-radius: 9px; background: #f3f7fa; }
.followup-confirm-recipient span, .followup-confirm-message > span { color: #6c8195; font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.followup-confirm-recipient strong { color: #173f66; overflow-wrap: anywhere; }
.followup-confirm-message { padding: 13px; border: 1px solid #d8e4ee; border-radius: 9px; }
.followup-confirm-message p { margin: 7px 0 0; color: #3d5871; line-height: 1.5; white-space: pre-line; }
.followup-confirm-note { display: block; margin-top: 11px; color: #6d8296; line-height: 1.4; }
.followup-confirm-dialog > footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.followup-confirm-dialog > footer .button, .followup-confirm-dialog > footer .confirm-button { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 40px; margin: 0; text-decoration: none; }
[data-theme="dark"] .catalog-followup-config, [data-theme="dark"] .sale-followup-choice, [data-theme="dark"] .sale-followup-context { border-color: #365a7a; background: #10263c; }
[data-theme="dark"] .catalog-stock-hint { border-color: #304860; background: #101e31; color: #b5c7d8; }
[data-theme="dark"] .sale-followup-choice.selected { border-color: #4385b8; background: #102b43; }
[data-theme="dark"] .catalog-followup-config input, [data-theme="dark"] .catalog-followup-config textarea, [data-theme="dark"] .sale-followup-context input, [data-theme="dark"] .sale-followup-context select { border-color: #3b5570; background: #0b1b2c; color: #e4eef8; }
[data-theme="dark"] .service-followup-summary article { border-color: #304860; background: #101e31; }
[data-theme="dark"] .service-followup-summary .overdue { background: #301819; }
[data-theme="dark"] .service-followup-summary .soon { background: #2c230f; }
[data-theme="dark"] .service-followup-summary .done { background: #102b20; }
[data-theme="dark"] .service-followup-table tr.followup-overdue { background: #271719; }
[data-theme="dark"] .service-followup-table tr.followup-soon { background: #27210f; }
[data-theme="dark"] .followup-message { color: #b5c7d8; }
[data-theme="dark"] .followup-confirm-dialog { border-color: #304963; background: #101e31; }
[data-theme="dark"] .followup-confirm-dialog h2 { color: #f2f7fc; }
[data-theme="dark"] .followup-confirm-dialog > p, [data-theme="dark"] .followup-confirm-note { color: #a8bdd2; }
[data-theme="dark"] .followup-confirm-recipient { background: #0b1929; }
[data-theme="dark"] .followup-confirm-recipient strong { color: #e8f2fb; }
[data-theme="dark"] .followup-confirm-message { border-color: #304963; }
[data-theme="dark"] .followup-confirm-message p { color: #c3d3e2; }
@media (max-width: 900px) { .service-followup-summary { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px) { .service-followup-summary, .catalog-followup-config > div, .sale-followup-context { grid-template-columns: 1fr; }.catalog-followup-config label.wide, .sale-followup-context > strong, .sale-followup-context > small { grid-column: auto; }.followup-confirm-backdrop { padding: 12px; }.followup-confirm-dialog { padding: 18px; }.followup-confirm-recipient { grid-template-columns: 1fr; }.followup-confirm-dialog > footer { flex-direction: column-reverse; }.followup-confirm-dialog > footer .button, .followup-confirm-dialog > footer .confirm-button { width: 100%; } }

/* Cobro final desde Presupuestos */
.payment-confirm-modal { width: min(680px,100%); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 0; }
.payment-confirm-header { padding: 21px 24px 17px; border-bottom: 1px solid #dce5ee; }
.payment-confirm-header h2 { margin: 3px 0 5px; color: #102a43; font-size: 1.35rem; }
.payment-confirm-header p { max-width: 590px; margin: 0; font-size: .82rem; line-height: 1.45; }
.payment-confirm-modal > .empty-state { margin: 20px 24px; }
.payment-amount-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 24px 12px; padding: 16px 18px; border: 1px solid #b8d5f0; border-left: 5px solid #2563eb; border-radius: 12px; background: linear-gradient(135deg,#eef7ff,#f8fbff); }
.payment-amount-main { display: grid; gap: 2px; }
.payment-amount-main > span { color: #4c6985; font-size: .7rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.payment-amount-main > strong { color: #0d3155; font-size: 2rem; line-height: 1.1; }
.payment-amount-main > small, .payment-customer-summary small { color: #71869c; font-size: .72rem; }
.payment-tax-summary { display: grid; gap: 7px; min-width: 155px; }
.payment-tax-summary span { display: flex; justify-content: space-between; gap: 14px; color: #607890; font-size: .72rem; }
.payment-tax-summary strong { color: #244766; }
.payment-customer-summary { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 2px 12px; margin: 0 24px 14px; padding: 10px 13px; border-radius: 9px; background: #f4f7fa; }
.payment-customer-summary > span { grid-row: 1/3; align-self: center; color: #6c8196; font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.payment-customer-summary strong { color: #173454; font-size: .84rem; }
.payment-options-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0 24px; }
.payment-options-grid .modal-field { gap: 6px; margin: 0; }
.payment-options-grid .modal-field > span, .payment-static-field > span { color: #486581; font-size: .72rem; font-weight: 800; }
.payment-options-grid .modal-field select { width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid #b9cadd; border-radius: 8px; background: #fff; color: #183b5b; font-size: .82rem; font-weight: 700; }
.payment-static-field { display: grid; gap: 5px; padding: 8px 11px; border: 1px solid #d6e1eb; border-radius: 8px; background: #f7f9fb; }
.payment-static-field strong { color: #173454; font-size: .82rem; }
.payment-confirm-modal .notice, .payment-confirm-modal .manual-payment-warning { grid-column: 1/-1; margin: 12px 24px 0; }
.payment-options-grid .notice { margin: 0; }
.payment-confirm-modal .manual-payment-warning { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: .78rem; line-height: 1.4; }
.payment-confirm-modal .manual-payment-warning input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; }
.invoice-customer-editor { display: grid; gap: 12px; margin: 14px 24px 0; padding: 14px; border: 1px solid #b9d5f0; border-radius: 11px; background: #f5faff; }
.invoice-customer-editor-heading > div { display: grid; gap: 3px; }
.invoice-customer-editor-heading strong { color: #173b5f; font-size: .88rem; }
.invoice-customer-editor-heading small { color: #607d98; font-size: .74rem; line-height: 1.4; }
.invoice-customer-editor .notice { margin: 0; }
.invoice-customer-search { display: grid; grid-template-columns: minmax(180px,1fr) auto auto; gap: 9px; align-items: end; }
.invoice-customer-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.invoice-customer-editor .modal-field { display: grid; gap: 5px; margin: 0; color: #486581; font-size: .72rem; font-weight: 800; }
.invoice-customer-editor .modal-field input { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #b9cadd; border-radius: 8px; background: #fff; color: #183b5b; font: inherit; font-weight: 600; }
.invoice-customer-search .button { min-height: 39px; margin: 0; white-space: nowrap; }
.invoice-customer-editor-actions { display: flex; justify-content: flex-end; }
.invoice-customer-editor-actions .button { width: auto; min-height: 39px; margin: 0; }
.payment-confirm-actions { margin-top: 18px; padding: 14px 24px; border-top: 1px solid #dce5ee; background: #f7f9fb; }
.payment-confirm-actions .button, .payment-confirm-actions .confirm-button { width: auto; min-height: 39px; margin: 0; padding: 9px 15px; font-size: .78rem; }

[data-theme="dark"] .payment-confirm-modal { border-color: #304963; background: #101e31; }
[data-theme="dark"] .payment-confirm-header { border-color: #2d435b; }
[data-theme="dark"] .payment-confirm-header h2 { color: #f2f7fc; }
[data-theme="dark"] .payment-confirm-header p { color: #a8bdd2; }
[data-theme="dark"] .payment-amount-summary { border-color: #315c84; border-left-color: #4aa7f0; background: linear-gradient(135deg,#0c2943,#10243a); }
[data-theme="dark"] .payment-amount-main > span { color: #94b8d7; }
[data-theme="dark"] .payment-amount-main > strong { color: #f5f9ff; }
[data-theme="dark"] .payment-amount-main > small, [data-theme="dark"] .payment-customer-summary small { color: #91a9bf; }
[data-theme="dark"] .payment-tax-summary span { color: #9db4ca; }
[data-theme="dark"] .payment-tax-summary strong { color: #dceafa; }
[data-theme="dark"] .payment-customer-summary { background: #0c192a; }
[data-theme="dark"] .payment-customer-summary > span, [data-theme="dark"] .payment-options-grid .modal-field > span, [data-theme="dark"] .payment-static-field > span { color: #91abc3; }
[data-theme="dark"] .payment-customer-summary strong, [data-theme="dark"] .payment-static-field strong { color: #eef5fc; }
[data-theme="dark"] .payment-options-grid .modal-field select { border-color: #3b5875; background: #0a1728; color: #edf5fd; }
[data-theme="dark"] .payment-static-field { border-color: #304a65; background: #0a1728; }
[data-theme="dark"] .payment-confirm-modal .manual-payment-warning { border-color: #75591e; background: #32270f; color: #f5d477; }
[data-theme="dark"] .invoice-customer-editor { border-color: #355b7c; background: #0c1b2d; }
[data-theme="dark"] .invoice-customer-editor-heading strong { color: #eef6fd; }
[data-theme="dark"] .invoice-customer-editor-heading small, [data-theme="dark"] .invoice-customer-editor .modal-field { color: #9ab2c9; }
[data-theme="dark"] .invoice-customer-editor .modal-field input { border-color: #3b5875; background: #081525; color: #edf5fd; }
[data-theme="dark"] .payment-confirm-actions { border-color: #2d435b; background: #0c192a; }

@media (max-width: 620px) {
    .payment-confirm-modal { max-height: calc(100dvh - 24px); }
    .payment-confirm-header { padding: 17px 18px 14px; }
    .payment-amount-summary { align-items: flex-start; flex-direction: column; margin: 14px 18px 10px; }
    .payment-tax-summary { width: 100%; }
    .payment-customer-summary, .payment-options-grid { margin-right: 18px; margin-left: 18px; }
    .payment-options-grid { grid-template-columns: 1fr; }
    .invoice-customer-editor { margin-right: 18px; margin-left: 18px; }
    .invoice-customer-search, .invoice-customer-fields { grid-template-columns: 1fr; }
    .invoice-customer-search .button, .invoice-customer-editor-actions .button { width: 100%; }
    .payment-confirm-modal .notice, .payment-confirm-modal .manual-payment-warning { margin-right: 18px; margin-left: 18px; }
    .payment-confirm-actions { padding: 12px 18px; }
    .payment-confirm-actions .button, .payment-confirm-actions .confirm-button { width: 100%; }
}

.attention-preview-button { border-color: #8dbce5 !important; background: #edf7ff !important; color: #175f98 !important; }
.attention-preview-button:hover { border-color: #2f80bd !important; background: #dcefff !important; }
[data-theme="dark"] .attention-preview-button { border-color: #35688f !important; background: #102b43 !important; color: #8fd1ff !important; }
[data-theme="dark"] .attention-preview-button:hover { border-color: #55a9e8 !important; background: #153b59 !important; color: #d9f1ff !important; }

/* Segunda reducción del nuevo modo Compacto. La base density-compact es ahora Cómoda. */
.density-tight .page-content { padding: 8px 12px 18px; }
.density-tight .page-heading { margin-bottom: .4rem; }
.density-tight .page-heading h1 { font-size: clamp(1.18rem,1.8vw,1.55rem); }
.density-tight .page-heading p:not(.eyebrow) { font-size: .72rem; }
.density-tight .filter-card { gap: .45rem; padding: .55rem; margin-bottom: .5rem; }
.density-tight .field { gap: .18rem; }
.density-tight .field label { font-size: .66rem; }
.density-tight .field input, .density-tight .field select { min-height: 30px; padding: .34rem .5rem; font-size: .75rem; }
.density-tight .button, .density-tight .primary-button, .density-tight .logout-button { min-height: 30px; padding: .34rem .65rem; font-size: .7rem; }
.density-tight .confirm-button { min-height: 35px; padding: .42rem .75rem; font-size: .76rem; }
.density-tight .table-toolbar { padding: .5rem .68rem; }
.density-tight .data-table th { padding: .42rem .55rem; font-size: .63rem; }
.density-tight .data-table td { padding: .46rem .55rem; font-size: .74rem; }
.density-tight .data-table td small { font-size: .62rem; }
.density-tight .section-heading, .density-tight .section-title { padding: .55rem .68rem; }
.density-tight .section-heading h2, .density-tight .section-title h2 { font-size: .9rem; }
.density-tight .section-heading p, .density-tight .section-title p { font-size: .67rem; }
.density-tight .metric-grid, .density-tight .dashboard-grid, .density-tight .inventory-kpi-grid,
.density-tight .inventory-view-nav, .density-tight .history-summary-grid, .density-tight .sales-grid,
.density-tight .agenda-layout, .density-tight .split-grid { gap: .48rem; }
.density-tight .metric-card { padding: 9px 10px; }
.density-tight .metric-card strong { font-size: 1.15rem; }
.density-tight .dashboard-card { padding: 10px; }
.density-tight .dashboard-card h3 { font-size: .9rem; }
.density-tight .agenda-form, .density-tight .stack-form { gap: .45rem; padding: .65rem; }
.density-tight .agenda-day { min-height: 54px; padding: .32rem .22rem; }
.density-tight .sale-line, .density-tight .agenda-event { padding: .45rem .65rem; }
.density-tight .row-actions { gap: 4px; }
.density-tight .row-actions :is(button,a), .density-tight .row-button { min-height: 27px; padding: 4px 7px; font-size: .65rem; }
.density-tight .topbar-control-cluster :is(.notification-trigger,.theme-toggle,.density-toggle,.topbar-user-toggle) { min-height: 34px; }

@media (max-width: 720px) {
    .density-tight .page-content { padding-right: 8px; padding-left: 8px; }
}
/* Recuperación de acceso pública */
.recovery-shell { width:min(960px,calc(100vw - 32px)); min-height:590px; display:grid; grid-template-columns:1.05fr .95fr; overflow:hidden; border:1px solid rgba(103,205,236,.18); border-radius:24px; background:#06111c; box-shadow:0 28px 80px rgba(0,0,0,.42); }
.recovery-brand { display:flex; flex-direction:column; justify-content:center; align-items:flex-start; padding:48px; background:radial-gradient(circle at 50% 25%,rgba(0,208,255,.18),transparent 34%),linear-gradient(145deg,#061e2f,#04111c); color:#eefbff; }
.recovery-brand img { width:min(290px,80%); align-self:center; margin:-35px auto -15px; }
.recovery-brand > span,.recovery-card header span { color:#59dcf4; font-size:.68rem; font-weight:800; letter-spacing:.17em; }
.recovery-brand h2 { margin:18px 0 12px; font-size:2.2rem; line-height:1.08; }
.recovery-brand p,.recovery-card > p { color:#8da7b9; line-height:1.6; }
.recovery-card { display:flex; flex-direction:column; justify-content:center; padding:50px; background:rgba(7,19,31,.94); color:#edf9ff; }
.recovery-card header h1 { margin:10px 0 24px; font-size:2rem; }
.recovery-form { display:grid; gap:18px; margin-top:12px; }
.recovery-form label { display:grid; gap:8px; color:#b7cbd7; font-size:.76rem; font-weight:700; }
.recovery-form input { min-height:48px; padding:12px 14px; border:1px solid rgba(122,174,203,.25); border-radius:10px; outline:0; background:#06111c; color:#eefbff; }
.recovery-form input:focus { border-color:#2dd9f7; box-shadow:0 0 0 3px rgba(45,217,247,.1); }
.recovery-form button,.recovery-primary-link { min-height:48px; display:flex; align-items:center; justify-content:center; padding:12px 18px; border:0; border-radius:10px; background:linear-gradient(105deg,#0a88ad,#08b8d7,#0877c4); color:white; font-weight:800; text-decoration:none; cursor:pointer; }
.recovery-message { display:grid; gap:6px; margin:4px 0 22px; padding:15px; border:1px solid rgba(89,180,213,.2); border-radius:10px; background:rgba(8,54,74,.2); color:#b9d9e6; line-height:1.45; }
.recovery-message.success { border-color:rgba(37,218,157,.25); background:rgba(12,96,69,.18); color:#aef5d9; }
.recovery-message.error { border-color:rgba(255,91,111,.27); background:rgba(126,22,41,.18); color:#ffc1c7; }
.recovery-back-link { align-self:center; margin-top:20px; color:#7f9cab; font-size:.75rem; text-decoration:none; }
@media(max-width:700px){.recovery-shell{display:block;min-height:0}.recovery-brand{min-height:210px;padding:24px 28px}.recovery-brand img{width:180px;margin:-35px auto -30px}.recovery-brand h2{font-size:1.4rem;text-align:center;align-self:center}.recovery-brand p{display:none}.recovery-brand>span{align-self:center}.recovery-card{padding:34px 26px}}
/* Sucursal operativa transversal */
.topbar-branch-picker { display: grid; gap: .15rem; min-width: 12rem; font-size: .72rem; color: #64748b; }
.topbar-branch-picker select { min-height: 2.35rem; border: 1px solid #cbd5e1; border-radius: .65rem; background: #fff; color: #172033; padding: .35rem .65rem; }
.branch-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(20rem, .8fr); gap: 1rem; align-items: start; }
.branch-editor { display: grid; gap: .8rem; }
.branch-editor label { display: grid; gap: .3rem; }
.branch-editor input { width: 100%; }
.branch-warehouse { width: 100%; display: grid; gap: .2rem; text-align: left; border: 1px solid #d9e2ec; border-radius: .7rem; background: #f8fafc; color: #172033; padding: .7rem; cursor: pointer; }
.branch-warehouse span { color: #64748b; font-size: .82rem; }
.branch-scope-card { margin-top: 1rem; }
@media (max-width: 1050px) { .branch-layout { grid-template-columns: 1fr; } .topbar-branch-picker { min-width: 9rem; } }
/* Emisión DTE en tiempo real y tiempos persistidos */
.dte-live-progress { display:grid; gap:14px; margin:0 0 18px; padding:18px; border:1px solid #bfd4ea; border-left:5px solid #2563eb; border-radius:14px; background:linear-gradient(135deg,#fff,#f5f9ff); box-shadow:0 6px 18px rgba(16,35,63,.07); }
.dte-live-progress.success { border-color:#a9dfbd; border-left-color:#16a34a; background:linear-gradient(135deg,#fff,#f1fbf4); }
.dte-live-progress.error { border-color:#efb6b1; border-left-color:#dc2626; background:linear-gradient(135deg,#fff,#fff4f3); }
.dte-live-progress-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.dte-live-progress-heading h2 { margin:2px 0 4px; color:#10233f; font-size:1.05rem; }
.dte-live-progress-heading p:not(.eyebrow) { margin:0; color:#60758c; font-size:.78rem; }
.dte-live-stopwatch { display:grid; min-width:155px; padding:10px 13px; border:1px solid #d6e2ee; border-radius:10px; background:#fff; text-align:right; }
.dte-live-stopwatch span { color:#71869c; font-size:.65rem; text-transform:uppercase; }
.dte-live-stopwatch strong { color:#123454; font-size:1.35rem; font-variant-numeric:tabular-nums; }
.dte-live-timeline { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.dte-live-timeline article { position:relative; display:flex; align-items:center; gap:9px; min-height:66px; padding:10px; border:1px solid #dbe5ef; border-radius:10px; background:#fff; }
.dte-live-timeline article::after { content:""; position:absolute; top:50%; right:-9px; width:9px; height:2px; background:#dbe5ef; }
.dte-live-timeline article:last-child::after { display:none; }
.dte-live-timeline article > span { display:grid; place-items:center; width:27px; height:27px; flex:0 0 27px; border-radius:50%; background:#e8eef5; color:#60758c; font-size:.68rem; font-weight:900; }
.dte-live-timeline article > div { display:grid; gap:2px; min-width:0; }
.dte-live-timeline strong { color:#173454; font-size:.73rem; }
.dte-live-timeline small { color:#71869c; font-size:.61rem; line-height:1.3; }
.dte-live-timeline article.done { border-color:#b7e4c7; background:#f3fcf6; }
.dte-live-timeline article.done > span { background:#16a34a; color:#fff; }
.dte-live-timeline article.current { border-color:#f2c76e; background:#fff9eb; box-shadow:0 0 0 2px rgba(245,158,11,.09); }
.dte-live-timeline article.current > span { background:#f59e0b; color:#10233f; animation:dte-progress-pulse 1.2s ease-in-out infinite; }
.dte-live-timeline article.error { border-color:#efb6b1; background:#fff3f2; }
.dte-live-timeline article.error > span { background:#dc2626; color:#fff; }
@keyframes dte-progress-pulse { 50% { transform:scale(1.1); box-shadow:0 0 0 6px rgba(245,158,11,.12); } }
.dte-live-metadata { display:flex; align-items:center; flex-wrap:wrap; gap:8px; color:#60758c; font-size:.7rem; }
.dte-live-metadata > span { padding:6px 9px; border-radius:999px; background:#eaf1f8; }
.dte-live-metadata .row-button { margin-left:auto; }
.dte-duration { display:block; margin-top:3px; color:#39739d !important; font-weight:700; white-space:nowrap; }
.dte-concurrency-guard { display:flex; align-items:center; gap:11px; margin:-4px 0 14px; padding:11px 13px; border:1px solid #c9d9eb; border-radius:10px; background:#f6faff; }
.dte-concurrency-guard > span { display:grid; place-items:center; width:36px; height:36px; flex:0 0 36px; border-radius:9px; background:#2563eb; color:#fff; font-size:.62rem; font-weight:900; }
.dte-concurrency-guard > div { display:grid; gap:2px; }
.dte-concurrency-guard strong { color:#173454; font-size:.78rem; }
.dte-concurrency-guard small { color:#60758c; font-size:.68rem; line-height:1.35; }
.dte-persisted-timeline { margin-top:14px; padding:14px; border:1px solid #d8e3ef; border-radius:11px; background:#f8fbfe; }
.dte-persisted-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:11px; }
.dte-persisted-heading > div { display:grid; gap:2px; }
.dte-persisted-heading > span { padding:7px 10px; border-radius:8px; background:#e7f0f9; color:#54708c; font-size:.7rem; }
.dte-persisted-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.dte-persisted-steps article { display:flex; align-items:center; gap:8px; padding:9px; border:1px solid #dce6ef; border-radius:9px; background:#fff; }
.dte-persisted-steps article > span { display:grid; place-items:center; width:24px; height:24px; flex:0 0 24px; border-radius:50%; background:#e8eef5; color:#60758c; font-size:.65rem; font-weight:900; }
.dte-persisted-steps article > div { display:grid; gap:2px; }
.dte-persisted-steps strong { color:#173454; font-size:.7rem; }
.dte-persisted-steps small { color:#71869c; font-size:.61rem; }
.dte-persisted-steps article.done > span { background:#16a34a; color:#fff; }
.dte-persisted-steps article.warning > span { background:#f59e0b; color:#10233f; }
[data-theme="dark"] .dte-live-progress,[data-theme="dark"] .dte-persisted-timeline { border-color:#35536f; background:linear-gradient(135deg,#0a1828,#0d2135); }
[data-theme="dark"] .dte-live-progress-heading h2,[data-theme="dark"] .dte-live-stopwatch strong,[data-theme="dark"] .dte-live-timeline strong,[data-theme="dark"] .dte-persisted-steps strong { color:#eef6fd; }
[data-theme="dark"] .dte-concurrency-guard { border-color:#35536f; background:#0d2135; }
[data-theme="dark"] .dte-concurrency-guard strong { color:#eef6fd; }
[data-theme="dark"] .dte-live-stopwatch,[data-theme="dark"] .dte-live-timeline article,[data-theme="dark"] .dte-persisted-steps article { border-color:#304a65; background:#0b1a2a; }
[data-theme="dark"] .dte-live-timeline article.done { border-color:#286846; background:#0c2b20; }
[data-theme="dark"] .dte-live-timeline article.current { border-color:#8a6520; background:#2d220d; }
[data-theme="dark"] .dte-live-metadata > span,[data-theme="dark"] .dte-persisted-heading > span { background:#132d45; color:#a9bfd3; }
@media (max-width:980px) { .dte-live-timeline { grid-template-columns:1fr; }.dte-live-timeline article::after { display:none; }.dte-persisted-steps { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) { .dte-live-progress-heading,.dte-persisted-heading { align-items:stretch; flex-direction:column; }.dte-live-stopwatch { text-align:left; }.dte-persisted-steps { grid-template-columns:1fr; } }
