:root {
    --brand-dark: #050817;
    --brand-purple: #7800b8;
    --brand-blue: #075ee8;
    --brand-cyan: #00aeca;
    --brand-green: #00b83f;
    --brand-yellow: #f4dc00;
    --brand-orange: #ff7300;
    --brand-red: #d7190f;
    --brand-gradient: linear-gradient(90deg, var(--brand-purple), var(--brand-blue), var(--brand-cyan), var(--brand-green), var(--brand-yellow), var(--brand-orange), var(--brand-red));
    --color-canvas: #f5f7fb;
    --color-surface: #ffffff;
    --color-surface-soft: #f8fafc;
    --color-text: #111827;
    --color-muted: #526074;
    --color-border: #dce3ec;
    --color-focus: #075ee8;
    --control-border: #c8d3e1;
    --control-bg: #fbfdff;
    --control-height: 2.35rem;
    --radius-sm: 0.65rem;
    --radius-md: 1rem;
    --radius-pill: 999px;
    --shadow-card: 0 14px 38px rgba(5, 8, 23, 0.08);
    --font-body: "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Trebuchet MS", "Segoe UI Variable Display", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 1rem; line-height: 1.6; background: var(--color-canvas); color: var(--color-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -0.02em; color: var(--brand-dark); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; }
p + p { margin-top: 0.45rem; }
a, button, input, select, textarea { font: inherit; }
a, button { transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease; }
.site-header { background: var(--brand-dark); color: #fff; padding: 0.9rem 1.5rem; position: sticky; top: 0; z-index: 50; border-bottom: 4px solid transparent; border-image: var(--brand-gradient) 1; box-shadow: 0 7px 20px rgba(5, 8, 23, 0.18); }
.nav-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.nav-bar a { color: #fff; margin-right: 1rem; text-decoration: none; font-weight: 650; }
.nav-bar nav a:hover, .auth-links a:hover { color: #7ee8f6; }
.nav-bar .brand { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; text-shadow: 0 0 18px rgba(0, 174, 202, 0.5); }
.auth-links { display: flex; gap: 0.75rem; align-items: center; }
.logout-form { display: inline; }
.logout-form button { padding: 0; color: #fff; background: transparent; border: 0; font-weight: 650; cursor: pointer; }
.logout-form button:hover { color: #7ee8f6; }
.app-menu { position: relative; }
.app-menu summary { color: #fff; font-weight: 650; cursor: pointer; list-style: none; white-space: nowrap; }
.app-menu summary::-webkit-details-marker { display: none; }
.app-menu summary::after { content: '⌄'; display: inline-block; margin-left: 0.32rem; color: #7ee8f6; font-size: 0.85em; transition: transform 0.16s ease; }
.app-menu[open] summary::after { transform: rotate(180deg); }
.app-menu-panel { position: absolute; right: 0; top: calc(100% + 0.7rem); z-index: 80; display: grid; min-width: 220px; padding: 0.45rem; background: #10182b; border: 1px solid #334155; border-radius: 0.7rem; box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32); }
.nav-bar .app-menu-panel a { margin: 0; padding: 0.55rem 0.65rem; border-radius: 0.42rem; font-size: 0.9rem; }
.nav-bar .app-menu-panel a:hover { color: #fff; background: #1e3a5f; }
.cart-link { display: inline-flex; align-items: center; gap: 0.35rem; }
.side-nav { position: fixed; top: 76px; bottom: 0; left: 0; z-index: 40; width: 68px; overflow-x: hidden; overflow-y: auto; padding: 0.8rem 0.55rem; background: #0b1221; border-right: 1px solid #26354c; box-shadow: 5px 0 20px rgba(5, 8, 23, 0.11); transition: width 0.2s ease; }
.side-nav:hover, .side-nav:focus-within { width: 244px; }
.side-nav nav { display: grid; gap: 0.25rem; }
.side-nav-link { display: flex; align-items: center; min-height: 40px; gap: 0.72rem; padding: 0.4rem 0.35rem; overflow: hidden; color: #dbeafe; border-radius: 0.55rem; text-decoration: none; white-space: nowrap; }
.side-nav-link:hover, .side-nav-link:focus-visible { color: #fff; background: #1e3a5f; outline: none; }
.side-nav-icon { display: grid; place-items: center; width: 32px; min-width: 32px; height: 32px; color: #dff7ff; background: #123b63; border: 1px solid #246da4; border-radius: 0.45rem; font-size: 0.67rem; font-weight: 850; }
.side-nav-link > span:last-child { opacity: 0; transition: opacity 0.12s ease 0.04s; font-size: 0.88rem; font-weight: 700; }
.side-nav:hover .side-nav-link > span:last-child, .side-nav:focus-within .side-nav-link > span:last-child { opacity: 1; }
.side-nav-group { height: 0; margin: 0.45rem 0 0; overflow: hidden; color: #6f88a9; font-size: 0.67rem; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; white-space: nowrap; transition: height 0.18s ease, margin 0.18s ease; }
.side-nav:hover .side-nav-group, .side-nav:focus-within .side-nav-group { height: 1.25rem; margin: 0.5rem 0 0 0.35rem; }
body.has-side-nav main { width: min(1200px, calc(100% - 92px)); margin-left: max(calc((100% - 1200px) / 2 + 34px), 92px); margin-right: auto; }
main { width: min(1200px, 100%); min-height: calc(100vh - 190px); margin: 1.75rem auto; padding: 0 1.5rem; }
.hero, .trayectoria, .comentarios, .productos-destacados, .catalog, .form-section, .product-detail, .cart-section { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 1.5rem; box-shadow: var(--shadow-card); }
.hero { min-height: 430px; display: flex; align-items: flex-end; overflow: hidden; position: relative; color: #fff; background: linear-gradient(90deg, rgba(5,8,23,0.83), rgba(5,8,23,0.08)), url('/static/images/colores-insignia.jpg') center center / 100% 100% no-repeat; }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 7px; background: var(--brand-gradient); }
.hero-block, .trayectoria-block, .comentarios-block { max-width: 900px; }
.hero-block { position: relative; z-index: 1; padding: 1.5rem; border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-md); background: rgba(5,8,23,0.68); backdrop-filter: blur(5px); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 0.6rem; color: #fff; }
.hero p, .trayectoria p, .comentarios p { line-height: 1.8; }
.top-menu, .group-menu { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.top-menu-link, .group-link { background: var(--brand-dark); color: #fff; padding: 0.7rem 1rem; border-radius: var(--radius-pill); text-decoration: none; font-weight: 700; }
.group-link { display: inline-flex; align-items: center; border: 2px solid transparent; transition: transform 0.15s ease, background 0.15s ease; }
.group-link:hover { background: var(--brand-purple); transform: translateY(-1px); }
.group-link.active { background: var(--brand-blue); border-color: #fff; box-shadow: 0 0 0 2px var(--brand-blue); }
/* Grupos de productos */
.grupos { padding: 1rem 0; }
.grupos-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.grupo-card { background: var(--color-surface); padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--color-border); border-top: 4px solid var(--brand-cyan); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.grupo-card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.grupo-card .card-image { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); }
.grupo-card .descripcion { color: var(--color-muted); font-size: 0.95rem; margin-bottom: 0.5rem; }
.grupo-card .button { align-self: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.card { background: var(--color-surface-soft); padding: 1.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; }
.card-image { width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%); }
.product-detail-image { display: block; width: min(100%, 460px); height: 250px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%); margin: 0 0 1.25rem; }
.card h3 { margin-bottom: 0.5rem; }
.price { font-weight: 750; margin-top: 0.5rem; color: var(--color-text); }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 1rem; padding: 0.78rem 1.2rem; background: linear-gradient(100deg, var(--brand-blue), var(--brand-purple)); color: #fff; text-decoration: none; font-weight: 750; border-radius: var(--radius-pill); border: 0; cursor: pointer; }
.button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.material-width { margin-top: 0.75rem; color: #075985; font-size: 1.05rem; }
.billing-note { margin-top: 0.35rem; color: var(--color-muted); font-size: 0.9rem; line-height: 1.45; }
.material-notice { display: grid; gap: 0.35rem; margin: 1rem 0; padding: 1rem 1.1rem; border-left: 5px solid var(--brand-cyan); border-radius: 0.75rem; background: linear-gradient(100deg, #ecfeff, #f0fdf4); }
.material-notice strong { color: #075985; font-size: 1.08rem; }
.field-row small { color: var(--color-muted); line-height: 1.4; }

.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 999; display: flex; justify-content: center; align-items: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.7); }
.modal-content { position: relative; z-index: 1; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); width: min(520px, 100%); padding: 1.5rem; box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18); }
.modal-content h2 { margin-bottom: 0.75rem; }
.modal-content p { margin-bottom: 1rem; color: var(--color-muted); }
.modal-error { margin-bottom: 1rem; color: #b91c1c; font-weight: 600; }
.modal-content label { display: block; margin-bottom: 0.9rem; font-weight: 700; color: var(--color-text); }
.modal-content input[type="text"], .modal-content input[type="password"] { width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-top: 0.35rem; }
.modal-alternate, .form-alternate { margin-top: 1rem; text-align: center; font-size: 0.94rem; }
.modal-alternate a, .form-alternate a { color: var(--brand-blue); font-weight: 750; }
.modal-close { position: absolute; right: 1rem; top: 1rem; background: transparent; border: none; color: #0f172a; font-size: 1.5rem; cursor: pointer; }
.button.button-outline { background: transparent; color: var(--color-text); border: 1px solid var(--color-text); }
.form-section form, .product-detail form, .checkout-form { display: grid; gap: 1rem; }
.registration-section { width: min(760px, 100%); margin-inline: auto; padding: clamp(1.1rem, 2.5vw, 1.5rem); }
.form-intro { margin: -0.4rem 0 1rem; color: var(--color-muted); }
.registration-form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0.85rem; row-gap: 0.75rem; }
.registration-field { display: grid; gap: 0.3rem; min-width: 0; }
.registration-field-wide, .registration-form > .button { grid-column: 1 / -1; }
.registration-form .button { justify-self: start; margin-top: 0.2rem; }
.verification-section { width: min(540px, 100%); }
.verification-form { max-width: 430px; }
.resend-form { display: block !important; margin-top: 0.8rem; }
.form-message { margin-top: 0.75rem; }
.form-message-error { color: #b91c1c; font-weight: 650; }
.form-section form p, .checkout-form p { display: grid; gap: 0.35rem; }
.form-section label, .product-detail label, .checkout-form label { font-weight: 700; color: var(--color-text); }
.form-section input, .form-section select, .form-section textarea, .product-detail input, .product-detail select, .product-detail textarea, .checkout-form input, .checkout-form select, .checkout-form textarea { width: 100%; padding: 0.82rem 0.95rem; color: var(--color-text); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); outline: none; }
.form-section input:focus, .form-section select:focus, .form-section textarea:focus, .product-detail input:focus, .product-detail select:focus, .product-detail textarea:focus, .checkout-form input:focus, .checkout-form select:focus, .checkout-form textarea:focus { border-color: var(--color-focus); box-shadow: 0 0 0 3px rgba(7, 94, 232, 0.14); }
.helptext { color: var(--color-muted); font-size: 0.88rem; }
.errorlist { list-style: none; color: #b91c1c; font-weight: 700; font-size: 0.9rem; }
.table-wrap { overflow-x: auto; margin-bottom: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.cart-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 0.9rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.cart-table th { color: #fff; background: var(--brand-dark); font-size: 0.9rem; letter-spacing: 0.02em; }
.cart-table tbody tr:nth-child(even) { background: var(--color-surface-soft); }
.cart-table tbody tr:last-child td { border-bottom: 0; }
.text-button { padding: 0.3rem 0.5rem; background: transparent; border: 0; font-weight: 750; cursor: pointer; }
.text-button-danger { color: #b91c1c; }
.text-button-danger:hover { color: #7f1d1d; text-decoration: underline; }
.cart-total { font-size: 1.25rem; font-weight: 800; color: var(--brand-dark); margin-top: 0.75rem; }
.order-summary { display: grid; justify-items: end; gap: 0.3rem; padding: 1.15rem 1.25rem; margin-bottom: 1.25rem; text-align: right; background: linear-gradient(120deg, #f8fafc, #ecfeff); border: 1px solid var(--color-border); border-right: 5px solid var(--brand-cyan); border-radius: var(--radius-sm); }
.order-summary h3 { font-size: 1.35rem; }
.summary-note { color: var(--color-muted); font-size: 0.9rem; }
.empty-state { padding: 3rem 1.5rem; text-align: center; color: var(--color-muted); background: var(--color-surface-soft); border: 1px dashed #aeb9c8; border-radius: var(--radius-md); }
.empty-state p { font-size: 1.15rem; }
.cart-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: stretch; gap: 0.75rem; margin-top: 1rem; }
.cart-actions form { display: flex; }
.cart-actions .button { margin-top: 0; }
.button-primary { background: linear-gradient(100deg, var(--brand-blue), var(--brand-purple)); }
.button-danger { background: linear-gradient(100deg, var(--brand-orange), var(--brand-red)); }
.button-secondary { background: linear-gradient(100deg, #047857, var(--brand-green)); }
.form-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.field-row { display: grid; gap: 0.5rem; }
.price-results { display: grid; gap: 0.35rem; margin: 1.25rem 0; padding: 1rem 1.15rem; background: linear-gradient(120deg, #eff6ff, #ecfeff); border: 1px solid #bae6fd; border-left: 5px solid var(--brand-blue); border-radius: var(--radius-sm); }
.checkout-items { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.checkout-item { background: var(--color-surface-soft); border: 1px solid var(--color-border); border-left: 4px solid var(--brand-green); padding: 1rem; border-radius: var(--radius-sm); }
.checkout-item h3 { margin-bottom: 0.55rem; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.permission-card { padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-soft); border-left: 4px solid var(--brand-blue); }
.permission-card h2 { font-size: 1.05rem; margin-bottom: 0.45rem; }
.permission-card p, .permission-card small { color: var(--color-muted); }
.permission-card-link { color: inherit; text-decoration: none; }
.permission-card-link:hover { border-color: var(--brand-blue); transform: translateY(-1px); }
.messages { max-width: 1200px; margin: 1rem auto; }
.message { padding: 0.75rem 1rem; border-radius: var(--radius-sm); background: #eff6ff; color: #1e3a8a; }
.message-error { background: #fef2f2; color: #991b1b; }
.content-section, .order-workspace, .operator-shell, .order-detail-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: clamp(1.1rem, 3vw, 2rem); margin-bottom: 1.5rem; box-shadow: var(--shadow-card); }
.workspace-heading, .order-detail-heading, .order-grid-header, .builder-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; }
.workspace-heading { padding-bottom: 1.25rem; border-bottom: 1px solid var(--color-border); }
.workspace-heading h1, .order-detail-heading h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0.2rem 0 0.45rem; }
.workspace-heading p, .builder-card-heading p, .muted-copy { color: var(--color-muted); }
.eyebrow { color: var(--brand-blue); font-size: 0.76rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.workspace-badge { padding: 0.5rem 0.9rem; color: #075985; background: #ecfeff; border: 1px solid #a5f3fc; border-radius: var(--radius-pill); font-weight: 750; white-space: nowrap; }
.order-group-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; margin: 1.25rem 0; }
.order-group-tab { display: grid; gap: 0.2rem; min-height: 92px; align-content: center; padding: 0.9rem 1rem; color: var(--color-text); text-decoration: none; background: var(--color-surface-soft); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.order-group-tab span { font-weight: 800; }
.order-group-tab small { color: var(--color-muted); line-height: 1.3; }
.order-group-tab:hover { border-color: var(--brand-blue); transform: translateY(-1px); }
.order-group-tab.active { color: #fff; background: linear-gradient(120deg, var(--brand-blue), var(--brand-purple)); border-color: transparent; box-shadow: 0 10px 25px rgba(7, 94, 232, 0.2); }
.order-group-tab.active small { color: #e0f2fe; }
.builder-card { overflow: hidden; margin-bottom: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; }
.builder-card-heading { padding: 1.15rem 1.25rem; background: linear-gradient(120deg, #f8fafc, #ecfeff); border-bottom: 1px solid var(--color-border); }
.builder-card-heading h2 { margin: 0.2rem 0 0; }
.builder-card-heading p { max-width: 500px; }
.job-builder-form { display: grid; gap: 0; }
.job-builder-form > .button { justify-self: start; margin: 0 1.25rem 1.25rem; }
.builder-section { padding: 1.2rem 1.25rem; border-bottom: 1px solid var(--color-border); }
.builder-section:last-of-type { border-bottom: 0; }
.direct-sku { margin-top: 1rem; padding: 0.7rem 0.85rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); }
.direct-sku summary { color: #92400e; font-weight: 750; cursor: pointer; }
.direct-sku .field-row { margin-top: 0.8rem; }
.builder-section-title { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 1rem; }
.builder-section-title > span { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; color: #fff; background: var(--brand-dark); border-radius: 50%; font-weight: 800; }
.builder-section-title div { display: grid; }
.builder-section-title small { color: var(--color-muted); }
.builder-fields { display: grid; gap: 1rem; }
.builder-fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.builder-fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.job-builder-form input, .job-builder-form select, .job-builder-form textarea, .operator-client-bar select { width: 100%; padding: 0.78rem 0.9rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #fff; }
.job-builder-form input:focus, .job-builder-form select:focus, .job-builder-form textarea:focus, .operator-client-bar select:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(7, 94, 232, 0.12); }
.choice-field { padding: 0.85rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.choice-field legend { padding: 0 0.4rem; font-weight: 750; }
.choice-field ul { display: flex; flex-wrap: wrap; gap: 0.65rem; list-style: none; }
.choice-field label { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.7rem; background: var(--color-surface-soft); border: 1px solid var(--color-border); border-radius: var(--radius-pill); cursor: pointer; }
.choice-field input { width: auto; }
.complement-choice ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.complement-choice label { border-radius: var(--radius-sm); }
.complement-groups { display: grid; gap: 0.85rem; }
.complement-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.65rem; }
.order-grid-card, .empty-order { margin-top: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; overflow: hidden; }
.order-grid-header { padding: 0.4rem 0.75rem; color: #fff; background: var(--brand-dark); }
.order-grid-header h2 { margin: 0; color: #fff; font-size: 1.2rem; }
.order-grid-header small { color: #bfdbfe; }
.order-total { display: flex; align-items: baseline; gap: 0.45rem; }
.order-total-label { color: #fff; font-size: 1.1rem; font-weight: 800; }
.order-total strong { color: #39ff14; font-size: 1.1rem; text-shadow: 0 0 8px rgba(57, 255, 20, 0.32); }
.order-grid-summary { display: flex; align-items: center; justify-content: end; }
.order-detail-actions { display: grid; justify-items: end; gap: 0.4rem; }
.draft-delete-button { display: grid; width: 1.65rem; height: 1.65rem; place-items: center; padding: 0; color: #fecaca; background: transparent; border: 0; border-radius: 0.3rem; cursor: pointer; }
.draft-delete-button:hover { color: #fff; background: rgba(254, 202, 202, 0.16); }
.draft-delete-button svg { width: 0.9rem; height: 0.9rem; fill: currentColor; }
.order-grid { width: 100%; min-width: 900px; border-collapse: collapse; }
.order-grid th, .order-grid td { padding: 0.85rem; border-bottom: 1px solid var(--color-border); vertical-align: top; text-align: left; }
.order-grid th { color: #fff; background: #111827; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.order-grid td > small, .order-grid td strong + small { display: block; color: var(--color-muted); }
.order-grid details summary { color: var(--brand-blue); font-weight: 750; cursor: pointer; }
.component-list { min-width: 260px; margin-top: 0.5rem; list-style: none; }
.component-list li { display: grid; padding: 0.45rem 0; border-bottom: 1px solid var(--color-border); }
.component-list small { color: var(--color-muted); }
.confirm-order-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; padding: 1.1rem 1.25rem; background: #f8fafc; }
.confirm-order-form .button { margin: 0; }
.empty-order { padding: 2.5rem 1.5rem; text-align: center; border-style: dashed; }
.empty-order p { margin-top: 0.5rem; color: var(--color-muted); }
.recent-orders { display: grid; gap: 0.65rem; }
.recent-order { display: flex; align-items: center; gap: 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.recent-order a { display: flex; flex: 1; justify-content: space-between; padding: 0.8rem 1rem; color: var(--color-text); text-decoration: none; }
.recent-order form { padding-right: 0.65rem; }
.recent-orders span { color: var(--color-muted); }
.operator-client-bar { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) auto; align-items: end; gap: 1rem; margin: 1.25rem 0; padding: 1rem; background: var(--color-surface-soft); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.operator-client-bar .button { margin: 0; }
.selected-customer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; padding: 0.8rem 1rem; background: #ecfdf5; border-left: 4px solid var(--brand-green); border-radius: var(--radius-sm); }
.selected-customer span, .selected-customer small { color: var(--color-muted); }
.order-detail-heading { padding-bottom: 1.25rem; border-bottom: 1px solid var(--color-border); }
.turn-ticket { display: grid; justify-items: center; min-width: 130px; padding: 0.8rem 1rem; color: #fff; background: var(--brand-dark); border-radius: var(--radius-sm); }
.turn-ticket strong { font-size: 1.65rem; }
.turn-ticket small, .turn-ticket span { color: #bfdbfe; }
.job-summary { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--color-border); }
.job-summary-main > span { color: var(--brand-blue); font-weight: 750; }
.job-summary-main h2 { font-size: 1.2rem; margin: 0.3rem 0; }
.job-summary-main p { color: var(--color-muted); }
.job-price { font-size: 1.25rem; }
.job-components { grid-column: 1 / -1; display: grid; gap: 0.4rem; padding: 0.8rem; background: var(--color-surface-soft); border-radius: var(--radius-sm); }
.job-components > div { display: flex; justify-content: space-between; gap: 1rem; }
.job-components small { color: var(--color-muted); }
.job-components code { padding: 0.1rem 0.35rem; background: #e2e8f0; border-radius: 0.3rem; }
.job-files { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
.job-files a { padding: 0.35rem 0.65rem; color: var(--brand-blue); text-decoration: none; background: #eff6ff; border-radius: var(--radius-pill); }
.order-detail-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 1rem; padding-top: 1.25rem; }
.order-detail-total span, .order-detail-total strong { font-size: 1.8rem; font-weight: 800; }
.order-detail-total strong { color: #16a34a; }
.process-admin-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin: 1.2rem 0; }
.process-admin-summary > div { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; background: var(--color-surface-soft); border: 1px solid var(--color-border); border-left: 4px solid var(--brand-blue); border-radius: var(--radius-sm); }
.process-admin-summary small { color: var(--color-muted); }
.process-admin-summary strong { font-size: 1.15rem; }
.process-admin-search { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.process-admin-search > label { font-weight: 750; }
.process-admin-search > div { display: flex; gap: 0.65rem; }
.process-admin-search input { flex: 1; padding: 0.75rem 0.9rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.process-admin-search .button { margin: 0; }
.process-admin-table code { display: inline-block; margin-right: 0.45rem; padding: 0.12rem 0.35rem; background: #e2e8f0; border-radius: 0.3rem; }
.process-admin-table td:nth-child(4) { min-width: 290px; }
.process-category, .status-pill, .compatibility-chip { display: inline-block; padding: 0.2rem 0.5rem; border-radius: var(--radius-pill); font-size: 0.78rem; font-weight: 750; }
.process-category { color: #3730a3; background: #eef2ff; }
.compatibility-chip { margin: 0.12rem; color: #075985; background: #ecfeff; }
.compatibility-chip.all { color: #475569; background: #f1f5f9; }
.status-pill.active { color: #065f46; background: #d1fae5; }
.status-pill.inactive { color: #991b1b; background: #fee2e2; }
.process-actions { display: grid; gap: 0.35rem; }
.process-actions a { color: var(--brand-blue); font-weight: 750; text-decoration: none; }
.process-actions form { display: inline; }
.process-admin-form { margin-top: 1.25rem; }
.process-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.process-form-grid .field-wide { grid-column: 1 / -1; }
.process-admin-form input:not([type="checkbox"]), .process-admin-form select { width: 100%; padding: 0.75rem 0.85rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #fff; }
.process-admin-form .field-wide > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.45rem; }
.process-admin-form .field-wide label { display: flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.6rem; background: var(--color-surface-soft); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.process-form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.2rem; }
.process-form-actions .button { margin: 0; }
.process-form-actions a { color: var(--color-muted); }
.csrf-failure-card { width: min(680px, 100%); margin-inline: auto; text-align: center; }
.csrf-failure-card h1 { margin: 0.35rem 0 0.8rem; }
.csrf-failure-card p { color: var(--color-muted); }
.csrf-failure-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.csrf-failure-actions .button { margin: 0; }

/* Captura tabular exclusiva de la orden asistida por operador. */
.operator-builder { position: relative; z-index: 2; overflow: visible; border-radius: 0.7rem; }
.operator-builder .builder-card-heading { padding: 0.85rem 1rem; }
.operator-builder .builder-card-heading h2 { font-size: 1.25rem; }
.operator-grid-form { display: grid; }
.operator-entry-grid {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
    gap: 1px;
    padding: 1px;
    background: #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
}
.operator-grid-field {
    grid-column: span 2;
    grid-row: span 3;
    display: grid;
    grid-template-rows: subgrid;
    row-gap: 0;
    align-content: start;
    min-width: 0;
    padding: 0.55rem;
    background: #fff;
}
.operator-grid-field > label, .operator-grid-field > legend {
    display: flex;
    align-items: center;
    margin: -0.55rem -0.55rem 0.45rem;
    padding: 0.36rem 0.55rem;
    color: #e2e8f0;
    background: #243044;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}
.operator-grid-field select, .operator-grid-field input, .operator-grid-field textarea,
.operator-grid-field output { width: 100%; height: var(--control-height); min-height: var(--control-height); }
.operator-grid-field textarea { min-height: var(--control-height); height: var(--control-height); }
.operator-grid-field small { margin-top: 0.25rem; color: var(--color-muted); font-size: 0.72rem; line-height: 1.2; }
.operator-product-combobox { position: relative; z-index: 3; }
.operator-product-native { display: none; }
.operator-product-search { width: 100%; }
.operator-product-results {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    z-index: 100;
    width: max(100%, 390px);
    max-height: 280px;
    overflow-y: auto;
    padding: 0.3rem;
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 0.55rem;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}
.operator-product-option {
    display: block;
    width: 100%;
    padding: 0.48rem 0.6rem;
    color: var(--color-text);
    background: transparent;
    border: 0;
    border-radius: 0.35rem;
    text-align: left;
    font-size: 0.86rem;
    cursor: pointer;
}
.operator-product-option:hover, .operator-product-option.active { color: #fff; background: #174ea6; }
.operator-product-empty { padding: 0.65rem; color: var(--color-muted); font-size: 0.84rem; }
.operator-field-sku { grid-column: span 4; }
.operator-field-measure, .operator-field-quantity { grid-column: span 1; }
.operator-field-calculated { grid-column: span 1; }
.operator-field-observation { grid-column: span 4; }
.operator-field-file { grid-column: span 2; }
.operator-field-file input { min-width: 0; font-size: 0.72rem; }
.operator-upload-control { position: relative; display: flex; align-items: center; justify-content: center; height: var(--control-height); min-width: 0; padding: 0 .4rem; color: #fff; background: linear-gradient(120deg, #174ea6, #075ee8); border-radius: .52rem; font-size: .75rem; font-weight: 750; text-align: center; box-shadow: 0 2px 5px rgba(7, 94, 232, .16); }
.operator-upload-control input[type="file"] { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.operator-upload-control:focus-within { outline: 3px solid rgba(7, 94, 232, .3); outline-offset: 2px; }
.operator-field-file:not(.enabled) .operator-upload-control { color: #64748b; background: #e2e8f0; box-shadow: none; }
.operator-field-file:not(.enabled) .operator-upload-control input { cursor: not-allowed; }
.operator-file-info { grid-column: 1 / -1; min-width: 0; color: var(--color-muted); font-size: .78rem; }
.operator-file-info strong { color: #263548; }
.operator-file-info ul { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; padding: 0; list-style: none; }
.operator-file-info a { display: inline-block; max-width: 100%; padding: .25rem .6rem; color: #174ea6; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: .4rem; overflow-wrap: anywhere; }
.operator-saved-file { display: inline-flex; align-items: center; gap: .25rem; max-width: 100%; }
.operator-saved-file a { min-width: 0; }
.operator-remove-file { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; padding: .3rem; color: #be123c; background: #fff1f2; border: 1px solid #fecaca; border-radius: .4rem; cursor: pointer; }
.operator-remove-file:hover { background: #ffe4e6; border-color: #fb7185; }
.operator-remove-file:focus-visible { outline: 2px solid #be123c; outline-offset: 2px; }
.operator-remove-file:disabled { opacity: .5; cursor: wait; }
.operator-remove-file svg { width: 1rem; height: 1rem; fill: currentColor; }
.operator-file-info [data-file-removal-status][data-error="true"] { color: #be123c; }
.operator-field-file:not(.enabled) { background: #f1f5f9; }
.operator-field-file:not(.enabled) > label { color: #94a3b8; background: #475569; }
.operator-field-file.enabled > label { background: #174ea6; }
.operator-field-file.optional > label { background: #0f766e; }
.operator-field-calculated output { display: flex; align-items: center; min-height: var(--control-height); padding: 0.48rem 0.72rem; color: #0f3f80; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 0.52rem; font-weight: 850; }
.operator-grid-extras {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
}
.operator-processes { min-width: 0; }
.operator-processes > summary { color: #1e3a8a; font-size: 0.86rem; font-weight: 800; cursor: pointer; }
.operator-complement-groups { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.55rem; }
.operator-complement-groups fieldset { min-width: 180px; padding: 0.45rem 0.55rem; border: 1px solid var(--color-border); border-radius: 0.45rem; background: #fff; }
.operator-complement-groups legend { padding: 0 0.25rem; color: var(--color-muted); font-size: 0.72rem; font-weight: 800; }
.operator-complement-options { display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem; }
.operator-complement-options label { display: inline-flex; align-items: center; gap: 0.28rem; font-size: 0.78rem; cursor: pointer; }
.operator-complement-options input { width: auto; }
.operator-add-row { min-height: var(--control-height); margin: 0; padding: 0.48rem 1rem; border-radius: 0.5rem; }
.operator-order-grid { border-radius: 0.7rem; }
.caja-shell { max-width: 1200px; margin-inline: auto; }
.treasury-dashboard { width: min(1420px, calc(100vw - 130px)); max-width: none; margin-left: 50%; margin-right: 0; transform: translateX(-50%); }
.treasury-bank-table { width: 100%; min-width: 900px; table-layout: fixed; }
.treasury-bank-col { width: 16%; }
.treasury-account-col { width: 29%; }
.treasury-currency-col { width: 10%; }
.treasury-balance-col { width: 14%; }
.treasury-action-col { width: 31%; }
.treasury-account-actions { display: flex; align-items: center; justify-content: flex-end; gap: .35rem; white-space: nowrap; }
.treasury-account-actions .text-button { display: inline-flex; padding-inline: .4rem; white-space: nowrap; }
@media (max-width: 768px) {
    .treasury-dashboard { width: 100%; margin-inline: 0; transform: none; }
    .treasury-account-actions { justify-content: flex-start; }
}
.caja-search { display: flex; gap: 0.7rem; margin: 1.25rem 0; }
.caja-search input { flex: 1; min-width: 0; padding: 0.72rem 0.9rem; border: 1px solid var(--control-border); border-radius: var(--radius-sm); }
.caja-report-filter { align-items: end; flex-wrap: wrap; }
.caja-report-filter label { display: grid; gap: 0.3rem; color: var(--color-muted); font-size: 0.82rem; font-weight: 750; }
.caja-report-filter input { flex: initial; }
.caja-report-table { margin-top: 1rem; }
.caja-report-table table { min-width: 1480px; font-size: 0.82rem; }
.caja-report-table tfoot { background: #eaf2ff; }
.caja-report-table tfoot th { font-weight: 850; }
.caja-search .button, .caja-action { margin: 0; min-height: 2.5rem; }
.caja-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr); gap: 1rem; margin: 1.25rem 0; }
.caja-card { padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-soft); }
.caja-card h2, .caja-payment-form h2 { margin-bottom: 0.8rem; font-size: 1.2rem; }
.caja-totals { display: grid; gap: 0.4rem; margin-top: 0.85rem; }
.caja-totals > div { display: flex; justify-content: space-between; gap: 1rem; }
.caja-totals dd { font-weight: 800; }
.caja-totals .total { padding-top: 0.55rem; border-top: 1px solid var(--color-border); font-size: 1.15rem; }
.caja-totals .balanced { color: #067647; }.caja-totals .difference { color: #b42318; }
.caja-payment-form { display: grid; gap: 0.85rem; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; }
.caja-payment-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; padding: 0.9rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.caja-payment-row legend { padding: 0 0.35rem; color: var(--brand-blue); font-weight: 800; }.caja-payment-row input, .caja-payment-row select { width: 100%; padding: 0.62rem 0.7rem; border: 1px solid var(--control-border); border-radius: 0.45rem; }.delete-field { align-self: end; }.caja-emit-form { margin-top: 1rem; }.caja-success { margin-top: 1rem; color: #067647; font-weight: 750; }
.treasury-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }.treasury-actions .button { margin: 0; }.treasury-section { margin-top: 1.4rem; }.treasury-section h2 { margin-bottom: 0.65rem; font-size: 1.12rem; }.treasury-section small { display: block; color: var(--color-muted); }.treasury-section form { margin: 0; }.treasury-section .text-button { border: 0; background: transparent; cursor: pointer; }.treasury-form-shell { max-width: 760px; }.treasury-form-shell .field-row { display: grid; gap: 0.35rem; }.treasury-form-shell textarea { width: 100%; }
.produccion-shell { max-width: 1400px; margin-inline: auto; }.produccion-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; margin: 1rem 0; }.produccion-area, .produccion-operacion, .produccion-liberables { display: grid; gap: .45rem; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; }.produccion-area { color: inherit; text-decoration: none; }.produccion-area:hover { border-color: var(--brand-blue); box-shadow: 0 2px 10px #174ea61c; }.produccion-area strong { color: var(--brand-blue); }.produccion-liberables { margin: 1rem 0; background: #fffbeb; border-color: #fcd34d; }.produccion-liberables > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; }.produccion-tabla { margin-top: 1.5rem; }.produccion-operaciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-top: 1rem; }.produccion-operacion header { display: flex; justify-content: space-between; gap: .5rem; color: var(--brand-blue); }.produccion-operacion p { margin: 0; }.produccion-operacion dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0; }.produccion-operacion dt { color: var(--color-muted); font-size: .75rem; }.produccion-operacion dd { margin: .15rem 0 0; font-weight: 750; }.produccion-operacion form { display: flex; gap: .5rem; margin: 0; }.produccion-operacion input { min-width: 0; flex: 1; }
.production-config-alert { margin: 1rem 0; padding: 1rem 1.1rem; color: #713f12; background: #fffbeb; border: 1px solid #fcd34d; border-left: 5px solid #f59e0b; border-radius: var(--radius-sm); }.production-config-alert p { margin: .2rem 0; }.production-config-alert a { color: #92400e; font-weight: 800; }

/* Personal: ficha individual coherente con los paneles operativos. */
.personal-shell { max-width: 1400px; margin-inline: auto; }
.personal-heading-actions, .personal-section-heading { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.personal-heading-actions .button, .personal-section-heading .button { margin: 0; }
.personal-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 1.25rem 0; }
.personal-summary-grid article { display: grid; gap: .22rem; min-height: 108px; align-content: center; padding: .9rem 1rem; background: #f8fafc; border: 1px solid var(--color-border); border-top: 4px solid var(--brand-blue); border-radius: .65rem; }
.personal-summary-grid span, .personal-data-grid dt { color: var(--color-muted); font-size: .72rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.personal-summary-grid strong { color: #172033; font-size: 1.15rem; }.personal-summary-grid small { color: var(--color-muted); }
.personal-section { margin-top: 1.25rem; padding: 1.1rem; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.personal-section-heading { justify-content: space-between; margin-bottom: .9rem; }.personal-section-heading h2 { margin: .12rem 0 0; font-size: 1.2rem; }
.personal-data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin: 0; background: var(--color-border); border: 1px solid var(--color-border); border-radius: .65rem; }
.personal-data-grid div { display: grid; gap: .25rem; padding: .8rem .9rem; background: #f8fafc; }.personal-data-grid dd { margin: 0; font-weight: 720; }
.personal-table-wrap { margin: 0; }.personal-table { width: 100%; min-width: 900px; border-collapse: collapse; }.personal-table th, .personal-table td { padding: .78rem .85rem; text-align: left; border-bottom: 1px solid #e8edf4; vertical-align: middle; }.personal-table th { color: #dbeafe; background: #1e293b; font-size: .73rem; letter-spacing: .055em; text-transform: uppercase; }.personal-table tbody tr:nth-child(even) { background: #f8fafc; }.personal-table small { display: block; margin-top: .15rem; color: var(--color-muted); }.personal-amount { text-align: right !important; font-family: Consolas, "SFMono-Regular", monospace; white-space: nowrap; }.personal-empty-cell { padding: 2rem !important; color: var(--color-muted); text-align: center !important; }
.personal-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }.personal-item-list { display: grid; gap: .55rem; }.personal-item-list article { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem .8rem; background: #f8fafc; border: 1px solid var(--color-border); border-radius: .55rem; }.personal-item-list article > div { display: grid; }.personal-item-list small, .personal-item-list span { color: var(--color-muted); font-size: .82rem; }
.personal-timeline { display: grid; }.personal-timeline article { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--color-border); }.personal-timeline article:last-child { border-bottom: 0; }.personal-timeline time { color: var(--brand-blue); font-weight: 800; }.personal-timeline p { margin: .2rem 0 0; color: var(--color-muted); }
.personal-empty { padding: 1.2rem; color: var(--color-muted); text-align: center; background: #f8fafc; border: 1px dashed #b7c3d2; border-radius: .55rem; }.personal-empty-state { display: grid; justify-items: start; gap: .65rem; margin-top: 1.25rem; padding: 2rem; background: linear-gradient(120deg, #f8fafc, #eff6ff); border: 1px dashed #9fb3c8; border-radius: var(--radius-md); }.personal-empty-state h2, .personal-empty-state p { margin: 0; }.personal-empty-state p { max-width: 680px; color: var(--color-muted); }
@media (max-width: 900px) { .personal-summary-grid, .personal-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.personal-columns { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .personal-summary-grid, .personal-data-grid { grid-template-columns: 1fr; }.personal-heading-actions { width: 100%; }.personal-heading-actions .button { flex: 1; }.personal-timeline article { grid-template-columns: 1fr; gap: .25rem; } }

/* Personal: lenguaje visual equivalente a Compras. */
.personal-page { max-width: 1400px; margin-inline: auto; padding: 0; }
.personal-module-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.1rem; }
.personal-module-heading h1 { margin: 0 0 .2rem; color: #121820; font-size: clamp(1.75rem, 3vw, 2.3rem); font-weight: 500; letter-spacing: .01em; text-transform: uppercase; }
.personal-module-heading p { margin: 0; color: var(--color-muted); }
.personal-module-actions, .personal-heading-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.personal-module-actions .button, .personal-heading-actions .button, .personal-module-heading > .button { min-height: 2.5rem; margin: 0; padding: .5rem .85rem; border-radius: .38rem; font-size: .88rem; }
.personal-filters { display: grid; grid-template-columns: minmax(360px, 2fr) minmax(220px, .8fr) auto auto; gap: .7rem; align-items: end; padding: 1rem; background: #fff; border: 1px solid #d6dde7; border-radius: .55rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
.personal-filters label { display: grid; grid-template-rows: 1.15rem 2.5rem; gap: .4rem; min-width: 0; margin: 0; }
.personal-filters label > span { display: flex; align-items: center; height: 1.15rem; color: #263548; font-size: .78rem; font-weight: 800; }
.personal-filters input, .personal-filters select { width: 100%; height: 2.5rem; min-width: 0; margin: 0; }
.personal-filter-button { align-self: end; height: 2.5rem; min-height: 2.5rem; margin: 0; padding: .48rem .85rem; border-radius: .38rem; white-space: nowrap; }
.personal-clear { display: inline-flex; align-items: center; justify-content: center; align-self: end; height: 2.5rem; padding: 0 .75rem; color: #475569; background: #fff; border: 1px solid #94a3b8; border-radius: .38rem; font-size: .85rem; font-weight: 700; text-decoration: none; }
.personal-count { margin: 1rem 0 .55rem; color: var(--color-muted); font-size: .9rem; }
.personal-list-table-wrap { overflow-x: auto; border: 1px solid #d6dde7; border-radius: .35rem; background: #fff; }
.personal-list-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: .86rem; }
.personal-list-table th, .personal-list-table td { padding: .7rem .75rem; border-bottom: 1px solid #e5e9ef; text-align: left; vertical-align: middle; }
.personal-list-table thead th, .personal-table thead th { color: #263548; background: #eef1f4; font-size: .76rem; font-weight: 850; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.personal-list-table tbody tr:nth-child(even), .personal-table tbody tr:nth-child(even) { background: #fafbfc; }
.personal-list-table tbody tr:hover, .personal-table tbody tr:hover { background: #f0f7f6; }
.personal-list-table tbody tr:last-child td { border-bottom: 0; }.personal-list-table td small { display: block; color: var(--color-muted); font-size: .74rem; }
.personal-status { display: inline-flex; padding: .18rem .45rem; color: #334155; background: #e2e8f0; border-radius: .25rem; font-size: .72rem; font-weight: 800; white-space: nowrap; }.personal-status-active { color: #166534; background: #dcfce7; }.personal-status-access { color: #1e40af; background: #dbeafe; }
.personal-row-link { color: #075985; font-weight: 750; white-space: nowrap; }.personal-list-empty { padding: 2.5rem !important; color: var(--color-muted); text-align: center !important; }
.personal-detail-page .personal-module-heading { padding-bottom: 0; border-bottom: 0; }.personal-detail-page .personal-summary-grid { margin-top: 0; }
.personal-summary-grid article { min-height: 94px; background: #fff; border-top-width: 1px; border-radius: .45rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .035); }.personal-summary-grid article:first-child { border-left: 4px solid #16803c; }
.personal-section { border-color: #d6dde7; border-radius: .55rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .035); }.personal-section-heading .eyebrow { color: #526074; font-size: .69rem; }.personal-section-heading h2 { color: #172033; font-size: 1.08rem; }.personal-data-grid { border-radius: .35rem; }.personal-data-grid div { background: #fafbfc; }
.personal-form-page { max-width: 1180px; }.personal-form-card { overflow: hidden; background: #fff; border: 1px solid #d6dde7; border-radius: .65rem; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }.personal-form-card > header { padding: 1rem 1.15rem; background: #f8fafc; border-bottom: 1px solid #d6dde7; }.personal-form-card > header span { color: #172033; font-size: 1.05rem; font-weight: 850; }.personal-form-card > header p { margin: .2rem 0 0; color: var(--color-muted); font-size: .85rem; }
.personal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; padding: 1.15rem; }.personal-form-field { display: grid; gap: .35rem; align-content: start; }.personal-form-field-wide { grid-column: 1 / -1; }.personal-form-field > label { color: #263548; font-size: .8rem; font-weight: 800; }.personal-form-field input:not([type="checkbox"]), .personal-form-field select, .personal-form-field textarea { width: 100%; min-width: 0; }.personal-form-field input[type="checkbox"] { width: 1rem; height: 1rem; }.personal-form-field small { color: var(--color-muted); font-size: .76rem; }.personal-form-field .errorlist { margin: 0; }
.personal-form-actions { display: flex; flex-wrap: wrap; gap: .65rem; padding: 0 1.15rem 1.15rem; }.personal-form-actions .button { min-height: 2.5rem; margin: 0; padding: .5rem .85rem; border-radius: .38rem; }.personal-confidential-form { border-top: 3px solid #7c3aed; }
@media (max-width: 760px) { .personal-module-heading { align-items: flex-start; flex-direction: column; }.personal-module-actions, .personal-heading-actions { width: 100%; }.personal-module-actions .button, .personal-heading-actions .button { flex: 1; }.personal-filters { grid-template-columns: 1fr; }.personal-form-grid { grid-template-columns: 1fr; }.personal-form-field-wide { grid-column: auto; } }

/* Contabilidad: jerarquía visual, cifras alineadas y tablas legibles. */
.accounting-page { max-width: 1440px; margin-inline: auto; padding: 0; overflow: hidden; }
.accounting-header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.75rem 1.2rem; color: #fff; background: linear-gradient(120deg, #111827, #172554); border-bottom: 4px solid var(--brand-cyan); }
.accounting-header h1 { margin-top: .25rem; color: #fff; font-size: clamp(1.7rem, 3vw, 2.45rem); }.accounting-header .eyebrow { color: #67e8f9; }
.accounting-nav { display: flex; flex-wrap: wrap; gap: .35rem; }.accounting-nav a { padding: .48rem .72rem; color: #e0f2fe; text-decoration: none; border: 1px solid #ffffff2e; border-radius: .45rem; font-size: .88rem; font-weight: 750; }.accounting-nav a:hover { color: #fff; background: #ffffff18; }
.accounting-content { padding: clamp(1rem, 2.5vw, 1.75rem); }.accounting-content > p:first-child { margin-top: 0; }
.accounting-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }.accounting-toolbar > .button { margin: 0; }
.accounting-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; }.accounting-filters label { display: grid; gap: .25rem; color: var(--color-muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }.accounting-filters input, .accounting-filters select, .accounting-content form input, .accounting-content form select, .accounting-content form textarea { min-height: 2.5rem; padding: .55rem .7rem; color: var(--color-text); background: #fff; border: 1px solid var(--control-border); border-radius: .45rem; }.accounting-filter-button { min-height: 2.5rem; margin: 0; padding-block: .5rem; }
.accounting-table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: .7rem; box-shadow: 0 6px 20px rgba(15, 23, 42, .05); }
.accounting-table, .accounting-content > table { width: 100%; border-collapse: collapse; background: #fff; }.accounting-table th, .accounting-table td, .accounting-content > table th, .accounting-content > table td { padding: .78rem .85rem; border-bottom: 1px solid #e8edf4; text-align: left; vertical-align: middle; }.accounting-table thead th, .accounting-content > table thead th { color: #dbeafe; background: #1e293b; font-size: .73rem; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }.accounting-table tbody tr:nth-child(even), .accounting-content > table tbody tr:nth-child(even) { background: #f8fafc; }.accounting-table tbody tr:hover, .accounting-content > table tbody tr:hover { background: #eff6ff; }.accounting-table tbody tr:last-child td { border-bottom: 0; }
.accounting-table .amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }.accounting-table td.amount { font-family: Consolas, "SFMono-Regular", monospace; font-weight: 650; }.muted-cell { color: var(--color-muted); }.nowrap { white-space: nowrap; }.voucher-link { color: #1d4ed8; font-weight: 800; text-decoration: none; }.voucher-link:hover { text-decoration: underline; }.accounting-empty { padding: 2.5rem !important; color: var(--color-muted); text-align: center !important; }
.status-badge { display: inline-flex; width: fit-content; padding: .22rem .58rem; border-radius: var(--radius-pill); font-size: .76rem; font-weight: 850; white-space: nowrap; }.status-contabilizado { color: #166534; background: #dcfce7; }.status-borrador { color: #854d0e; background: #fef9c3; }.status-reservado { color: #1e40af; background: #dbeafe; }
.voucher-summary { display: grid; grid-template-columns: repeat(4, minmax(145px, 1fr)); gap: .75rem; margin-bottom: 1rem; }.voucher-summary > div { display: grid; gap: .2rem; padding: .85rem 1rem; background: #f8fafc; border: 1px solid var(--color-border); border-radius: .65rem; }.voucher-summary span, .voucher-description > span { color: var(--color-muted); font-size: .72rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }.voucher-description { margin-bottom: 1rem; padding: .9rem 1rem; background: #eff6ff; border-left: 4px solid var(--brand-blue); border-radius: .45rem; }.voucher-description p { margin-top: .2rem; font-size: 1.02rem; }.account-code { min-width: 190px; font-weight: 750; }.voucher-lines tfoot th { padding: .85rem; color: #fff; background: #334155; }.accounting-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }.accounting-actions form { margin: 0; }.accounting-actions .button { margin: 0; }.accounting-note { margin-top: 1rem; padding: .8rem 1rem; background: #f8fafc; border-radius: .45rem; }
.accounting-content .summary-grid { margin: 0 0 1.25rem; }.accounting-content .summary-grid article { min-height: 105px; align-content: center; border-top: 4px solid var(--brand-blue); }.accounting-content .summary-grid strong { display: block; font-size: 1.35rem; }.accounting-content > form { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; margin: 0 0 1rem; }.accounting-content > form .button { margin: 0; }.accounting-content > table { margin-top: 1rem; border: 1px solid var(--color-border); }
.accounting-report-alert { display: flex; gap: .45rem 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; padding: .75rem 1rem; color: #166534; background: #ecfdf3; border: 1px solid #bbf7d0; border-left: 5px solid #16803c; border-radius: .55rem; }.accounting-report-alert span { color: #3f6250; }
.accounting-content > form.accounting-report-filters { display: grid; grid-template-columns: repeat(6, minmax(125px, 1fr)); gap: .75rem; padding: 1rem; background: #fff; border: 1px solid #cbd5e1; border-radius: .7rem; box-shadow: 0 4px 14px rgba(15, 23, 42, .04); }.accounting-report-filters label { display: grid; gap: .32rem; min-width: 0; }.accounting-report-filters label > span { color: #263548; font-size: .76rem; font-weight: 800; }.accounting-report-filters input, .accounting-report-filters select { width: 100%; min-width: 0; }.accounting-report-filters .report-filter-type { grid-column: span 2; }.accounting-report-filters .report-generate-button { min-height: var(--control-height); align-self: end; margin: 0; white-space: nowrap; }
.accounting-report-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.2rem 0 .6rem; }.accounting-report-heading span { color: var(--color-muted); font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }.accounting-report-heading h2 { margin: .1rem 0 0; color: #172033; font-size: 1.2rem; }.accounting-report-heading > strong { color: #526074; font-size: .84rem; font-weight: 650; }
.report-table-wrap { box-shadow: none; }.accounting-report-table { font-size: .86rem; }.accounting-report-table thead th { color: #1f3545; background: #e5efed; border-bottom-color: #b7cac7; }.accounting-report-table tbody tr:nth-child(even) { background: #f2faf6; }.accounting-report-table tbody tr:hover { background: #e4f4ec; }.accounting-report-table .account-code { color: #233d55; font-family: Consolas, "SFMono-Regular", monospace; font-size: .81rem; }.report-movements { min-width: 920px; }
.trial-balance-table { min-width: 980px; }.trial-balance-table tbody .trial-balance-total { background: #eef3f7; }.trial-balance-table tbody .trial-balance-total:hover { background: #e3ebf2; }.trial-balance-table .trial-balance-total td { border-top: 1px solid #cbd5e1; }.trial-balance-table .trial-balance-total.level-0 td { color: #102a43; background: #dce7ef; border-top: 2px solid #9fb3c5; font-weight: 850; }.trial-balance-table tfoot th { padding: .85rem; color: #fff; background: #1e293b; }.trial-balance-table tfoot .amount { text-align: right; font-family: Consolas, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.accounting-totals-card { max-width: 760px; overflow: hidden; background: #fff; border: 1px solid #cbd5e1; border-radius: .7rem; }.accounting-totals-card > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .3fr); gap: 1rem; padding: .72rem 1rem; border-bottom: 1px solid #e2e8f0; }.accounting-totals-card > div:nth-child(even) { background: #f2faf6; }.accounting-totals-card > div:last-child { border-bottom: 0; }.accounting-totals-card strong { text-align: right; font-family: Consolas, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; }.accounting-totals-card .report-grand-total { color: #fff; background: #1e293b; font-weight: 850; }
.accounting-report-empty { display: grid; gap: .25rem; justify-items: center; margin-top: 1.2rem; padding: 2.5rem 1rem; color: var(--color-muted); background: #f8fafc; border: 1px dashed #b7c3d2; border-radius: .7rem; text-align: center; }.accounting-report-empty strong { color: #334155; }
@media (max-width: 1100px) { .accounting-content > form.accounting-report-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }.accounting-report-filters .report-filter-type { grid-column: span 1; } }
@media (max-width: 760px) { .accounting-header { align-items: flex-start; }.accounting-nav { width: 100%; }.accounting-nav a { flex: 1; text-align: center; }.voucher-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.accounting-filters { width: 100%; }.accounting-filters label { flex: 1 1 140px; }.accounting-filters input, .accounting-filters select { width: 100%; } }
@media (max-width: 640px) { .accounting-content > form.accounting-report-filters { grid-template-columns: 1fr; }.accounting-report-heading { align-items: flex-start; flex-direction: column; }.accounting-report-heading > strong { order: -1; }.accounting-totals-card > div { grid-template-columns: 1fr auto; } }

/* Dashboard contable: lectura ejecutiva con navegación al detalle verificable. */
.accounting-dashboard { display: grid; gap: 1rem; }
.accounting-dashboard-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; background: #f8fafc; border: 1px solid #d6dde7; border-radius: .7rem; }
.accounting-dashboard-toolbar h2 { margin: .1rem 0 .2rem; color: #172033; font-size: 1.35rem; }
.accounting-dashboard-toolbar p { margin: 0; color: var(--color-muted); }
.accounting-dashboard-toolbar .eyebrow, .accounting-dashboard-section > header span { color: #08769b; font-size: .68rem; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.accounting-dashboard-period { display: grid !important; grid-template-columns: minmax(230px, 1fr) auto; gap: .3rem .65rem !important; align-items: end !important; margin: 0 !important; }
.accounting-dashboard-period label { grid-column: 1/-1; color: #334155; font-size: .72rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.accounting-dashboard-period select { min-width: 260px; }
.accounting-dashboard-period .button { min-height: 2.5rem; margin: 0; white-space: nowrap; }
.accounting-dashboard-alert { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; padding: .8rem 1rem; border: 1px solid; border-left-width: 5px; border-radius: .55rem; }
.accounting-dashboard-alert div { display: grid; gap: .12rem; }.accounting-dashboard-alert span { font-size: .84rem; }
.accounting-dashboard-alert a { flex-shrink: 0; font-size: .82rem; font-weight: 850; }
.accounting-dashboard-alert-info { color: #164e63; background: #ecfeff; border-color: #a5e7ef; }.accounting-dashboard-alert-info a { color: #075985; }
.accounting-dashboard-alert-danger { color: #881337; background: #fff1f2; border-color: #fecdd3; }.accounting-dashboard-alert-danger a { color: #9f1239; }
.accounting-dashboard-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.accounting-dashboard-kpis > a { display: grid; align-content: start; gap: .24rem; min-width: 0; min-height: 126px; padding: .9rem 1rem; color: inherit; background: #fff; border: 1px solid #d6dde7; border-top: 4px solid #075ee8; border-radius: .6rem; text-decoration: none; box-shadow: 0 3px 10px rgba(15,23,42,.05); }
.accounting-dashboard-kpis > a:hover, .accounting-dashboard-kpis > a:focus-visible { border-color: #075ee8; transform: translateY(-2px); box-shadow: 0 7px 18px rgba(15,23,42,.1); outline: none; }
.accounting-dashboard-kpis > a.is-positive { border-top-color: #16803c; }.accounting-dashboard-kpis > a.is-negative, .accounting-dashboard-kpis > a.needs-attention { border-top-color: #d97706; }
.accounting-dashboard-kpis span, .accounting-dashboard-balance span { color: var(--color-muted); font-size: .68rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.accounting-dashboard-kpis strong { overflow-wrap: anywhere; color: #172033; font-size: clamp(1.2rem, 2vw, 1.55rem); font-variant-numeric: tabular-nums; }
.accounting-dashboard-kpis small { color: #526074; font-size: .73rem; line-height: 1.3; }
.accounting-dashboard-section { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #d6dde7; border-radius: .65rem; box-shadow: 0 3px 12px rgba(15,23,42,.04); }
.accounting-dashboard-section > header { display: flex; align-items: end; justify-content: space-between; gap: .8rem; padding: .85rem 1rem; border-bottom: 1px solid #e5e9ef; }
.accounting-dashboard-section > header h2 { margin: .12rem 0 0; color: #172033; font-size: 1.05rem; }
.accounting-dashboard-section > header > a { flex-shrink: 0; color: #075ee8; font-size: .78rem; font-weight: 800; text-decoration: none; }
.accounting-dashboard-section > header > a:hover { text-decoration: underline; }
.accounting-dashboard-balance { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: #e5e9ef; }
.accounting-dashboard-balance article { display: grid; gap: .25rem; min-width: 0; padding: .9rem 1rem; background: #fff; }
.accounting-dashboard-balance strong { overflow-wrap: anywhere; color: #172033; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.accounting-dashboard-balance .accounting-dashboard-control { background: #f0fdf4; }.accounting-dashboard-balance .accounting-dashboard-control strong { color: #166534; }
.accounting-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.accounting-dashboard-grid-lower { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.accounting-horizontal-chart { display: grid; gap: .75rem; padding: 1rem; }
.accounting-horizontal-row { display: grid; grid-template-columns: 5rem minmax(70px, 1fr) minmax(105px, auto); gap: .7rem; align-items: center; }
.accounting-horizontal-row > span { color: #334155; font-size: .78rem; font-weight: 750; }.accounting-horizontal-row > div { height: .7rem; overflow: hidden; background: #e8eef5; border-radius: 999px; }
.accounting-horizontal-row i { display: block; width: var(--bar); min-width: 0; height: 100%; background: linear-gradient(90deg,#075ee8,#1683a8); border-radius: inherit; }.accounting-horizontal-row.is-negative i { background: #dc2626; }
.accounting-horizontal-row > strong { color: #172033; font-size: .82rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.accounting-daily-chart { display: flex; align-items: end; gap: clamp(.2rem, .7vw, .55rem); min-height: 220px; padding: 1.2rem 1rem .8rem; overflow-x: auto; border-bottom: 1px solid #eef2f7; }
.accounting-daily-chart a { display: grid; grid-template-rows: 165px auto; gap: .35rem; align-items: end; min-width: 18px; height: 190px; color: #526074; text-align: center; text-decoration: none; font-size: .65rem; }
.accounting-daily-chart i { display: block; width: 100%; height: var(--bar); min-height: 3px; background: linear-gradient(#1683a8,#075ee8); border-radius: .25rem .25rem 0 0; }
.accounting-daily-chart a:hover i, .accounting-daily-chart a:focus-visible i { background: #174ea6; }.accounting-daily-chart a:focus-visible { outline: 2px solid #075ee8; outline-offset: 2px; }
.accounting-recent-list { display: grid; }
.accounting-recent-list > a:last-child { border-bottom: 0; }.accounting-recent-list > a:hover { background: #f0f7f6; }
.accounting-recent-list span { display: grid; min-width: 0; }.accounting-recent-list strong { overflow-wrap: anywhere; color: #172033; font-size: .82rem; }.accounting-recent-list small { color: var(--color-muted); font-size: .7rem; }
.accounting-recent-list em { color: #172033; font-size: .78rem; font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; }
.accounting-recent-list > a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .72rem 1rem; color: inherit; border-bottom: 1px solid #edf1f5; text-decoration: none; }
.accounting-dashboard-empty { margin: 0; padding: 2rem 1rem; color: var(--color-muted); text-align: center; }
.accounting-dashboard-actions { display: flex; flex-wrap: wrap; gap: .65rem; }.accounting-dashboard-actions .button { margin: 0; }
@media (max-width: 1180px) { .accounting-dashboard-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }.accounting-dashboard-balance { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 850px) { .accounting-dashboard-grid, .accounting-dashboard-grid-lower { grid-template-columns: 1fr; }.accounting-dashboard-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }.accounting-dashboard-balance { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 620px) { .accounting-dashboard-toolbar { align-items: stretch; }.accounting-dashboard-period { width: 100%; grid-template-columns: 1fr; }.accounting-dashboard-period label { grid-column: auto; }.accounting-dashboard-period select { min-width: 0; width: 100%; }.accounting-dashboard-kpis, .accounting-dashboard-balance { grid-template-columns: 1fr; }.accounting-dashboard-alert { align-items: flex-start; flex-direction: column; }.accounting-horizontal-row { grid-template-columns: 4.5rem minmax(60px,1fr); }.accounting-horizontal-row > strong { grid-column: 2; } }

/* Presentación BI compacta, alineada con la referencia visual entregada. */
.accounting-dashboard { gap: .7rem; padding: .65rem; background: #edf2f6; border: 1px solid #91a8bb; border-radius: .4rem; box-shadow: inset 0 0 0 3px #d5e0e8; }
.accounting-dashboard-toolbar { padding: .8rem 1rem; background: #fff; border-color: #aebdca; border-top: 4px solid #12679e; border-radius: .28rem; }
.accounting-dashboard-kpis { gap: .5rem; }
.accounting-dashboard-kpis > a { min-height: 112px; padding: .75rem .8rem; border-color: #aebdca; border-top: 0; border-radius: .28rem; box-shadow: 0 2px 5px rgba(15,23,42,.07); }
.accounting-dashboard-kpis > a.is-positive, .accounting-dashboard-kpis > a.is-negative, .accounting-dashboard-kpis > a.needs-attention { border-top: 0; }
.accounting-dashboard-kpis span { margin: -.75rem -.8rem .35rem; padding: .38rem .55rem; color: #fff; background: #12679e; font-size: .66rem; letter-spacing: .045em; }
.accounting-dashboard-kpis > a.is-positive span { background: #16803c; }.accounting-dashboard-kpis > a.is-negative span, .accounting-dashboard-kpis > a.needs-attention span { background: #b8680d; }
.accounting-dashboard-section { border-color: #9fb1c0; border-radius: .28rem; box-shadow: 0 2px 6px rgba(15,23,42,.06); }
.accounting-dashboard-section > header { padding: .48rem .7rem; color: #fff; background: linear-gradient(90deg,#12679e,#177cac); border-bottom-color: #0d527e; }
.accounting-dashboard-section > header span { color: #d9f4ff; font-size: .62rem; }.accounting-dashboard-section > header h2 { margin-top: .08rem; color: #fff; font-size: .92rem; }.accounting-dashboard-section > header > a { color: #fff3a8; font-size: .72rem; }
.accounting-dashboard-grid { grid-template-columns: minmax(280px,.78fr) minmax(0,1.22fr); gap: .7rem; }.accounting-dashboard-grid-lower { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); align-items: start; }
.accounting-ratio-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: #dbe3ea; }
.accounting-ratio-grid article { display: grid; align-content: start; gap: .35rem; min-height: 205px; padding: .8rem .85rem; background: #fff; }
.accounting-ratio-grid article > span { color: #12679e; font-size: .7rem; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.accounting-ratio-grid article > strong { color: #172033; font-size: 1.45rem; font-variant-numeric: tabular-nums; line-height: 1.1; }.accounting-ratio-grid article > strong.is-unavailable { color: #64748b; font-size: 1rem; }
.accounting-ratio-chart { display: grid; gap: .28rem; padding: .42rem .5rem; background: #f8fafc; border: 1px solid #e3e9ef; border-radius: .25rem; }
.accounting-ratio-chart > div { display: grid; grid-template-columns: 3.35rem minmax(45px,1fr) minmax(4rem,auto); gap: .4rem; align-items: center; }
.accounting-ratio-chart span { color: #526074; font-size: .6rem; font-weight: 750; text-transform: uppercase; }.accounting-ratio-chart i { display: block; height: .42rem; overflow: hidden; background: #dce4eb; border-radius: 999px; }
.accounting-ratio-chart b { display: block; width: var(--ratio-bar); height: 100%; border-radius: inherit; }.accounting-ratio-chart-previous b { background: #94a3b8; }.accounting-ratio-chart-current b { background: linear-gradient(90deg,#12679e,#25a3c7); }
.accounting-ratio-chart em { color: #334155; font-size: .64rem; font-style: normal; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.accounting-ratio-grid article > small { min-height: 2.2em; color: #526074; font-size: .66rem; line-height: 1.25; }
.accounting-ratio-trend { margin: auto 0 0; padding-top: .35rem; color: #526074; border-top: 1px solid #edf1f5; font-size: .68rem; }.accounting-ratio-trend b { color: #12679e; font-size: .9rem; }
.accounting-recent-list strong { font-size: .78rem; }.accounting-recent-list small { font-size: .67rem; }
@media (max-width:850px) { .accounting-dashboard-grid, .accounting-dashboard-grid-lower { grid-template-columns:1fr; } }
@media (max-width:620px) { .accounting-dashboard { padding:.4rem; }.accounting-ratio-grid { grid-template-columns:1fr; } }

/* Libro diario: agrupación documental por asiento, basada en el formato contable histórico. */
.journal-report { margin-top: 1.15rem; color: #172033; background: #fff; }
.journal-report-heading { position: relative; display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: .8rem 2rem; padding: 1rem 1.15rem; border: 1px solid #cbd5e1; border-bottom: 3px solid #263548; border-radius: .65rem .65rem 0 0; }
.journal-report-heading > div > span { color: #475569; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }.journal-report-heading h2 { margin: .15rem 0 0; color: #172033; font-size: 1.35rem; }
.journal-report-heading dl { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; margin: 0; }.journal-report-heading dl div { display: grid; gap: .1rem; }.journal-report-heading dt { color: #64748b; font-size: .68rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }.journal-report-heading dd { margin: 0; font-weight: 750; }
.journal-print-button { position: absolute; right: 1rem; top: -3.15rem; margin: 0; }
.journal-column-headings, .journal-line { display: grid; grid-template-columns: minmax(145px, .8fr) minmax(210px, 1.25fr) minmax(300px, 2fr) minmax(100px, .55fr) minmax(100px, .55fr); gap: .7rem; }
.journal-column-headings { padding: .65rem 1rem; color: #dbeafe; background: #1e293b; font-size: .72rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.journal-entry { break-inside: avoid; border: 1px solid #d9e0e8; border-top: 0; }
.journal-entry > header { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: .7rem; padding: .65rem 1rem .45rem; background: #edf3f7; }.journal-entry > header div { display: flex; gap: .4rem; }.journal-entry > header span, .journal-entry-concept span { color: #64748b; font-size: .72rem; font-weight: 800; text-transform: uppercase; }.journal-entry > header a { color: #1d4ed8; font-weight: 850; text-decoration: none; }
.journal-entry-concept { display: flex; gap: .65rem; margin: 0; padding: .15rem 1rem .65rem; background: #edf3f7; font-weight: 650; }.journal-entry-concept span { flex: 0 0 auto; }
.journal-line { align-items: start; padding: .55rem 1rem; border-top: 1px solid #edf0f4; }.journal-line:nth-child(even) { background: #f8fafc; }.journal-line .account-code { min-width: 0; }.journal-account-name { font-weight: 650; }.journal-detail small { display: block; margin-top: .15rem; color: #64748b; }
.journal-line .amount, .journal-entry > footer .amount, .journal-grand-total .amount { text-align: right; font-family: Consolas, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.journal-entry > footer { display: grid; grid-template-columns: 1fr minmax(100px, .55fr) minmax(100px, .55fr); gap: .7rem; padding: .55rem 1rem; border-top: 1px solid #94a3b8; background: #fff; }.journal-entry > footer span { text-align: right; font-weight: 850; }
.journal-grand-total { display: grid; grid-template-columns: 1fr minmax(100px, .55fr) minmax(100px, .55fr); gap: .7rem; padding: .8rem 1rem; color: #fff; background: #1e293b; font-size: 1rem; }.journal-grand-total span { text-align: right; font-weight: 850; }
.journal-report-footnote { margin: .6rem 0 0; color: #64748b; font-size: .76rem; text-align: right; }
@media (max-width: 900px) { .journal-report { overflow-x: auto; }.journal-report-heading, .journal-column-headings, .journal-entry, .journal-grand-total, .journal-report-footnote { min-width: 920px; }.journal-print-button { position: static; width: fit-content; }.journal-report-heading { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4 portrait; margin: 10mm 8mm; }
  body { color: #000; background: #fff; }
  body > header, body > footer, .side-nav, .side-menu-backdrop, .accounting-header, .accounting-report-alert, .accounting-report-filters, .journal-print-button { display: none !important; }
  main, .content-section, .accounting-page, .accounting-content { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; box-shadow: none !important; }
  .journal-report { margin: 0; font-size: 8pt; }
  .journal-report-heading { grid-template-columns: 1fr auto; padding: 0 0 4mm; border: 0; border-bottom: 1pt solid #000; border-radius: 0; }.journal-report-heading > div { text-align: center; }.journal-report-heading h2 { font-size: 13pt; }.journal-report-heading dl { gap: 5mm; }
  .journal-column-headings, .journal-line { grid-template-columns: 25mm 38mm 1fr 19mm 19mm; gap: 2mm; }.journal-column-headings { padding: 2mm 0; color: #000; background: #fff; border-bottom: 1pt solid #000; }
  .journal-entry { border: 0; border-bottom: .5pt solid #777; }.journal-entry > header { grid-template-columns: repeat(4, 1fr); padding: 2.5mm 0 1mm; background: #fff; }.journal-entry-concept { padding: 0 0 1.5mm; background: #fff; }.journal-line { padding: 1.2mm 0; border: 0; }.journal-line:nth-child(even) { background: #fff; }
  .journal-entry > footer { grid-template-columns: 1fr 19mm 19mm; gap: 2mm; padding: 1.5mm 0 2mm; border-top: .5pt solid #000; }.journal-grand-total { grid-template-columns: 1fr 19mm 19mm; gap: 2mm; padding: 2mm 0; color: #000; background: #fff; border-top: 1.5pt solid #000; border-bottom: 1.5pt solid #000; }
  .journal-report-footnote { margin-top: 2mm; }
}

/* Libro mayor: saldo inicial y acumulado por cuenta. */
.ledger-report { margin-top: 1.15rem; color: #172033; background: #fff; }
.ledger-report-heading { position: relative; display: grid; grid-template-columns: minmax(230px, .75fr) minmax(500px, 1.5fr); align-items: end; gap: 1rem 2rem; padding: 1rem 1.15rem; border: 1px solid #cbd5e1; border-bottom: 3px solid #263548; border-radius: .65rem .65rem 0 0; }
.ledger-report-heading > div > span { color: #475569; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }.ledger-report-heading h2 { margin: .15rem 0 0; color: #172033; font-size: 1.35rem; text-transform: uppercase; }
.ledger-report-heading dl { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .7rem 1.4rem; margin: 0; }.ledger-report-heading dl div { display: grid; gap: .1rem; }.ledger-report-heading dt { color: #64748b; font-size: .68rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }.ledger-report-heading dd { margin: 0; font-weight: 750; }
.ledger-print-button { position: absolute; right: 1rem; top: -3.15rem; margin: 0; }
.ledger-column-headings, .ledger-row { display: grid; grid-template-columns: minmax(90px, .55fr) minmax(145px, .9fr) minmax(85px, .5fr) minmax(300px, 2.2fr) minmax(95px, .6fr) minmax(95px, .6fr) minmax(105px, .7fr); gap: .65rem; }
.ledger-column-headings { padding: .65rem 1rem; color: #dbeafe; background: #1e293b; font-size: .72rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.ledger-account { border: 1px solid #d9e0e8; border-top: 0; }.ledger-account > header { display: grid; grid-template-columns: auto minmax(150px, .35fr) 1fr; gap: .6rem; align-items: baseline; padding: .65rem 1rem; background: #dfe9ef; }.ledger-account > header > span { color: #64748b; font-size: .7rem; font-weight: 850; text-transform: uppercase; }.ledger-account > header .account-code { min-width: 0; color: #17324d; }
.ledger-row { align-items: start; padding: .48rem 1rem; border-top: 1px solid #edf0f4; }.ledger-row:nth-child(odd) { background: #f8fafc; }.ledger-row > a { color: #1d4ed8; font-weight: 800; text-decoration: none; }.ledger-opening { color: #475569; font-style: italic; background: #f8fafc; }.ledger-detail small { display: block; margin-top: .12rem; color: #64748b; }
.ledger-row .amount, .ledger-account > footer .amount, .ledger-grand-total .amount { text-align: right; font-family: Consolas, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-account > footer, .ledger-grand-total { display: grid; grid-template-columns: 1fr minmax(95px, .6fr) minmax(95px, .6fr) minmax(105px, .7fr); gap: .65rem; padding: .58rem 1rem; }.ledger-account > footer { border-top: 1px solid #94a3b8; }.ledger-account > footer > span { text-align: right; font-weight: 850; }
.ledger-grand-total { color: #fff; background: #1e293b; }.ledger-grand-total > span:first-child { text-align: right; font-weight: 850; }
.ledger-report-footnote { margin: .6rem 0 0; color: #64748b; font-size: .76rem; text-align: right; }
@media (max-width: 1050px) { .ledger-report { overflow-x: auto; }.ledger-report-heading, .ledger-column-headings, .ledger-account, .ledger-grand-total, .ledger-report-footnote { min-width: 1080px; }.ledger-print-button { position: static; width: fit-content; }.ledger-report-heading { grid-template-columns: 1fr; }.ledger-report-heading dl { justify-content: flex-start; } }
@media print {
  .ledger-print-button { display: none !important; }
  .ledger-report { width: 100% !important; min-width: 0 !important; margin: 0; overflow: visible !important; font-size: calc(7.5pt + 2px); }
  .ledger-report-heading { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; padding: 0 0 3mm; border: 0; border-bottom: 1pt solid #000; border-radius: 0; }.ledger-report-heading h2 { font-size: 13pt; }.ledger-report-heading dl { gap: 3mm 5mm; }
  .ledger-column-headings, .ledger-row { width: 100%; min-width: 0; grid-template-columns: 15mm 26mm 13mm minmax(0, 1fr) 17mm 17mm 19mm; gap: 1mm; box-sizing: border-box; }
  .ledger-column-headings { padding: 2mm 0; color: #000; background: #fff; border-bottom: 1pt solid #000; font-size: calc(7.5pt + 2px); }
  .ledger-column-headings > *, .ledger-row > * { min-width: 0; overflow-wrap: anywhere; }
  .ledger-account { width: 100%; min-width: 0; border: 0; overflow: visible; }.ledger-account > header { grid-template-columns: 12mm 32mm minmax(0, 1fr); padding: 2.5mm 0 1.5mm; background: #fff; border-top: .6pt solid #777; }.ledger-row { padding: 1.1mm 0; border: 0; }.ledger-row:nth-child(odd), .ledger-opening { background: #fff; }
  .ledger-row .amount, .ledger-account > footer .amount, .ledger-grand-total .amount { display: block !important; min-width: 0; overflow: visible; color: #000 !important; text-align: right; white-space: nowrap; font-size: calc(7.5pt + 2px); }
  .ledger-account > footer, .ledger-grand-total { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) 17mm 17mm 19mm; gap: 1mm; box-sizing: border-box; padding: 1.5mm 0 2mm; }.ledger-account > footer { border-top: .5pt solid #000; border-bottom: .5pt solid #777; }.ledger-grand-total { color: #000; background: #fff; border-top: 1.5pt solid #000; border-bottom: 1.5pt solid #000; }
  .ledger-report-footnote { margin-top: 2mm; }
}

/* Cartera de proveedores: reporte de pagos */
.supplier-payments-report { position: relative; left: 50%; width: min(1580px, calc(100vw - 40px)); max-width: none; margin-inline: 0; transform: translateX(-50%); }
.supplier-payments-filters { grid-template-columns: minmax(140px, .65fr) minmax(140px, .65fr) minmax(300px, 1.7fr) minmax(190px, 1fr) auto; }
.supplier-payments-filters label { display: grid; grid-template-rows: 1.15rem 2.5rem; gap: .35rem; min-width: 0; }
.supplier-payments-filters label > span { font-size: .76rem; font-weight: 800; }
.supplier-payments-filters input, .supplier-payments-filters select { width: 100%; min-width: 0; }
.supplier-payments-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0 .65rem; }
.supplier-payments-summary p { margin: 0; color: var(--color-muted); }
.supplier-payments-summary nav { display: flex; gap: .5rem; }
.supplier-payments-table { min-width: 1240px; font-size: .84rem; }
.supplier-payments-table td small, .supplier-payments-table td > strong { display: block; }
.supplier-payments-table td small { margin-top: .2rem; color: var(--color-muted); }
.supplier-payment-invoice { display: block; white-space: nowrap; }
@media (max-width: 1100px) { .supplier-payments-report { left: auto; width: 100%; margin-inline: auto; transform: none; }.supplier-payments-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }.supplier-payments-table-wrap { overflow-x: auto; } }
@media (max-width: 640px) { .supplier-payments-filters { grid-template-columns: 1fr; }.supplier-payments-summary { align-items: flex-start; flex-direction: column; } }
@media print { .supplier-payments-report { left: auto; width: 100%; transform: none; }.supplier-payments-report .purchases-actions, .supplier-payments-report form, .supplier-payments-summary nav, .side-nav, .site-header { display: none !important; }.supplier-payments-table { min-width: 0; font-size: 8pt; } }
.operator-lines-table { min-width: 980px; font-size: 0.86rem; }
.operator-lines-table .operator-item-payable { display: inline-block; font-size: 1.2em; font-weight: 800; }
.operator-lines-table th { padding: 0.58rem 0.62rem; background: #243044; font-size: 0.7rem; }
.operator-lines-table td { padding: 0.58rem 0.62rem; }
.operator-lines-table code { font-size: 0.78rem; font-weight: 750; }
.operator-empty-cell { color: #94a3b8; }
.operator-lines-table td:first-child { min-width: 310px; }
.operator-lines-table td:first-child > strong, .operator-lines-table td:first-child > small { display: block; }
.operator-lines-table .component-list { min-width: 390px; }
.operator-lines-table .component-list li { gap: 0.12rem; }

/* Panel de compras: proveedores, recurrencia, materiales y cartera. */
.purchase-dashboard { display: grid; gap: .75rem; padding: .7rem; color: #172033; background: #edf2f6; border: 1px solid #91a8bb; border-radius: .4rem; box-shadow: inset 0 0 0 3px #d5e0e8; }
.purchase-dashboard-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; background: #fff; border: 1px solid #aebdca; border-top: 4px solid #12679e; border-radius: .28rem; }
.purchase-dashboard-toolbar h1 { margin: .08rem 0 .15rem; font-size: 1.45rem; }.purchase-dashboard-toolbar p { margin: 0; color: var(--color-muted); font-size: .86rem; }
.purchase-dashboard-toolbar .eyebrow, .purchase-dashboard-section > header span { color: #08769b; font-size: .66rem; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.purchase-dashboard-period { display: grid !important; grid-template-columns: repeat(2,minmax(145px,1fr)) auto; align-items: end !important; gap: .45rem .65rem !important; margin: 0 !important; }
.purchase-dashboard-period label { display: grid; gap: .25rem; color: #334155; font-size: .72rem; font-weight: 850; text-transform: uppercase; }.purchase-dashboard-period .button { min-height: 2.5rem; margin: 0; white-space: nowrap; }
.purchase-dashboard-kpis { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .5rem; }
.purchase-dashboard-kpis > a { display: grid; align-content: start; gap: .25rem; min-height: 112px; padding: .75rem .8rem; overflow: hidden; color: inherit; background: #fff; border: 1px solid #aebdca; border-radius: .28rem; text-decoration: none; box-shadow: 0 2px 5px rgba(15,23,42,.07); transition: transform .15s ease,box-shadow .15s ease; }
.purchase-dashboard-kpis > a:hover,.purchase-dashboard-kpis > a:focus-visible { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(15,23,42,.12); outline: 2px solid #8ecbf0; }
.purchase-dashboard-kpis span { margin: -.75rem -.8rem .35rem; padding: .38rem .55rem; color: #fff; background: #12679e; font-size: .66rem; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }.purchase-dashboard-kpis > a.needs-attention span { background: #b8680d; }
.purchase-dashboard-kpis strong { overflow-wrap: anywhere; font-size: clamp(1.2rem,2vw,1.55rem); font-variant-numeric: tabular-nums; }.purchase-dashboard-kpis small { color: #526074; font-size: .73rem; line-height: 1.3; }
.purchase-dashboard-insights { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; }
.purchase-dashboard-insights article { display: grid; grid-template-columns: auto 1fr; gap: .1rem .65rem; align-items: center; padding: .65rem .8rem; background: #f8fafc; border: 1px solid #b8c5d0; border-left: 4px solid #16803c; border-radius: .25rem; }.purchase-dashboard-insights article.is-warning { border-left-color: #c06c0b; }
.purchase-dashboard-insights span { grid-column: 1/-1; color: #526074; font-size: .65rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }.purchase-dashboard-insights strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }.purchase-dashboard-insights p { margin: 0; color: #526074; font-size: .76rem; line-height: 1.3; }
.purchase-dashboard-section { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #9fb1c0; border-radius: .28rem; box-shadow: 0 2px 6px rgba(15,23,42,.06); }
.purchase-dashboard-section > header { display: flex; align-items: end; justify-content: space-between; gap: .8rem; padding: .48rem .7rem; color: #fff; background: linear-gradient(90deg,#12679e,#177cac); border-bottom: 1px solid #0d527e; }.purchase-dashboard-section > header span { color: #d9f4ff; font-size: .62rem; }.purchase-dashboard-section > header h2 { margin: .08rem 0 0; color: #fff; font-size: .94rem; }.purchase-dashboard-section > header > a { flex-shrink: 0; color: #fff3a8; font-size: .72rem; font-weight: 800; text-decoration: none; }.purchase-dashboard-section > header > a:hover { text-decoration: underline; }
.purchase-dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }.purchase-dashboard-grid-lower { grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); }
.purchase-month-chart { display: grid; grid-auto-columns: minmax(78px,1fr); grid-auto-flow: column; gap: .35rem; min-height: 220px; padding: .8rem .75rem .55rem; overflow-x: auto; }
.purchase-month-chart a { display: grid; grid-template-rows: 1.2rem minmax(105px,1fr) auto auto; gap: .2rem; min-width: 70px; color: inherit; text-align: center; text-decoration: none; }.purchase-month-chart strong { overflow: hidden; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }.purchase-month-chart i { display: flex; align-items: end; justify-content: center; min-height: 105px; padding: 0 .28rem; border-bottom: 1px solid #94a3b8; background: repeating-linear-gradient(to top,#f8fafc 0,#f8fafc 24%,#e5e7eb 25%); }.purchase-month-chart b { width: 100%; height: var(--bar); min-height: 0; background: linear-gradient(#22a5ca,#12679e); border-radius: .2rem .2rem 0 0; }.purchase-month-chart span { font-size: .7rem; font-weight: 850; text-transform: uppercase; }.purchase-month-chart small { color: #64748b; font-size: .65rem; }
.purchase-horizontal-chart,.purchase-frequency-chart,.purchase-material-chart { display: grid; padding: .45rem .7rem .7rem; }
.purchase-horizontal-chart a,.purchase-frequency-chart a,.purchase-material-chart a { display: grid; grid-template-columns: minmax(140px,1.15fr) minmax(90px,1fr) minmax(76px,.45fr); gap: .6rem; align-items: center; min-width: 0; padding: .48rem 0; color: inherit; border-bottom: 1px solid #e2e8f0; text-decoration: none; }.purchase-horizontal-chart a:last-child,.purchase-frequency-chart a:last-child,.purchase-material-chart a:last-child { border-bottom: 0; }
.purchase-horizontal-chart a:hover,.purchase-frequency-chart a:hover,.purchase-material-chart a:hover { background: #f8fafc; }.purchase-horizontal-chart span,.purchase-frequency-chart span,.purchase-material-chart span { min-width: 0; }.purchase-horizontal-chart strong,.purchase-frequency-chart strong,.purchase-material-chart strong { display: block; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }.purchase-horizontal-chart small,.purchase-frequency-chart small,.purchase-material-chart small { display: block; margin-top: .1rem; color: #64748b; font-size: .67rem; }
.purchase-horizontal-chart i,.purchase-frequency-chart i,.purchase-material-chart i { height: .62rem; overflow: hidden; background: #e2e8f0; border-radius: 999px; }.purchase-horizontal-chart b,.purchase-frequency-chart b,.purchase-material-chart b { display: block; width: var(--bar); height: 100%; background: linear-gradient(90deg,#1495bd,#12679e); border-radius: inherit; }.purchase-frequency-chart b { background: linear-gradient(90deg,#22a06b,#16803c); }.purchase-material-chart b { background: linear-gradient(90deg,#7c6ee6,#5546b8); }.purchase-horizontal-chart em,.purchase-frequency-chart em,.purchase-material-chart em { font-size: .76rem; font-style: normal; font-weight: 850; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.purchase-portfolio { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; align-items: center; padding: 1rem; }.purchase-donut { display: grid; width: 124px; aspect-ratio: 1; place-content: center; margin: auto; background: radial-gradient(circle closest-side,#fff 70%,transparent 71%),conic-gradient(#d97706 calc(var(--value)*1%),#dce5eb 0); border-radius: 50%; text-align: center; }.purchase-donut strong { font-size: 1.35rem; }.purchase-donut span { color: #64748b; font-size: .68rem; text-transform: uppercase; }
.purchase-portfolio dl { display: grid; gap: .45rem; margin: 0; }.purchase-portfolio dl div { display: flex; justify-content: space-between; gap: .8rem; padding-bottom: .35rem; border-bottom: 1px solid #e2e8f0; }.purchase-portfolio dt { color: #526074; font-size: .73rem; }.purchase-portfolio dd { margin: 0; font-size: .78rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.purchase-dashboard-empty { margin: 0; padding: 2rem 1rem; color: var(--color-muted); text-align: center; }.purchase-dashboard-note { padding: .35rem .15rem 0; color: #526074; font-size: .7rem; }
@media (max-width:1180px) { .purchase-dashboard-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width:850px) { .purchase-dashboard-grid,.purchase-dashboard-grid-lower { grid-template-columns:1fr; }.purchase-dashboard-insights { grid-template-columns:1fr; }.purchase-dashboard-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .purchase-dashboard { padding:.4rem; }.purchase-dashboard-toolbar { align-items:stretch; }.purchase-dashboard-period { width:100%; grid-template-columns:1fr 1fr; }.purchase-dashboard-period .button { grid-column:1/-1; }.purchase-dashboard-kpis { grid-template-columns:1fr; }.purchase-horizontal-chart a,.purchase-frequency-chart a,.purchase-material-chart a { grid-template-columns:minmax(120px,1fr) minmax(70px,.75fr); }.purchase-horizontal-chart em,.purchase-frequency-chart em,.purchase-material-chart em { grid-column:2; }.purchase-portfolio { grid-template-columns:1fr; } }
.line-actions { display: flex; align-items: center; gap: 0.25rem; white-space: nowrap; }
.line-actions form { margin: 0; }
.icon-button { display: inline-grid; width: 2rem; height: 2rem; place-items: center; padding: 0; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 0.4rem; cursor: pointer; }
.icon-button:hover { color: #1e3a8a; background: #dbeafe; }
.icon-button svg { width: 1rem; height: 1rem; fill: currentColor; }
.icon-button-danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.icon-button-danger:hover { color: #7f1d1d; background: #fee2e2; }

/* Controles compactos: cerca de 30% menos altos que los formularios originales. */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="search"],
input[type="url"], input[type="date"], input[type="time"], select {
    min-height: var(--control-height);
    padding: 0.48rem 0.72rem !important;
    color: var(--color-text);
    background-color: var(--control-bg);
    border: 1px solid var(--control-border) !important;
    border-radius: 0.52rem !important;
    box-shadow: 0 1px 2px rgba(5, 8, 23, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-size: 0.94rem;
    line-height: 1.25;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
select {
    appearance: none;
    padding-right: 2.15rem !important;
    background-image: linear-gradient(45deg, transparent 50%, #526074 50%), linear-gradient(135deg, #526074 50%, transparent 50%);
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}
textarea {
    padding: 0.55rem 0.72rem !important;
    color: var(--color-text);
    background: var(--control-bg);
    border: 1px solid var(--control-border) !important;
    border-radius: 0.52rem !important;
    box-shadow: 0 1px 2px rgba(5, 8, 23, 0.04);
    font-size: 0.94rem;
    line-height: 1.35;
    resize: vertical;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover,
input[type="number"]:hover, input[type="tel"]:hover, input[type="search"]:hover,
input[type="url"]:hover, input[type="date"]:hover, input[type="time"]:hover,
select:hover, textarea:hover {
    border-color: #9aabc0 !important;
    background-color: #fff;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="number"]:focus, input[type="tel"]:focus, input[type="search"]:focus,
input[type="url"]:focus, input[type="date"]:focus, input[type="time"]:focus,
select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-focus) !important;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(7, 94, 232, 0.12), 0 3px 9px rgba(5, 8, 23, 0.06) !important;
}
input::placeholder, textarea::placeholder { color: #7b899c; opacity: 1; }
input:disabled, select:disabled, textarea:disabled {
    color: #64748b;
    background-color: #eef2f7;
    cursor: not-allowed;
    opacity: 0.78;
}
.field-row > label, .registration-field > label, .process-form-grid label,
.form-section form p > label, .checkout-form p > label {
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}
.site-footer { background: var(--brand-dark); color: #ddd; padding: 1.5rem; border-top: 5px solid transparent; border-image: var(--brand-gradient) 1; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
@media (max-width: 768px) {
    .nav-bar { flex-direction: column; align-items: flex-start; }
    .nav-bar nav { display: flex; flex-wrap: wrap; gap: 0.6rem; }
    .nav-bar a { margin-right: 0; }
    .auth-links { width: 100%; flex-wrap: wrap; }
    .app-menu-panel { right: auto; left: 0; }
    .side-nav { position: static; width: 100%; max-height: none; padding: 0.6rem 1rem; border-right: 0; border-bottom: 1px solid #26354c; box-shadow: none; }
    .side-nav:hover, .side-nav:focus-within { width: 100%; }
    .side-nav nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .side-nav-link { padding: 0.45rem; }
    .side-nav-link > span:last-child { opacity: 1; }
    .side-nav-group { display: none; }
    body.has-side-nav main { width: 100%; margin: 1rem 0; }
    main { padding: 0 1rem; margin-top: 1rem; }
    .hero { min-height: 430px; background-size: auto 100%; background-position: center; }
    .hero-block { padding: 1rem; }
    .cards { grid-template-columns: 1fr; }
    .registration-form { grid-template-columns: 1fr; }
    .registration-field-wide, .registration-form > .button { grid-column: auto; }
    .top-menu, .group-menu, .cart-actions { align-items: stretch; flex-direction: column; }
    .group-link, .cart-actions .button { width: 100%; }
    .order-summary { justify-items: stretch; text-align: left; }
    .workspace-heading, .order-detail-heading, .builder-card-heading { flex-direction: column; }
    .builder-fields-2, .builder-fields-3, .operator-client-bar, .confirm-order-form { grid-template-columns: 1fr; }
    .order-total { justify-items: start; }
    .job-summary { grid-template-columns: 1fr; }
    .job-components, .job-components > div { grid-column: auto; display: grid; }
    .process-admin-summary, .process-form-grid { grid-template-columns: 1fr; }
    .process-form-grid .field-wide { grid-column: auto; }
    .process-admin-search > div { flex-direction: column; }
    .operator-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; }
    .operator-grid-field, .operator-field-sku, .operator-field-measure,
    .operator-field-quantity, .operator-field-calculated, .operator-field-observation,
    .operator-field-file { grid-column: span 1; }
    .operator-field-observation { grid-column: 1 / -1; }
    .operator-grid-extras { grid-template-columns: 1fr; align-items: stretch; }
    .operator-add-row { width: 100%; }
    .operator-product-results { width: 100%; }
}

/* Menú operativo lateral: panel desplegable, inspirado en patrones de portales institucionales. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.side-menu-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: #fff; background: transparent; border: 1px solid #9db6d5; border-radius: 0.35rem; cursor: pointer; font-size: 1.18rem; }
.side-menu-toggle:hover, .side-menu-toggle:focus-visible { background: #174ea6; outline: 2px solid #7ee8f6; outline-offset: 2px; }
.side-menu-backdrop { position: fixed; inset: 0; z-index: 58; background: rgba(5, 8, 23, 0.42); }
.side-nav { position: fixed; top: 74px; bottom: 0; left: 0; z-index: 60; width: min(320px, calc(100vw - 24px)); padding: 0; overflow: hidden auto; color: #172033; background: #fff; border: 0; border-right: 1px solid #cbd5e1; box-shadow: 8px 0 28px rgba(5, 8, 23, 0.24); transform: translateX(-105%); transition: transform 0.2s ease; }
.side-nav:hover, .side-nav:focus-within { width: min(320px, calc(100vw - 24px)); }
body.side-menu-open { overflow: hidden; }
body.side-menu-open .side-nav { transform: translateX(0); }
.side-nav-header { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0.8rem 1rem; color: #fff; background: #174ea6; }
.side-menu-close { width: 32px; height: 32px; color: #fff; background: transparent; border: 0; border-radius: 0.3rem; cursor: pointer; font-size: 1.55rem; line-height: 1; }
.side-menu-close:hover, .side-menu-close:focus-visible { background: rgba(255, 255, 255, 0.18); outline: 2px solid #fff; }
.side-menu-search { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1rem; border-bottom: 1px solid #dce3ec; color: #526074; }
.side-menu-search input { flex: 1; min-width: 0; border: 1px solid #aeb9c8 !important; border-radius: 0.3rem !important; }
.side-menu-clear { width: 27px; height: 27px; padding: 0; color: #334155; background: transparent; border: 0; cursor: pointer; font-size: 1.35rem; }
.side-nav nav { display: block; }
.side-nav-link, .side-menu-section summary { display: flex; align-items: center; gap: 0.7rem; min-height: 47px; padding: 0.65rem 1rem; color: #283548; background: #fff; border-bottom: 1px solid #e2e8f0; border-radius: 0; text-decoration: none; white-space: normal; font-size: 0.88rem; font-weight: 650; }
.side-nav-link:hover, .side-nav-link:focus-visible, .side-menu-section summary:hover { color: #0f3f80; background: #eff6ff; outline: none; }
.side-nav > nav > .side-nav-link { font-weight: 750; }
.side-nav-icon { display: grid; place-items: center; width: 24px; min-width: 24px; height: 24px; color: #16436e; background: transparent; border: 0; border-radius: 0; font-size: 1rem; font-weight: 850; }
.side-menu-section summary { cursor: pointer; list-style: none; }
.side-menu-section summary::-webkit-details-marker { display: none; }
.side-menu-section summary::after { content: '›'; margin-left: auto; color: #526074; font-size: 1.15rem; transition: transform 0.15s ease; }
.side-menu-section[open] summary { background: #e8eef5; }
.side-menu-section[open] summary::after { transform: rotate(90deg); }
.side-menu-section > div .side-nav-link { min-height: 40px; padding-left: 3.65rem; font-weight: 500; }
.side-menu-section[hidden], .side-nav-link[hidden] { display: none; }
.side-nav-link.active { color: #0f3f80; background: #dbeafe; box-shadow: inset 4px 0 0 #075ee8; font-weight: 800; }
.side-nav-link.active .side-nav-icon { color: #075ee8; }
.side-menu-section[open] > summary { color: #0f3f80; background: #e8eef5; font-weight: 800; }
.side-menu-section > div { background: #f8fafc; }
.operations-home { max-width: 1400px; margin-inline: auto; }
.operations-dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 1rem; }
.operations-task-card { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: .35rem; min-height: 210px; padding: 1rem 1.1rem; color: inherit; background: #fff; border: 1px solid #d6dde7; border-top: 4px solid #075ee8; border-radius: .65rem; text-decoration: none; box-shadow: 0 5px 16px rgba(15, 23, 42, .05); }
.operations-task-card:hover, .operations-task-card:focus-visible { border-color: #075ee8; transform: translateY(-2px); box-shadow: 0 9px 24px rgba(15, 23, 42, .1); outline: none; }
.operations-task-card > span { color: var(--color-muted); font-size: .7rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.operations-task-card > strong { color: #075ee8; font-size: 2rem; line-height: 1; }
.operations-task-card h2 { margin: .1rem 0; font-size: 1.05rem; }
.operations-task-card p { color: var(--color-muted); font-size: .88rem; }
.operations-task-card small { color: #075985; font-weight: 800; }


.retention-xml-heading { align-items: center; margin-bottom: 1.1rem; }
.supplier-tax-review { margin: 1.25rem 0; padding: 1.15rem; background: #f7fbff; border: 1px solid #bfdbfe; border-left: 5px solid #075ee8; border-radius: .7rem; }
.supplier-tax-review h2 { margin-bottom: .35rem; font-size: 1.25rem; }
.supplier-tax-review > p { color: var(--color-muted); }
.supplier-tax-review form { display: grid; gap: .9rem; margin-top: 1rem; }
.supplier-tax-question { padding: .9rem 1rem; background: #fff; border: 1px solid #d6e2ef; border-radius: .55rem; }
.supplier-tax-question legend { padding: 0 .35rem; color: #172033; font-weight: 800; }
.supplier-tax-question ul { display: flex; flex-wrap: wrap; gap: .55rem; margin: .35rem 0 .45rem; list-style: none; }
.supplier-tax-question label { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .65rem; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: .4rem; cursor: pointer; }
.supplier-tax-question input { width: auto; min-height: auto; }
.supplier-tax-question small { display: block; color: var(--color-muted); }
.supplier-tax-review .button { justify-self: start; margin: 0; }
.supplier-tax-caution { margin-top: .8rem; padding: .65rem .75rem; color: #854d0e !important; background: #fffbeb; border-radius: .4rem; font-size: .88rem; }
.retention-resolution-page { max-width: 1400px; margin-inline: auto; }
.retention-resolution-heading { align-items: end; }
.retention-resolution-summary { display: grid; grid-template-columns: 1fr 1.65fr .8fr .9fr; gap: .7rem; margin-bottom: 1rem; }
.retention-resolution-summary > div { display: grid; align-content: start; gap: .2rem; min-width: 0; padding: .85rem 1rem; background: #fff; border: 1px solid #d6dde7; border-top: 3px solid #075ee8; border-radius: .5rem; }
.retention-resolution-summary span:not(.purchase-status), .retention-result-grid span, .retention-card-eyebrow { color: var(--color-muted); font-size: .7rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.retention-resolution-summary strong { overflow-wrap: anywhere; color: #172033; }
.retention-resolution-summary small, .retention-result-grid small { color: var(--color-muted); }
.retention-resolution-card { overflow: hidden; background: #fff; border: 1px solid #d6dde7; border-radius: .55rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
.retention-resolution-card > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid #e5e9ef; }
.retention-resolution-card h2 { margin: .15rem 0 0; color: #172033; font-size: 1.2rem; }
.retention-resolution-card > p, .retention-resolution-help { margin: 0; padding: .85rem 1.15rem; color: var(--color-muted); }
.retention-resolution-success { border-left: 5px solid #16803c; }
.retention-resolution-warning { border-left: 5px solid #d97706; }
.retention-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #e5e9ef; }
.retention-result-grid > div { display: grid; gap: .25rem; padding: 1rem 1.15rem; background: #fff; }
.retention-result-grid strong { color: #172033; font-size: 1rem; overflow-wrap: anywhere; }
.retention-pending-list { display: grid; gap: .5rem; margin: 0; padding: 1rem 1.15rem 1rem 2.25rem; background: #fffbeb; color: #78350f; }
.retention-card-actions { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0 1.15rem 1.15rem; }
.retention-card-actions .button, .retention-retry-form .button { margin: 0; }
.retention-retry-form { padding: 0 1.15rem 1.15rem; }
@media (max-width: 900px) { .retention-resolution-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.retention-result-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .retention-resolution-summary { grid-template-columns: 1fr; }.retention-resolution-card > header { align-items: flex-start; flex-direction: column; } }

.retention-xml-heading h1 { margin: .2rem 0 .35rem; font-size: clamp(1.65rem, 3.5vw, 2.25rem); }
.retention-xml-heading p { color: var(--color-muted); }
.retention-xml-heading .status-badge { padding: .38rem .8rem; }
.retention-xml-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.retention-xml-summary > div { display: grid; gap: .2rem; min-width: 0; padding: .85rem 1rem; background: #fff; border: 1px solid var(--color-border); border-top: 3px solid var(--brand-cyan); border-radius: .65rem; }
.retention-xml-summary span, .retention-xml-toolbar p { color: var(--color-muted); font-size: .76rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.retention-xml-summary strong { overflow-wrap: anywhere; color: #1e293b; }
.retention-xml-summary small { color: var(--color-muted); }
.retention-xml-viewer { overflow: hidden; background: #fff; border: 1px solid var(--color-border); border-radius: .75rem; box-shadow: 0 6px 20px rgba(15, 23, 42, .05); }
.retention-xml-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; padding: .9rem 1rem; border-bottom: 1px solid var(--color-border); }
.retention-xml-toolbar h2 { margin: 0 0 .18rem; color: #172033; font-size: 1.05rem; }
.retention-xml-toolbar p { margin: 0; font-size: .7rem; }
.retention-xml-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.retention-xml-actions .button { min-height: 2.4rem; margin: 0; padding: .48rem .85rem; font-size: .88rem; }
.retention-xml-code-frame { max-height: min(68vh, 820px); overflow: auto; background: #f8fafc; }
.retention-xml-code { margin: 0; padding: 1rem 1.1rem; color: #1e293b; font: .86rem/1.6 Consolas, "SFMono-Regular", "Liberation Mono", monospace; tab-size: 2; white-space: pre; }
.button.button-compact { min-height: .675rem; margin: 0; padding: .126rem .24rem; font-size: .246rem; line-height: 1.2; white-space: nowrap; }
.xml-preview-icon { display: inline-grid; width: 1.75rem; height: 1.75rem; place-items: center; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: .28rem; text-decoration: none; vertical-align: middle; }
.xml-preview-icon img { display: block; width: 1rem; height: 1rem; object-fit: contain; image-rendering: crisp-edges; }
.xml-preview-icon:hover, .xml-preview-icon:focus-visible { color: #fff; background: var(--brand-blue); border-color: var(--brand-blue); outline: none; }
.retencion-sri-celda { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.retencion-sri-indicador { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid currentColor; vertical-align: middle; }
.retencion-sri-indicador svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.retencion-sri-pendiente { color: #8a6200; background: #fff8dc; }
.retencion-sri-cola { color: #1756a0; background: #eaf3ff; }
.retencion-sri-proceso { color: #5b47a5; background: #f2edff; }
.retencion-sri-autorizada { color: #147347; background: #e9f8f0; }
.retencion-sri-alerta { color: #a12a27; background: #fff0ee; }
.retencion-sri-leyenda { margin: .4rem 0 .8rem; font-size: .85rem; color: var(--color-muted); }
.retencion-xml-revision { max-height: 26rem; overflow: auto; padding: 1rem; background: #f5f7fb; white-space: pre-wrap; overflow-wrap: anywhere; }
.purchase-invoice-reference { display: inline-flex; align-items: center; gap: .45rem; }
.purchases-table .purchase-document-type { width: 1%; padding-inline: .45rem; text-align: center; white-space: nowrap; }
.purchase-document-type span { display: inline-flex; min-width: 1.8rem; justify-content: center; padding: .18rem .35rem; color: #334155; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: .3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.equivalence-receivers { min-width: 8.5rem; }
.equivalence-receiver-badge { display: inline-flex; margin: 0 .25rem .15rem 0; padding: .14rem .38rem; border: 1px solid #94a3b8; border-radius: 999px; background: #f8fafc; color: #334155; font-size: .72rem; font-weight: 850; }
.equivalence-receiver-cédula { border-color: #7dd3fc; background: #f0f9ff; color: #075985; }
.equivalence-receiver-ruc { border-color: #86efac; background: #f0fdf4; color: #166534; }
.invoice-preview-icon { display: inline-grid; flex: 0 0 auto; width: 1.75rem; height: 1.75rem; place-items: center; color: #075985; background: #ecfeff; border: 1px solid #a5e7ef; border-radius: .28rem; text-decoration: none; }
.invoice-preview-icon svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.invoice-preview-icon:hover, .invoice-preview-icon:focus-visible { color: #fff; background: #075985; border-color: #075985; outline: none; }
.purchases-page { max-width: 1400px; margin-inline: auto; padding: 0; }
.purchase-upload-page { max-width: 1180px; margin-inline: auto; }
.treasury-bank-summary { display: grid; grid-template-columns: 1.5fr repeat(2, minmax(160px, .7fr)); gap: .75rem; margin: 0 0 1rem; }
.treasury-bank-summary > div { display: grid; gap: .2rem; padding: .8rem 1rem; background: #fff; border: 1px solid #d6dde7; border-top: 3px solid #1683a8; border-radius: .5rem; }
.treasury-bank-summary span { color: var(--color-muted); font-size: .72rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.treasury-bank-summary strong { color: #172033; overflow-wrap: anywhere; }
.bank-import-card { max-width: 760px; padding: 1.2rem; background: #fff; border: 1px solid #d6dde7; border-radius: .65rem; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.bank-import-card h2 { margin-top: 0; color: #172033; }
.bank-import-card code { display: block; padding: .75rem; overflow-x: auto; color: #0f3f80; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: .4rem; }
.bank-import-card form { display: grid; gap: 1rem; margin-top: 1rem; }
.bank-import-card input[type="file"] { width: 100%; }
.bank-import-card .button { justify-self: start; margin: 0; }
@media (max-width: 700px) { .treasury-bank-summary { grid-template-columns: 1fr; } }
.purchase-upload-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .75fr); gap: 1rem; align-items: start; }
.purchase-upload-card, .purchase-upload-checks, .purchase-preview-card { background: #fff; border: 1px solid #d6dde7; border-radius: .65rem; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.purchase-upload-card { display: grid; gap: 1rem; padding: 1.15rem; }
.purchase-upload-card > header { display: flex; gap: .8rem; align-items: flex-start; }
.purchase-upload-card h2, .purchase-upload-checks h2, .purchase-preview-card h2 { margin: 0 0 .25rem; color: #172033; font-size: 1.08rem; }
.purchase-upload-card header p, .purchase-upload-checks p, .purchase-preview-card header p { margin: 0; color: var(--color-muted); font-size: .88rem; }
.purchase-upload-step { display: inline-flex; flex: 0 0 auto; padding: .22rem .5rem; color: #075985; background: #ecfeff; border: 1px solid #a5e7ef; border-radius: .3rem; font-size: .7rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.purchase-file-field { display: grid; grid-template-columns: auto minmax(170px, 1fr) minmax(210px, .9fr); gap: .8rem; align-items: center; padding: 1rem; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: .55rem; cursor: pointer; }
.purchase-file-field:hover { background: #f0f9ff; border-color: #1683a8; }
.purchase-file-field > span:nth-child(2) { display: grid; gap: .15rem; }
.purchase-file-field small { color: var(--color-muted); font-size: .78rem; }
.purchase-file-field input { width: 100%; min-width: 0; margin: 0; }
.purchase-file-icon { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; color: #075985; background: #e0f2fe; border-radius: 50%; }
.purchase-file-icon svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.purchase-upload-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.purchase-upload-actions .button { min-height: 2.5rem; margin: 0; border-radius: .38rem; }
.purchase-upload-actions #preview-status { color: var(--color-muted); font-size: .84rem; font-weight: 700; }
.purchase-upload-note { margin: 0; padding: .7rem .8rem; color: #475569; background: #f8fafc; border-left: 4px solid #1683a8; font-size: .82rem; }
.purchase-upload-checks { padding: 1.15rem; border-top: 3px solid #16803c; }
.purchase-upload-checks .purchase-upload-step { margin-bottom: .65rem; color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.purchase-upload-checks ul { display: grid; gap: .55rem; margin: .9rem 0 0; padding-left: 1.15rem; color: #334155; font-size: .86rem; }
.purchase-preview-card { margin-top: 1rem; overflow: hidden; }
.purchase-preview-card > header { padding: 1rem 1.15rem; border-bottom: 1px solid #d6dde7; }
.purchase-preview-card .purchase-upload-step { margin-bottom: .5rem; }
.purchase-preview-card iframe { display: block; width: 100%; height: 72vh; min-height: 560px; border: 0; background: #eef1f4; }
.purchase-upload-card .errorlist { margin: -.45rem 0 0; }
@media (max-width: 820px) { .purchase-upload-layout { grid-template-columns: 1fr; }.purchase-file-field { grid-template-columns: auto 1fr; }.purchase-file-field input { grid-column: 1 / -1; } }
@media (max-width: 520px) { .purchase-file-field { grid-template-columns: 1fr; }.purchase-file-icon { display: none; }.purchase-upload-actions .button { width: 100%; }.purchase-preview-card iframe { min-height: 480px; } }
.purchases-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.1rem; }
.purchases-heading h1 { margin: 0 0 .2rem; font-size: clamp(1.75rem, 3vw, 2.3rem); font-weight: 500; letter-spacing: .01em; text-transform: uppercase; }
.purchases-heading p { color: var(--color-muted); }
.purchases-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.purchases-actions .button { min-height: 2.5rem; margin: 0; padding: .5rem .85rem; border-radius: .38rem; font-size: .88rem; }
.document-actions { align-items: stretch; margin: 1rem 0; padding: .75rem; background: linear-gradient(120deg, #f8fbfa, #eef7f3); border: 1px solid #d2e4dc; border-radius: .6rem; box-shadow: 0 3px 10px rgba(34, 78, 60, .055); }
.document-actions .document-action-button { color: #285b48; background: linear-gradient(110deg, #f4faf7, #dcefe7); border: 1px solid #b8d8ca; box-shadow: 0 2px 5px rgba(41, 91, 72, .09); }
.document-actions .document-action-button:hover { color: #1f4c3a; background: linear-gradient(110deg, #eaf6f0, #cce7db); border-color: #96c5b2; filter: none; }
.document-action-form { display: flex; margin: 0; }
.document-actions .document-retry-button { color: #fff; background: linear-gradient(110deg, #5d927b, #3f765f); border: 1px solid #376a55; box-shadow: 0 3px 8px rgba(39, 91, 68, .18); }
.document-actions .document-retry-button:hover { background: linear-gradient(110deg, #548a73, #356c56); filter: none; }
.document-actions :is(.document-action-button, .document-retry-button):focus-visible { outline: 3px solid rgba(63, 118, 95, .28); outline-offset: 2px; }
@media (max-width: 760px) { .document-actions, .document-action-form { width: 100%; }.document-actions .button { width: 100%; white-space: normal; }.document-action-form { flex: 1 1 100%; } }
.purchases-filters { display: grid; grid-template-columns: minmax(210px, 1.35fr) repeat(3, minmax(145px, .8fr)) auto auto; gap: .7rem; align-items: stretch; padding: 1rem; background: #fff; border: 1px solid #d6dde7; border-radius: .55rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
.purchases-filters label { display: grid; grid-template-rows: 1.15rem 2.5rem; gap: .4rem; min-width: 0; margin: 0; }
.purchases-filters label > span { display: flex; align-items: center; height: 1.15rem; margin: 0; color: #263548; font-size: .78rem; font-weight: 800; line-height: 1.15rem; }
.purchases-filters input, .purchases-filters select { width: 100%; height: 2.5rem; min-width: 0; margin: 0; }
.purchases-filter-button { align-self: end; height: 2.5rem; min-height: 2.5rem; margin: 0; padding: .48rem .85rem; border-radius: .38rem; white-space: nowrap; }
.purchases-clear { display: inline-flex; align-items: center; justify-content: center; align-self: end; height: 2.5rem; padding: 0 .75rem; color: #475569; border: 1px solid #94a3b8; border-radius: .38rem; font-size: .85rem; font-weight: 700; text-decoration: none; }
.purchases-count { margin: 1rem 0 .55rem; color: var(--color-muted); font-size: .9rem; }
.purchases-table-wrap { overflow-x: auto; border: 1px solid #d6dde7; border-radius: .35rem; background: #fff; }
.purchases-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: .86rem; }
.purchases-table th, .purchases-table td { padding: .7rem .75rem; border-bottom: 1px solid #e5e9ef; text-align: left; vertical-align: middle; }
.purchases-table thead th { color: #263548; background: #eef1f4; font-size: .76rem; font-weight: 850; white-space: nowrap; }
.purchases-table tbody tr:nth-child(even) { background: #fafbfc; }
.purchases-table tbody tr:hover { background: #f0f7f6; }
.purchases-table tbody tr:last-child td { border-bottom: 0; }
.purchases-table td small { display: block; color: var(--color-muted); font-size: .74rem; }
.purchases-table .amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.purchase-status { display: inline-flex; padding: .18rem .45rem; border-radius: .25rem; color: #334155; background: #e2e8f0; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.purchase-status-registrada { color: #166534; background: #dcfce7; }
.purchase-status-requiere_revision, .purchase-status-error { color: #991b1b; background: #fee2e2; }
.purchase-status-asentada_retencion_pendiente { color: #854d0e; background: #fef3c7; }
.payables-page { position: relative; left: 50%; width: min(1580px, calc(100vw - 40px)); max-width: none; margin-inline: 0; transform: translateX(-50%); }
.payables-heading { align-items: center; }
.payables-heading p { max-width: 760px; margin: .15rem 0 0; }
.payables-eyebrow { display: block; margin-bottom: .25rem; color: #08769b; font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.payables-filters { grid-template-columns: minmax(320px, 1fr) minmax(180px, 220px) auto auto; }
.payables-table-wrap { overflow-x: visible; }
.payables-table { min-width: 0; table-layout: fixed; font-size: .79rem; }
.payables-table th, .payables-table td { padding: .62rem .58rem; }
.payables-table thead th { white-space: normal; line-height: 1.15; }
.payables-col-provider { width: 21%; }
.payables-col-xml { width: 6%; }
.payables-col-date { width: 8%; }
.payables-col-amount { width: 9%; }
.payables-col-status { width: 8%; }
.payables-col-action { width: 13%; }
.payables-provider { overflow-wrap: anywhere; }
.payables-provider strong { display: block; color: #172033; line-height: 1.25; }
.payables-provider small { margin-top: .18rem; }
.payables-xml-code { display: inline-flex; min-width: 2rem; justify-content: center; padding: .15rem .35rem; color: #075985; background: #ecfeff; border: 1px solid #a5e7ef; border-radius: .25rem; font-weight: 850; }
.payables-balance strong { color: #172033; font-size: .88rem; }
.payables-status { display: inline-flex; padding: .2rem .45rem; border-radius: .3rem; font-size: .7rem; font-weight: 850; white-space: nowrap; }
.payables-status-abierta { color: #854d0e; background: #fef3c7; }
.payables-status-vencida { color: #991b1b; background: #fee2e2; }
.payables-status-pagada { color: #166534; background: #dcfce7; }
.payables-action-cell { text-align: right !important; }
.button.payables-action { min-height: 2rem; margin: 0; padding: .36rem .58rem; border-radius: .35rem; font-size: .74rem; line-height: 1.15; white-space: nowrap; }
@media (max-width: 1100px) {
    .payables-page { position: static; left: auto; width: 100%; margin-inline: auto; transform: none; }
    .payables-table-wrap { overflow-x: auto; }
    .payables-table { min-width: 1120px; }
}
@media (max-width: 768px) {
    .payables-filters { grid-template-columns: 1fr; }
    .payables-filters .purchases-search { grid-column: auto; }
}
.purchase-row-actions { display: flex; flex-wrap: wrap; gap: .3rem .65rem; min-width: 130px; }
.purchase-row-actions a { color: #075985; font-weight: 750; white-space: nowrap; }
.purchase-row-actions span { color: #94a3b8; }
.journal-entry-icon { display: inline-grid; flex: 0 0 auto; width: 1.75rem; height: 1.75rem; place-items: center; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: .28rem; text-decoration: none; }
.journal-entry-icon svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.journal-entry-icon:hover, .journal-entry-icon:focus-visible { color: #fff; background: #1d4ed8; border-color: #1d4ed8; outline: none; }
.journal-entry-retention-icon { color: #6d28d9; background: #f5f3ff; border-color: #c4b5fd; }
.journal-entry-retention-icon:hover, .journal-entry-retention-icon:focus-visible { background: #6d28d9; border-color: #6d28d9; }
.purchases-empty { padding: 2.5rem !important; color: var(--color-muted); text-align: center !important; }
.equivalences-page { max-width: 1400px; margin-inline: auto; }
.equivalence-filters { display: grid; grid-template-columns: minmax(260px, 1.6fr) repeat(2, minmax(160px, .75fr)) auto auto; gap: .7rem; align-items: end; padding: 1rem; background: #fff; border: 1px solid #d6dde7; border-radius: .55rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
.equivalence-filters label { display: grid; gap: .3rem; min-width: 0; }
.equivalence-filters label > span { color: #263548; font-size: .78rem; font-weight: 800; }
.equivalence-filters input, .equivalence-filters select { width: 100%; min-width: 0; }
.equivalence-table-wrap { overflow-x: hidden; }
.equivalence-table { min-width: 0; table-layout: fixed; font-size: .78rem; }
.equivalence-table th, .equivalence-table td { padding: .55rem .48rem; overflow-wrap: anywhere; }
.equivalence-table thead th { white-space: normal; line-height: 1.2; }
.equivalence-col-supplier { width: 17%; }
.equivalence-col-code { width: 9%; }
.equivalence-col-description { width: 19%; }
.equivalence-col-destination { width: 10%; }
.equivalence-col-internal { width: 25%; }
.equivalence-col-status { width: 15%; }
.equivalence-col-action { width: 5%; }
.equivalence-ruc, .equivalence-confidence { margin-top: .22rem; white-space: nowrap; }
.equivalence-destination { display: inline-block; max-width: 100%; }
.equivalence-action-cell { text-align: center !important; white-space: nowrap; }
.equivalence-edit-button { display: inline-grid; width: 1.65rem; height: 1.65rem; place-items: center; color: #075985; background: #ecfeff; border: 1px solid #a5e7ef; border-radius: .3rem; text-decoration: none; }
.equivalence-edit-button:hover, .equivalence-edit-button:focus-visible { color: #fff; background: #075985; border-color: #075985; outline: none; }
.equivalence-edit-button svg { width: .82rem; height: .82rem; fill: currentColor; }
.purchase-reception-page { max-width: 1400px; margin-inline: auto; }
.reception-heading { align-items: end; }
.reception-heading > .button { min-height: 2.5rem; margin: 0; padding: .5rem .85rem; border-radius: .38rem; }
.reception-summary { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(280px, 1.7fr) minmax(150px, .6fr); gap: 1px; margin-bottom: .8rem; overflow: hidden; background: #d6dde7; border: 1px solid #d6dde7; border-radius: .55rem; }
.reception-summary > div { display: grid; gap: .18rem; align-content: center; min-width: 0; padding: .75rem .9rem; background: #fff; }
.reception-summary span { color: var(--color-muted); font-size: .72rem; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.reception-summary strong { overflow-wrap: anywhere; color: #1e293b; }
.reception-summary .purchase-status { width: fit-content; }
.reception-note { margin: 0 0 1rem; color: var(--color-muted); font-size: .88rem; }
.reception-form { display: grid; gap: 1rem; }
.reception-table { min-width: 1000px; }
.reception-quantity { width: 42%; }
.reception-quantity input:not([type="checkbox"]), .reception-quantity select { width: 100%; min-width: 0; }
.reception-quantity input[type="number"] { text-align: right; }
.reception-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .65rem 1rem; align-items: start; }
.reception-control { min-width: 0; display: grid; gap: .25rem; }
.reception-control label { display: block; font-size: .82rem; line-height: 1.4; }
.reception-confirmation { grid-column: 1 / -1; display: flex; flex-direction: row-reverse; justify-content: end; align-items: start; gap: .6rem; }
.reception-quantity .reception-confirmation input[type="checkbox"] { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: .1rem; }
.reception-confirmation label { flex: 1; }
.reception-conversion-help { margin-top: .65rem; color: var(--color-muted); font-size: .78rem; }
.reception-area-preview { margin-top: .5rem; color: #16436e; font-weight: 650; }
.reception-table td { vertical-align: top; }
.reception-quantity .errorlist { margin-top: .25rem; white-space: normal; }
.reception-footer { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1rem; background: #fff; border: 1px solid #d6dde7; border-radius: .55rem; }
.reception-footer .field-row { flex: 1; max-width: 720px; }
.reception-footer textarea { width: 100%; min-height: 4rem; }
.reception-footer .button { flex: 0 0 auto; min-height: 2.5rem; margin: 0; border-radius: .38rem; }
.inventory-page { max-width: 1500px; margin-inline: auto; }
.inventory-filters, .inventory-movement-filters { display: grid; gap: .7rem; align-items: end; padding: 1rem; background: #fff; border: 1px solid #d6dde7; border-radius: .55rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
.inventory-filters { grid-template-columns: minmax(280px, 1fr) 180px 210px 145px auto; }
.inventory-movement-filters { grid-template-columns: minmax(230px, 1fr) 200px 155px 155px 145px auto; }
.inventory-filters label, .inventory-movement-filters label { display: grid; grid-template-rows: 1.15rem 2.5rem; gap: .4rem; min-width: 0; }
.inventory-filters label > span, .inventory-movement-filters label > span { display: flex; align-items: center; height: 1.15rem; color: #263548; font-size: .78rem; font-weight: 800; }
.inventory-filters input, .inventory-filters select, .inventory-movement-filters input, .inventory-movement-filters select { width: 100%; height: 2.5rem; min-width: 0; margin: 0; }
.inventory-filters .purchases-filter-button, .inventory-movement-filters .purchases-filter-button { width: 145px; height: 2.5rem; min-height: 2.5rem; margin: 0; }
.inventory-filters .purchases-clear, .inventory-movement-filters .purchases-clear { display: inline-flex; align-items: center; justify-content: center; height: 2.5rem; padding: 0 .75rem; color: #334155; background: #fff; border: 1px solid #94a3b8; border-radius: .38rem; text-decoration: none; white-space: nowrap; }
.inventory-summary { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: .7rem; margin: 1rem 0; }
.inventory-summary > div { display: grid; gap: .2rem; padding: .8rem 1rem; background: #fff; border: 1px solid #d6dde7; border-top: 3px solid #16803c; border-radius: .5rem; }
.inventory-summary span { color: var(--color-muted); font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.inventory-summary strong { color: #172033; font-size: 1.15rem; }
.inventory-table { min-width: 1250px; }
.inventory-movements-table { min-width: 1550px; }
.inventory-detail-link { display: inline-flex; padding: .25rem .5rem; color: #075985; background: #ecfeff; border: 1px solid #bae6fd; border-radius: .3rem; font-size: .75rem; font-weight: 800; text-decoration: none; }
.inventory-detail-link:hover { color: #fff; background: #075985; }
.inventory-movement-type { display: inline-flex; padding: .18rem .45rem; color: #1e3a5f; background: #e8eef5; border-radius: .25rem; font-size: .72rem; font-weight: 800; white-space: nowrap; }
@media (max-width: 1100px) {
    .inventory-filters, .inventory-movement-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-search { grid-column: 1 / -1; }
    .inventory-filters .purchases-filter-button, .inventory-movement-filters .purchases-filter-button { width: 100%; }
}
@media (max-width: 620px) {
    .inventory-filters, .inventory-movement-filters, .inventory-summary { grid-template-columns: 1fr; }
    .inventory-search { grid-column: auto; }
}

@media (max-width: 760px) {
    .reception-summary { grid-template-columns: 1fr; }
    .reception-footer { align-items: stretch; flex-direction: column; }
    .reception-footer .button { width: 100%; }
}


@media (max-width: 800px) {
    .equivalence-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .equivalence-search { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .equivalence-filters { grid-template-columns: 1fr; }
    .equivalence-search { grid-column: auto; }
}
.equivalence-filters { align-items: stretch; }
.equivalence-filters label { grid-template-rows: 1.15rem 2.5rem; align-self: stretch; gap: .4rem; margin: 0; }
.equivalence-filters label > span { display: flex; align-items: center; height: 1.15rem; min-height: 1.15rem; margin: 0; line-height: 1.15rem; }
.equivalence-filters input, .equivalence-filters select { align-self: start; height: 2.5rem; margin: 0; }
.equivalence-filters .purchases-filter-button { align-self: end; margin: 0; }
.equivalence-filters .purchases-clear { align-self: center; margin: 0; }

.equivalence-filters { grid-template-columns: minmax(280px, 1fr) 180px 180px 145px auto; column-gap: .75rem; row-gap: .8rem; }
.equivalence-filters label > span { min-height: 1.15rem; line-height: 1.15rem; }
.equivalence-filters input, .equivalence-filters select, .equivalence-filters .purchases-filter-button { height: 2.5rem; min-height: 2.5rem; }
.equivalence-filters .purchases-filter-button { width: 145px; justify-self: stretch; padding-inline: .7rem; }
.equivalence-filters .purchases-clear { display: inline-flex; align-items: center; justify-content: center; align-self: end; height: 2.5rem; padding: 0 .75rem; color: #334155; background: #fff; border: 1px solid #94a3b8; border-radius: .38rem; text-decoration: none; white-space: nowrap; }
.equivalence-filters .purchases-clear:hover { color: #0f3f80; background: #eff6ff; border-color: #3b82f6; }
@media (max-width: 1050px) {
    .equivalence-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .equivalence-search { grid-column: 1 / -1; }
    .equivalence-filters .purchases-filter-button { width: 100%; }
}
@media (max-width: 560px) {
    .equivalence-filters { grid-template-columns: 1fr; }
    .equivalence-search { grid-column: auto; }
}


.purchase-equivalence-form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.purchase-equivalence-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; padding: 1rem; border: 1px solid var(--color-border); border-radius: .7rem; }
.purchase-equivalence-form legend { padding: 0 .45rem; color: #1e3a5f; font-weight: 850; }
.purchase-equivalence-form .field-row { align-content: start; }
.purchase-equivalence-form select, .purchase-equivalence-form input { width: 100%; }
.retention-facts-panel { background: #f6faf9; border-left: 5px solid #16803c !important; }
.retention-facts-intro { grid-column: 1 / -1; margin: 0; color: var(--color-muted); }
.retention-exclusion-question { grid-column: 1 / -1; padding: .85rem; background: #fff; border: 1px solid #d5e5df; border-radius: .55rem; }
.choice-confirmation { display: flex !important; align-items: center; gap: .55rem; }
.choice-confirmation input { width: auto; }
.purchase-equivalence-form > .button { justify-self: start; margin-top: 0; }
@media (max-width: 700px) {
    .purchase-equivalence-form fieldset { grid-template-columns: 1fr; }
    .retention-facts-intro, .retention-exclusion-question { grid-column: auto; }
}

@media (max-width: 768px) {
    .purchases-heading { align-items: flex-start; flex-direction: column; }
    .purchases-actions { width: 100%; }
    .purchases-actions .button { flex: 1; }
    .purchases-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .purchases-search { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .purchases-filters { grid-template-columns: 1fr; }
    .purchases-search { grid-column: auto; }
}

/* Personal: delimitación tabular del patrón de Documentos electrónicos. */
.personal-page { color: #1f2926; }
.personal-filter-button, .personal-page .button-secondary { background: #18745f; border-color: #18745f; }
.personal-filter-button:hover, .personal-page .button-secondary:hover { background: #105c4b; border-color: #105c4b; }
.personal-filters { border-color: #c5d0cc; border-radius: .62rem; box-shadow: none; }
.personal-filters input, .personal-filters select { border-color: #aebbb7 !important; border-radius: .32rem !important; }
.personal-clear { color: #145c4d; border-color: #378270; }
.personal-list-table-wrap { border-color: #b9cec6; border-radius: .55rem; }
.personal-list-table { table-layout: fixed; }
.personal-list-table th, .personal-list-table td { border-right: 1px solid #b9d0c7; border-bottom: 1px solid #b9d0c7; }
.personal-list-table th:last-child, .personal-list-table td:last-child { border-right: 0; }
.personal-list-table thead th, .personal-table thead th { color: #23302c; background: #e4eeea; font-weight: 850; letter-spacing: 0; text-transform: none; }
.personal-list-table tbody tr, .personal-list-table tbody tr:nth-child(even), .personal-table tbody tr, .personal-table tbody tr:nth-child(even) { background: #e5f5ed; }
.personal-list-table tbody tr:nth-child(even), .personal-table tbody tr:nth-child(even) { background: #ddf0e7; }
.personal-list-table tbody tr:hover, .personal-table tbody tr:hover { background: #d2eadf; }
.personal-list-table tbody tr:last-child td { border-bottom: 0; }
.personal-col-name { width: 24%; }.personal-col-id { width: 18%; }.personal-col-condition { width: 15%; }.personal-col-role { width: 20%; }.personal-col-access { width: 13%; }.personal-col-actions { width: 10%; }
.personal-contract-type { width: 13%; }.personal-contract-period { width: 16%; }.personal-contract-center { width: 19%; }.personal-contract-production { width: 10%; }.personal-contract-amount { width: 11%; }.personal-contract-hour { width: 12%; }.personal-contract-action { width: 9%; }
.personal-section { border-color: #b9cec6; box-shadow: none; }
.personal-section-heading { margin: -1.1rem -1.1rem .9rem; padding: .8rem 1rem; background: #e4eeea; border-bottom: 1px solid #b9cec6; border-radius: .5rem .5rem 0 0; }
.personal-data-grid { gap: 0; background: transparent; border-color: #b9cec6; }
.personal-data-grid div { background: #e5f5ed; border-right: 1px solid #b9d0c7; border-bottom: 1px solid #b9d0c7; }
.personal-data-grid div:nth-child(3n) { border-right: 0; }.personal-data-grid div:nth-last-child(-n + 3) { border-bottom: 0; }
.personal-summary-grid { gap: 0; overflow: hidden; border: 1px solid #b9cec6; border-radius: .55rem; }
.personal-summary-grid article { min-height: 100px; border: 0; border-right: 1px solid #b9d0c7; border-radius: 0; background: #f8fbfa; box-shadow: none; }.personal-summary-grid article:first-child { border-left: 0; }.personal-summary-grid article:last-child { border-right: 0; }
.personal-item-list { gap: 0; overflow: hidden; border: 1px solid #b9cec6; border-radius: .4rem; }
.personal-item-list article { margin: 0; background: #e5f5ed; border: 0; border-bottom: 1px solid #b9d0c7; border-radius: 0; }.personal-item-list article:nth-child(even) { background: #ddf0e7; }.personal-item-list article:last-child { border-bottom: 0; }
.personal-timeline { overflow: hidden; border: 1px solid #b9cec6; border-radius: .4rem; }.personal-timeline article { padding: .75rem .85rem; background: #e5f5ed; border-bottom-color: #b9d0c7; }.personal-timeline article:nth-child(even) { background: #ddf0e7; }
.personal-empty { background: #f8fbfa; border: 0; }.personal-empty-state { background: #f8fbfa; border-color: #9ebbb0; }
.personal-form-card { border-color: #b9cec6; box-shadow: none; }.personal-form-card > header { background: #e4eeea; border-bottom-color: #b9cec6; }
.personal-form-grid { gap: 0; padding: 0; border-bottom: 1px solid #b9d0c7; }
.personal-form-field { min-width: 0; padding: .85rem 1rem; background: #f8fbfa; border-right: 1px solid #b9d0c7; border-bottom: 1px solid #b9d0c7; }.personal-form-field:nth-child(even) { border-right: 0; }.personal-form-field-wide { border-right: 0; }.personal-form-field input:not([type="checkbox"]), .personal-form-field select, .personal-form-field textarea { border-color: #aebbb7 !important; border-radius: .32rem !important; background: #fff; }.personal-form-actions { padding-top: 1rem; background: #fff; }
@media (max-width: 900px) { .personal-list-table { table-layout: auto; }.personal-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); }.personal-summary-grid article:nth-child(2) { border-right: 0; }.personal-summary-grid article:nth-child(-n + 2) { border-bottom: 1px solid #b9d0c7; }.personal-data-grid div:nth-child(3n) { border-right: 1px solid #b9d0c7; }.personal-data-grid div:nth-child(2n) { border-right: 0; }.personal-data-grid div:nth-last-child(-n + 3) { border-bottom: 1px solid #b9d0c7; }.personal-data-grid div:nth-last-child(-n + 2) { border-bottom: 0; } }
@media (max-width: 760px) { .personal-form-field, .personal-form-field:nth-child(even) { border-right: 0; }.personal-summary-grid { grid-template-columns: 1fr; }.personal-summary-grid article, .personal-summary-grid article:nth-child(2) { border-right: 0; border-bottom: 1px solid #b9d0c7; }.personal-summary-grid article:last-child { border-bottom: 0; }.personal-data-grid div, .personal-data-grid div:nth-child(2n), .personal-data-grid div:nth-child(3n) { border-right: 0; }.personal-data-grid div:nth-last-child(-n + 2) { border-bottom: 1px solid #b9d0c7; }.personal-data-grid div:last-child { border-bottom: 0; } }

@media (max-width: 768px) {
    .side-nav { top: 0; width: min(330px, calc(100vw - 20px)); }
    .side-menu-backdrop { z-index: 58; }
    .side-menu-toggle { order: 3; }
}
@media (max-width: 640px) {
    .retention-xml-heading { align-items: flex-start; }
    .retention-xml-summary { grid-template-columns: 1fr; }
    .retention-xml-toolbar { align-items: flex-start; flex-direction: column; }
    .retention-xml-actions { width: 100%; }
    .retention-xml-actions .button { flex: 1; }
}

/* Los avisos se distinguen por su significado; rojo reservado a errores. */
.message { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; border-left: 4px solid #2563eb; }
.message-success { background: #ecfdf5; color: #166534; border-color: #bbf7d0; border-left-color: #16a34a; }
.message-info, .message-debug { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; border-left-color: #2563eb; }
.message-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; border-left-color: #d97706; }
.message-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; border-left-color: #dc2626; }

/* Acciones en cabeceras de Personal: mismo tamaño y separación. */
.personal-page header .button, .nomina > header .button, .nomina > nav.panel .button {
    min-height: 2.5rem; margin: 0; padding: .5rem .85rem;
    border-radius: .38rem; font-size: .88rem; line-height: 1.3;
}
.nomina > header nav, .nomina > nav.panel { justify-content: flex-start; gap: .6rem; }
.nomina > nav.panel form { margin: 0; }

/* Un único color de botón para todo el módulo de Personal y Nómina. */
.personal-page .button, .nomina .button {
    background: linear-gradient(100deg, #047857, var(--brand-green));
    color: #fff;
    border: 0;
}
.personal-page .button:focus-visible, .nomina .button:focus-visible {
    outline: 3px solid #047857;
    outline-offset: 3px;
}
