:root{--nav:#0c1830;--bg:#f1f4f9;--surface:#fff;--text:#192942;--muted:#748298;--line:#e4eaf2;--blue:#3169e8;--green:#168b6a;--red:#d44759;--amber:#b77718;--radius:16px;--shadow:0 8px 32px #162b4b08}*{box-sizing:border-box}body{margin:0;font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--text);background:var(--bg);font-size:14px;line-height:1.5}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:var(--blue);text-decoration:none}[hidden]{display:none!important}h1,h2,h3,p{margin-top:0}h1{font-size:30px;line-height:1.2;letter-spacing:-.9px;margin-bottom:9px}h2{font-size:23px;letter-spacing:-.5px;margin-bottom:8px}h3{font-size:16px;margin-bottom:3px}p{color:var(--muted)}.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.7px;color:var(--blue);display:block;margin-bottom:12px}.app-shell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--nav);color:#afbdd3;position:fixed;inset:0 auto 0 0;width:244px;padding:31px 18px 20px;display:flex;flex-direction:column;z-index:30}.brand{display:flex;align-items:center;gap:11px;color:#fff;font-weight:800;font-size:25px;letter-spacing:1.6px;padding:0 10px}.brand small{display:block;font-size:8px;letter-spacing:1.4px;color:#8a9db9;font-weight:600;margin-top:1px}.brand-mark{display:flex;align-items:center;justify-content:center;width:40px;height:42px;background:linear-gradient(135deg,#357cff,#1748b3);border-radius:12px;font-size:29px;font-style:italic;color:#fff;font-weight:900;box-shadow:0 6px 20px #1c63e442;flex-shrink:0}.workspace-label{margin:28px 10px 22px;font-size:11px;color:#9ab0ce}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#64ddb3;margin-right:7px}.nav-group{font-size:9px;font-weight:700;letter-spacing:1.5px;color:#536b90;padding:18px 13px 8px}.nav-link{display:flex;align-items:center;gap:11px;padding:10px 13px;margin:3px 0;border-radius:9px;color:#a7b8d2;transition:background .18s,color .18s,transform .18s;font-size:12px}.nav-link svg{width:18px;height:18px;opacity:.9;flex-shrink:0}.nav-link:hover{background:#172b48;color:white;transform:translateX(2px)}.nav-link.active{color:#fff;background:linear-gradient(100deg,#2755aa,#1c3b71);box-shadow:inset 3px 0 #68a2ff}.sidebar nav{overflow-y:auto;flex:1;scrollbar-width:thin;scrollbar-color:#243857 transparent}.sidebar-bottom{border-top:1px solid #23324a;padding:17px 6px 0;display:flex;align-items:center;gap:10px;font-size:10px}.sidebar-bottom small{display:block;color:#597190;font-size:9px}.mini-avatar{background:#1b304f;width:29px;height:29px;border-radius:9px;display:grid;place-items:center;font-size:10px;color:#9ab9ea}.main-shell{grid-column:2;min-width:0}.topbar{height:79px;background:#ffffffc9;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 35px;backdrop-filter:blur(16px);position:sticky;top:0;z-index:20}.breadcrumb{font-size:12px;color:var(--muted)}.breadcrumb span{padding:0 12px;color:#c6cfdb}.breadcrumb strong{font-weight:600;color:#364760}.topbar-right{display:flex;align-items:center;gap:18px}.today-label{font-size:11px;color:var(--muted)}.icon-button{border:0;background:transparent;color:var(--muted);font-size:18px;padding:7px;border-radius:8px;line-height:1}.icon-button:hover{background:#eaf0fb;color:var(--blue)}.profile{display:flex;align-items:center;gap:10px;padding-left:17px;border-left:1px solid var(--line)}.avatar{width:35px;height:35px;border-radius:11px;background:#e5edfd;color:var(--blue);display:grid;place-items:center;font-size:12px;font-weight:700}.profile strong{display:block;font-size:11px}.profile small{font-size:10px;color:var(--muted)}#mobile-menu{display:none}main{padding:35px;max-width:1650px;margin:auto}.page-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:26px}.page-header p{font-size:12px;margin:0}.page-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.button{border:1px solid transparent;padding:10px 15px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:600;transition:transform .18s,box-shadow .18s;white-space:nowrap}.button:hover{transform:translateY(-1px)}.primary{background:var(--blue);color:#fff;box-shadow:0 4px 12px #3169e81c}.primary:hover{box-shadow:0 6px 20px #3169e839}.secondary{background:white;color:#49617e;border-color:#dce4ef}.danger{background:#fff0f2;color:var(--red);border-color:#f7d8df}.period-bar{display:flex;align-items:center;gap:10px;background:white;padding:12px 16px;border:1px solid var(--line);border-radius:12px;margin-bottom:23px;flex-wrap:wrap;font-size:11px}.period-bar label{display:flex;align-items:center;gap:8px;font-size:11px}.period-bar input,.period-bar select{width:auto;padding:6px 9px;font-size:11px}.period-bar .period-note{margin-left:auto;color:var(--muted);font-size:10px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:23px}.stat-card{position:relative;background:white;border:1px solid var(--line);padding:20px;border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}.stat-top{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#768499;font-size:11px;font-weight:600}.stat-icon{width:32px;height:32px;border-radius:10px;background:#edf3ff;color:var(--blue);display:grid;place-items:center}.stat-icon svg{width:16px;height:16px}.stat-value{font-size:25px;font-weight:750;letter-spacing:-.7px;margin-top:12px}.stat-note{font-size:10px;color:#8b98aa;margin-top:7px}.stat-card.accent{background:linear-gradient(130deg,#215bd5,#3778ee);border:0;color:white}.accent .stat-top,.accent .stat-note{color:#dce9ff}.accent .stat-icon{background:#ffffff24;color:white}.accent:after{content:"";position:absolute;width:120px;height:120px;border:18px solid #ffffff08;border-radius:50%;right:-25px;bottom:-55px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:21px}.panel{background:white;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;margin-bottom:21px}.panel-header{padding:20px 22px;border-bottom:1px solid #edf1f6;display:flex;justify-content:space-between;align-items:center;gap:15px}.panel-header p{font-size:10px;margin:0}.panel-body{padding:22px}.chart-legend{display:flex;gap:13px;font-size:10px;color:var(--muted)}.legend-dot{width:6px;height:6px;display:inline-block;background:var(--blue);border-radius:2px;margin-right:5px}.legend-dot.orange{background:#edb866}.chart{height:230px;display:flex;gap:10px;align-items:flex-end;padding:28px 8px 23px;border-bottom:1px solid var(--line);position:relative}.chart:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(to top,transparent 0,transparent 49px,#eef2f8 49px,#eef2f8 50px);pointer-events:none}.chart-group{flex:1;height:100%;display:flex;align-items:flex-end;justify-content:center;gap:3px;position:relative}.chart-bar{width:35%;max-width:27px;min-height:2px;background:linear-gradient(to top,#477ff0,#8cafef);border-radius:4px 4px 0 0;z-index:1}.chart-bar.expense{background:linear-gradient(to top,#e9b25c,#f3d5a5)}.chart-label{position:absolute;bottom:-20px;font-size:9px;color:var(--muted);white-space:nowrap}.chart-empty{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:12px}.alert-row{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid #eff3f7}.alert-row:last-child{border:0}.alert-icon{width:35px;height:35px;border-radius:10px;display:grid;place-items:center;background:#fff5e7;color:var(--amber)}.alert-copy{flex:1}.alert-copy strong{font-size:12px;display:block}.alert-copy small{font-size:10px;color:var(--muted)}.alert-count{font-size:17px;font-weight:750;color:#415774}.link-button{background:none;border:0;color:var(--blue);font-size:11px;font-weight:650;padding:0}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:11px}th{background:#f8fafd;color:#8491a3;font-weight:650;font-size:10px;letter-spacing:.25px;padding:12px 17px;text-align:left;border-bottom:1px solid var(--line)}td{padding:14px 17px;border-bottom:1px solid #edf1f7;max-width:230px;overflow:hidden;text-overflow:ellipsis}tbody tr:hover{background:#f8fbff}tbody tr:last-child td{border-bottom:0}.money{font-variant-numeric:tabular-nums;font-weight:600}.positive{color:var(--green)}.negative{color:var(--red)}.badge{display:inline-flex;align-items:center;padding:3px 8px;border-radius:5px;font-size:9px;font-weight:650;background:#eef2f7;color:#64738b}.badge.green{background:#e7f5ee;color:#198469}.badge.red{background:#fff0f0;color:#c64d5b}.badge.amber{background:#fff5e6;color:#ad7a24}.badge.blue{background:#eaf1ff;color:#4077d3}.table-toolbar{padding:16px 18px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);flex-wrap:wrap}.search-input{max-width:320px;flex:1;min-width:180px}.table-toolbar select{max-width:190px}.table-toolbar .record-count{margin-left:auto;font-size:10px;color:var(--muted)}input,select,textarea{width:100%;border:1px solid #dce3ee;padding:10px 12px;border-radius:8px;background:white;color:var(--text);min-height:39px}input:focus,select:focus,textarea:focus{border-color:#6496f2;box-shadow:0 0 0 3px #3169e812}textarea{min-height:83px;resize:vertical}label{display:block;font-size:11px;color:#5e6f87;font-weight:600}label input,label select,label textarea{margin-top:6px;font-weight:400;font-size:12px}.row-actions{display:flex;gap:8px}.row-actions button{border:0;background:#edf3fc;color:#42679f;border-radius:6px;font-size:10px;padding:5px 9px}.row-actions button:hover{background:#dae7fc}.empty-state{padding:45px 25px;text-align:center}.empty-state .empty-icon{width:48px;height:48px;border-radius:14px;background:#edf3ff;display:grid;place-items:center;margin:0 auto 15px;color:var(--blue)}.empty-icon svg{width:23px;height:23px}.empty-state h3{margin:0 0 7px}.empty-state p{font-size:12px;max-width:430px;margin:0 auto 18px}.empty-state .button{margin:3px}.page-footer{display:flex;justify-content:space-between;padding-top:12px;font-size:10px;color:#9ca8ba}.notice{border:1px solid #dce7fa;background:#f1f6ff;color:#587197;border-radius:10px;padding:13px 16px;font-size:11px;margin-bottom:16px;line-height:1.7}.notice.warning{background:#fff8ed;border-color:#f2e0bf;color:#927144}.module-note{margin-bottom:15px}.report-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:18px}.report-tabs button{border:1px solid var(--line);border-radius:7px;background:white;padding:8px 12px;color:#667b96;font-size:11px}.report-tabs button.active{background:#e8f0ff;color:var(--blue);border-color:#c6d9ff}.balance-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.balance-card{border:1px solid var(--line);padding:18px;border-radius:12px;background:white}.balance-card span{font-size:11px;color:var(--muted)}.balance-card strong{display:block;margin-top:7px;font-size:21px}.pager{display:flex;justify-content:space-between;align-items:center;padding:15px 18px;font-size:11px;color:var(--muted)}dialog{border:1px solid var(--line);padding:0;border-radius:18px;width:min(780px,95vw);max-height:90vh;color:var(--text);box-shadow:0 25px 100px #07183040}dialog::backdrop{background:#07183077;backdrop-filter:blur(3px)}.dialog-header{padding:23px 27px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:white;z-index:2}.dialog-header .eyebrow{margin-bottom:5px}.dialog-header h2{font-size:20px;margin:0}.form-grid{padding:24px 27px;display:grid;grid-template-columns:1fr 1fr;gap:18px}.form-grid .wide{grid-column:1/-1}.form-grid select[multiple]{min-height:130px}.field-help{font-size:10px;font-weight:400;color:var(--muted);display:block;margin-top:5px}.dialog-footer{border-top:1px solid var(--line);padding:17px 27px;display:flex;justify-content:flex-end;gap:10px;background:#fafbfd}.form-error{color:var(--red);font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;padding:0 27px 15px}.form-error:empty{display:none}.detail-grid{padding:23px 27px;display:grid;grid-template-columns:1fr 1fr;gap:16px}.detail-item small{display:block;font-size:10px;color:var(--muted)}.detail-item strong{font-size:12px;font-weight:550;white-space:pre-wrap;overflow-wrap:anywhere}.detail-section{padding:0 27px 23px}.detail-section h3{margin:10px 0 12px}.document-list{display:grid;gap:8px;margin-bottom:16px}.document-list a{padding:10px 12px;background:#f4f7fc;border-radius:8px;display:flex;justify-content:space-between;font-size:11px}.upload-row{display:flex;gap:10px;align-items:center}.upload-row input{font-size:11px}.toast{position:fixed;bottom:25px;right:25px;max-width:min(450px,90vw);background:#112c4b;color:white;padding:14px 20px;border-radius:11px;z-index:100;box-shadow:0 10px 30px #12274233;font-size:12px}.toast.error{background:#ac3347}.login-view{display:grid;grid-template-columns:1.05fr 1fr;min-height:100vh}.login-story{position:relative;background:radial-gradient(ellipse at 20% 55%,#173b75 0,transparent 60%),#0c1830;padding:50px 8%;overflow:hidden;color:white;display:flex;flex-direction:column}.brand-large{padding:0}.story-content{margin:auto 0;position:relative;z-index:1;padding:90px 0 160px}.story-content .eyebrow{color:#73a4fb;font-size:10px}.story-content h1{font-size:clamp(32px,3.5vw,53px);line-height:1.18;letter-spacing:-1.9px}.story-content em{color:#86b5ff;font-style:normal}.story-content p{color:#92aacd;font-size:14px;line-height:1.9;margin:24px 0 35px}.story-pills{display:flex;gap:15px;color:#849fc5;font-size:10px}.story-footer{font-size:10px;color:#657c9f;z-index:1}.road-art{position:absolute;bottom:70px;left:0;width:100%;height:140px;transform:rotate(-12deg)}.road-art div{height:15px;border-top:1px solid #497ed342;margin-top:30px}.road-art div:nth-child(2){border-top:2px dashed #4677c04a}.road-art span{font-size:8px;letter-spacing:5px;color:#2b4e80;position:absolute;right:50px;bottom:0}.login-panel{display:grid;place-items:center;padding:50px 30px;background:#f8fafd}.login-card{max-width:370px;width:100%}.login-card h2{font-size:28px}.login-card p{font-size:12px;line-height:1.8;margin-bottom:30px}.login-card label{margin-bottom:18px}.login-card input{padding:13px;background:white}.login-card .button{width:100%;padding:13px;justify-content:space-between;margin-top:8px}.login-card>small{display:block;text-align:center;color:#a2afbf;font-size:10px;margin-top:25px}.login-card .form-error{padding:0 0 10px}.login-card .notice{margin-top:15px}.loading-view{position:fixed;inset:0;background:#0c1830;display:flex;align-items:center;justify-content:center;flex-direction:column;color:white;z-index:200;gap:16px}.loading-view strong{font-size:19px;letter-spacing:3px}.loading-view small{font-size:10px;color:#89a3c9}.loader-line{height:2px;width:130px;position:relative;background:#23395b;overflow:hidden;border-radius:5px}.loader-line:after{content:"";position:absolute;inset:0;width:50%;background:#71a9ff;animation:load 1.2s ease-in-out infinite}@keyframes load{from{transform:translateX(-100%)}to{transform:translateX(300%)}}.welcome-strip{display:flex;gap:16px;padding:20px;background:linear-gradient(110deg,#e7efff,#f4f7ff);border:1px solid #dce7fb;border-radius:14px;margin-bottom:23px;align-items:center}.welcome-strip h3{font-size:13px}.welcome-strip p{font-size:11px;margin:3px 0 0}.welcome-strip .button{margin-left:auto}.import-body{padding:23px 27px}.import-step{margin-bottom:18px}.mapping-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.import-preview{max-height:250px;overflow:auto;border:1px solid var(--line);border-radius:8px;margin:20px 0}.import-summary{font-size:12px;color:var(--muted)}.small-text{font-size:11px;color:var(--muted)}.checklist{display:grid;gap:12px}.checklist a{padding:15px 18px;border:1px solid var(--line);border-radius:10px;background:white;display:flex;gap:15px;align-items:center;color:var(--text)}.step-number{width:30px;height:30px;border-radius:10px;background:#e8effc;color:var(--blue);display:grid;place-items:center;font-size:12px;font-weight:700}.checklist small{display:block;color:var(--muted);font-size:11px}.report-heading{padding:16px 22px;font-size:11px;color:var(--muted)}@media(min-width:1700px){.stats-grid{gap:22px}.stat-value{font-size:29px}}@media(max-width:1200px){.app-shell{grid-template-columns:218px minmax(0,1fr)}.sidebar{width:218px}.brand{font-size:22px}main{padding:25px}.topbar{padding:0 25px}.stat-card{padding:16px}.stat-value{font-size:21px}.dashboard-grid{grid-template-columns:minmax(0,1.35fr) minmax(260px,1fr)}.today-label{display:none}.balance-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:900px){.app-shell{display:block}.sidebar{transform:translateX(-100%);transition:transform .2s;width:244px;box-shadow:10px 0 40px #091c3733}.sidebar.open{transform:translateX(0)}#mobile-menu{display:inline-block;margin-right:12px}.topbar{height:65px}.profile div{display:none}.stats-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}.page-header{align-items:flex-start}.page-actions{justify-content:flex-end}.login-view{grid-template-columns:1fr}.login-story{display:none}.login-panel{min-height:100vh}.chart{height:210px}}@media(max-width:600px){main{padding:21px 15px}.topbar{padding:0 15px}.topbar-right{gap:6px}.breadcrumb{font-size:10px}.breadcrumb span{padding:0 7px}.profile{padding-left:8px}.page-header{display:block}.page-actions{justify-content:flex-start;margin-top:16px}h1{font-size:26px}.stats-grid{gap:10px}.stat-card{padding:14px}.stat-value{font-size:22px}.stat-top{font-size:10px}.stat-icon{width:25px;height:25px}.stat-note{font-size:9px}.period-bar{gap:6px}.period-bar .period-note{margin:4px 0 0;width:100%}.panel-header{padding:17px}.panel-body{padding:17px}.form-grid,.detail-grid,.mapping-grid{grid-template-columns:1fr;padding:20px}.dialog-header{padding:20px}.dialog-footer{padding:15px 20px}.detail-section{padding:0 20px 20px}.form-grid .wide{grid-column:auto}.balance-grid{grid-template-columns:1fr 1fr}.balance-card{padding:12px}.balance-card strong{font-size:18px}.welcome-strip{display:block}.welcome-strip .button{margin-top:14px}.page-footer{font-size:9px}.chart-legend{font-size:9px;gap:7px}.table-toolbar{gap:8px}.table-toolbar select{max-width:100%}.table-toolbar .record-count{margin-left:0}.upload-row{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media print{.sidebar,.topbar,.page-actions,.period-bar,.row-actions,.table-toolbar,.page-footer{display:none!important}.app-shell{display:block}main{padding:0}.panel{box-shadow:none;break-inside:avoid}.stats-grid{grid-template-columns:repeat(4,1fr)}body{background:white}}
.inline-checkbox{width:auto;min-height:auto;margin-right:8px}.alert-icon svg{width:18px;height:18px}.panel-header>svg{width:20px;height:20px;color:var(--muted)}
.dashboard-grid>div,.panel{min-width:0}@media(max-width:900px){.dashboard-grid{grid-template-columns:minmax(0,1fr)}}@media(max-width:600px){.panel-header{flex-wrap:wrap}.chart-legend{flex-wrap:wrap}}

.module-shortcuts{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.unit-summary{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}.unit-summary h3{margin:0 0 12px}.unit-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}.unit-facts>div{padding:10px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:8px}.unit-facts small,.unit-facts strong{display:block;overflow-wrap:anywhere}.unit-facts small{color:var(--muted);font-size:11px;margin-bottom:4px}.unit-facts strong{font-size:13px}.toll-filters{margin-top:18px}.toll-filters label{min-width:130px}.toll-filters input,.toll-filters select{width:100%}#toll-preview select{min-width:130px}#toll-preview td small{display:block;font-size:11px}#toll-pivot{margin-top:20px}

/* Directorio de módulos y espacios de trabajo de LAMTRA. */
:root{--module-red:#cf2431;--module-dark:#ad1724}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.topbar-home{display:none;align-items:center;gap:10px;text-decoration:none;color:#13233c;letter-spacing:1px;font-size:21px}
.topbar-links{display:none;gap:28px;align-items:center}.topbar-links a{color:#46536a;text-decoration:none;font-weight:650;font-size:14px}.topbar-links a:hover{color:var(--module-red)}
.topbar>div:first-child{display:flex;align-items:center;gap:32px;min-width:0}
.portal-mode{display:block}.portal-mode .sidebar{display:none}.portal-mode .main-shell{width:100%;grid-column:auto}.portal-mode .topbar-home,.portal-mode .topbar-links{display:flex}.portal-mode .breadcrumb,.portal-mode #mobile-menu{display:none}.portal-mode .topbar{padding:0 4%;border-bottom:1px solid #e4e7ec;height:90px}.portal-mode #main-content{max-width:1320px;margin:0 auto;padding:42px 34px}.portal-mode .workspace-back{display:none}.portal-mode .page-symbol{display:none}.portal-mode .page-header{padding-bottom:24px;border-bottom:1px solid #dfe4eb;margin-bottom:24px}.portal-mode .page-header h1{font-size:36px;letter-spacing:-1px}.portal-mode .page-header p{max-width:620px;font-size:15px;line-height:1.6}
.workspace-back{display:inline-flex;text-decoration:none;color:#65738a;font-size:13px;font-weight:650;margin-bottom:23px}.workspace-back:hover{color:var(--module-red)}
.module-directory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 25px;flex-wrap:wrap}.module-group-filters{display:flex;gap:6px;flex-wrap:wrap}.module-group-button{border:1px solid transparent;background:transparent;padding:11px 14px;border-radius:7px;color:#596477;font-weight:650;cursor:pointer}.module-group-button.active{background:#fff;border-color:#d8dfe8;color:#13233c;box-shadow:0 2px 4px #14254008}.module-search{position:relative;min-width:220px;flex:0 1 285px}.module-search input{width:100%;padding:12px 40px 12px 15px;border-radius:7px;border:1px solid #d8dfe8;background:#fff;font-size:14px}.module-search>span:last-child{position:absolute;right:14px;top:6px;font-size:25px;color:#738095}.module-directory-label{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:18px;color:#4e5c72;font-size:13px}.module-directory-label strong{font-size:14px}.module-directory-label>span{color:#79869a}
.module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px}.module-card{display:flex;flex-direction:column;text-decoration:none;min-width:0;border:1px solid #e2e6ec;border-radius:9px;overflow:hidden;background:#fff;color:#1a2940;box-shadow:0 3px 9px #14254006;transition:transform .18s,box-shadow .18s}.module-card:hover{transform:translateY(-4px);box-shadow:0 10px 25px #14254018}.module-card:focus-visible{outline:3px solid #205bc9;outline-offset:4px}.module-card-face{position:relative;min-height:258px;padding:26px 26px 20px;display:flex;flex-direction:column;align-items:center;background:var(--module-red);color:#fff}.module-card-label{font-size:10px;letter-spacing:2px;text-transform:uppercase;color:#ffffffbd;margin-bottom:13px}.module-card-face h2{font-size:25px;font-weight:850;letter-spacing:-.65px;text-transform:uppercase;font-style:italic;line-height:1.15;text-align:center;margin:0;max-width:310px}.module-card-icon{display:flex;flex:1;align-items:center;justify-content:center;padding:20px 0 6px}.module-card-icon svg{width:95px;height:95px;stroke-width:1.3}.module-card-caption{padding:20px 22px 18px;display:flex;flex-direction:column;flex:1}.module-card-caption p{margin:0 0 20px;font-size:14px;line-height:1.65;color:#637086;min-height:68px}.module-card-footer{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:auto;border-top:1px solid #edf0f4;padding-top:14px}.module-card-footer small{font-size:11px;color:#8490a2}.module-card-footer strong{font-size:12px;color:var(--module-red)}.module-card-footer strong span{margin-left:8px}.module-empty{grid-column:1/-1;border:1px dashed #cdd5e1;padding:45px;text-align:center;color:#65738a}
.page-header{align-items:flex-start;gap:18px}.page-header>div:first-of-type{flex:1;min-width:0}.page-symbol{display:flex;width:62px;height:62px;border-radius:12px;align-items:center;justify-content:center;background:#fff1f2;color:var(--module-red);flex:none;border:1px solid #f4dce0}.page-symbol svg{width:34px;height:34px}.page-actions{flex-wrap:wrap;justify-content:flex-end}.nav-link{min-height:44px;padding-top:11px;padding-bottom:11px;font-size:13px;line-height:1.45}.sidebar nav{padding-bottom:25px}.nav-group-label{letter-spacing:1.7px}.workspace-navigation{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:20px}.workspace-navigation a{padding:11px 17px;background:#fff;border:1px solid #dee4ee;border-radius:7px;text-decoration:none;color:#52627b;font-weight:650;font-size:13px}.workspace-navigation a.active{background:#fff1f2;color:#b41c29;border-color:#efc3c8}.workspace-summary{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 25px;border:1px solid #e0e5ed;background:#fff;border-radius:9px;margin-bottom:22px}.workspace-summary>div:first-child{display:flex;align-items:center;gap:15px}.workspace-summary strong{font-size:32px;color:#192b47;font-weight:750}.workspace-summary span{font-size:14px;color:#5f6c80}.workspace-summary-note{max-width:370px;font-size:12px;line-height:1.65;color:#8390a3}.table-toolbar{gap:12px;padding:19px 22px;flex-wrap:wrap}.table-toolbar input,.table-toolbar select{min-height:42px}.table-toolbar .search-input{min-width:180px;flex:1}.record-count{white-space:nowrap}.module-shortcuts{flex-wrap:wrap;gap:10px}.report-tabs{gap:8px;flex-wrap:wrap}.report-tabs button{padding:13px 19px;border-radius:7px}.panel{border-radius:10px}.panel th{padding-top:16px;padding-bottom:16px;font-size:11px;letter-spacing:.3px}.panel td{padding-top:17px;padding-bottom:17px}.row-actions{gap:8px}.row-actions button{padding:7px 9px}.form-section{grid-column:1/-1;font-size:13px;letter-spacing:.2px;margin:12px 0 0;padding:14px 0 10px;border-bottom:1px solid #e5e9ef;color:#20314c}.form-section:first-child{margin-top:0}.form-grid{gap:19px 24px}.form-grid>label{font-size:12px;line-height:1.5}.form-grid input,.form-grid select{min-height:44px}.dialog-header{border-bottom:1px solid #e5e9ef;background:#fafbfc}.dialog-header h2{font-size:24px}.dialog-footer{border-top:1px solid #e5e9ef;background:#fafbfc}
@media(min-width:1400px){.portal-mode #main-content{padding-left:45px;padding-right:45px}}
@media(max-width:1100px){.module-card-face h2{font-size:23px}.module-card-face{padding-left:15px;padding-right:15px}.portal-mode .today-label{display:none}.portal-mode .topbar{padding:0 25px}.topbar>div:first-child{gap:22px}.topbar-links{gap:18px}.page-header{flex-wrap:wrap}.page-actions{width:100%;justify-content:flex-start}.workspace-summary-note{max-width:280px}}
@media(max-width:900px){.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-mode .topbar{height:78px}.portal-mode #main-content{padding:28px 25px}.portal-mode .profile>div{display:none}.workspace-summary-note{display:none}.page-header h1{font-size:28px}.page-symbol{width:52px;height:52px}.page-symbol svg{width:29px;height:29px}}
@media(max-width:600px){.portal-mode .topbar{padding:0 16px;height:70px}.portal-mode .topbar-home{font-size:16px;gap:7px}.portal-mode .topbar-home .brand-mark{width:32px;height:32px;font-size:19px}.portal-mode .topbar-links{display:none}.portal-mode .profile{display:none}.portal-mode .topbar-right{gap:8px}.portal-mode #main-content{padding:26px 18px}.portal-mode .page-header h1{font-size:30px}.module-directory-toolbar{gap:14px}.module-group-filters{gap:4px}.module-group-button{font-size:11px;padding:9px 10px}.module-search{flex:1 1 100%}.module-directory-label{align-items:flex-start}.module-directory-label strong{max-width:180px}.module-grid{grid-template-columns:1fr;gap:20px}.module-card-face{min-height:235px}.module-card-face h2{font-size:27px}.module-card-caption p{min-height:auto;margin-bottom:15px}.module-card-icon svg{width:88px;height:88px}.workspace-back{margin-bottom:17px}.page-header{gap:12px}.page-header>div:first-of-type{width:calc(100% - 64px)}.page-actions .button{font-size:12px;padding:11px 13px}.workspace-navigation{gap:6px}.workspace-navigation a{font-size:12px;padding:10px 12px}.workspace-summary{padding:17px}.workspace-summary strong{font-size:28px}.workspace-summary span{font-size:12px}.table-toolbar{padding:16px;gap:10px}.table-toolbar input,.table-toolbar select{width:100%;max-width:100%}.table-toolbar .record-count{width:100%}.form-grid{gap:16px}.dialog-header h2{font-size:19px}.report-tabs button{font-size:12px;padding:11px 12px}.portal-mode .page-actions{width:100%}}
@media(prefers-reduced-motion:reduce){.module-card{transition:none}.module-card:hover{transform:none}}
@media print{.workspace-back,.workspace-navigation,.page-symbol,.topbar-links{display:none}.workspace-summary{break-inside:avoid}.module-grid{grid-template-columns:repeat(3,1fr)}.module-card-face{print-color-adjust:exact}}

/* Las tarjetas son el menú principal; el logo permite regresar a ellas. */
.app-shell{display:block}
.app-shell #sidebar,.app-shell #mobile-menu,.app-shell .workspace-back{display:none!important}
.app-shell .main-shell{grid-column:auto;width:100%;margin-left:0}
.app-shell .topbar-home{display:flex;flex-shrink:0}
.app-shell:not(.portal-mode) .topbar-links{display:none}
.app-shell:not(.portal-mode) #main-content{max-width:1600px;margin:0 auto;padding-top:32px}
.app-shell:not(.portal-mode) .breadcrumb{font-size:13px}
@media(max-width:1100px){.app-shell .today-label{display:none}.app-shell .profile>div{display:none}}
@media(max-width:600px){.app-shell .topbar{padding-left:16px;padding-right:16px}.app-shell .topbar>div:first-child{gap:12px}.app-shell .topbar-home{font-size:16px;gap:7px}.app-shell .topbar-home .brand-mark{width:32px;height:32px;font-size:19px}.app-shell:not(.portal-mode) .breadcrumb{display:none}.app-shell .profile{display:none}.app-shell .topbar-right{gap:8px}.app-shell:not(.portal-mode) #main-content{padding-top:24px}}
@media print{.app-shell .topbar-home{display:none}}

.unit-cell{display:block;color:#7d8a9c;font-size:11px;line-height:1.6;margin-top:4px}.unit-summary h3:not(:first-child){margin-top:22px}.detail-section .unit-summary{margin-bottom:20px}.unit-facts strong{overflow-wrap:anywhere}.unit-facts{grid-template-columns:repeat(auto-fit,minmax(125px,1fr))}

/* Ilustración naranja con giro 3D junto a las observaciones de la ficha. */
.unit-summary-bottom{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:18px;margin-top:14px;align-items:stretch}
.unit-notes{border:1px solid #dce5f1;border-radius:10px;background:#fff;padding:16px;min-width:0}.unit-notes small{display:block;color:#7d8ba1;font-size:11px}.unit-notes p{font-size:12px;line-height:1.7;color:#344761;margin:9px 0 0;overflow-wrap:anywhere;white-space:pre-wrap;font-weight:500}
.unit-trailer{min-width:0;position:relative;border:1px solid #e0e7f1;border-radius:12px;background:linear-gradient(145deg,#fff,#edf2f8);overflow:hidden}.trailer-caption{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 14px 0;color:#7a889d;font-size:10px;position:relative;z-index:1}.trailer-toggle{border:0;background:transparent;color:#5e708b;font:inherit;cursor:pointer;padding:5px 7px;border-radius:5px}.trailer-toggle:hover{background:#dfe7f2;color:#1e3b61}.trailer-toggle:focus-visible{outline:2px solid #3169e8;outline-offset:2px}.trailer-stage{height:210px;position:relative}.trailer-canvas{display:block;width:100%;height:100%;position:relative;z-index:1}.trailer-shadow{position:absolute;left:19%;right:19%;height:24px;bottom:22px;background:radial-gradient(ellipse,#28334225,transparent 70%);filter:blur(5px);border-radius:50%;transform:scaleY(.7)}.trailer-fallback{display:flex;align-items:center;justify-content:center;height:100%;font-size:88px}
@media(max-width:600px){.unit-summary-bottom{grid-template-columns:1fr;gap:12px}.trailer-stage{height:215px}.unit-notes{padding:14px}}
@media print{.trailer-toggle{display:none}.unit-trailer{break-inside:avoid}}

.historical-marker{display:block;font-size:11px;color:#ab6517;line-height:1.5;margin-top:4px}.historical-origin{padding:17px 0;color:#536178}.historical-origin p,.historical-origin li{font-size:12px;line-height:1.7;overflow-wrap:anywhere}.historical-origin h3{margin-top:0}.historical-origin summary,.history-reference summary{font-size:12px;font-weight:650;cursor:pointer;padding:12px 0}.historical-form{background:#fff8ed;border:1px solid #f0d7ad;border-radius:10px;padding:0 17px 17px}.history-confirm{display:flex;align-items:flex-start;gap:10px;font-size:12px;line-height:1.7}.history-confirm input{width:17px;height:17px;min-height:17px;flex:none;margin-top:3px}.history-reference{border-bottom:1px solid #e1e7ee}#module-references{margin-top:24px}

/* LAMTRA: azules y rojos suaves, superficies claras y jerarquía consistente. */
:root{--nav:#263e60;--bg:#f4f6fb;--surface:#fff;--text:#253751;--muted:#64758c;--line:#dfe6f0;--blue:#416ba5;--red:#ad4f62;--module-red:#ad4f62;--radius:18px;--shadow:0 9px 28px #344f7710;--soft-blue:#edf3fc;--soft-red:#fbf0f2}
body{background:radial-gradient(ellipse at 0 0,#e9effa 0,transparent 45%),radial-gradient(ellipse at 100% 25%,#f8edf0 0,transparent 42%),var(--bg);background-attachment:fixed}
.topbar,.portal-mode .topbar{background:#ffffffed;border-bottom-color:#dfe5ef;box-shadow:0 3px 20px #334f7605}
.brand-mark{background:linear-gradient(140deg,#6a8cbc,#355c94);box-shadow:0 5px 15px #486ea82b;border:1px solid #ffffff5c}
.avatar{background:var(--soft-blue);color:#365e95}
.topbar-links a{color:#506580}
.topbar-links a:hover{color:var(--blue)}
.button{border-radius:11px;min-height:40px}
.primary{background:linear-gradient(120deg,#5079b0,#3e6397);box-shadow:0 4px 12px #426ba51a}
.secondary{background:#ffffffd9;color:#3d5d86;border-color:#d5dfed}
.secondary:hover{background:var(--soft-blue);border-color:#b7c9e1}
.danger{background:var(--soft-red);border-color:#e9cad2;color:#9c3e53}
.page-header{padding:24px 26px;border:1px solid #dce4ef;border-radius:20px;background:linear-gradient(105deg,#edf3fc,#fff 62%,#fbf0f2);box-shadow:0 5px 18px #405e8b06}
.page-header h1{color:#253b5b}
.page-header p{color:#62748c}
.page-symbol{background:#ffffffc7;color:#5476a7;border-color:#d5e0ef;border-radius:16px}
.eyebrow{color:#5575a2}
.portal-mode .page-header{position:relative;overflow:hidden;align-items:center;min-height:245px;padding:32px 36px;border:1px solid #dbe3ef;border-radius:25px;margin-bottom:22px;background:radial-gradient(ellipse at 90% 15%,#f6e1e7 0,transparent 42%),linear-gradient(115deg,#e8f0fc 0,#f8faff 57%,#fdf6f7 100%);box-shadow:0 12px 35px #3e5b8310}
.portal-mode .page-header:before{content:'';position:absolute;inset:0 auto 0 0;width:5px;background:linear-gradient(#7798c8,#c58291)}
.portal-mode .page-header>div:first-of-type{position:relative;z-index:1;max-width:650px}
.portal-mode .page-header h1{font-size:38px;line-height:1.16;letter-spacing:-1.25px;max-width:570px;margin-bottom:15px;font-weight:750}
.portal-mode .page-header .eyebrow{letter-spacing:1.9px;margin-bottom:17px;font-size:10px}
.portal-mode .page-header p{max-width:560px;font-size:14px;line-height:1.8}
.portal-mode .page-actions{width:290px;flex:0 0 290px;flex-direction:column;align-items:center;gap:8px;position:relative;z-index:1}
.portal-hero-art{width:270px;color:#6687b5;filter:drop-shadow(0 8px 12px #567dab12)}
.portal-hero-art svg{display:block;width:100%;height:auto}
.portal-mode .page-actions .button{font-size:12px;padding:11px 18px;background:#ffffffc9;box-shadow:0 4px 12px #4c68970a}
.portal-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:26px}
.portal-overview>a{display:flex;align-items:center;gap:14px;padding:18px 20px;background:#ffffffd9;border:1px solid #dce5f1;border-radius:16px;color:#344f74;box-shadow:0 3px 12px #344e7705;transition:transform .18s,border-color .18s}
.portal-overview>a:nth-child(2){border-color:#ead9df}
.portal-overview>a:hover{transform:translateY(-2px);border-color:#acc0de;background:#fff}
.overview-icon{width:44px;height:44px;flex:none;background:#edf3fc;border:1px solid #dce7f5;border-radius:13px;display:grid;place-items:center;color:#587eb4}
.overview-icon svg{width:24px;height:24px}
.portal-overview>a:nth-child(2) .overview-icon{background:#fbf0f2;border-color:#f0dde2;color:#b56c7c}
.portal-overview small{display:block;font-size:9px;letter-spacing:1.5px;color:#7186a4;margin-bottom:3px;font-weight:700}
.portal-overview strong{font-size:13px;font-weight:650}
.overview-arrow{margin-left:auto;color:#839bbd;font-size:19px}
.module-directory-toolbar{background:#ffffffb8;border:1px solid #e0e6ef;border-radius:16px;padding:12px 14px;gap:12px;margin-bottom:25px}
.module-group-button{border-radius:10px;padding:10px 13px;font-size:12px;color:#5e728e}
.module-group-button:hover{background:#f2f5fa}
.module-group-button.active{background:#eaf1fc;color:#3b6094;border-color:#cddcf0;box-shadow:none}
.module-search input{border-radius:10px;border-color:#d9e3ef;background:#f9fbff;padding-top:11px;padding-bottom:11px;font-size:12px}
.module-directory-label{padding:0 3px;margin-bottom:20px}
.module-directory-label strong{color:#3a5375;font-size:14px}
.module-directory-label>span{font-size:11px;color:#7184a0}
.module-grid{gap:22px}
.module-card{border-radius:20px;border-color:#dce5f1;box-shadow:0 5px 19px #39588008}
.module-card:hover{transform:translateY(-4px);border-color:#b9cce6;box-shadow:0 12px 27px #39588015}
.module-card-face{min-height:235px;padding:26px 24px 21px;background:linear-gradient(135deg,#e8f0fd,#f1f5fc 65%,#e5edfa);color:#355783;align-items:flex-start;overflow:hidden}
.module-card-face:after{content:'';position:absolute;width:190px;height:190px;border:1px solid #b5c9e536;border-radius:50%;right:-65px;bottom:-87px;box-shadow:0 0 0 30px #bacce619;pointer-events:none}
.module-card-label{color:#6483aa;font-size:9px;letter-spacing:1.7px;font-weight:700;margin-bottom:12px;border:1px solid #c8d9ee;background:#ffffff70;padding:4px 9px;border-radius:20px}
.module-card-face h2{color:#355783;font-size:23px;font-weight:730;font-style:normal;text-transform:none;text-align:left;letter-spacing:-.55px;line-height:1.22;max-width:290px;z-index:1}
.module-card-icon{flex:none;width:68px;height:68px;margin-top:22px;padding:14px;background:#ffffffb3;border:1px solid #d2dfef;border-radius:19px;color:#6484b1;box-shadow:0 5px 15px #4b6f9e06;z-index:1}
.module-card-icon svg{width:39px;height:39px;stroke-width:1.45}
.module-card-caption{padding:21px 23px 20px;background:linear-gradient(#fff,#fcfdff)}
.module-card-caption p{font-size:12px;color:#64768e;line-height:1.8;min-height:65px;margin-bottom:17px}
.module-card-footer{padding-top:15px;border-color:#e8edf5}
.module-card-footer small{color:#7386a1;font-size:10px}
.module-card-footer strong{color:#496da0;font-size:11px;display:flex;align-items:center;gap:8px}
.module-card-footer strong span{display:grid;place-items:center;width:25px;height:25px;background:#edf3fc;border-radius:8px;margin-left:0}
.module-card--red{border-color:#ecdee3}
.module-card--red:hover{border-color:#d7b6c1;box-shadow:0 12px 27px #9d526914}
.module-card--red .module-card-face{background:linear-gradient(135deg,#f9e9ed,#fcf1f3 65%,#f4e3e9)}
.module-card--red .module-card-face h2{color:#8b4a5e}
.module-card--red .module-card-label{color:#a36778;border-color:#e8cdd6}
.module-card--red .module-card-icon{color:#b77a8c;border-color:#ecd4dd}
.module-card--red .module-card-face:after{border-color:#d7adba40;box-shadow:0 0 0 30px #dcb9c51c}
.module-card--red .module-card-footer strong{color:#a15d72}
.module-card--red .module-card-footer strong span{background:#faf0f3}
.workspace-navigation a{border-radius:11px;border-color:#dce5f0;background:#ffffffcc;color:#60738e}
.workspace-navigation a.active{background:#eaf1fc;color:#42679d;border-color:#c6d8f0}
.workspace-summary{border-radius:16px;border-color:#dce5f1;background:linear-gradient(110deg,#eef4fd,#fff 65%,#fcf3f5);box-shadow:0 5px 18px #47678d06}
.workspace-summary strong{color:#355783}
.panel{border-radius:17px;border-color:#dfe6f0;box-shadow:0 5px 20px #3b567a06;overflow:hidden}
.panel-header,.table-toolbar{background:linear-gradient(100deg,#f4f7fd,#fff 75%,#fdf7f8);border-bottom-color:#e2e8f2}
.panel th,thead th{background:#eef3fb;color:#5b7397;border-bottom-color:#dce5f2;font-weight:650}
.panel tbody tr:hover{background:#f5f8fe}
.row-actions button{border-radius:8px;background:#edf3fc;color:#496da0;border-color:#dbe5f3}
.row-actions button[data-action=delete]{background:#fcf0f3;color:#a55c70;border-color:#efdae1}
input,select,textarea{border-color:#d9e3f0!important;border-radius:10px}
input:focus,select:focus,textarea:focus{border-color:#91aed6!important;box-shadow:0 0 0 3px #759acd18}
.report-tabs button{background:#ffffffba;border:1px solid #dfe7f2;border-radius:11px;color:#5d7395}
.report-tabs button.active{background:#eaf1fc;color:#3c6093;border-color:#c8d9f0;box-shadow:inset 0 -2px #89a7cf}
.period-bar{background:#ffffffd9;border-color:#dfe6f0;border-radius:14px}
.stat-card{border-color:#dce5f1;border-radius:18px;background:linear-gradient(145deg,#fff,#f4f7fd);box-shadow:0 5px 18px #3d5a8207}
.stat-icon{background:#eaf1fc;color:#6585b2;border:1px solid #dae5f5}
.stat-card:nth-child(2n){background:linear-gradient(145deg,#fff,#fcf3f5);border-color:#ebdce3}
.stat-card:nth-child(2n) .stat-icon{background:#fbf0f3;color:#aa6b80;border-color:#ecd5df}
.stat-card.accent{background:linear-gradient(120deg,#e7effc,#f8faff 60%,#faeff3);color:#314e78;border-color:#d2dff0}
.stat-card.accent .stat-top,.stat-card.accent .stat-note{color:#5d7599}
.stat-card.accent .stat-icon{background:#ffffffa6;color:#5b7cae}
.balance-card{background:linear-gradient(140deg,#edf3fc,#fff);border-color:#dce5f1;border-radius:14px}
.unit-summary{background:linear-gradient(110deg,#f0f5fd,#fff 75%,#fcf3f6);border-color:#d9e3f1;border-radius:16px}
.unit-fact{background:#ffffffc9;border-color:#e0e7f2;border-radius:11px}
.form-section{color:#4d6c95;border-color:#dde6f3}
.dialog-header{background:linear-gradient(105deg,#edf3fc,#fff 70%,#fbf0f3);border-bottom-color:#dfe6f0;padding-top:23px;padding-bottom:23px}
.dialog-footer{background:#f6f8fc;border-top-color:#e1e7f1}
dialog{border-radius:20px;box-shadow:0 25px 90px #29446730}
.login-story{background:radial-gradient(ellipse at 15% 50%,#6581ac,transparent 65%),radial-gradient(ellipse at 100% 5%,#9a7188,transparent 60%),#344f76}
.login-view{background:linear-gradient(145deg,#f0f5fd,#fff 60%,#fcf0f3)}
.loading-view{background:linear-gradient(140deg,#f0f5fd,#fff 60%,#fcf0f3)}
.page-footer{color:#7e8fa8;border-top-color:#e0e7f0}
/* Los colores semánticos de advertencias y estados se conservan. */
@media(max-width:1100px){.portal-mode .page-header{padding:28px}.portal-mode .page-header h1{font-size:34px}.portal-mode .page-actions{flex:0 0 235px;width:235px}.portal-hero-art{width:230px}.portal-overview>a{padding:15px;gap:10px}.portal-overview strong{font-size:12px}}
@media(max-width:900px){.portal-mode .page-header{flex-wrap:nowrap;gap:15px}.portal-mode .page-header>div:first-of-type{width:auto}.portal-mode .page-actions{flex:0 0 190px;width:190px}.portal-hero-art{width:180px}.portal-overview{gap:10px}.portal-overview>a{padding:14px 12px}.overview-icon{width:36px;height:36px;border-radius:10px}.overview-arrow{display:none}.module-directory-toolbar{align-items:stretch}.module-group-filters{flex:1 1 100%}.module-search{flex:1 1 100%}.module-card-face h2{font-size:22px}}
@media(max-width:600px){.portal-mode #main-content{padding:22px 16px}.portal-mode .page-header{padding:26px 23px;min-height:0;border-radius:20px;flex-wrap:wrap;gap:19px}.portal-mode .page-header h1{font-size:31px;line-height:1.2}.portal-mode .page-header p{font-size:12px}.portal-mode .page-header .eyebrow{font-size:8px;letter-spacing:1.5px;margin-bottom:14px}.portal-mode .page-actions{width:100%;flex:1 1 100%;align-items:flex-start}.portal-hero-art{display:none}.portal-mode .page-actions .button{min-height:42px}.portal-overview{grid-template-columns:1fr;gap:9px;margin-bottom:20px}.portal-overview>a{padding:12px 15px;border-radius:13px}.portal-overview strong{font-size:12px}.portal-overview small{font-size:8px}.overview-icon{width:37px;height:37px}.overview-arrow{display:block}.module-directory-toolbar{padding:10px;border-radius:14px}.module-group-filters{gap:3px}.module-group-button{padding:9px 10px;font-size:10px}.module-directory-label{font-size:10px}.module-directory-label strong{font-size:12px;max-width:180px}.module-card-face{min-height:219px;padding:24px}.module-card-face h2{font-size:24px}.module-card-icon{width:60px;height:60px;margin-top:20px;border-radius:17px}.module-card-icon svg{width:34px;height:34px}.module-card-caption p{min-height:0}.page-header{padding:20px 18px;border-radius:16px}.page-header h1{font-size:24px}.page-symbol{width:46px;height:46px;border-radius:13px}.page-actions{justify-content:flex-start}.table-toolbar{padding:15px}.dialog-header h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){.portal-overview>a{transition:none}.portal-overview>a:hover{transform:none}}
@media print{body{background:#fff}.portal-hero-art,.portal-overview{display:none}.page-header,.panel,.stat-card{box-shadow:none}.module-card-face{print-color-adjust:exact}}

/* Mayor presencia y luz de contorno en las tarjetas de módulos. */
.module-card{--card-edge:#7fa2cf;--card-glow:#508be540;--card-ink:#254d83;border:1.5px solid var(--card-edge);box-shadow:0 6px 20px #345d8f0e;transition:border-color .22s,box-shadow .22s,transform .22s}
.module-card--red{--card-edge:#c8849d;--card-glow:#d9658c35;--card-ink:#763249}
.module-card-face{background:linear-gradient(130deg,#bdd2f1,#d1e0f6 60%,#bed2ee)}
.module-card--red .module-card-face{background:linear-gradient(130deg,#edbccb,#f4d0dc 60%,#e7b6c6)}
.module-card-face h2,.module-card--red .module-card-face h2{color:var(--card-ink);font-weight:800}
.module-card-label{color:#416793;border-color:#a9c2e4;background:#ffffffa6;font-weight:750}
.module-card--red .module-card-label{color:#93516a;border-color:#d9a9ba;background:#ffffffa6}
.module-card-icon{color:#416da5;border-color:#afc6e5;background:#ffffffc4;box-shadow:0 5px 14px #426eaa10}
.module-card--red .module-card-icon{color:#a55974;border-color:#dfb6c5;background:#ffffffc4}
.module-card-caption p{color:#4e6380}
.module-card-footer{border-color:#dce6f4}
.module-card-footer small{color:#5e7390}
.module-card-footer strong{color:#355e95;font-weight:750}
.module-card--red .module-card-footer strong{color:#93435f}
.module-card:hover,.module-card:focus-visible{border-color:#588cd4;box-shadow:0 0 0 2px #7ca5e22b,0 0 24px var(--card-glow),0 14px 30px #3b63991c;transform:translateY(-4px)}
.module-card--red:hover,.module-card--red:focus-visible{border-color:#bd6483;box-shadow:0 0 0 2px #da97b02d,0 0 24px var(--card-glow),0 14px 30px #93455e1a}
.module-card:focus-visible{outline:2px solid #588cd4;outline-offset:4px}
.module-card--red:focus-visible{outline-color:#bd6483}
@media(prefers-reduced-motion:reduce){.module-card{transition:none}.module-card:hover,.module-card:focus-visible{transform:none}}
@media print{.module-card,.module-card:hover{box-shadow:none;transform:none}}

/* Títulos centrados e ilustraciones protagonistas en las tarjetas. */
.module-card-face {
    min-height: 292px;
    padding: 24px 22px;
    align-items: center;
    background: linear-gradient(130deg, #adc8ee, #c0d5f3 60%, #aac5e9);
}
.module-card--red .module-card-face {
    background: linear-gradient(130deg, #e9aabb, #f0c0d0 60%, #e4a7bb);
}
.module-card-label {
    align-self: center;
    margin-bottom: 10px;
}
.module-card-face h2 {
    width: 100%;
    max-width: 330px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 24px;
    line-height: 1.2;
    margin: 0;
}
.module-card-icon {
    width: 112px;
    height: 112px;
    margin: 20px auto 0;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 22px rgba(48,85,134,.12);
}
.module-card-icon svg {
    width: 76px;
    height: 76px;
    stroke-width: 1.45;
}
.module-card--red .module-card-icon {
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 22px rgba(139,59,87,.1);
}
@media(max-width:900px) {
    .module-card-face h2 {font-size: 22px;}
}
@media(max-width:600px) {
    .module-card-face {min-height: 278px;padding: 23px 20px;}
    .module-card-face h2 {font-size: 24px;}
    .module-card-icon {width: 104px;height: 104px;margin-top: 18px;padding: 17px;border-radius: 24px;}
    .module-card-icon svg {width: 70px;height: 70px;}
}

/* Paleta derivada del logo LAM y textos de tarjetas más legibles. */
.module-card {
    --card-edge: #588ace;
    --card-glow: #0755ba40;
}
.module-card--red {
    --card-edge: #d95360;
    --card-glow: #d7193038;
}
.module-card-face {
    background: linear-gradient(135deg, #8fb7ee, #afcef7 58%, #82aae4);
}
.module-card--red .module-card-face {
    background: linear-gradient(135deg, #f18a90, #f6b0b5 58%, #e97983);
}
.module-card-face h2,
.module-card--red .module-card-face h2 {
    color: #111111;
    font-size: 28px;
    font-weight: 800;
    min-height: 68px;
    line-height: 1.2;
    letter-spacing: -.65px;
}
.module-card-label {
    color: #064b9d;
    border-color: #729dd7;
    background: rgba(255,255,255,.85);
    font-size: 10px;
}
.module-card--red .module-card-label {
    color: #b41725;
    border-color: #de6871;
    background: rgba(255,255,255,.85);
}
.module-card-icon {
    color: #0753ad;
    border-color: #7da5dc;
}
.module-card--red .module-card-icon {
    color: #c41b2b;
    border-color: #df777f;
}
.module-card-caption p {
    color: #263a53;
    font-size: 16px;
    line-height: 1.7;
    min-height: 88px;
    margin-bottom: 20px;
}
.module-card-footer small {font-size: 12px;color: #536780;}
.module-card-footer strong {font-size: 14px;color: #074fa4;}
.module-card--red .module-card-footer strong {color: #ba1727;}
.module-card:hover,
.module-card:focus-visible {
    border-color: #0759be;
}
.module-card--red:hover,
.module-card--red:focus-visible {
    border-color: #d71d30;
}
@media(max-width:900px) {
    .module-card-face h2,
    .module-card--red .module-card-face h2 {font-size: 26px;}
}
@media(max-width:600px) {
    .module-card-face h2,
    .module-card--red .module-card-face h2 {font-size: 26px;}
    .module-card-caption p {font-size: 15px;min-height: 0;line-height: 1.75;}
}

/* Históricos integrados: pendientes de documentación, sin perder acciones. */
#table-content tr.historical-pending-row td{background:rgba(245,158,11,.13);border-bottom-color:rgba(217,119,6,.28)}
#table-content tr.historical-pending-row td:first-child{box-shadow:inset 4px 0 0 #f59e0b}
#table-content tr.historical-pending-row:hover td{background:rgba(245,158,11,.2)}
#table-content tr.historical-pending-row td:first-child::after{content:" · Pendiente de justificar";display:block;font-size:10px;font-weight:800;color:#a45a08;letter-spacing:.015em;margin-top:5px}
[data-theme="night"] #table-content tr.historical-pending-row td{background:rgba(245,158,11,.14)}
[data-theme="night"] #table-content tr.historical-pending-row td:first-child::after{color:#ffd087}


/* Captura inteligente: buscadores de catálogos en todos los formularios */
.lamtra-reference-picker{display:flex;flex-direction:column;gap:7px;min-width:0}
.lamtra-reference-picker .lamtra-ref-search{width:100%;min-height:40px;padding:9px 12px;border:1px solid var(--border,#ced9e8);border-radius:10px;background:var(--surface,#fff);color:inherit;font:inherit;box-sizing:border-box}
.lamtra-reference-picker .lamtra-ref-search:focus-visible{outline:2px solid #3978d5;outline-offset:1px}
.lamtra-reference-picker select{width:100%;min-width:0}


/* Monitoreo de combustible — panel ejecutivo */
.fuel-monitor{--fm-navy:#142e52;--fm-blue:#285a9d;--fm-line:#d9e3f1;color:var(--fm-navy)}
.fuel-monitor-notice{display:flex;align-items:center;gap:12px;margin:16px 0;padding:14px 18px;border:1px solid #d5e2f5;background:#f4f8ff;border-radius:14px;font-size:.9rem;line-height:1.55}
.fuel-monitor-notice>span:first-child{font-weight:800;font-size:1.35rem;color:#31609b}
.fuel-monitor-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:16px 0 22px}
.fuel-monitor-kpi{min-height:210px;padding:22px;border:1px solid var(--fm-line);border-radius:20px;background:linear-gradient(145deg,#fff,#f4f7fc);box-shadow:0 8px 25px rgba(29,55,92,.055);overflow:hidden}
.fuel-monitor-connection{background:linear-gradient(150deg,#fff,#f9f6f7);border-color:#e6dce0}
.fuel-monitor-level{background:linear-gradient(150deg,#fff,#f1f6fc)}
.fuel-monitor-liters{background:linear-gradient(150deg,#fff,#ecf4fd)}
.fuel-monitor-money{background:linear-gradient(150deg,#fff,#f6f2f6)}
.fuel-monitor-top{display:flex;align-items:center;gap:9px;min-height:40px;margin-bottom:20px}
.fuel-monitor-symbol,.fuel-monitor-device-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;border:1px solid #d4e2f5;border-radius:13px;background:#edf4ff;color:#1b559a;font-size:1.5rem;font-weight:750}
.fuel-monitor-label{font-size:.81rem;font-weight:750;line-height:1.35}
.fuel-monitor-pill{margin-left:auto;white-space:nowrap;border-radius:50px;padding:7px 10px;background:#f5e9ec;color:#9b3449;font-size:.72rem;font-weight:750}
.fuel-monitor-pill.neutral{background:#e8edf5;color:#526780}
.fuel-monitor-value{display:block;font-size:clamp(1.6rem,2.1vw,2.55rem);letter-spacing:-.04em;line-height:1.15;color:var(--fm-navy);font-weight:850;overflow-wrap:anywhere}
.fuel-monitor-kpi p{font-size:.88rem;color:#61758e;margin:10px 0 0}
.fuel-monitor-kpi small{color:#7789a0;font-size:.78rem}
.fuel-monitor-track{height:12px;background:#dfe7f2;border-radius:50px;margin:24px 0 18px;overflow:hidden}
.fuel-monitor-track span{display:block;width:0;height:100%}
.fuel-monitor-connection-line{display:flex;align-items:center;gap:15px;justify-content:space-between;margin-top:24px;font-size:.7rem;letter-spacing:.08em;color:#728198;font-weight:800}
.fuel-monitor-disconnected{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#f4e6e9;color:#9b3449;font-size:1.25rem}
.fuel-monitor-device,.fuel-monitor-records{background:var(--surface,#fff);border:1px solid var(--fm-line);border-radius:20px;margin:18px 0;padding:20px;box-shadow:0 7px 22px rgba(29,55,92,.035)}
.fuel-monitor-device-head,.fuel-monitor-records-head{display:flex;align-items:center;gap:14px}
.fuel-monitor-device h3,.fuel-monitor-records h3{margin:0 0 5px;color:var(--fm-navy)}
.fuel-monitor-device p,.fuel-monitor-records-head p{margin:0;color:#667b95;font-size:.87rem;line-height:1.5}
.fuel-monitor-waiting{margin-left:auto;flex:none;color:#365d81;background:#e8f1fa;padding:10px 14px;border-radius:40px;font-size:.76rem;font-weight:800}
.fuel-monitor-device-meta{display:flex;flex-wrap:wrap;gap:16px 34px;margin-top:18px;padding:13px 17px;border-radius:12px;background:#f2f6fc;color:#58708e;font-size:.81rem}
.fuel-monitor-records-head>.button{margin-left:auto}
.fuel-monitor-filters{display:grid;grid-template-columns:minmax(180px,1.1fr) minmax(145px,.8fr) minmax(145px,.8fr) minmax(240px,1.7fr);gap:14px;margin:20px 0 16px;align-items:end}
.fuel-monitor-filters label{display:flex;flex-direction:column;gap:7px;font-size:.82rem;font-weight:700;color:#36506e}
.fuel-monitor-filters :is(input,select){box-sizing:border-box;width:100%;min-height:44px;border:1px solid #d3deed;border-radius:11px;background:#fff;color:#173657;padding:9px 12px;font:inherit;font-weight:500}
.fuel-monitor-records .table-wrap{border:1px solid #e1e8f1;border-radius:12px;overflow:auto}
.fuel-monitor-records table{width:100%}
.fuel-monitor-records thead{background:#eff4fa}
.fuel-monitor-records td,.fuel-monitor-records th{padding:13px 14px}
.fuel-monitor-origin{display:inline-block;padding:6px 10px;border-radius:30px;font-size:.77rem;font-weight:750;white-space:nowrap}
.fuel-monitor-origin.confirmed{color:#2b6250;background:#e9f4ee}
.fuel-monitor-origin.pending{color:#8f651e;background:#fff3dc}
@media(max-width:1200px){.fuel-monitor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fuel-monitor-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.fuel-monitor-grid,.fuel-monitor-filters{grid-template-columns:1fr}.fuel-monitor-device-head,.fuel-monitor-records-head{flex-wrap:wrap}.fuel-monitor-waiting,.fuel-monitor-records-head>.button{margin-left:0}.fuel-monitor-kpi{min-height:175px}.fuel-monitor-device-meta{display:grid;gap:8px}}


/* LAMTRA · Legibilidad global y delimitación visual consistente (2026-10).
   Alcance intencional: formularios, filtros, paneles y tablas; se respetan
   tarjetas de portada, mapa, calendarios y componentes de gráficos. */
:root{
 --lamtra-ui-line:#c6d5e7;
 --lamtra-ui-ink:#173554;
 --lamtra-ui-soft:#4e6582;
 --lamtra-ui-surface:#ffffff;
 --lamtra-ui-shadow:0 7px 24px rgba(19,51,94,.075);
}
body{font-size:15px;line-height:1.55}
#content{min-width:0}
#content > .panel,
#content > .expense-period,
#content > .period-bar,
#content > .balance-grid,
#content > .notice{margin-bottom:20px}
#content .panel,
#content .expense-period,
#content .period-bar,
#content .fuel-monitor-records,
#content .fuel-monitor-device{
 border-color:var(--lamtra-ui-line);
 box-shadow:var(--lamtra-ui-shadow);
}
#content .panel-header{
 border-bottom:1px solid var(--lamtra-ui-line);
 background:linear-gradient(115deg,#f2f6fd,#fff);
}
#content .panel-header h2,
#content .panel-header h3,
#content .expense-period-heading strong,
#content .fuel-monitor-records h3{color:var(--lamtra-ui-ink)}
#content .panel-header p,
#content .panel-header small,
#content .expense-period-heading small{font-size:.84rem;line-height:1.5;color:var(--lamtra-ui-soft)}
#content .table-toolbar,
#content .expense-period-fields,
#content .analysis-toolbar,
#content .fuel-monitor-filters{min-width:0;gap:12px;align-items:end}
#content .table-toolbar{
 background:linear-gradient(105deg,#f3f7fc,#fff);
 border-bottom:1px solid var(--lamtra-ui-line);
 padding:18px 20px;
}
#content .table-toolbar label,
#content .expense-period label,
#content .period-bar label,
#content .fuel-monitor-filters label{
 font-size:.87rem;
 font-weight:650;
 color:var(--lamtra-ui-ink);
 line-height:1.4;
}
#content input:not([type="checkbox"]):not([type="radio"]),
#content select,
#content textarea,
dialog input:not([type="checkbox"]):not([type="radio"]),
dialog select,
dialog textarea{
 min-height:43px;
 max-width:100%;
 border:1px solid var(--lamtra-ui-line);
 border-radius:10px;
 font-size:14px;
 line-height:1.4;
 color:var(--lamtra-ui-ink);
}
#content input:focus-visible,
#content select:focus-visible,
#content textarea:focus-visible,
dialog input:focus-visible,
dialog select:focus-visible,
dialog textarea:focus-visible{
 border-color:#3875b9;
 outline:2px solid rgba(56,117,185,.24);
 outline-offset:1px;
}
#content .button,
#content button.button,
#page-actions .button,
dialog .button{font-size:14px;min-height:41px;font-weight:650;white-space:normal}
#content .notice{font-size:.875rem;line-height:1.6;border-color:var(--lamtra-ui-line)}
#content .stat-card,
#content .balance-card{
 border-color:var(--lamtra-ui-line);
 box-shadow:var(--lamtra-ui-shadow);
}
#content .stat-top,
#content .stat-note{font-size:.85rem;line-height:1.45}
#content .stat-value{line-height:1.15;overflow-wrap:anywhere}
#content .table-wrap{width:100%;max-width:100%;border:1px solid #d5e0ed;border-radius:12px;overflow-x:auto}
#content table{font-size:13px;line-height:1.45}
#content th{
 font-size:12px;
 font-weight:750;
 color:#244666;
 background:#eaf1f9;
 padding:13px 14px;
 border-bottom:1px solid #cbdaea;
}
#content td{
 font-size:13px;
 padding:13px 14px;
 border-bottom-color:#dfe7f0;
 max-width:270px;
}
#content .badge{font-size:12px;font-weight:700;padding:5px 9px;line-height:1.25}
#content .table-toolbar .record-count{font-size:13px;color:var(--lamtra-ui-soft)}
#content .pager{font-size:13px}
#content .period-bar{padding:15px 18px;gap:14px;font-size:14px}
#content .period-bar input,
#content .period-bar select{font-size:14px;padding:9px 11px}
#content .period-bar .period-note{font-size:12px;color:var(--lamtra-ui-soft)}
dialog .form-grid{gap:17px;min-width:0}
dialog .form-grid label{min-width:0;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
dialog .field-help{font-size:12px;line-height:1.5}
dialog .dialog-footer{border-top:1px solid var(--lamtra-ui-line)}
@media(max-width:900px){
 #content .table-toolbar{flex-wrap:wrap}
 #content .table-toolbar input.search-input{flex:1 1 220px;max-width:none}
 #content .table-toolbar select{flex:1 1 155px;max-width:100%}
 #content th,#content td{padding:11px 12px}
}
@media(max-width:600px){
 body{font-size:14px}
 #content .table-toolbar{padding:14px}
 #content .panel-body{padding:16px}
 #content .stat-card{padding:16px}
 #content .period-bar{padding:13px}
 #content table{font-size:12.5px}
 #content th,#content td{font-size:12.5px}
 dialog .form-grid{grid-template-columns:minmax(0,1fr);padding:16px}
}


/* Contornos compatibles con el tema nocturno. */
html[data-theme=night]{
 --lamtra-ui-line:#4a5f7c;
 --lamtra-ui-ink:#e7effb;
 --lamtra-ui-soft:#bac9dc;
 --lamtra-ui-surface:#19283d;
 --lamtra-ui-shadow:0 7px 24px rgba(0,0,0,.16);
}
html[data-theme=night] #content .panel-header,
html[data-theme=night] #content .table-toolbar{background:linear-gradient(115deg,#22334c,#1a273a)}
html[data-theme=night] #content th{background:#283b54;color:#e0ebfb;border-bottom-color:#506786}
html[data-theme=night] #content td{border-bottom-color:#344963}
html[data-theme=night] #content .table-wrap{border-color:#4a5f7c}
html[data-theme=night] #content .notice{color:#e4edf9}


/* Tonos LAM: azul cobalto y rojo profundo, con degradado luminoso legible. */
.module-grid .module-card--blue .module-card-face{
 background:linear-gradient(145deg,#397fda 0%,#649fe4 54%,#4588d5 100%);
}
.module-grid .module-card--red .module-card-face{
 background:linear-gradient(145deg,#e74753 0%,#f16b75 54%,#e64a59 100%);
}
.module-grid .module-card--blue{border-color:#2167bd}
.module-grid .module-card--red{border-color:#c82e42}
.module-grid .module-card--blue .module-card-face h2,
.module-grid .module-card--red .module-card-face h2{color:#15253d}


/* Administración: matriz de permisos por cuenta */
.permissions-editor{min-width:0;grid-column:1/-1;border:1px solid #cbd9ea;background:linear-gradient(130deg,#f7faff,#fff);border-radius:16px;padding:18px;margin-top:14px}
.permissions-editor h3{margin:0 0 4px;color:var(--text);font-size:1.1rem}
.permissions-editor .table-wrap{margin-top:14px;max-height:46vh;overflow:auto}
.permissions-editor table{min-width:520px;width:100%;border-collapse:collapse}
.permissions-editor th{position:sticky;top:0;background:#eaf1fa;color:#173b69;z-index:1}
.permissions-editor td,.permissions-editor th{padding:11px 14px;white-space:normal}
.permissions-editor td:not(:first-child),.permissions-editor th:not(:first-child){text-align:center}
.permissions-editor .permission-option{display:flex;align-items:center;justify-content:center;margin:0;min-height:30px}
.permissions-editor input[type=checkbox]{width:19px;height:19px;accent-color:#2b65ac;cursor:pointer}
html[data-theme=night] .permissions-editor{background:#202f45;border-color:#495f7d}
html[data-theme=night] .permissions-editor th{background:#293d59;color:#eaf2fc}
