:root{--bg: #f6f7f9;--surface: #ffffff;--surface-sunken: #eef0f3;--surface-hover: #f2f4f7;--border: #dfe3e8;--border-strong: #7c8794;--text: #1c232b;--text-secondary: #414c59;--text-muted: #5a6572;--text-disabled: #6b7480;--accent: #0b5f7d;--accent-hover: #094e66;--accent-active: #073d50;--accent-surface: #e4f0f4;--accent-border: #9fc6d3;--on-accent: #ffffff;--focus-ring: #0b5f7d;--focus-ring-inverse: #7fc4dc;--success: #1c6136;--success-surface: #dcefe1;--success-border: #a8d3b7;--warning: #7a4a06;--warning-surface: #fbeecb;--warning-border: #e8cf92;--danger: #8c2020;--danger-hover: #6f1717;--danger-surface: #fbe0df;--danger-border: #e7b3b1;--info: #1e4f8a;--info-surface: #dde8f6;--state-borrador-text: #3a4552;--state-borrador-surface: #e7eaee;--state-borrador-dot: #7c8794;--state-enviado-text: #1e4f8a;--state-enviado-surface: #dde8f6;--state-enviado-dot: #1e4f8a;--state-en_revision-text: #7a4a06;--state-en_revision-surface: #fbeecb;--state-en_revision-dot: #b57612;--state-pre_aprobado-text: #3b3f8f;--state-pre_aprobado-surface: #e3e4f7;--state-pre_aprobado-dot: #3b3f8f;--state-aprobado-text: #1c6136;--state-aprobado-surface: #dcefe1;--state-aprobado-dot: #1c6136;--state-rechazado-text: #8c2020;--state-rechazado-surface: #fbe0df;--state-rechazado-dot: #8c2020;--state-anulado-text: #5b2f7a;--state-anulado-surface: #ecdff5;--state-anulado-dot: #5b2f7a;--shell-bg: #1b2027;--shell-surface: #232931;--shell-border: #2c333c;--shell-text: #c3cad3;--shell-text-active: #ffffff;--shell-accent: #0b5f7d;--font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--text-3xl: 2.75rem;--text-2xl: 1.75rem;--text-xl: 1.375rem;--text-lg: 1.125rem;--text-md: 1rem;--text-base: .875rem;--text-sm: .8125rem;--text-xs: .75rem;--leading-tight: 1.2;--leading-snug: 1.35;--leading-normal: 1.5;--weight-regular: 400;--weight-medium: 500;--weight-semibold: 600;--weight-bold: 700;--space-1: .25rem;--space-2: .375rem;--space-3: .5rem;--space-4: .75rem;--space-5: 1rem;--space-6: 1.25rem;--space-7: 1.5rem;--space-8: 2rem;--space-9: 2.5rem;--space-10: 3rem;--radius-xs: 3px;--radius-sm: 4px;--radius-md: 6px;--radius-lg: 10px;--radius-pill: 999px;--border-w: 1px;--border-w-strong: 2px;--focus-w: 2px;--control-h: 2.25rem;--row-h: 2.5rem;--hit-min: 1.75rem;--sidebar-w: 14.5rem;--sidebar-w-compact: 13rem;--modal-sm: 26rem;--modal-md: 32rem;--modal-lg: 56rem;--shadow-xs: 0 1px 2px rgba(17, 22, 28, .06);--shadow-sm: 0 1px 3px rgba(17, 22, 28, .1), 0 1px 2px rgba(17, 22, 28, .06);--shadow-md: 0 4px 12px rgba(17, 22, 28, .12);--shadow-lg: 0 12px 32px rgba(17, 22, 28, .18), 0 2px 8px rgba(17, 22, 28, .08);--overlay: rgba(12, 17, 23, .48);--dur-fast: .12s;--dur-base: .16s;--dur-slow: .22s;--ease-standard: cubic-bezier(.2, 0, 0, 1);--ease-exit: cubic-bezier(.4, 0, 1, 1);--z-sticky: 10;--z-dropdown: 20;--z-drawer: 40;--z-modal: 50;--z-toast: 60}:root{--color-bg: var(--bg);--color-surface: var(--surface);--color-border: var(--border);--color-text: var(--text);--color-text-muted: var(--text-muted);--color-primary: var(--accent);--color-primary-hover: var(--accent-hover);--color-danger: var(--danger);--color-danger-hover: var(--danger-hover);--color-success-text: var(--success);--color-error-bg: var(--danger-surface);--color-error-text: var(--danger);--radius: var(--radius-md);--shadow: var(--shadow-sm);--sidebar-width: var(--sidebar-w)}*{margin:0;padding:0;box-sizing:border-box}body{font-family:var(--font-sans);font-size:var(--text-base);line-height:var(--leading-normal);background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}.app-sidebar :focus-visible{outline-color:var(--focus-ring-inverse)}.auth-title,.page-title,.section-title,.block-title,.modal-title,.status-page-title{font-weight:var(--weight-semibold);line-height:var(--leading-tight);color:var(--text)}.auth-title,.page-title{font-size:var(--text-xl)}.section-title,.block-title{font-size:var(--text-md)}.modal-title,.status-page-title{font-size:var(--text-lg)}button,input,textarea,select{font:inherit}a{color:var(--color-primary)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:var(--control-h);padding:0 var(--space-4);border:1px solid transparent;border-radius:var(--radius-sm);cursor:pointer;font-size:var(--text-base);font-weight:var(--weight-semibold);transition:background-color var(--dur-fast) var(--ease-standard),border-color var(--dur-fast) var(--ease-standard),color var(--dur-fast) var(--ease-standard)}.btn:disabled{background:var(--surface-sunken);border-color:var(--border);color:var(--text-disabled);cursor:not-allowed}.btn-primary{background:var(--accent);color:var(--on-accent)}.btn-primary:hover:not(:disabled){background:var(--accent-hover)}.btn-primary:active:not(:disabled){background:var(--accent-active)}.btn-secondary{background:var(--surface);color:var(--text);border:1px solid var(--border-strong)}.btn-secondary:hover:not(:disabled){background:var(--surface-hover)}.btn-secondary:active:not(:disabled){background:var(--surface-sunken)}.btn-danger{background:var(--danger);color:var(--on-accent)}.btn-danger:hover:not(:disabled){background:var(--danger-hover)}.btn-block{width:100%}.btn:focus-within{outline:2px solid var(--focus-ring);outline-offset:2px}.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:var(--space-6)}.auth-card{width:100%;max-width:380px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-xs);padding:var(--space-6);display:flex;flex-direction:column;gap:var(--space-5)}.auth-subtitle{color:var(--text-muted);font-size:var(--text-sm)}.auth-link{font-size:var(--text-sm);color:var(--text-muted);text-align:center}.form-field{display:flex;flex-direction:column;gap:var(--space-2)}.form-label{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--text-secondary)}.form-input{min-height:var(--control-h);padding:var(--space-3) var(--space-4);border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);font-size:var(--text-md);transition:border-color var(--dur-fast) var(--ease-standard),background-color var(--dur-fast) var(--ease-standard)}.form-input:focus{border-color:var(--accent)}.form-input:disabled{background:var(--surface-sunken);color:var(--text-disabled);cursor:not-allowed}.form-input[aria-invalid=true]{border-color:var(--danger);background:var(--danger-surface)}.form-field-error{color:var(--danger);font-size:var(--text-sm);margin-top:var(--space-1);line-height:var(--leading-snug)}.form-error{background:var(--danger-surface);color:var(--danger);border:1px solid var(--danger-border);border-left:3px solid var(--danger);border-radius:var(--radius-md);padding:var(--space-3) var(--space-4);font-size:var(--text-sm)}.app-layout{display:flex;align-items:stretch;min-height:100vh}.app-sidebar{flex:0 0 var(--sidebar-w);width:var(--sidebar-w);background:var(--shell-bg);color:var(--shell-text);position:sticky;top:0;height:100vh;overflow-y:auto;display:flex;flex-direction:column}.app-brand{padding:var(--space-5);font-size:var(--text-md);font-weight:var(--weight-semibold);color:var(--shell-text-active);border-bottom:1px solid var(--shell-border)}.app-nav{display:flex;flex-direction:column;flex:1;padding:var(--space-3) var(--space-2);gap:var(--space-1);overflow-y:auto}.app-nav-item{display:flex;align-items:center;min-height:var(--control-h);padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);color:var(--shell-text);text-decoration:none;font-size:var(--text-base);font-weight:var(--weight-medium);transition:background-color var(--dur-fast) var(--ease-standard),color var(--dur-fast) var(--ease-standard)}.app-nav-item:hover:not(.app-nav-item-active){background:var(--shell-surface);color:var(--shell-text-active)}.app-nav-item-active{background:var(--shell-accent);color:var(--shell-text-active);box-shadow:inset 2px 0 0 var(--shell-text-active)}.app-sidebar-footer{padding:var(--space-3) var(--space-2);border-top:1px solid var(--shell-border)}.app-sidebar-footer .btn{width:100%}.app-main{flex:1;min-width:0;display:flex;flex-direction:column}.app-header{position:sticky;top:0;z-index:var(--z-sticky);display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:nowrap;padding:var(--space-3) var(--space-6);min-height:3.5rem;background:var(--surface);border-bottom:1px solid var(--border)}.app-header-user{display:flex;flex-direction:column;min-width:0}.app-header-name{font-weight:var(--weight-semibold);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-header-role{font-size:var(--text-xs);color:var(--text-muted)}.app-content{padding:var(--space-6);width:100%;max-width:100rem;margin-inline:auto}@media (max-width: 768px){.app-content{padding:var(--space-4)}}.app-menu-toggle,.app-sidebar-overlay{display:none}@media (max-width: 1023px){.app-menu-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:var(--control-h);min-height:var(--control-h);padding:0 var(--space-2);border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);font-size:var(--text-md);line-height:1;cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),border-color var(--dur-fast) var(--ease-standard)}.app-menu-toggle:hover{background:var(--surface-hover);border-color:var(--border-strong)}.app-sidebar{position:fixed;inset-block:0;inset-inline-start:0;width:280px;max-width:85vw;flex-basis:auto;height:100vh;z-index:var(--z-drawer);transform:translate(-100%);visibility:hidden;transition:transform var(--dur-base) var(--ease-standard),visibility 0s linear var(--dur-base)}.app-sidebar[data-open=true]{transform:translate(0);visibility:visible;transition:transform var(--dur-base) var(--ease-standard),visibility 0s linear 0s}.app-sidebar-overlay{display:block;position:fixed;top:0;right:0;bottom:0;left:0;background:var(--overlay);z-index:calc(var(--z-drawer) - 1)}}@media (min-width: 1024px) and (max-width: 1279px){.app-sidebar{flex-basis:var(--sidebar-w-compact);width:var(--sidebar-w-compact)}}@media (min-width: 1024px){.app-sidebar{visibility:visible;transform:none}.app-menu-toggle,.app-sidebar-overlay{display:none}}.status-page{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);max-width:30rem;margin-inline:auto;padding:var(--space-8) var(--space-4);text-align:center}.status-page-code{font-size:var(--text-3xl);font-weight:var(--weight-bold);line-height:var(--leading-tight);color:var(--text-disabled)}.status-page-message{color:var(--text-muted);font-size:var(--text-sm)}.data-table-wrapper{overflow-x:auto;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md)}.data-table{width:100%;border-collapse:collapse}.data-table th,.data-table td{padding:var(--space-3) var(--space-4);border-bottom:1px solid var(--border);font-size:var(--text-sm);line-height:var(--leading-snug);text-align:left}.data-table th{position:sticky;top:0;z-index:var(--z-sticky);background:var(--surface-sunken);font-weight:var(--weight-semibold);color:var(--text-secondary);font-size:var(--text-sm);white-space:nowrap;border-bottom:var(--border-w-strong) solid var(--border-strong)}.data-table-cell{font-size:var(--text-sm);line-height:var(--leading-snug)}.data-table tbody tr:last-child td{border-bottom:none}.data-table tbody tr:hover{background:var(--surface-hover)}.data-table input[type=checkbox],.data-table-row-clickable{cursor:pointer}.data-table-row-clickable:hover{background:var(--surface-hover);box-shadow:inset 2px 0 0 var(--accent-border)}.data-table-row-clickable:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.data-table .align-left{text-align:left}.data-table .align-center{text-align:center}.data-table .align-right{text-align:right;font-variant-numeric:tabular-nums}.stat-card{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-4);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-xs)}.stat-card-label{font-size:var(--text-xs);font-weight:var(--weight-medium);color:var(--text-muted)}.stat-card-value{font-size:var(--text-2xl);font-weight:var(--weight-semibold);font-variant-numeric:tabular-nums;color:var(--text)}.stat-card-hint{font-size:var(--text-xs);color:var(--text-muted)}.stat-card[data-status] .stat-card-label{display:inline-flex;align-items:center;gap:var(--space-2)}.stat-card[data-status] .stat-card-label:before{content:"";flex:0 0 auto;width:6px;height:6px;border-radius:var(--radius-pill)}.stat-card[data-status=borrador] .stat-card-label:before{background:var(--state-borrador-dot)}.stat-card[data-status=enviado] .stat-card-label:before{background:var(--state-enviado-dot)}.stat-card[data-status=en_revision] .stat-card-label:before{background:var(--state-en_revision-dot)}.stat-card[data-status=pre_aprobado] .stat-card-label:before{background:var(--state-pre_aprobado-dot)}.stat-card[data-status=aprobado] .stat-card-label:before{background:var(--state-aprobado-dot)}.stat-card[data-status=rechazado] .stat-card-label:before{background:var(--state-rechazado-dot)}.stat-card[data-status=anulado] .stat-card-label:before{background:var(--state-anulado-dot)}.status-badge,.badge{display:inline-flex;align-items:center;gap:var(--space-2);min-height:1.5rem;padding:0 var(--space-2);border-radius:var(--radius-pill);font-size:var(--text-xs);font-weight:var(--weight-semibold);line-height:1}.status-badge:before{content:"";flex:0 0 auto;width:6px;height:6px;border-radius:var(--radius-pill);background:currentColor}.status-badge-borrador{background:var(--state-borrador-surface);color:var(--state-borrador-text)}.status-badge-borrador:before{background:var(--state-borrador-dot)}.status-badge-enviado{background:var(--state-enviado-surface);color:var(--state-enviado-text)}.status-badge-enviado:before{background:var(--state-enviado-dot)}.status-badge-en_revision{background:var(--state-en_revision-surface);color:var(--state-en_revision-text)}.status-badge-en_revision:before{background:var(--state-en_revision-dot)}.status-badge-pre_aprobado{background:var(--state-pre_aprobado-surface);color:var(--state-pre_aprobado-text)}.status-badge-pre_aprobado:before{background:var(--state-pre_aprobado-dot)}.status-badge-aprobado{background:var(--state-aprobado-surface);color:var(--state-aprobado-text)}.status-badge-aprobado:before{background:var(--state-aprobado-dot)}.status-badge-rechazado{background:var(--state-rechazado-surface);color:var(--state-rechazado-text)}.status-badge-rechazado:before{background:var(--state-rechazado-dot)}.status-badge-anulado{background:var(--state-anulado-surface);color:var(--state-anulado-text)}.status-badge-anulado:before{background:var(--state-anulado-dot)}.loading-state{display:flex;flex-direction:column;align-items:center;gap:var(--space-4);padding:var(--space-9) var(--space-5);color:var(--text-muted)}.loading-label{font-size:var(--text-sm);color:var(--text-muted)}.spinner{width:28px;height:28px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.empty-state{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-8) var(--space-5);text-align:center;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md)}.empty-state-title{font-size:var(--text-md);font-weight:var(--weight-semibold);color:var(--text)}.empty-state-description{color:var(--text-muted);font-size:var(--text-sm);max-width:46ch}.empty-state-action{display:flex;justify-content:center;margin-top:var(--space-2)}.error-state{display:flex;flex-direction:column;align-items:center;gap:var(--space-4);padding:var(--space-4) var(--space-5);text-align:center;background:var(--danger-surface);border:1px solid var(--danger-border);border-left:3px solid var(--danger);border-radius:var(--radius-md)}.error-state-message{color:var(--danger);font-size:var(--text-sm);font-weight:var(--weight-semibold);line-height:var(--leading-snug)}.toast-container{position:fixed;top:var(--space-5);right:var(--space-5);z-index:var(--z-toast);display:flex;flex-direction:column;gap:var(--space-3);max-width:360px}.toast{display:flex;align-items:flex-start;gap:var(--space-4);padding:var(--space-4) var(--space-5);border-radius:var(--radius-md);border:1px solid var(--border);border-left:3px solid var(--border-strong);box-shadow:var(--shadow-md);background:var(--surface);color:var(--text);transition:background-color var(--dur-fast) var(--ease-standard),color var(--dur-fast) var(--ease-standard)}.toast-success{border-left-color:var(--success)}.toast-error{border-left-color:var(--danger)}.toast-message{flex:1;font-size:var(--text-sm);line-height:var(--leading-normal)}.toast-dismiss{background:none;border:none;cursor:pointer;font-size:1.1rem;line-height:1;color:var(--text-muted);flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:2.25rem;min-height:2.25rem;padding:0;border-radius:var(--radius-sm);transition:background-color var(--dur-fast) var(--ease-standard),color var(--dur-fast) var(--ease-standard)}.toast-dismiss:hover{background:var(--surface-hover);color:var(--text)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--overlay);display:flex;align-items:center;justify-content:center;padding:var(--space-5);z-index:var(--z-modal)}.modal{width:100%;max-width:var(--modal-md);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);display:flex;flex-direction:column;max-height:min(90vh,44rem)}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);padding:var(--space-5);border-bottom:1px solid var(--border)}.modal-close{background:none;border:none;cursor:pointer;font-size:1.5rem;line-height:1;color:var(--text-muted);padding:0;width:2.25rem;height:2.25rem;display:flex;align-items:center;justify-content:center;flex:none;border-radius:var(--radius-sm);transition:background-color var(--dur-fast) var(--ease-standard),color var(--dur-fast) var(--ease-standard)}.modal-close:hover{color:var(--text);background:var(--surface-hover)}.modal-body{padding:var(--space-5);overflow-y:auto;flex:1;min-height:0}.modal-actions,.modal-footer{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--space-3);padding:var(--space-5);border-top:1px solid var(--border)}.modal-warning{background:var(--warning-surface);color:var(--warning);border:1px solid var(--warning-border);border-left:3px solid var(--warning);border-radius:var(--radius-md);padding:var(--space-3) var(--space-4);font-size:var(--text-sm);margin-bottom:var(--space-5)}.page{display:flex;flex-direction:column;gap:var(--space-6)}.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-4);flex-wrap:wrap}.page-actions{display:flex;align-items:center;gap:var(--space-3);flex-wrap:wrap}.send-action{display:inline-flex;align-items:center;gap:.5rem}.filter-bar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--space-3)}.filter-field{flex:1 1 12rem;max-width:26rem}.form-card{display:flex;flex-direction:column;gap:var(--space-5);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);padding:var(--space-5)}.form-actions{display:flex;justify-content:flex-end;gap:var(--space-3);flex-wrap:wrap}.items-section{display:flex;flex-direction:column;gap:var(--space-3)}.items-header{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);flex-wrap:wrap}.item-card{display:flex;flex-direction:column;gap:var(--space-4);border:1px solid var(--border);border-radius:var(--radius-md);padding:var(--space-4);background:var(--surface)}.item-card-header{display:flex;align-items:center;justify-content:space-between}.item-card-title{font-size:var(--text-md);font-weight:var(--weight-semibold)}.item-fields{display:flex;flex-direction:column;gap:var(--space-4)}.item-catalog{max-width:26rem}.item-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(16rem,1fr));gap:var(--space-4)}.item-grid-wide{grid-column:1 / -1}.item-subtotal,.running-total,.detail-total{text-align:right;font-size:var(--text-sm);font-variant-numeric:tabular-nums}.running-total{border-top:1px solid var(--border);padding-top:var(--space-4);font-size:var(--text-md)}.hint-text,.readonly-field{color:var(--text-muted);font-size:var(--text-sm)}.catalog-autocomplete{position:relative;display:flex;flex-direction:column;gap:var(--space-1)}.catalog-hint,.catalog-reference{font-size:var(--text-xs);color:var(--text-muted)}.catalog-dropdown{position:absolute;top:100%;left:0;right:0;z-index:var(--z-dropdown);margin-top:var(--space-1);max-height:260px;overflow-y:auto;list-style:none;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md)}.catalog-option{display:flex;flex-direction:column;gap:var(--space-1);width:100%;min-height:2.75rem;text-align:left;background:none;border:none;padding:var(--space-2) var(--space-3);cursor:pointer}.catalog-option:hover{background:var(--surface-hover)}.catalog-option-code{font-size:var(--text-xs);font-weight:var(--weight-semibold);color:var(--accent)}.catalog-option-desc{font-size:var(--text-sm)}.catalog-option-meta{font-size:var(--text-xs);color:var(--text-muted)}.row-actions{display:flex;gap:.75rem;justify-content:flex-end;flex-wrap:wrap}.link-button{display:inline-flex;align-items:center;min-height:var(--hit-min);padding-inline:var(--space-2);background:none;border:none;border-radius:var(--radius-sm);color:var(--accent);cursor:pointer;font-size:var(--text-base);font-weight:var(--weight-semibold);transition:background-color var(--dur-fast) var(--ease-standard),color var(--dur-fast) var(--ease-standard)}.link-button:hover:not(:disabled){background:var(--accent-surface)}.link-button:disabled{color:var(--text-disabled);cursor:not-allowed}.detail-meta{display:flex;align-items:center;gap:var(--space-3);margin-top:var(--space-1)}.detail-meta-item{font-size:var(--text-sm);color:var(--text-muted)}.detail-block{display:flex;flex-direction:column;gap:var(--space-3);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:var(--space-4)}.block-text{font-size:var(--text-sm)}.block-meta{font-size:var(--text-xs);color:var(--text-muted)}.rejection-block{display:flex;flex-direction:column;gap:var(--space-2);background:var(--danger-surface);border:1px solid var(--danger-border);border-left:3px solid var(--danger);border-radius:var(--radius-md);padding:var(--space-4)}.rejection-block .block-title{color:var(--danger)}.annulment-block{display:flex;flex-direction:column;gap:var(--space-2);background:var(--state-anulado-surface);border:1px solid var(--state-anulado-text);border-left:3px solid var(--state-anulado-text);border-radius:var(--radius-md);padding:var(--space-4)}.annulment-block .block-title{color:var(--state-anulado-text)}.summary-list{display:flex;flex-direction:column;gap:var(--space-2);margin-bottom:var(--space-5)}.summary-row{display:flex;flex-wrap:wrap;gap:var(--space-3);font-size:var(--text-sm)}.summary-row dt{font-weight:var(--weight-semibold);color:var(--text-muted);min-width:8.5rem}.summary-table{width:100%;border-collapse:collapse;margin-bottom:var(--space-4)}.summary-table th,.summary-table td{padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--border);font-size:var(--text-sm);line-height:var(--leading-snug)}.summary-table th{text-align:left;background:var(--surface-sunken);color:var(--text-secondary);font-weight:var(--weight-semibold)}.summary-table .align-right{text-align:right;font-variant-numeric:tabular-nums}.summary-total{text-align:right;font-size:var(--text-md);font-weight:var(--weight-semibold);font-variant-numeric:tabular-nums}.dashboard-section{display:flex;flex-direction:column;gap:var(--space-3)}.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:var(--space-4)}.stat-grid>.stat-card:only-child{max-width:20rem;justify-self:start}.dashboard-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:var(--space-5)}.role-list{list-style:none;display:flex;flex-direction:column;gap:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:var(--space-3) var(--space-4)}.role-row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-5);padding:var(--space-2) 0;font-size:var(--text-sm)}.role-row:not(:last-child){border-bottom:1px solid var(--border)}.role-row strong{font-variant-numeric:tabular-nums}.bar-list{list-style:none;display:flex;flex-direction:column;gap:var(--space-3);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:var(--space-4)}.bar-row{display:grid;grid-template-columns:minmax(7rem,9rem) 1fr auto;align-items:center;gap:var(--space-3);font-size:var(--text-sm)}.bar-month{color:var(--text-muted);text-transform:capitalize}.bar-track{height:8px;background:var(--surface-sunken);border-radius:var(--radius-pill);overflow:hidden}.bar-fill{display:block;height:100%;background:var(--accent);border-radius:var(--radius-pill)}.bar-total{text-align:right;font-variant-numeric:tabular-nums}@media (max-width: 640px){.bar-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"month total" "track track";row-gap:var(--space-2)}.bar-month{grid-area:month}.bar-track{grid-area:track}.bar-total{grid-area:total}}.filter-field-wide{flex:1 1 16rem;max-width:26rem}.pagination{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap}.pagination-info{color:var(--text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums}.pagination-controls{display:flex;align-items:center;gap:var(--space-2)}.pagination-limit{display:flex;flex-direction:column;gap:var(--space-1)}.pagination-limit .form-input{padding:var(--space-2) var(--space-3)}@media (max-width: 640px){.pagination{flex-direction:column;align-items:stretch}.pagination-controls{width:100%;justify-content:space-between}.filter-field,.filter-field-wide{flex:1 1 100%;max-width:none}}.role-badge-solicitante{background:var(--state-borrador-surface);color:var(--state-borrador-text)}.role-badge-solicitante:before{background:var(--state-borrador-dot)}.role-badge-aprobador{background:var(--info-surface);color:var(--info)}.role-badge-planificacion{background:var(--warning-surface);color:var(--warning)}.role-badge-super_admin{background:var(--state-anulado-surface);color:var(--state-anulado-text)}.role-badge-super_admin:before{background:var(--state-anulado-dot)}.user-enabled{background:var(--success-surface);color:var(--success)}.user-disabled{background:var(--danger-surface);color:var(--danger)}.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}.fuc-form{display:flex;flex-direction:column;gap:1.25rem}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(16rem,1fr));gap:var(--space-4)}.form-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid .col-span-2{grid-column:span 2}.readonly-input{background:var(--surface-sunken);color:var(--text-muted);cursor:not-allowed}.highlight-input{font-weight:var(--weight-bold);color:var(--accent);background:var(--accent-surface);border-color:var(--accent-border)}.borrador-input{font-weight:var(--weight-bold);color:var(--warning);background:var(--warning-surface);border-color:var(--warning-border)}@media (max-width: 900px){.form-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid .col-span-2{grid-column:span 2}}@media (max-width: 639px){.form-grid-3{grid-template-columns:1fr}.form-grid .col-span-2{grid-column:span 1}}.items-table-wrapper{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface)}.items-table{width:100%;min-width:1200px;border-collapse:collapse}.items-table th,.items-table td{padding:var(--space-3) var(--space-2);border-bottom:1px solid var(--border);font-size:var(--text-sm);line-height:var(--leading-snug);vertical-align:top}.items-table th{position:sticky;top:0;z-index:var(--z-sticky);text-align:left;background:var(--surface-sunken);font-weight:var(--weight-semibold);color:var(--text-secondary);font-size:var(--text-sm);white-space:nowrap;border-bottom:var(--border-w-strong) solid var(--border-strong)}.items-table tbody tr:last-child td{border-bottom:none}.items-table th:first-child,.items-table td:first-child{position:sticky;left:0;z-index:2;background:var(--surface)}.items-table th:last-child,.items-table td:last-child{position:sticky;right:0;z-index:2;background:var(--surface)}.items-table th:first-child,.items-table th:last-child{z-index:calc(var(--z-sticky) + 1);background:var(--surface-sunken)}.items-table .align-right,.table-input.align-right{text-align:right;font-variant-numeric:tabular-nums}.table-input{min-height:calc(var(--row-h) - 8px);padding:var(--space-2) var(--space-3);font-size:var(--text-sm);border-radius:var(--radius-sm);border-color:var(--border-strong);width:100%}.table-input-narrow{min-width:60px}.table-input-year{min-width:78px;text-align:center;font-variant-numeric:tabular-nums}.year-empty{display:block;text-align:center;color:var(--text-muted)}.row-index{text-align:center;font-weight:var(--weight-semibold);color:var(--text-muted);font-variant-numeric:tabular-nums}.subitem-row>td{background:var(--surface-sunken)}.subitem-row>td:first-child,.subitem-row>td:last-child{background:var(--surface-sunken)}.subitem-row .row-index{padding-left:var(--space-6);font-weight:var(--weight-regular)}.row-action{text-align:center}.row-action-buttons{display:flex;align-items:center;justify-content:center;gap:var(--space-1)}.row-menu-panel{position:fixed;z-index:var(--z-dropdown);display:flex;flex-direction:column;gap:2px;padding:var(--space-1);background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-md)}.row-menu-item{display:block;width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--text-secondary);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.row-menu-item:hover,.row-menu-item:focus-visible{background:var(--surface-sunken);color:var(--text-secondary)}.row-menu-item:disabled{color:var(--text-disabled);cursor:not-allowed}.table-empty{padding:var(--space-6);text-align:center;color:var(--text-muted)}.items-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);flex-wrap:wrap;padding-top:var(--space-2);font-size:var(--text-sm)}.total-box{font-size:var(--text-md);font-weight:var(--weight-semibold);font-variant-numeric:tabular-nums}.btn-icon{min-width:var(--control-h);padding:0 var(--space-2);line-height:1}.catalog-cell{position:relative;display:flex;flex-direction:column;gap:.15rem}.items-header-actions{display:flex;gap:var(--space-2);flex-wrap:wrap}.modal-content{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);max-width:var(--modal-lg);width:100%;max-height:min(90vh,44rem);display:flex;flex-direction:column}.modal-lg{max-width:var(--modal-lg)}.catalog-search-box{margin-bottom:1rem}.search-meta{display:flex;align-items:center;justify-content:space-between;margin-top:.5rem;font-size:.85rem}.text-muted{color:var(--text-muted)}.badge-info{background:var(--info-surface);color:var(--info)}.max-height-400{max-height:400px;overflow-y:auto}.table-responsive{border:1px solid var(--border);border-radius:var(--radius-md)}.reference-grid{display:grid;grid-template-columns:1fr;gap:var(--space-6)}.reference-section{display:flex;flex-direction:column;gap:var(--space-4)}.reference-table{width:100%;border-collapse:collapse;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);font-size:var(--text-sm)}.reference-table th,.reference-table td{padding:var(--space-3) var(--space-4);border-bottom:1px solid var(--border);text-align:left;font-size:var(--text-sm);line-height:var(--leading-snug)}.reference-table th{background:var(--surface-sunken);font-weight:var(--weight-semibold);color:var(--text-secondary)}.reference-table tbody tr:last-child td{border-bottom:none}.reference-actions{display:flex;flex-wrap:wrap;gap:var(--space-2)}@media (min-width: 1024px){.reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@keyframes spinner-pulse{0%,to{opacity:1}50%{opacity:.4}}@media (prefers-reduced-motion: reduce){:root{--dur-fast: 0ms;--dur-base: 0ms;--dur-slow: 0ms}.spinner{animation:spinner-pulse 1.6s ease-in-out infinite}}@media (pointer: coarse){:root{--control-h: 2.75rem;--hit-min: 2.75rem}.modal-close,.toast-dismiss{width:2.75rem;height:2.75rem;min-width:2.75rem;min-height:2.75rem}.status-badge,.badge{min-height:1.75rem}}@media (max-width: 768px){.modal-overlay{align-items:flex-end;padding:0}.modal,.modal-content{width:100%;max-width:100%;border-radius:var(--radius-lg) var(--radius-lg) 0 0;max-height:88vh}.modal-actions,.modal-footer{padding-bottom:max(var(--space-5),env(safe-area-inset-bottom,0px))}.toast-container{top:auto;right:var(--space-3);left:var(--space-3);bottom:calc(var(--space-3) + env(safe-area-inset-bottom,0px));max-width:none}}@media (max-width: 480px){.modal-actions,.modal-footer{align-items:stretch}.modal-actions{flex-direction:column-reverse}.modal-footer{flex-direction:column}.modal-actions>.btn,.modal-footer>.btn{width:100%}}@media (max-width: 640px){.auth-page{padding:var(--space-4)}.auth-card{padding:var(--space-5)}.page-actions,.form-actions{flex-direction:column;align-items:stretch}.form-actions{flex-direction:column-reverse}.page-actions>.btn,.form-actions>.btn{width:100%}.items-header-actions{width:100%}.items-header-actions .btn{flex:1 1 auto}}
