/* GintSoftware · Azul elegante. Shared palette for the desktop and AI workspace. */
:root{color-scheme:light;--bg:#edf3fb;--card:#fff;--ink:#164fc4;--muted:#526b8a;--line:#dbe5f2;--blue:#164fc4;--blue2:#24456d;--nav:#0b2348;--nav2:#153765;--wine:#164fc4;--wine-deep:#0b2348;--wine-mid:#35547a;--wine-soft:#edf4ff;--shadow:0 2px 8px rgba(0,0,0,.035);--r:10px}
html,body{background:#edf3fb!important;color:#164fc4;font-family:Inter,"Segoe UI",Arial,sans-serif;-webkit-font-smoothing:antialiased}
.side{background:#0b2348!important;border-right:1px solid #1d4678!important;box-shadow:none!important}
.brand b{color:#fff!important;font-weight:650!important;letter-spacing:-.03em!important}.brand small{color:#adc6e9!important;letter-spacing:.08em;text-transform:uppercase}
.logo,.auth-logo{background:#fff!important;color:#102b51!important;box-shadow:none!important;border:1px solid #d1deef;border-radius:8px!important;font-weight:750}
.sect{color:#8caedb!important;letter-spacing:.16em!important}.nav a{color:#c8dbf7!important;border:1px solid transparent!important}.nav a .ico{color:inherit!important}
.nav a:hover{background:#173e72!important;color:#fff!important}.nav a.active{background:#fff!important;color:#102b51!important;box-shadow:none!important;border-color:#fff!important;font-weight:750}
.sidefoot{background:transparent!important;border-color:#24456d!important;color:#c8dbf7!important}.dot{box-shadow:none!important}
.top{background:#fff!important;border-bottom:1px solid #dbe5f2!important;backdrop-filter:none!important}.top strong,.company-badge{color:#164fc4!important}.top small{color:#60758e!important}
.userbox .avatar{background:#164fc4!important;color:#fff!important;border-color:#164fc4!important;box-shadow:none!important}.logout{color:#35547a!important;border-color:#d1deef!important;background:#fff!important}
.hero h1{color:#102b51!important;font-weight:650!important;letter-spacing:-.035em}.hero p{color:#60758e!important}
.primary{background:#164fc4!important;color:#fff!important;border:1px solid #164fc4!important;box-shadow:none!important}.primary:hover{background:#24456d!important;border-color:#24456d!important}.btn{border-radius:7px!important;transform:none!important;font-weight:600!important}.btn:disabled{opacity:.5;cursor:wait}
.light{background:#fff!important;color:#1d4678!important;border:1px solid #d1deef!important}.light:hover{background:#eaf2ff!important;border-color:#999!important}.danger{background:#fff!important;color:#193a64!important;border:1px dashed #777!important}
.card,.stat{background:#fff!important;border-color:#dbe5f2!important;box-shadow:var(--shadow)!important;border-radius:10px!important}.ch{background:#fff!important;border-bottom-color:#e5edf7!important}.ch b{color:#252525!important;font-weight:650!important}.ch span,.stat .t{color:#526b8a!important}.stat strong{color:#102b51!important;font-weight:650!important;font-variant-numeric:tabular-nums}.stat:after{display:none!important}.stat .i,.stat:nth-child(n) .i{background:#eaf2ff!important;color:#193a64!important;border:1px solid #dbe5f2!important}
.toolbar,.table th{background:#f0f5fc!important;border-color:#dbe5f2!important;color:#526b8a!important}.table th{letter-spacing:.065em!important}.table td,.table th{border-bottom-color:#e5edf7!important}.table td{color:#24456d;font-variant-numeric:tabular-nums}.table tbody tr:hover{background:#f4f8ff!important}
.field label{color:#456184!important}.field input,.field select,.toolbar input,.toolbar select,.item input,.quoteitem select,textarea{background:#fff!important;color:#193a64!important;border-color:#cad8eb!important}.field input:focus,.field select:focus,.toolbar input:focus,.toolbar select:focus,.item input:focus,.quoteitem select:focus,textarea:focus{outline:2px solid #193a64!important;outline-offset:2px;box-shadow:none!important;border-color:#777!important}
button:focus-visible,a:focus-visible{outline:2px solid #777;outline-offset:3px}input,select,textarea{accent-color:#102b51}
.pill,.tab.on{background:#e7efff!important;color:#193a64!important;border:1px solid #cad8eb!important}.tab{color:#456184!important}.badge.ok{background:#e7efff!important;color:#193a64!important;border:1px solid #d1deef}.badge.pending{background:#fff!important;color:#456184!important;border:1px dashed #999}.badge.err{background:#24456d!important;color:#fff!important;border:1px solid #24456d}
.quick button{background:#fff!important;border-color:#d1deef!important;box-shadow:none!important;transform:none!important}.quick button:hover{background:#eaf2ff!important;border-color:#8caedb!important}.quick button b{color:#193a64!important}.quick span{color:#60758e!important}
.bar,.product-bar i{background:#1d4678!important;box-shadow:none!important}.rank{background:#e7efff!important;color:#193a64!important}.donut:after{background:#fff!important;box-shadow:inset 0 0 0 1px #eee!important}.invoice-type{background:#f0f5fc!important;border-color:#d1deef!important}.invoice-type strong,.totals .big{color:#102b51!important}.totals .big{border-color:#ccc!important}
.toast{background:#164fc4!important;color:#fff!important}.auth-screen{background:#102b51!important}.auth-card{background:#fff!important;border:1px solid #d1deef!important;border-radius:16px!important;box-shadow:0 24px 80px rgba(0,0,0,.3)!important}.auth-logo{background:#102b51!important;color:#fff!important;border-color:#102b51!important}.auth-card a{color:#193a64!important}.auth-error{background:#eee!important;color:#193a64!important;border-left:3px solid #24456d}
.ai-message{background:#eaf2ff!important;color:#193a64!important}.ai-message.user{background:#164fc4!important;color:#fff!important}.ai-details .proposal{border-color:#d1deef!important}.ai-details td,.ai-details th,.ai-conversation form{border-color:#dbe5f2!important}.ai-details .warning,#aiError{color:#35547a!important}.ai-details .warning{border-left:2px solid #8caedb;padding-left:10px}.ai-conversation textarea{border-color:#ccc!important}
@media(min-width:900px){#agente .ai-layout{flex:1;height:auto!important;min-height:0!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.side{overflow-y:auto!important;scrollbar-width:thin;scrollbar-color:#456184 #0b2348}.sidefoot{position:static!important;margin-top:14px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
@media(max-width:760px){
 .main,.content,.page,.ai-layout,.ai-conversation,.ai-details{min-width:0!important}
 .top{gap:8px!important;padding:0 10px!important}.top>div:first-child{min-width:0}.top>div:first-child small{font-size:9px;white-space:nowrap}.top .actions{gap:6px!important;flex-wrap:nowrap!important}.top .pill,.userbox>div:not(.avatar){display:none!important}.userbox{gap:6px!important}.userbox .avatar{width:27px!important;height:27px!important;font-size:11px!important;flex-shrink:0}.logout{padding:7px!important;font-size:10px!important}
 .side .logo{width:34px!important;min-width:34px!important;height:34px!important;flex-shrink:0}.side .brand{padding-left:8px!important;padding-right:0!important}
 .ai-conversation .ch{flex-wrap:wrap;gap:8px}.ai-details #aiResults{min-width:0}.ai-layout{grid-template-columns:minmax(0,1fr)!important}
}

/* Alineación y jerarquía visual del encabezado. */
.top>.actions{align-items:center!important;align-self:center;min-width:0}
#env.pill{display:inline-flex;align-items:center;justify-content:center;align-self:center;flex:0 0 auto;min-height:30px;height:30px;padding:0 12px!important;line-height:1!important;text-align:center;white-space:nowrap;letter-spacing:.055em;background:#e8f0ff!important;color:#214f96!important;border:1px solid #cadbf6!important}
.userbox{align-items:center!important}.userbox>div:not(.avatar){line-height:1.25}.userbox .avatar{display:flex;align-items:center;justify-content:center;line-height:1}
.side{background:linear-gradient(175deg,#102f5b 0%,#0a2041 100%)!important;border-color:#1b3e6b!important}
.nav a.active{background:#2463d6!important;color:#fff!important;border-color:#3474e7!important;box-shadow:0 4px 12px #05152e33!important}
.logo{background:#2870e7!important;color:#fff!important;border-color:#4b87ea!important}
.primary{background:linear-gradient(135deg,#2463d6,#194fb7)!important;border-color:#245bc5!important;box-shadow:0 3px 9px #1d57bd22!important}.primary:hover{background:#1647a6!important}
.auth-screen{background:radial-gradient(ellipse at 20% 20%,#2157a3,transparent 55%),linear-gradient(140deg,#102f5b,#081c39)!important}
.auth-logo{background:#2463d6!important;color:#fff!important}
.bar,.product-bar i{background:linear-gradient(180deg,#5c94f1,#2463d6)!important}
.ai-message.user{background:#205bc6!important;color:#fff!important}
.badge.ok{background:#e8f5ef!important;color:#206447!important;border-color:#c8e6d5!important}.badge.err,.auth-error{background:#fff0f1!important;color:#a62f43!important;border-color:#edc9d0!important}.danger{color:#a62f43!important;border-color:#edc9d0!important;background:#fff5f6!important}
@media(max-width:760px){#env.pill{display:none!important}}
