
    :root {
      --ink:#132942; --ink-soft:#627389; --navy:#0c2441; --navy-light:#193b60;
      --cyan:#06b7e8; --cyan-soft:#e6f9ff; --border:#dde7f1; --bg:#f4f7fc;
      --white:#fff; --shadow:0 14px 40px rgba(16,45,82,.055); --radius:18px;
    }
    *{box-sizing:border-box}
    html{scroll-behavior:smooth}
    body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:14px;line-height:1.45}
    button,input{font:inherit}
    button{cursor:pointer}
    button:disabled{cursor:not-allowed;opacity:.5}
    :focus-visible{outline:3px solid rgba(0,175,235,.45);outline-offset:2px}
    .shell{width:min(100% - 68px,1580px);margin:auto}
    .topbar{background:var(--navy);color:white;min-height:93px;position:relative;overflow:hidden}
    .topbar::after{content:"";position:absolute;right:13%;top:-118px;width:440px;height:260px;border-radius:50%;border:1px solid rgba(94,198,255,.13);pointer-events:none;box-shadow:0 0 0 75px rgba(17,102,153,.06),0 0 0 156px rgba(17,102,153,.035)}
    .topbar .shell{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:93px;position:relative;z-index:1}
    .brand{display:flex;gap:14px;align-items:center;min-width:0}
    .brand-icon{width:44px;height:44px;border-radius:13px;background:linear-gradient(142deg,#4dddfe,#0985cb);display:grid;place-items:center;box-shadow:0 8px 25px rgba(5,177,241,.22)}
    .brand-icon svg{width:25px;height:25px}
    .brand-name{font-size:18px;line-height:1.15;font-weight:800;letter-spacing:-.35px}
    .brand-sub{font-size:11px;letter-spacing:1.55px;text-transform:uppercase;color:#a9c4db;margin-top:5px}
    .head-right{display:flex;align-items:center;gap:12px;color:#bdcede;font-size:12px;white-space:nowrap}
    .status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:#38d0ad;box-shadow:0 0 0 4px rgba(56,208,173,.12);margin-right:5px}
    .tag-head{border:1px solid rgba(190,225,255,.22);border-radius:100px;padding:8px 12px}
    main{padding:31px 0 60px}
    .intro-row{display:flex;gap:18px;align-items:flex-end;justify-content:space-between;flex-wrap:wrap}
    .eyebrow{color:#0887bc;font-size:11px;font-weight:850;letter-spacing:1.7px;text-transform:uppercase}
    h1{font-size:clamp(25px,2.45vw,35px);margin:7px 0 5px;line-height:1.18;letter-spacing:-1.2px;font-weight:830}
    .subtitle{color:var(--ink-soft);font-size:13px;margin:0}
    .toolbar-buttons{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
    .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 15px;border-radius:10px;border:1px solid #d5e1ec;background:white;color:#2b4864;white-space:nowrap;font-size:12.5px;font-weight:760;transition:transform .16s,background .16s,border-color .16s}
    .btn:hover{transform:translateY(-1px);background:#f7fbff;border-color:#a5c7df}
    .btn svg{width:15px;height:15px;flex:none}
    .btn.primary{background:#097ebc;color:white;border-color:#097ebc;box-shadow:0 5px 14px rgba(8,126,188,.15)}
    .btn.primary:hover{background:#066fa9;border-color:#066fa9}
    .btn.compact{padding:9px 11px}
    .btn.icon-only{padding:9px;width:36px;height:36px}
    .button-group{display:flex;align-items:center;gap:8px}
    .demo-note{margin-top:24px;background:#edf8fd;border:1px solid #bee3f1;border-radius:11px;padding:11px 14px;display:flex;gap:12px;align-items:center;justify-content:space-between;color:#42647b;font-size:12px}
    .demo-note[hidden]{display:none}
    .demo-note strong{color:#155678}
    .demo-note .small-link{background:none;border:0;color:#057fb4;font-weight:800;white-space:nowrap;text-decoration:underline;text-underline-offset:3px;padding:4px}
    .stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:23px}
    .stat{border:1px solid #e0e9f2;background:#fff;border-radius:15px;box-shadow:var(--shadow);padding:19px 19px 17px;position:relative;overflow:hidden;min-width:0}
    .stat:after{position:absolute;content:"";width:85px;height:85px;right:-40px;top:-44px;border-radius:50%;background:#eff8ff}
    .stat-top{display:flex;align-items:center;gap:10px;color:#60748a;font-size:12px;font-weight:730;margin-bottom:13px}
    .stat-icon{height:29px;width:29px;display:grid;place-items:center;border-radius:8px;background:#eaf6ff;color:#087daf;flex:none}
    .stat-icon svg{height:16px;width:16px}
    .stat-value{font-size:clamp(21px,2vw,28px);font-weight:830;letter-spacing:-1px;line-height:1.08;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .stat-footer{margin-top:8px;color:#8b99a9;font-size:10.5px}
    .section-tools{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:33px 0 17px;flex-wrap:wrap}
    .section-left{display:flex;align-items:center;gap:13px;flex-wrap:wrap}
    h2{font-size:18px;letter-spacing:-.45px;margin:0;font-weight:840}
    .record-count{background:#eaf0f7;color:#627891;border:1px solid #dee7f1;font-size:10px;border-radius:100px;padding:5px 9px;white-space:nowrap;font-weight:800}
    .section-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
    .month-switch{display:flex;align-items:center;gap:5px;border:1px solid #dbe5f0;border-radius:10px;background:#fff;padding:4px}
    .month-label{font-weight:800;color:#1f4261;min-width:117px;text-align:center;font-size:12px;text-transform:capitalize}
    .arrow{border:0;background:transparent;color:#355b7b;border-radius:7px;padding:4px 7px;font-size:19px;line-height:1}
    .arrow:hover{background:#f0f6fb}
    .view-switch{display:flex;gap:2px;border:1px solid #dbe5f0;border-radius:10px;background:#fff;padding:4px}
    .view-switch button{font-size:11.5px;border:0;background:none;padding:8px 11px;border-radius:7px;color:#647990;font-weight:800}
    .view-switch button.active{color:#047cb4;background:#e9f8fd}
    .cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;align-items:start}
    .daily-card{background:white;border:1px solid var(--border);border-radius:15px;overflow:hidden;box-shadow:var(--shadow);min-width:0;transition:box-shadow .16s,border-color .16s}
    .daily-card:focus-within{border-color:#83c7e6;box-shadow:0 14px 40px rgba(16,45,82,.095)}
    .card-top{padding:15px 15px 13px;border-bottom:1px solid #e9eff4;display:flex;justify-content:space-between;align-items:center;gap:5px}
    .day-title{display:flex;gap:9px;align-items:center;min-width:0}
    .day-number{font-size:27px;line-height:1;font-weight:850;color:#123955;letter-spacing:-1.5px}
    .day-meta{min-width:0}
    .day-name{color:#0f476b;font-weight:850;font-size:11px;text-transform:uppercase;letter-spacing:.65px}
    .date-pretty{color:#8b9baa;font-size:10.5px;margin-top:1px;white-space:nowrap}
    .menu-button{border:0;border-radius:7px;width:27px;height:28px;background:#f2f6fa;color:#638199;display:grid;place-items:center;font-size:16px}
    .menu-button:hover{background:#fdecec;color:#a23d3d}
    .spreadsheet{padding:10px 11px 13px}
    .sheet-heading{display:grid;grid-template-columns:1fr 1fr;border:1px solid #b6cbd9;background:#f0f5fa;overflow:hidden;border-radius:6px 6px 0 0;text-align:center}
    .sheet-heading > span{padding:5px 3px;color:#34536d;font-weight:850;font-size:10.5px;text-transform:uppercase;border-right:1px solid #b6cbd9}
    .sheet-heading > span:nth-child(2n){border-right:0}
    .sheet-heading > span:nth-child(-n+2){border-bottom:1px solid #b6cbd9;background:#edf3f9}
    .sheet-heading .heading-date{font-size:10px;white-space:nowrap}
    .sheet-gap{height:9px;border-left:1px solid #d6e3ec;border-right:1px solid #d6e3ec;background:repeating-linear-gradient(0deg,#fff,#fff 6px,#fafcff 6px,#fafcff 12px)}
    .sheet-row{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);min-height:31px;border-top:1px solid #e1e8ef;border-left:1px solid #d6e3ec;border-right:1px solid #d6e3ec;background:white}
    .sheet-row label,.sheet-row .row-name{display:flex;align-items:center;min-width:0;padding:5px 7px;font-size:10.3px;font-weight:750;color:#3b566c;text-transform:uppercase;letter-spacing:.025em}
    .sheet-row .val-area{border-left:1px solid #d6e3ec;min-width:0;display:flex;align-items:stretch;justify-content:flex-end}
    .currency-input{display:block;width:100%;min-width:0;text-align:right;direction:ltr;background:none;border:1px solid transparent;border-radius:0;padding:5px 7px;color:#24425a;font-size:11.5px;font-weight:680;font-variant-numeric:tabular-nums;outline:none}
    .currency-input::placeholder{color:#c7d1da}
    .currency-input:hover{background:#f4fbff}
    .currency-input:focus{background:white;border:1px solid #0b9fce;box-shadow:inset 0 0 0 1px #0b9fce;outline:none}
    .sheet-row.sale{background:#effbff}
    .sheet-row.sale label{color:#006e99;font-weight:900}
    .sheet-row.sale .currency-input{background:#00a8dd;color:white;font-size:12.3px;font-weight:850}
    .sheet-row.sale .currency-input:focus{background:#028dbf}
    .sheet-row.sale .currency-input::placeholder{color:#c3f3ff}
    .sheet-row.total{margin-top:9px;border:1px solid #aed6e7;background:#eaf8fe;border-radius:5px;min-height:34px;overflow:hidden}
    .sheet-row.total .row-name{font-weight:880;color:#0a577a}
    .calculated{padding:7px 7px;font-variant-numeric:tabular-nums;font-weight:900;font-size:11.8px;color:#096c94;text-align:right;white-space:nowrap}
    .card-foot{display:flex;justify-content:space-between;align-items:center;padding:0 14px 13px;color:#91a3b3;font-size:10px}
    .card-foot span:before{content:"";display:inline-block;width:5px;height:5px;border-radius:100%;background:#24bcad;vertical-align:2px;margin-right:6px}
    .card-foot button{background:none;border:0;color:#087cae;font-size:10px;font-weight:850;padding:0}
    .empty{background:white;border:1px dashed #bfd2e4;border-radius:14px;padding:58px 20px;text-align:center;color:#637e92}
    .empty-symbol{width:54px;height:54px;background:#eaf6fe;border-radius:15px;color:#079bcc;display:grid;place-items:center;margin:0 auto 14px;font-size:27px;font-weight:600}
    .empty h3{margin:0;color:#28475f;font-size:17px}
    .empty p{margin:9px auto 19px;max-width:460px;font-size:12.5px}
    .table-scroller{overflow:auto;border:1px solid #dfebf2;border-radius:14px;background:white;box-shadow:var(--shadow)}
    .overview-table{border-collapse:separate;border-spacing:0;width:100%;min-width:1550px;text-align:right}
    .overview-table th{background:#eff6fb;color:#42667f;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.35px;padding:13px 9px;border-bottom:1px solid #dce9f2;white-space:nowrap}
    .overview-table td{border-bottom:1px solid #e6eef5;padding:8px 7px;font-size:11.5px;color:#456178}
    .overview-table tr:last-child td{border-bottom:0}
    .overview-table td:first-child,.overview-table th:first-child{text-align:left;position:sticky;left:0;background:white;z-index:1;min-width:150px}
    .overview-table th:first-child{background:#eff6fb;z-index:2}
    .overview-table .currency-input{padding:7px 5px;border-radius:6px}
    .overview-table .highlight .currency-input{background:#e1f7fd;color:#047daa;font-weight:880}
    .overview-table .delete{border:0;background:#fff0f0;color:#a34f50;border-radius:6px;padding:6px 9px}
    .summary{margin-top:37px;border:1px solid #dfe9f2;background:white;border-radius:15px;box-shadow:var(--shadow);overflow:hidden}
    .summary-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;padding:20px 22px;border-bottom:1px solid #e4edf4}
    .summary-head p{margin:4px 0 0;font-size:12px;color:#8294a6}
    .summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
    .summary-item{padding:16px 21px;border-right:1px solid #edf1f6;border-bottom:1px solid #edf1f6;min-width:0}
    .summary-item:nth-child(4n){border-right:0}
    .summary-label{font-size:11px;letter-spacing:.15px;text-transform:uppercase;font-weight:730;color:#8394a5;margin-bottom:7px}
    .summary-number{font-variant-numeric:tabular-nums;font-weight:850;letter-spacing:-.35px;color:#254762;font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .summary-item.is-sale{background:#edfaff}
    .summary-item.is-sale .summary-number{color:#0085b4}
    .summary-item.is-total{background:#f0f8fa}
    .summary-item.is-total .summary-number{color:#078075}
    .footer-link{border:0;background:none;color:#0b7ea9;font-size:inherit;font-weight:800;padding:0;text-decoration:underline;text-underline-offset:2px}
    .footer{display:flex;justify-content:space-between;gap:16px;align-items:center;color:#8a9cab;font-size:11px;margin-top:19px;flex-wrap:wrap}
    dialog{border:1px solid #e0eaf2;border-radius:20px;box-shadow:0 25px 90px rgba(7,32,57,.25);max-width:min(95vw,430px);padding:0;width:100%;color:var(--ink)}
    dialog::backdrop{background:rgba(6,27,46,.55);backdrop-filter:blur(3px)}
    .modal-body{padding:27px}
    .modal-body h3{font-size:21px;letter-spacing:-.5px;margin:0 0 7px}
    .modal-body p{font-size:12.5px;color:#74869a;margin:0 0 22px;line-height:1.65}
    .form-label{font-size:12px;font-weight:850;color:#415e77;display:block;margin-bottom:9px}
    .form-date{width:100%;background:white;border-radius:10px;border:1px solid #cbdbe8;padding:12px;color:#163751}
    .modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:26px}
    .modal-error{color:#b03743;font-size:12px;margin-top:10px;display:none}
    .toast{position:fixed;bottom:22px;right:24px;background:#183a55;color:white;padding:12px 17px;border-radius:10px;font-size:12px;box-shadow:0 12px 45px rgba(0,0,0,.16);z-index:8;opacity:0;transform:translateY(15px);transition:.24s;pointer-events:none}
    .toast.visible{opacity:1;transform:translateY(0)}
    @media(max-width:1300px){.shell{width:min(100% - 42px,1380px)}.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.summary-item:nth-child(4n){border-right:1px solid #edf1f6}.summary-item:nth-child(3n){border-right:0}}
    @media(max-width:980px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-item:nth-child(3n){border-right:1px solid #edf1f6}.summary-item:nth-child(2n){border-right:0}.stat-value{font-size:26px}}
    @media(max-width:640px){.shell{width:min(100% - 28px,580px)}.topbar{min-height:72px}.topbar .shell{min-height:72px}.brand-icon{width:39px;height:39px}.brand-name{font-size:16px}.brand-sub{font-size:9px;letter-spacing:.85px}.head-right{display:none}main{padding-top:24px}.intro-row{gap:21px}.intro-row h1{font-size:26px}.toolbar-buttons{width:100%;gap:8px}.toolbar-buttons .btn{flex:1;padding:10px 7px;font-size:11px}.demo-note{align-items:flex-start;gap:8px;flex-direction:column}.stats{gap:9px;margin-top:17px}.stat{padding:14px 12px;border-radius:12px}.stat-top{font-size:10px;gap:7px;margin-bottom:9px}.stat-icon{width:24px;height:24px;border-radius:7px}.stat-value{font-size:20px;letter-spacing:-.6px}.stat-footer{font-size:9px}.section-tools{margin-top:25px;align-items:flex-start}.section-controls{width:100%;justify-content:space-between}.month-label{min-width:105px}.cards{grid-template-columns:1fr;gap:13px}.spreadsheet{padding:13px 15px}.sheet-row{min-height:35px}.sheet-row label,.sheet-row .row-name{font-size:11px}.currency-input{font-size:12.7px}.daily-card{max-width:580px}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-item{padding:14px 13px}.summary-number{font-size:15px}.summary-head{padding:18px 15px}.summary-item:nth-child(3n){border-right:1px solid #edf1f6}.summary-item:nth-child(2n){border-right:0}.footer{font-size:10px}}
    @media print{body{background:white}.topbar{background:#edf6fa;color:#123955;min-height:70px}.topbar .shell{min-height:70px}.brand-sub{color:#496a83}.toolbar-buttons,.demo-note,.section-controls,.menu-button,.card-foot button,.footer,.head-right{display:none!important}.shell{width:100%;padding:0 6px}main{padding-top:16px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.daily-card{box-shadow:none;border:1px solid #cad3da;break-inside:avoid}.stat{box-shadow:none;padding:10px}.stats{gap:8px}.stat-value{font-size:17px}.spreadsheet{padding:7px}.sheet-row label{font-size:8px;padding:3px}.currency-input{font-size:9px;padding:3px}.summary{box-shadow:none;break-inside:avoid}.summary-grid{grid-template-columns:repeat(4,1fr)}@page{size:landscape;margin:12mm}}
  /* CUADRA: extensiones para autenticación, base de datos y filtros dinámicos */
.brand-point{color:#2dd3ff}
.head-logout{border:1px solid rgba(198,225,244,.21);background:transparent;color:#d6e6f4;padding:8px 12px;border-radius:9px;font-size:12px;font-weight:800;cursor:pointer}
.head-logout:hover{background:rgba(255,255,255,.1)}
.logout-form{margin:0}
.focus-panel{margin-top:24px;border:1px solid #d8e8f3;background:linear-gradient(112deg,#fff 25%,#f3faff);border-radius:15px;padding:19px 22px 15px;box-shadow:var(--shadow)}
.focus-panel h2{margin-top:5px;font-size:17px}
.focus-panel{display:flex;flex-wrap:wrap;gap:10px 25px;align-items:center;justify-content:space-between}
.focus-title{min-width:200px}
.focus-actions{display:flex;align-items:center;gap:13px;flex-wrap:wrap}
.mode-switch button{font-size:12px;padding:11px 14px}
.date-control{display:flex;align-items:center;gap:11px;font-weight:750;color:#3b5a71;font-size:11.5px;white-space:nowrap}
.date-control input{border:1px solid #cfdfeb;border-radius:9px;background:#fff;color:#163b59;padding:10px;font:inherit;min-width:147px}
.focus-help{font-size:11px;color:#7b90a3;width:100%;margin:3px 0 0}
.section-tools{margin-top:27px}
.records-single .cards{grid-template-columns:minmax(0,540px);justify-content:center}
.records-single .daily-card{width:100%}
.records-single .sheet-row{min-height:39px}
.records-single .sheet-row label,.records-single .sheet-row .row-name{font-size:12px}
.records-single .currency-input{font-size:13px}
.card-actions{display:flex;gap:5px;align-items:center}
.card-focus{border:1px solid #d7e8f2;border-radius:8px;background:#eff9fe;color:#087dab;padding:6px 8px;font-size:10px;font-weight:850}
.card-focus:hover{background:#dff3fc}
.card-foot {padding-top:2px;gap:10px}
.card-foot .add-field-button{color:#037daa;font-weight:850;background:#e7f6fc;border:1px solid #bde6f3;border-radius:7px;padding:7px 8px}
.card-foot .add-field-button:hover{background:#cfedf8}
.row-custom-label{display:flex;align-items:center;justify-content:space-between;gap:3px;min-width:0;padding:4px 5px}
.row-custom-label .name{font-size:10.3px;font-weight:750;letter-spacing:.025em;color:#3b566c;text-transform:uppercase;overflow-wrap:anywhere;min-width:0}
.row-tools{display:flex;gap:2px;flex:none}
.row-tools button{display:grid;place-items:center;border:none;background:transparent;color:#91a3b1;width:21px;height:22px;border-radius:5px;font-size:13px}
.row-tools button:hover{background:#e5f2f8;color:#0976a6}
.row-tools button.danger:hover{background:#fdebea;color:#c94949}
.sheet-row.custom{background:#fbfdff}
.sheet-row.custom .currency-input{font-size:11.5px}
.spreadsheet .sheet-row:last-child{border-bottom:1px solid #d6e3ec}
.single-controls{display:flex;align-items:center;gap:6px}
.single-controls button{border:1px solid #cce3ef;background:white;padding:9px 12px;border-radius:8px;color:#136989;font-weight:780}
.single-controls button:hover{background:#e4f7fc}
.loading-data,.empty{padding:45px 25px;border:1px dashed #cfdee9;background:white;border-radius:15px;color:#7e93a7;text-align:center}
.empty h3{font-size:17px;color:#183e5a;margin:5px 0}
.empty p{font-size:12px;margin-bottom:19px}
.empty .empty-symbol{display:grid;place-items:center;margin:0 auto 10px;border-radius:100%;width:45px;height:45px;background:#e6f5fc;color:#1b83b9;font-size:27px}
.custom-add-bar{padding:11px 12px 12px;text-align:center}
.custom-add-bar button{width:100%;border:1px dashed #afd6e8;background:#f6fcff;color:#087ca7;padding:9px;border-radius:8px;font-weight:850;font-size:11px}
.custom-add-bar button:hover{background:#e7f8ff}
.field-scope{border:1px solid #e0edf4;padding:12px 13px;margin-top:16px;border-radius:10px;display:grid;gap:10px}
.field-scope legend{font-size:12px;font-weight:800;color:#3e5871}
.field-scope label{display:flex;gap:9px;align-items:center;font-size:12px;color:#425b72}
.field-scope input{accent-color:#088abb}
.modal-symbol{font-size:22px;color:#07a4d3;margin-bottom:6px}
.stat-icon{font-weight:900;font-size:18px}
.auth-shell{width:min(100% - 36px,435px);margin:44px auto;background:white;border:1px solid #dce9f1;border-radius:24px;padding:35px;box-shadow:0 20px 70px rgba(7,29,57,.16)}
.access-page{min-height:100vh;background:radial-gradient(circle at 40% 0%,#1a618b 0%,#0c2441 65%);padding:16px}
.access-page h1{font-size:28px;margin:8px 0 10px}
.access-page .subtitle{line-height:1.6}
.auth-icon{height:49px;width:49px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(150deg,#50d6f7,#028fc8);font-size:26px;color:white;margin-bottom:19px}
.auth-form{display:grid;gap:16px;margin-top:25px}
.auth-form h2{font-size:15px;margin:12px 0 -7px}
.auth-form label{display:grid;gap:7px;color:#3e5c75;font-size:12px;font-weight:800}
.auth-form input{width:100%;border:1px solid #cfdfea;border-radius:10px;padding:12px;color:#1c3e57;background:#fff}
.auth-submit{margin-top:4px;width:100%;font-size:13px;padding:13px}
.auth-caption{font-size:11px;color:#8799a8;margin:22px 0 0;line-height:1.6}
.form-alert,.form-ok{padding:11px 12px;border-radius:10px;font-size:12px;line-height:1.5;margin-top:15px}
.form-alert{color:#8d3240;border:1px solid #f1c6ce;background:#fff1f3}
.form-ok{color:#196e58;border:1px solid #bfe6d9;background:#eaf9f1}
.install-shell{width:min(100% - 36px,535px)}
.install-grid{display:grid;grid-template-columns:1fr 100px;gap:12px}
.table-scroller{border-radius:12px;overflow:auto;border:1px solid #d9e7f0;background:white}
.overview-table td.unavailable{background:#f6f9fc;color:#c1cbd4;text-align:center}
.overview-table .edit-row-head{font-size:9px;color:#087daa;border:none;background:none;display:block;white-space:nowrap;margin-top:4px}
.overview-table{min-width:750px}
@media (max-width:640px){
 .focus-panel{padding:16px;gap:14px}
 .focus-title{width:100%}
 .focus-actions{width:100%;gap:10px;display:grid;grid-template-columns:1fr}
 .mode-switch{width:100%}
 .mode-switch button{flex:1}
 .date-control{justify-content:space-between}
 .date-control input{flex:1;min-width:0}
 .section-controls{gap:8px}
 .records-single .sheet-row{min-height:38px}
 .records-single .spreadsheet{padding:12px 13px}
 .auth-shell{padding:24px;margin:22px auto}
 .head-right{display:flex}
 .head-right > span,.head-right .tag-head{display:none}
 .topbar .shell{gap:8px}
 .brand{gap:10px}
 .head-logout{font-size:11px;padding:7px 8px}
 .card-focus{font-size:9px}
 .row-custom-label .name{font-size:10.2px}
}
@media print{
 .focus-panel,.head-logout,.card-focus,.row-tools,.custom-add-bar,.toolbar-buttons,.section-controls,.add-field-button{display:none!important}
 .records-single .cards{grid-template-columns:1fr;max-width:570px;margin:auto}
 .records-single .daily-card{max-width:none}
}
/* Asegurar que el atributo HTML hidden tenga prioridad sobre estilos de componentes */
[hidden]{display:none!important}
/* CUADRA 3: administración de usuarios, roles y matriz de permisos */
a.btn{text-decoration:none}
.head-users-link{color:#edfcff;text-decoration:none;border:1px solid rgba(107,206,255,.35);background:rgba(17,153,215,.12);padding:9px 12px;border-radius:10px;font-size:12px;font-weight:800}
.head-users-link:hover{background:rgba(17,153,215,.28)}
.head-role{color:#abd1e8;font-size:11px;font-weight:750}
.brand-link{text-decoration:none;color:inherit}
.user-admin-page{max-width:1500px}
.user-kpis{margin:25px 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.user-kpis>div{padding:16px 20px;background:white;border:1px solid #dde8f1;border-radius:14px;display:flex;justify-content:space-between;align-items:center;gap:10px;box-shadow:var(--shadow)}
.user-kpis span{font-size:11px;color:#678097;font-weight:720}
.user-kpis strong{font-size:22px;color:#113e60;font-weight:850}
.user-kpis strong:has(span){font-size:14px}
.users-layout{display:grid;grid-template-columns:minmax(280px,350px) minmax(0,1fr);gap:18px;align-items:start}
.user-list-panel,.user-detail-panel{background:white;border:1px solid #dce6ef;border-radius:17px;box-shadow:var(--shadow);min-width:0}
.user-list-panel{padding:18px;position:sticky;top:12px}
.panel-heading,.detail-title{display:flex;justify-content:space-between;gap:12px;align-items:center}
.panel-heading h2{font-size:16px}
.user-search{padding:12px 14px;background:#f7fafc;border:1px solid #dce6ef;border-radius:10px;margin:18px 0 13px;width:100%;color:#163952;font-size:12px;outline:none}
.user-search:focus{border-color:#11a2ce;background:white}
.users-list{display:grid;max-height:610px;overflow:auto;gap:7px}
.user-item{display:flex;align-items:center;gap:11px;text-align:left;width:100%;padding:12px 10px;background:white;border:1px solid #e6edf4;border-radius:11px;color:#173b59}
.user-item:hover{background:#f6fbfe}
.user-item.selected{background:#ecf9ff;border-color:#79d0ed;box-shadow:inset 3px 0 #02a9db}
.user-avatar,.detail-avatar{display:grid;place-items:center;flex:none;background:#ddeef7;color:#077ca8;border-radius:11px;width:42px;height:42px;font-size:18px;font-weight:850}
.user-avatar.is-root,.detail-avatar.root{background:#103e64;color:#e4f9ff}
.user-item-main{display:grid;gap:3px;flex:1;min-width:0}
.user-item-main>strong{font-size:12px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.user-item-main>small{font-size:10px;color:#7f91a0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-item-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}
.u-role,.u-state{font-size:9px;font-weight:800;border-radius:30px;padding:3px 7px;display:inline-block;white-space:nowrap}
.u-role-superadmin{background:#e4eefb;color:#15466e}
.u-role-administrador{background:#e8f4ff;color:#076899}
.u-role-usuario{background:#f0f3f7;color:#536981}
.u-state{background:#e8f8f2;color:#1d8b69}
.u-state.off{background:#fff2ee;color:#a46443}
.user-chevron{font-size:22px;color:#8facbd;font-weight:500}
.user-list-help{color:#8a9aab;font-size:11px;line-height:1.6;margin:16px 2px 0}
.user-list-empty{padding:20px;color:#869aab;text-align:center;font-size:12px}
.user-detail-panel{padding:25px 28px}
.detail-wait{padding:80px 30px;text-align:center;color:#8092a3;display:grid;place-items:center}
.detail-wait h2{margin:9px 0}
.detail-wait p{font-size:12px}
.detail-title{border-bottom:1px solid #e9eff4;padding-bottom:19px}
.detail-person{display:flex;gap:13px;align-items:center;min-width:0}
.detail-person h2{font-size:20px;margin:2px 0}
.detail-person .eyebrow{font-size:9px}
.detail-avatar{width:52px;height:52px;font-size:21px}
.muted-small{color:#8c9bad;font-size:11px;overflow-wrap:anywhere}
.user-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;margin:20px 0}
.user-actions-bottom{border-top:1px solid #e9eff4;padding-top:20px;justify-content:space-between;flex-wrap:wrap}
.user-actions-bottom span{color:#8a9cac;font-size:11px}
.btn.danger-soft{background:#fff6f4;color:#b34b42;border-color:#f2dbd7}
.btn.danger-soft:hover{background:#ffeeea}
.user-edit-form{margin-top:18px}
.detail-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.detail-fields label{font-size:11px;color:#547089;font-weight:800;display:grid;gap:7px}
.detail-fields label small{display:inline;color:#93a5b5;font-weight:500}
.detail-fields .form-date{font-size:12px}
.detail-fields .form-date:disabled{background:#f5f8fc;color:#8a9eae}
.active-switch{display:flex;align-items:center;gap:12px;margin:20px 0 25px;padding:13px 15px;border-radius:10px;background:#f7fafc;border:1px solid #e5edf3}
.active-switch input{width:18px;height:18px;accent-color:#009fd1}
.active-switch span{display:grid;gap:3px}
.active-switch strong{font-size:12px;color:#365a76}
.active-switch small{font-size:10px;color:#879aaa}
.permission-header{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:5px 0 12px}
.permission-header h2{font-size:18px;margin:0 0 4px}
.permission-header p{font-size:11px;color:#8094a7;margin:0}
.rights-presets{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#f7fbfe;border:1px solid #e5eff7;border-radius:10px;padding:12px;margin:14px 0}
.rights-presets span{font-size:11px;color:#658299;font-weight:800;margin-right:6px}
.rights-presets button{border:1px solid #c9e4f2;background:#fff;color:#1681ae;border-radius:8px;padding:7px 10px;font-size:10.5px;font-weight:800}
.rights-presets button:hover{background:#d9f3ff}
.rights-scroll{border:1px solid #dce8f2;border-radius:12px;overflow:hidden}
.rights-table{width:100%;border-collapse:collapse;font-size:12px}
.rights-table thead{background:#103f61;color:white;text-align:left}
.rights-table thead th{font-size:10px;letter-spacing:.5px;text-transform:uppercase;padding:13px 16px}
.rights-table thead th:last-child{text-align:center;width:106px}
.rights-table tbody tr{border-bottom:1px solid #edf1f6}
.rights-table tbody tr:last-child{border-bottom:0}
.rights-table td{padding:10px 16px;color:#40607a}
.rights-table td label{display:block;cursor:pointer}
.rights-table .rights-section{background:#eff6fb}
.rights-section th{text-align:left;font-size:10px;letter-spacing:.35px;text-transform:uppercase;color:#2e6688;padding:9px 16px}
.rights-table .right-check{text-align:center}
.right-check input{appearance:none;display:inline-grid;place-items:center;width:20px;height:20px;border:1.5px solid #bdd4e3;background:white;border-radius:6px;cursor:pointer;vertical-align:middle;transition:background .15s}
.right-check input:checked{background:#048fc5;border-color:#048fc5}
.right-check input:checked:after{content:'✓';font-size:14px;line-height:1;color:white;font-weight:900}
.right-check input:disabled{cursor:default;opacity:.55}
.right-check input:not(:disabled):hover{border-color:#079dcc;box-shadow:0 0 0 3px #e0f7ff}
.rights-hint{font-size:10.5px;color:#90a0ae;line-height:1.6;margin-top:12px}
.root-notice{background:#f2f7ff;border:1px solid #cedff4;border-radius:13px;padding:17px;display:flex;gap:13px;margin-top:20px;color:#154d7e}
.root-notice>span{font-size:25px}
.root-notice strong{font-size:13px}
.root-notice p{font-size:11px;line-height:1.6;margin:4px 0 0;color:#5e7e9d}
.root-foot{font-size:11px;color:#7f93a7;text-align:center;padding:8px}
.user-modal .form-label{display:block;margin:15px 0 6px}
.user-modal .form-date{margin-bottom:2px}
.toast.error{background:#aa3d49}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1050px){.user-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.users-layout{grid-template-columns:minmax(240px,290px) minmax(0,1fr)}.user-detail-panel{padding:20px}.head-role{display:none}}
@media(max-width:760px){.users-layout{grid-template-columns:1fr}.user-list-panel{position:static}.users-list{max-height:310px}.user-kpis{margin-top:17px}.detail-fields{grid-template-columns:1fr}.user-detail-panel{padding:18px}.detail-title{flex-wrap:wrap}.user-actions-bottom{justify-content:center}.rights-scroll{overflow-x:auto}.rights-table{min-width:360px}}
@media(max-width:640px){.user-kpis{gap:8px}.user-kpis>div{padding:13px;display:grid;align-content:center}.user-kpis strong{font-size:19px}.head-users-link{font-size:10px;padding:7px 8px}.user-actions{justify-content:space-between;gap:6px}.user-actions .btn{font-size:11px;padding:9px 10px}.users-intro .toolbar-buttons{width:100%}.rights-presets button{flex:1}.detail-avatar{width:45px;height:45px}.user-detail-panel .detail-person h2{font-size:17px}}
@media print{.user-list-panel,.user-actions,.rights-presets,.topbar .head-right{display:none!important}.users-layout{display:block}.user-detail-panel{border:0;box-shadow:none}}

.currency-input[readonly]{cursor:default;color:#6d8090;background:#f8fafc}

/* Vista previa de la creación de una semana completa. */
.week-preview{background:#eff9fa;border:1px solid #c5e7e9;color:#176975;border-radius:11px;padding:12px 14px;font-size:13px;font-weight:700;line-height:1.45;margin-top:10px}
#newWeekDialog .modal-body{max-width:430px}
#newWeekDialog .modal-body p{line-height:1.6}

/* v6 - selector de tres períodos y navegación semanal */
.mode-switch{flex-wrap:wrap}.mode-switch button{white-space:nowrap;min-height:40px}
.focus-actions{flex-wrap:wrap;justify-content:flex-end;gap:12px}
@media(max-width:650px){.focus-actions{justify-content:stretch}.mode-switch{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.mode-switch button{padding:9px 5px;white-space:normal}.date-control{width:100%}}

.month-label.week-label{text-transform:none}
