:root{--navy:#071a38;--navy-2:#0c2a58;--royal:#2457f5;--royal-2:#183fd5;--red:#ef2330;--bg:#f3f6fb;--surface:#fff;--ink:#0c1b31;--muted:#6d7e94;--line:#dde5ef;--green:#07885c;--amber:#c66d00;--shadow:0 20px 60px rgba(7,26,56,.12)}
body{background:radial-gradient(circle at 80% 0,#e7edff 0,transparent 30%),var(--bg);font-family:"Segoe UI Variable Text",Inter,system-ui,sans-serif}
.topbar{height:76px;padding:0 max(24px,calc((100vw - 1480px)/2));background:rgba(7,26,56,.97);box-shadow:0 12px 34px #071a3829;backdrop-filter:blur(16px)}
.brand-logo{width:126px}.brand strong{font-size:16px}.brand small{font-size:12px}
.header-button{min-height:41px;border-color:#ffffff2e!important;background:#ffffff0b!important;border-radius:11px!important}.header-button:hover{border-color:#86a4ff!important;background:#ffffff17!important}
.add-button{min-height:43px;border-radius:11px;background:linear-gradient(135deg,#f42a35,#d60e18);box-shadow:0 9px 24px #ef23303b}
main{max-width:1480px;padding:28px 28px 64px}
.hero{grid-template-columns:minmax(500px,1.2fr) minmax(430px,.8fr);gap:36px;padding:30px 36px;border-radius:22px;background:radial-gradient(circle at 82% -28%,#396aff 0,transparent 42%),linear-gradient(122deg,#071a38,#102d70 68%,#123ec1);box-shadow:var(--shadow)}
.hero h1{max-width:700px;font-size:clamp(30px,3.2vw,46px);line-height:1.07}.hero-copy>p:not(.eyebrow){font-size:15px}
.search-box{height:58px;border:1px solid #ffffff70;border-radius:15px;box-shadow:0 15px 34px #04112d50}.search-box:focus-within{box-shadow:0 0 0 4px #96adff55,0 15px 34px #04112d50}
.hero-metrics{gap:10px}.hero-metrics article{min-height:96px;padding:15px;border-radius:14px}.hero-metrics strong{font-size:27px}
.toolbar{margin:17px 0 13px}.tabs{border-radius:12px;box-shadow:0 6px 20px #071a3808}.tab{min-height:40px}.tab.active{background:linear-gradient(135deg,#2457f5,#193bd0)}
.directory-shell{border-radius:19px;box-shadow:0 14px 45px #071a380c}.results-heading{padding:17px 20px}
.results{padding:10px;gap:8px}.result-card,.department-group{border-color:#e0e7f0;border-radius:14px}
.result-card{min-height:76px;padding:14px 16px}.result-card:hover,.department-group:hover{border-color:#9bb3ff;box-shadow:0 10px 28px #173c9b10;transform:translateY(-1px)}
.department-head{min-height:74px}.department-icon,.record-type-icon{border-radius:13px}.department-chevron{width:36px;height:36px;border-radius:11px}
.department-group.open{border-color:#90aaff;box-shadow:0 12px 34px #173c9b12}.department-body{background:#f8faff}
.person-row{min-height:66px}.person-avatar{border-radius:12px;background:#eaf0ff;color:#1749d4}
.copy-btn,.edit-btn,.icon-action{border-radius:10px;transition:.16s}.copy-btn:hover,.edit-btn:hover{border-color:#9eb4ef;background:#eef3ff}
.data-menu-panel{width:280px;border-radius:16px;box-shadow:0 24px 70px #071a3840}
dialog{border-radius:22px;box-shadow:0 34px 110px #071a3850}#editorForm{padding:26px}.form-grid input,.form-grid select,.form-grid textarea{min-height:44px;border-radius:11px}
.button{min-height:40px;border-radius:10px;transition:transform .16s,box-shadow .16s,border-color .16s}.button:active{transform:translateY(1px)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #4d78ff55;outline-offset:2px}
*{scrollbar-width:thin;scrollbar-color:#9aabc0 transparent}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background:#9aabc0;border:2px solid transparent;border-radius:99px;background-clip:padding-box}
@media(max-width:1100px){.hero{grid-template-columns:1fr}.hero-metrics{max-width:none}.content-grid{grid-template-columns:1fr}.summary-card{display:none}}
@media(max-width:760px){.topbar{min-height:70px;padding:9px 12px}.brand-logo{width:100px}.top-actions{gap:6px}main{padding:16px 12px 44px}.hero{padding:22px 18px;border-radius:18px}.hero h1{font-size:29px}.hero-metrics{grid-template-columns:1fr 1fr}.hero-metrics article.warning{grid-column:1/-1}.search-box{height:54px}.directory-shell{border-radius:16px}.results{padding:7px}}

/* Directorio operativo 4.7 */
.brand-logo{padding:6px 9px;border-radius:12px;background:rgba(255,255,255,.94);box-shadow:0 5px 18px rgba(0,0,0,.16)}
.hero{grid-template-columns:minmax(0,1fr) auto;align-items:end;padding:22px 26px;background:linear-gradient(115deg,#071a38,#103b83 68%,#2457f5)}
.hero-copy{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(420px,1.25fr);align-items:end;gap:8px 28px}
.hero-copy .eyebrow,.hero-copy h1,.hero-copy>p{grid-column:1}.hero h1{margin:2px 0;font-size:26px}.hero-copy>p:not(.eyebrow){margin:0;font-size:12px}
.search-box{grid-column:2;grid-row:1/4;width:100%;height:56px;margin:0;align-self:center}.suggestions{grid-column:2;grid-row:4}
.hero-metrics{min-width:420px}.hero-metrics article{min-height:82px}.hero-metrics strong{font-size:24px}
.toolbar{position:sticky;top:76px;z-index:30;padding:10px 0;background:linear-gradient(var(--bg) 72%,transparent)}
.directory-shell{overflow:hidden}.directory-workspace{display:grid;grid-template-columns:270px minmax(520px,1fr) 310px;min-height:620px;border-top:1px solid var(--line)}
.directory-navigation{max-height:calc(100vh - 220px);overflow:auto;padding:14px;background:#f8faff;border-right:1px solid var(--line)}
.directory-navigation-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;padding:0 5px}.directory-navigation-head>span{color:#60748e;font-size:9px;font-weight:900;letter-spacing:.15em}.directory-navigation-head button{border:0;background:transparent;color:#2457f5;font-size:10px;font-weight:800;cursor:pointer}
.directory-navigation details{margin-bottom:8px}.directory-navigation summary{display:flex;align-items:center;justify-content:space-between;padding:10px 8px;color:#203550;font-size:11px;font-weight:900;cursor:pointer}.directory-navigation summary small{display:grid;place-items:center;min-width:24px;height:20px;padding:0 6px;border-radius:99px;background:#e7edfa;color:#536982}
.directory-navigation details>div{display:grid;gap:4px}.directory-navigation details>div>button{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:8px;width:100%;padding:8px;border:1px solid transparent;border-radius:10px;background:transparent;color:#334963;text-align:left;cursor:pointer}.directory-navigation details>div>button:hover{border-color:#c8d6f2;background:#fff;color:#173fba}
.directory-navigation details>div>button span{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#eaf0ff;color:#2457f5}.directory-navigation details>div>button svg{width:15px;height:15px}.directory-navigation details>div>button b{overflow:hidden;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.directory-content{min-width:0;background:#fff}.directory-content .results{padding:12px}.department-group{box-shadow:none}.person-row{grid-template-columns:42px minmax(190px,1.2fr) minmax(105px,.45fr) minmax(150px,.6fr) auto}
.record-preview{min-width:0;padding:20px;border-left:1px solid var(--line);background:#fbfcff}.record-preview-empty{min-height:420px;display:grid;place-items:center;align-content:center;gap:8px;color:#7d8da2;text-align:center}.record-preview-empty>span{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:#edf2fb;color:#2457f5;font-size:32px}.record-preview-empty h3{margin:5px 0 0;color:#233954}.record-preview-empty p{max-width:220px;margin:0;font-size:11px;line-height:1.5}
.record-preview-head{position:relative;display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:14px;align-items:center;padding-bottom:20px;border-bottom:1px solid var(--line)}.record-preview-avatar{display:grid;place-items:center;width:64px;height:64px;border:1px solid #cad6e5;border-radius:50%;background:linear-gradient(145deg,#f6f8fb,#dfe6ef);color:#50647a;font-size:20px;font-weight:900}.record-preview-head h3{margin:0 0 4px;font-size:18px}.record-preview-head p{margin:0 0 8px;color:#75859a;font-size:11px}.record-preview-head>button{align-self:start;width:30px;height:30px;border:0;background:transparent;color:#65768c;font-size:22px;cursor:pointer}.preview-status{display:inline-flex;padding:4px 7px;border-radius:6px;background:#dcf7e6;color:#087b4e;font-size:9px;font-weight:850}.preview-status.inactive{background:#fde5e7;color:#bd222b}
.record-preview-data{display:grid;gap:18px;margin:22px 0}.record-preview-data div{display:grid;gap:5px}.record-preview-data dt{color:#77879a;font-size:9px;text-transform:uppercase}.record-preview-data dd{margin:0;color:#203550;font-size:12px;font-weight:700}.record-preview-data .preview-extension{color:#164ce0;font-size:21px}.record-preview-actions{display:grid;gap:9px;padding-top:18px;border-top:1px solid var(--line)}.record-preview-actions .button{width:100%;display:flex;align-items:center;justify-content:center;gap:8px}.record-preview-actions svg{width:17px;height:17px}
[data-preview-record]{cursor:pointer}.selected-preview{background:#edf4ff!important;box-shadow:inset 3px 0 #2457f5}
@media(max-width:1250px){.directory-workspace{grid-template-columns:230px minmax(480px,1fr)}.record-preview{position:fixed;z-index:120;right:18px;top:92px;bottom:18px;width:310px;border:1px solid var(--line);border-radius:18px;box-shadow:0 28px 80px rgba(7,26,56,.24)}.record-preview:has(.record-preview-empty){display:none}}
@media(max-width:1000px){.hero{grid-template-columns:1fr}.hero-copy{grid-template-columns:1fr}.hero-copy .eyebrow,.hero-copy h1,.hero-copy>p,.search-box,.suggestions{grid-column:1;grid-row:auto}.hero-metrics{min-width:0}.directory-workspace{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:760px){.brand-logo{padding:4px 6px}.hero{padding:18px}.directory-workspace{display:block}.directory-navigation{display:flex;gap:8px;max-height:none;overflow:auto;border-right:0;border-bottom:1px solid var(--line)}.directory-navigation-head{flex:0 0 auto}.directory-navigation details{flex:0 0 210px}.directory-navigation details>div{max-height:180px;overflow:auto}.person-row{grid-template-columns:38px 1fr auto}.person-whatsapp{display:none}}
@media(max-width:760px){.record-preview{left:12px;right:12px;top:82px;bottom:12px;width:auto;padding:17px}.record-preview-head{grid-template-columns:54px minmax(0,1fr) auto}.record-preview-avatar{width:54px;height:54px}.record-preview-data{grid-template-columns:1fr 1fr}}
