
:root{
 --nav:#071b2e;--nav2:#0a2a46;--nav3:#0d456f;--copper:#c8834b;--copper2:#f0b678;
 --blue:#0c5c92;--blue2:#0a3c61;--green:#13935b;--red:#d53a32;
 --bg:#f2f6fa;--panel:#fff;--text:#11263a;--muted:#66788a;--line:#d9e2eb;
 --shadow:0 3px 12px rgba(8,35,58,.09)
}
*{box-sizing:border-box}
html{font-size:14px}
html,body{margin:0;min-height:100%;font-family:"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text)}
body{background:linear-gradient(180deg,#f8fbfd 0,#eef4f8 100%)}
button,input,select,textarea{font:inherit}
a{text-decoration:none;color:inherit}
.app{display:flex;min-height:100vh}
.sidebar{
 width:212px;position:fixed;inset:0 auto 0 0;z-index:30;padding:12px 10px 12px;
 background:linear-gradient(180deg,#07192a 0%,#0a2a47 62%,#061522 100%);
 color:#fff;border-right:1px solid rgba(255,255,255,.05);overflow-y:auto
}
.brand{height:118px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid rgba(138,178,211,.22);margin:0 2px 8px;padding:4px 0}
.brand-logo{width:148px;max-height:96px;object-fit:contain;image-rendering:auto;filter:drop-shadow(0 3px 5px rgba(0,0,0,.28))}
.brand-sub{display:none}
.sidebar nav{display:grid;gap:3px}
.sidebar a{display:flex;align-items:center;gap:10px;padding:8px 9px;color:#f3f6f9;border-radius:5px;font-size:13px;line-height:1;border:1px solid transparent}
.sidebar a:hover{background:#0b3c62}
.sidebar a.active{background:linear-gradient(90deg,#0d6da7,#0c4b79);border-color:#2d79a9;box-shadow:inset 3px 0 0 #9cc8ee}
.nav-icon{width:27px;height:27px;flex:0 0 27px;display:grid;place-items:center;border-radius:7px;color:#0b2640;background:linear-gradient(145deg,#f8fbff 0,#b8d0e8 52%,#3e6f98 100%);border:1px solid rgba(230,242,255,.92);box-shadow:inset 1px 1px 0 rgba(255,255,255,.82), inset -2px -2px 3px rgba(35,69,97,.28),0 2px 4px rgba(0,0,0,.28)}
.nav-icon svg{width:16px;height:16px;stroke-width:2.1}
.sidebar-foot{margin:25px 10px 0;padding-top:14px;border-top:2px solid #6ea0cf;text-align:center;font-size:9px;letter-spacing:.15em;line-height:1.7;color:#d7e1e9}
.main{margin-left:212px;width:calc(100% - 212px);padding:12px 15px 24px;min-width:0}
.topbar{height:48px;background:#fff;border:1px solid #e0e8ef;border-radius:7px;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:space-between;padding:6px 12px;margin-bottom:11px}
.top-left{display:flex;align-items:center;gap:10px;flex:1}.mobile-menu{display:none}
.searchbar{position:relative;width:400px;max-width:52vw}.searchbar input{height:34px;padding:6px 10px 6px 34px;border:1px solid #d7e1ea;border-radius:5px;background:#fbfdff;font-size:12px}
.searchbar svg{position:absolute;left:10px;top:9px;width:16px;height:16px;color:#365975}
.top-actions{display:flex;align-items:center;gap:13px}.date-block{font-size:10px;color:#617486;text-align:right;line-height:1.35}
.user-pill{display:flex;align-items:center;gap:7px;padding-left:11px;border-left:1px solid #dfe6ec}.user-avatar{width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#164d76,#082b45);color:#fff;font-weight:700;font-size:11px}.user-meta strong{display:block;font-size:11px}.user-meta span{display:block;font-size:9px;color:#738392}
.hero-title{margin:2px 0 10px}.hero-title h1{margin:0;font-size:22px;color:#0e2235;letter-spacing:-.02em}.hero-title p{margin:2px 0 0;font-size:11px;color:#66798b}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.card{background:#fff;border:1px solid #dfe7ee;border-radius:7px;padding:12px;box-shadow:var(--shadow)}
.kpi{height:112px;display:flex;align-items:flex-start;gap:9px;padding-top:13px}
.kpi-icon{width:40px;height:40px;flex:0 0 40px;border-radius:9px;display:grid;place-items:center;color:white;background:linear-gradient(145deg,#9dd2ff,#287fbe 60%,#0a4b77);border:1px solid #82b9e1;box-shadow:inset 1px 1px 0 rgba(255,255,255,.55),0 3px 6px rgba(10,75,119,.22)}
.kpi-icon.blue{background:linear-gradient(145deg,#9dd2ff,#287fbe 60%,#0a4b77);border-color:#82b9e1}.kpi-icon.green{background:linear-gradient(145deg,#8de6c0,#24a36f 60%,#0c6f4a);border-color:#8fe0bf}.kpi-icon.red{background:linear-gradient(145deg,#ffc2be,#db5a53 60%,#9c2c26);border-color:#f0a6a1}
.kpi-icon svg{width:22px;height:22px}.kpi-label{font-size:11px;color:#4a6175}.kpi strong{display:block;font-size:20px;line-height:1.1;margin:4px 0;color:#0b2238}.kpi small{font-size:9px;color:#728596}
.two{display:grid;grid-template-columns:360px minmax(0,1fr);gap:12px;margin-top:10px}
.card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.card-head h2,.card h2,.section-title h2{font-size:16px;margin:0;color:#12273b}.muted{font-size:10px;color:#6a7e8f}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 9px}label{display:grid;gap:3px;font-size:10px;font-weight:600;color:#30495f}
input,select,textarea{width:100%;border:1px solid #ccd8e3;border-radius:4px;background:white;color:#173047;padding:7px 8px;font-size:11px;outline:none}
input:focus,select:focus,textarea:focus{border-color:#3f82af;box-shadow:0 0 0 2px #2e7eaf18}textarea{min-height:47px;resize:vertical}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;border-radius:5px;padding:7px 10px;font-size:10px;font-weight:700;background:linear-gradient(#0d5f92,#0a456c);color:#fff;cursor:pointer}.btn.green{background:linear-gradient(#1aa36a,#12804f)}.btn.red{background:linear-gradient(#d94c46,#b2322d)}.btn.gray{background:linear-gradient(#8a9aa8,#637380)}.btn.copper{background:linear-gradient(#d49a67,#aa6738)}.btn.small{padding:5px 7px;font-size:9px}.actions{display:flex;gap:5px;flex-wrap:wrap}
.section-title{display:flex;align-items:center;justify-content:space-between;margin:13px 0 7px}
.table-wrap{overflow:auto;background:#fff;border:1px solid #dfe7ee;border-radius:7px;box-shadow:var(--shadow)}
.table{width:100%;border-collapse:collapse;min-width:650px}.table th,.table td{padding:7px 8px;border-bottom:1px solid #e8eef3;text-align:left;font-size:10px;white-space:nowrap}.table th{background:#f2f7fb;color:#3c5368;font-weight:700}.table tr:hover td{background:#fbfdff}
.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 6px;border-radius:999px;font-size:9px;font-weight:700}.badge:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}.paid{background:#dff5e8;color:#168252}.pending{background:#fff0d8;color:#a86821}.late{background:#fde5e3;color:#c43530}
.alert{padding:8px 10px;border-radius:5px;margin-bottom:8px;font-size:10px}.alert.ok{background:#e0f5e9;color:#126e48}.alert.err{background:#fde7e6;color:#96312d}
.receipt{max-width:620px;margin:auto;background:white;border:1px solid #d2dce5;border-radius:7px;box-shadow:var(--shadow);padding:16px}.receipt-brand{display:flex;justify-content:space-between;align-items:center;gap:15px;border-bottom:2px solid #123e61;padding-bottom:10px}.receipt-logo{width:140px;height:70px;object-fit:contain}.receipt-title{font-size:15px;font-weight:800;margin:12px 0}.receipt-grid{display:grid;grid-template-columns:1fr 1fr;border:1px solid #dce4eb}.receipt-grid p{margin:0;padding:7px 8px;border-bottom:1px solid #e5ebf0;font-size:10px}.no-print{margin-bottom:10px}
.install-banner{display:none!important}
.login-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(135deg,#07192a,#0b2b47)}.login-shell{width:min(820px,100%);display:grid;grid-template-columns:1.05fr .95fr;overflow:hidden;border-radius:12px;box-shadow:0 24px 70px #0007}.login-brand{min-height:470px;padding:28px;background:linear-gradient(155deg,#07192a,#0a2b48);color:white;display:flex;flex-direction:column;justify-content:space-between}.login-brand img{width:100%;max-height:230px;object-fit:contain}.login-brand h2{font-size:22px;margin:14px 0 7px}.login-brand p{font-size:12px;color:#c9d5df;line-height:1.5}.login-form{background:#fff;padding:35px 32px;display:flex;flex-direction:column;justify-content:center}.login-form h1{font-size:22px;margin:0 0 4px}.login-form .muted{margin-bottom:18px}.login-form label{margin-bottom:10px}.login-form .btn{width:100%;padding:9px}
@media(max-width:1050px){.grid{grid-template-columns:repeat(2,1fr)}.two{grid-template-columns:1fr}}
@media(max-width:720px){
 .sidebar{transform:translateX(-100%);transition:.2s;width:235px}.sidebar.open{transform:translateX(0)}
 .main{margin-left:0;width:100%;padding:9px}.mobile-menu{display:grid;place-items:center;width:33px;height:33px;border:1px solid #d9e2e9;border-radius:5px;background:white}.mobile-menu svg{width:17px}
 .searchbar,.date-block{display:none}.user-meta{display:none}.topbar{height:46px}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.kpi{height:92px;padding:10px}.kpi strong{font-size:18px}.kpi-icon{width:34px;height:34px;flex-basis:34px}.kpi-icon svg{width:19px;height:19px}
 .form-grid{grid-template-columns:1fr}.two{grid-template-columns:1fr}.hero-title h1{font-size:20px}
 .login-shell{grid-template-columns:1fr}.login-brand{min-height:260px}.login-brand img{max-height:150px}.login-form{padding:26px 22px}
 .receipt-grid{grid-template-columns:1fr}.receipt-brand{flex-direction:column;align-items:flex-start}.receipt-logo{width:100%;height:auto;max-height:130px}
}
@media(max-width:440px){.grid{grid-template-columns:1fr}}
@media print{.sidebar,.topbar,.no-print,.alert{display:none!important}.main{margin:0;width:100%;padding:0}.receipt{border:0;box-shadow:none}}


/* ===== v4.0 responsive corrections ===== */
:root{
 --brand:#0d5b91;
 --brand-dark:#082f50;
 --accent:#4ca7d9;
 --accent-soft:#dceffc;
 --ok:#14935c;
 --danger:#c83d39;
}
body{overflow-x:hidden}
.brand{height:102px!important;padding:2px 0 8px!important}
.brand-logo{
 width:154px!important;max-height:84px!important;object-fit:contain!important;
 image-rendering:auto!important;filter:drop-shadow(0 2px 4px rgba(0,0,0,.20))!important
}
.sidebar{width:210px!important}
.main{margin-left:210px!important;width:calc(100% - 210px)!important}
.nav-icon{
 background:linear-gradient(145deg,#f7fbff,#b9d8ee 55%,#5d8fb5)!important;
 color:#0b2b44!important;border-color:#e5f3ff!important
}
.nav-icon svg{stroke:#0b2b44!important}
.sidebar a.active{box-shadow:inset 3px 0 0 #72b9e6!important}
.sidebar-foot{border-top-color:#6ea9d2!important}
.kpi{height:auto!important;min-height:96px!important}
.kpi strong{font-size:19px!important}
.kpi-icon{width:38px!important;height:38px!important;flex-basis:38px!important}
.table-wrap{max-width:100%}
.table{min-width:720px}
.link-chip{
 display:inline-flex;align-items:center;gap:4px;padding:4px 7px;border-radius:999px;
 background:#edf7fd;color:#0b5b91;border:1px solid #cce7f7;font-size:9px;font-weight:700
}
.danger-btn{background:linear-gradient(#db5650,#b93631)!important}
.secondary-btn{background:linear-gradient(#6994b5,#4b708d)!important}
.icon-btn{padding:5px 7px!important}
.receipt{
 max-width:720px!important;padding:20px!important;background:#fff!important;
 border-radius:12px!important;border:1px solid #dbe5ed!important
}
.receipt-brand{
 display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;
 border-bottom:1px solid #cfdce7!important;padding-bottom:12px!important
}
.receipt-logo{width:185px!important;height:82px!important;object-fit:contain!important}
.receipt-title{
 text-align:center!important;font-size:21px!important;letter-spacing:.02em!important;
 padding-top:6px!important;color:#0c2e4b!important
}
.receipt-number{
 display:block;text-align:center;color:#0b6db0;font-size:18px;font-weight:800;margin-top:3px
}
.receipt-grid{border-radius:7px;overflow:hidden}
.receipt-grid p:nth-child(odd){background:#f5f8fb}
.receipt-success{
 margin-top:14px;padding:12px 14px;background:linear-gradient(90deg,#e3f8ed,#effcf6);
 border:1px solid #c9efda;border-radius:8px;color:#117347;font-weight:700;text-align:center
}
.receipt-footer{
 margin-top:13px;padding-top:11px;border-top:1px solid #dfe7ee;text-align:center;
 color:#60778d;font-size:10px;font-style:italic
}
.module-toolbar{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.install-card{
 display:none;position:fixed;right:16px;bottom:16px;z-index:80;background:#fff;border:1px solid #dce6ee;
 border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.16);padding:12px 14px;max-width:290px
}
.install-card.show{display:block}
.install-card strong{display:block;color:#102b45;margin-bottom:3px}
.install-card p{font-size:10px;color:#667b8e;margin:0 0 8px}
.install-card .actions{justify-content:flex-end}
.mobile-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
@media(max-width:1200px){
 .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .two{grid-template-columns:1fr!important}
}
@media(max-width:820px){
 html{font-size:13px}
 .sidebar{width:225px!important;transform:translateX(-100%);transition:.2s}
 .sidebar.open{transform:translateX(0)}
 .main{margin-left:0!important;width:100%!important;padding:8px!important}
 .topbar{height:44px!important;min-height:44px!important;padding:5px 8px!important}
 .mobile-menu{display:grid!important;place-items:center;width:32px!important;height:32px!important}
 .searchbar{display:none!important}.date-block{display:none!important}.user-meta{display:none!important}
 .hero-title{margin-bottom:8px!important}.hero-title h1{font-size:19px!important}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
 .kpi{min-height:82px!important;padding:9px!important;gap:7px!important}
 .kpi-label{font-size:10px!important}.kpi strong{font-size:16px!important}.kpi small{font-size:8px!important}
 .kpi-icon{width:32px!important;height:32px!important;flex-basis:32px!important}
 .card{padding:10px!important;border-radius:7px!important}
 .form-grid{grid-template-columns:1fr!important;gap:7px!important}
 input,select,textarea{font-size:16px!important;padding:8px!important} /* evita zoom iOS */
 label{font-size:10px!important}
 .btn{font-size:10px!important;padding:8px 9px!important}
 .table{min-width:640px!important}
 .receipt{padding:12px!important;border-radius:8px!important}
 .receipt-brand{grid-template-columns:1fr!important;text-align:center!important}
 .receipt-logo{width:150px!important;height:68px!important;margin:auto}
 .receipt-brand>div{text-align:center!important}
 .receipt-title{font-size:18px!important}
 .receipt-grid{grid-template-columns:1fr!important}
}
@media(max-width:520px){
 .grid{grid-template-columns:1fr!important}
 .kpi{min-height:70px!important}
 .top-actions{gap:5px!important}
 .user-avatar{width:28px!important;height:28px!important}
 .hero-title p{font-size:10px!important}
 .actions{width:100%}
 .actions .btn{flex:1}
 .receipt{margin:0!important;width:100%!important}
 .receipt-logo{width:132px!important;height:58px!important}
 .receipt-title{font-size:16px!important}
 .receipt-number{font-size:15px!important}
 .install-card{left:8px;right:8px;bottom:8px;max-width:none}
}
@media print{
 body{background:#fff!important}
 .receipt{max-width:100%!important;border:0!important;box-shadow:none!important;padding:0!important}
 .receipt-logo{width:150px!important;height:65px!important}
 .receipt-title{font-size:18px!important}
 .no-print,.sidebar,.topbar,.install-card{display:none!important}
}


/* v4.1 logo improvement */
.brand{height:auto!important;min-height:96px!important;padding:8px 6px 10px!important;display:grid!important;grid-template-columns:60px 1fr;align-items:center;gap:10px;border-bottom:1px solid rgba(140,184,220,.22)!important}
.brand-mark{display:flex;align-items:center;justify-content:center}
.brand-logo{width:58px!important;height:58px!important;max-width:58px!important;max-height:58px!important;object-fit:contain!important;filter:drop-shadow(0 2px 5px rgba(0,0,0,.28))!important}
.brand-copy{display:flex;flex-direction:column;line-height:1.08;min-width:0}
.brand-copy strong{font-size:18px;color:#f1f6fb;font-weight:800;letter-spacing:-.02em}
.brand-copy span{font-size:10px;color:#cfe3f7;font-weight:600;margin-top:2px}
.brand-copy em{font-style:normal;font-size:8px;color:#90b5d3;text-transform:uppercase;letter-spacing:.10em;margin-top:4px}
.sidebar{padding-top:10px!important}
.sidebar nav{margin-top:8px}
.sidebar-foot{margin-top:18px!important}
.login-brand-head{display:flex;align-items:center;gap:14px;margin-bottom:6px}
.login-brand-head img{width:92px!important;max-height:92px!important;object-fit:contain}
.login-brand-copy strong{display:block;font-size:28px;color:#fff;font-weight:800;line-height:1}
.login-brand-copy span{display:block;font-size:14px;color:#d2e5f7;margin-top:6px}
.receipt-brand-left{display:flex;align-items:center;gap:14px}
.receipt-brand-copy strong{display:block;font-size:20px;color:#0d2840;line-height:1.05}
.receipt-brand-copy span{display:block;font-size:12px;color:#52687d;margin-top:4px}
.receipt-logo{width:84px!important;height:84px!important;object-fit:contain!important}
@media(max-width:820px){
 .brand{grid-template-columns:52px 1fr!important;min-height:88px!important;padding:8px 4px 9px!important}
 .brand-logo{width:48px!important;height:48px!important;max-width:48px!important;max-height:48px!important}
 .brand-copy strong{font-size:16px}
 .brand-copy span{font-size:9px}
 .brand-copy em{font-size:7px}
}
@media(max-width:520px){
 .brand{grid-template-columns:46px 1fr!important;gap:8px!important}
 .brand-logo{width:42px!important;height:42px!important;max-width:42px!important;max-height:42px!important}
 .brand-copy strong{font-size:14px!important}
 .brand-copy span{font-size:8px!important}
 .brand-copy em{font-size:6.5px!important}
 .sidebar{width:220px!important}
}


/* v4.2 logo refinement */
.brand{grid-template-columns:52px 1fr!important;gap:10px!important;min-height:92px!important;padding:9px 6px 10px!important;align-items:center!important;overflow:visible!important}
.brand-mark{width:52px!important;height:52px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}
.brand-logo{width:52px!important;height:52px!important;max-width:52px!important;max-height:52px!important;object-fit:contain!important;overflow:visible!important;filter:drop-shadow(0 2px 4px rgba(0,0,0,.22))!important}
.brand-copy{min-width:0!important;overflow:visible!important}
.brand-copy strong{font-size:13px!important;line-height:1.0!important;letter-spacing:-.01em!important;color:#f7fbff!important;display:block!important}
.brand-copy span{font-size:9px!important;line-height:1.1!important;color:#d8ebfb!important;display:block!important;margin-top:4px!important}
.brand-copy em{font-size:7px!important;line-height:1.2!important;letter-spacing:.08em!important;color:#9bbdd8!important;display:block!important;margin-top:5px!important}
.receipt-brand-left{display:flex;align-items:center;gap:14px}
.receipt-logo{width:72px!important;height:72px!important;max-width:72px!important;max-height:72px!important;object-fit:contain!important}
.login-brand-head{display:flex;align-items:center;gap:14px;margin-bottom:8px!important}
.login-brand-head img{width:88px!important;height:88px!important;max-height:88px!important;object-fit:contain!important}
@media(max-width:820px){
 .brand{grid-template-columns:48px 1fr!important;gap:9px!important;min-height:88px!important;padding:8px 5px 9px!important}
 .brand-mark{width:48px!important;height:48px!important}
 .brand-logo{width:48px!important;height:48px!important;max-width:48px!important;max-height:48px!important}
 .brand-copy strong{font-size:12px!important}
 .brand-copy span{font-size:8px!important}
 .brand-copy em{font-size:6.5px!important}
}
@media(max-width:520px){
 .brand{grid-template-columns:46px 1fr!important;gap:8px!important;min-height:84px!important}
 .brand-mark{width:46px!important;height:46px!important}
 .brand-logo{width:46px!important;height:46px!important;max-width:46px!important;max-height:46px!important}
 .brand-copy strong{font-size:11px!important}
 .brand-copy span{font-size:8px!important}
 .brand-copy em{font-size:6px!important}
}


/* v4.3 exact sidebar logo per approved reference */
.brand{
 display:flex!important;align-items:flex-start!important;justify-content:center!important;
 min-height:auto!important;height:auto!important;padding:10px 6px 10px!important;
 border-bottom:1px solid rgba(125,168,206,.35)!important;overflow:visible!important;
}
.brand-mark,.brand-copy,.brand-sub{display:none!important}
.brand-logo-exact{
 display:block!important;width:172px!important;max-width:172px!important;height:auto!important;
 object-fit:contain!important;border:0!important;border-radius:0!important;background:none!important;
 box-shadow:none!important;filter:none!important;image-rendering:auto!important;
}
.sidebar{padding-top:8px!important}
.sidebar nav{margin-top:10px!important}
.sidebar-foot{margin-top:18px!important}
@media(max-width:820px){
 .brand{padding:10px 6px 9px!important}
 .brand-logo-exact{width:168px!important;max-width:168px!important}
}
@media(max-width:520px){
 .brand{padding:9px 5px 8px!important}
 .brand-logo-exact{width:164px!important;max-width:164px!important}
}


/* v5.0 comprobante corporativo */
.receipt-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:4px 0 16px}
.receipt-action{min-width:120px;padding:9px 16px!important;border-radius:8px!important;font-size:12px!important}
.receipt-action.primary{background:linear-gradient(180deg,#1469a3,#0b4f7c)!important}
.receipt-action.whatsapp{background:linear-gradient(180deg,#18a85e,#0b7c45)!important}
.receipt-action.edit{background:linear-gradient(180deg,#2f92d1,#176da8)!important}
.receipt-action.back{background:linear-gradient(180deg,#8192a3,#5f6d7b)!important}

.receipt-corporate{position:relative;width:min(100%,980px);margin:0 auto;background:#fff;border:1px solid #d7e3ec;border-radius:22px;box-shadow:0 14px 40px rgba(9,43,71,.13);padding:26px 30px 22px;overflow:hidden}
.receipt-corner{position:absolute;pointer-events:none;z-index:0}
.receipt-corner-top{top:-42px;right:-55px;width:310px;height:170px;border-radius:0 0 0 95%;background:linear-gradient(145deg,transparent 0 31%,#1b9e96 31% 38%,transparent 38% 43%,#6cc44d 43% 50%,transparent 50% 55%,#0b5e91 55% 100%);opacity:.96}
.receipt-corner-bottom{left:-80px;bottom:-105px;width:380px;height:210px;border-radius:0 90% 0 0;background:linear-gradient(35deg,#0b5e91 0 47%,transparent 47% 52%,#6cc44d 52% 60%,transparent 60% 65%,#1b9e96 65% 72%,transparent 72%);opacity:.96}

.receipt-corp-header{position:relative;z-index:1;display:grid;grid-template-columns:1.15fr .85fr;gap:30px;align-items:center;padding-bottom:18px;border-bottom:1px solid #cbdbe7}
.receipt-logo-area{min-width:0;padding-right:25px;border-right:1px solid #d3e0ea}
.receipt-corp-logo{display:block;width:100%;max-width:420px;height:150px;object-fit:contain;object-position:left center}
.receipt-tagline{margin-top:-3px;text-align:center;max-width:420px;color:#214e72;font-style:italic;font-size:13px;letter-spacing:.02em}

.receipt-contact-area{display:grid;gap:8px;color:#153b5b}
.receipt-contact-row{display:flex;align-items:center;gap:10px;font-size:13px}
.receipt-contact-row>div{display:flex;flex-direction:column}
.receipt-contact-row span{color:#6d8193;font-size:11px}
.receipt-contact-row strong{font-size:15px;color:#173c5e}
.receipt-contact-row a{color:#173c5e;font-weight:700}
.receipt-contact-icon{width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:#0d5c91;color:white!important;font-size:12px!important;flex:0 0 31px}
.receipt-contact-values{padding-top:8px;margin-top:3px;border-top:1px solid #cbdbe7;text-align:center;color:#65819a;font-size:9px;letter-spacing:.22em}

.receipt-corp-title-row{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:26px 18px 16px}
.receipt-corp-title-row h2{margin:0;color:#073865;font-size:31px;letter-spacing:.015em}
.receipt-corp-title-row p{margin:3px 0 0;color:#5e7d98;font-size:12px;font-weight:700;letter-spacing:.32em}
.receipt-number-pill{flex:0 0 auto;padding:11px 22px;border-radius:999px;background:linear-gradient(180deg,#0e5f93,#084a76);color:#fff;font-size:17px;font-weight:800;box-shadow:0 4px 10px rgba(9,76,118,.18)}

.receipt-info-panel{position:relative;z-index:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:12px;border:1px solid #dce8f0;border-radius:16px;background:linear-gradient(180deg,#fbfdff,#f5f9fc)}
.receipt-data-card{display:flex;align-items:center;gap:10px;min-height:76px;padding:11px 12px;border:1px solid #dbe6ee;border-radius:12px;background:#fff;box-shadow:0 2px 6px rgba(8,46,77,.04)}
.receipt-data-card>div{min-width:0}
.receipt-data-card small{display:block;color:#44617a;font-size:11px;margin-bottom:2px}
.receipt-data-card strong{display:block;color:#112f4a;font-size:14px;line-height:1.2;overflow-wrap:anywhere}
.receipt-data-icon{width:38px;height:38px;flex:0 0 38px;border-radius:50%;display:grid;place-items:center;background:#e3f4f7;color:#0b638a;font-size:18px}
.receipt-data-wide{grid-column:span 2}

.receipt-payment-row{position:relative;z-index:1;display:grid;grid-template-columns:1.25fr .75fr;gap:14px;margin-top:12px;padding:12px;border:1px solid #bde6d2;border-radius:15px;background:linear-gradient(90deg,#eefbf5,#f5fdf9)}
.receipt-amount-block,.receipt-status-block{display:flex;align-items:center;gap:14px}
.receipt-amount-block{padding-right:16px;border-right:1px solid #bfe2d1}
.receipt-amount-icon{width:54px;height:54px;flex:0 0 54px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:28px;font-weight:800;background:linear-gradient(145deg,#15967c,#087460);box-shadow:inset 1px 1px 0 rgba(255,255,255,.35)}
.receipt-amount-block small{display:block;color:#337566;font-size:12px}
.receipt-amount-block strong{display:block;margin-top:2px;color:#007862;font-size:31px;letter-spacing:-.02em}
.receipt-status-block{justify-content:center;padding:10px;border-radius:12px;background:rgba(255,255,255,.55)}
.receipt-check{width:49px;height:49px;flex:0 0 49px;border-radius:50%;display:grid;place-items:center;background:#b8edc6;color:#0b8a53;font-size:26px;font-weight:900}
.receipt-status-block strong,.receipt-status-block span{display:block;color:#0b7358;font-size:18px;line-height:1.05}
.receipt-status-block span{font-weight:700}

.receipt-observation{position:relative;z-index:1;margin-top:11px;padding:10px 12px;border-radius:9px;background:#f5f8fa;color:#52697d;font-size:11px}

.receipt-corp-footer{position:relative;z-index:1;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-top:15px;padding:16px 18px 0;border-top:1px solid #dbe5ed}
.receipt-thanks{display:flex;align-items:center;gap:12px}
.receipt-handshake{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;border-radius:50%;background:#e8f5fa;color:#0c668f;font-size:18px}
.receipt-thanks strong{display:block;color:#123f60;font-size:13px}
.receipt-thanks span{display:block;color:#71869a;font-size:10px;margin-top:2px}
.receipt-footer-values{color:#7690a6;font-size:8px;letter-spacing:.20em;text-align:right}

@media(max-width:900px){
 .receipt-corporate{padding:20px}
 .receipt-corp-header{grid-template-columns:1fr}
 .receipt-logo-area{border-right:0;border-bottom:1px solid #d3e0ea;padding:0 0 14px}
 .receipt-corp-logo{margin:auto;object-position:center;max-width:360px;height:125px}
 .receipt-tagline{margin:0 auto;text-align:center}
 .receipt-contact-area{max-width:430px;margin:auto;width:100%}
 .receipt-corp-title-row{align-items:flex-start}
 .receipt-info-panel{grid-template-columns:repeat(2,minmax(0,1fr))}
 .receipt-data-wide{grid-column:span 2}
 .receipt-payment-row{grid-template-columns:1fr}
 .receipt-amount-block{border-right:0;border-bottom:1px solid #bfe2d1;padding:0 0 12px}
}
@media(max-width:600px){
 .receipt-corporate{width:100%;padding:15px 11px;border-radius:13px}
 .receipt-corner-top{width:190px;height:110px}
 .receipt-corner-bottom{width:220px;height:135px}
 .receipt-corp-logo{height:100px;max-width:300px}
 .receipt-corp-title-row{flex-direction:column;align-items:center;text-align:center;padding:19px 4px 13px}
 .receipt-corp-title-row h2{font-size:23px}
 .receipt-corp-title-row p{font-size:9px;letter-spacing:.20em}
 .receipt-number-pill{font-size:14px;padding:9px 18px}
 .receipt-info-panel{grid-template-columns:1fr;padding:8px}
 .receipt-data-wide{grid-column:auto}
 .receipt-data-card{min-height:65px;padding:9px}
 .receipt-data-card strong{font-size:13px}
 .receipt-amount-block strong{font-size:25px}
 .receipt-status-block strong,.receipt-status-block span{font-size:15px}
 .receipt-corp-footer{flex-direction:column;align-items:center;text-align:center}
 .receipt-footer-values{text-align:center}
}
@media print{
 .receipt-corporate{box-shadow:none!important;border:0!important;width:100%!important;max-width:none!important;margin:0!important;padding:14mm 12mm 10mm!important}
 .receipt-actions,.no-print{display:none!important}
 .receipt-corp-title-row h2{font-size:26px!important}
 .receipt-corp-logo{height:110px!important}
}

/* ===== v5.1 RESPONSIVE TOTAL ===== */
html,body{width:100%;max-width:100%;overflow-x:hidden!important}
img,svg,video,canvas{max-width:100%}
.app,.main,.card,.table-wrap,.receipt-corporate{min-width:0!important;max-width:100%}
.main{overflow-x:hidden!important}
input,select,textarea,button{max-width:100%}

@media(max-width:1024px){
 .main{padding:10px!important}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .two{grid-template-columns:1fr!important}
}

@media(max-width:820px){
 html{font-size:14px}
 body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
 .sidebar{
  position:fixed!important;top:0!important;left:0!important;bottom:0!important;
  width:min(84vw,270px)!important;max-width:270px!important;height:100dvh!important;
  transform:translateX(-105%)!important;transition:transform .22s ease!important;
  z-index:9999!important;overflow-y:auto!important;overscroll-behavior:contain;
  padding-bottom:calc(14px + env(safe-area-inset-bottom))!important;
  box-shadow:12px 0 30px rgba(0,0,0,.28)
 }
 .sidebar.open{transform:translateX(0)!important}
 body.menu-open::after{content:"";position:fixed;inset:0;background:rgba(3,18,31,.46);z-index:9990;backdrop-filter:blur(1px)}
 .main{
  margin-left:0!important;width:100%!important;max-width:100%!important;
  padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right))
          calc(14px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important
 }
 .topbar{position:sticky;top:0;z-index:900;min-height:50px!important;height:auto!important;padding:7px 8px!important;margin-bottom:8px!important;border-radius:8px!important}
 .mobile-menu{display:grid!important;place-items:center;min-width:38px!important;width:38px!important;height:38px!important;flex:0 0 38px}
 .mobile-menu svg{width:20px!important;height:20px!important}
 .searchbar,.date-block{display:none!important}
 .user-pill{margin-left:auto;padding-left:8px!important}
 .user-meta{display:none!important}
 .user-avatar{width:34px!important;height:34px!important}
 .hero-title{margin:7px 2px 9px!important}
 .hero-title h1{font-size:clamp(19px,6vw,24px)!important;line-height:1.08!important}
 .hero-title p{font-size:12px!important;line-height:1.35}
 .grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
 .card{max-width:100%!important;padding:11px!important;border-radius:9px!important}
 .kpi{min-height:84px!important;height:auto!important;padding:10px!important;gap:8px!important}
 .kpi-icon{width:34px!important;height:34px!important;flex:0 0 34px!important}
 .kpi-icon svg{width:18px!important;height:18px!important}
 .kpi-label{font-size:10px!important;line-height:1.15}
 .kpi strong{font-size:clamp(15px,4.5vw,20px)!important;overflow-wrap:anywhere}
 .kpi small{font-size:8.5px!important}
 .two{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
 .form-grid{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
 .form-grid>*{grid-column:auto!important;min-width:0!important}
 label{font-size:11px!important;min-width:0}
 input,select,textarea{width:100%!important;min-width:0!important;font-size:16px!important;padding:10px!important;border-radius:7px!important}
 textarea{min-height:80px!important}
 .actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;width:100%!important}
 .actions .btn,.actions button{width:100%!important;min-width:0!important;white-space:normal!important;text-align:center;padding:9px 7px!important;line-height:1.15}
 .section-title{gap:8px;align-items:stretch!important;flex-direction:column!important}
 .section-title form,.section-title input{width:100%!important}

 .table-wrap{overflow:visible!important;border:0!important;box-shadow:none!important;background:transparent!important}
 table.table{display:block!important;width:100%!important;min-width:0!important;border:0!important}
 table.table thead{display:none!important}
 table.table tbody{display:block!important;width:100%!important}
 table.table>tbody>tr{
  display:block!important;width:100%!important;margin:0 0 10px!important;padding:8px 10px!important;
  border:1px solid #dce6ee!important;border-radius:10px!important;background:#fff!important;
  box-shadow:0 3px 10px rgba(8,34,57,.07)
 }
 table.table td{
  display:grid!important;grid-template-columns:minmax(90px,38%) minmax(0,1fr)!important;gap:8px!important;
  align-items:start!important;width:100%!important;min-width:0!important;white-space:normal!important;
  padding:7px 2px!important;border:0!important;border-bottom:1px solid #edf2f6!important;
  font-size:12px!important;overflow-wrap:anywhere;word-break:break-word
 }
 table.table td:last-child{border-bottom:0!important}
 table.table td::before{
  content:attr(data-label);display:block;font-weight:700;color:#38536a;font-size:10px;
  text-transform:uppercase;letter-spacing:.02em
 }
 table.table td .actions,table.table td.actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 table.table td.actions::before{grid-column:1/-1}
 .link-chip{justify-self:start}

 .receipt-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;width:100%}
 .receipt-action{width:100%!important;min-width:0!important;padding:10px 7px!important}
 .receipt-corporate{width:100%!important;max-width:100%!important;margin:0!important;padding:14px 10px 13px!important;border-radius:12px!important;overflow:hidden!important}
 .receipt-corp-header{display:block!important;padding-bottom:12px!important}
 .receipt-logo-area{border-right:0!important;border-bottom:1px solid #d8e3eb!important;padding:0 0 12px!important;text-align:center}
 .receipt-corp-logo{
  display:block!important;width:auto!important;max-width:min(100%,310px)!important;height:auto!important;
  max-height:110px!important;margin:0 auto!important;object-fit:contain!important;object-position:center!important
 }
 .receipt-tagline{margin:4px auto 0!important;max-width:100%!important;text-align:center!important;font-size:11px!important}
 .receipt-contact-area{margin-top:11px!important;width:100%!important;gap:6px!important}
 .receipt-contact-row{font-size:12px!important;min-width:0}
 .receipt-contact-row strong,.receipt-contact-row a{overflow-wrap:anywhere;word-break:break-word}
 .receipt-contact-values{font-size:7px!important;letter-spacing:.09em!important}
 .receipt-corp-title-row{display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;gap:9px!important;padding:17px 3px 12px!important}
 .receipt-corp-title-row h2{font-size:clamp(20px,6.2vw,27px)!important;line-height:1.06!important}
 .receipt-corp-title-row p{font-size:8px!important;letter-spacing:.14em!important}
 .receipt-number-pill{padding:8px 15px!important;font-size:13px!important}
 .receipt-info-panel{display:block!important;padding:8px!important}
 .receipt-data-card,.receipt-data-wide{display:flex!important;width:100%!important;min-width:0!important;min-height:0!important;margin-bottom:7px!important;padding:9px!important;grid-column:auto!important}
 .receipt-data-card:last-child{margin-bottom:0!important}
 .receipt-data-icon{width:33px!important;height:33px!important;flex:0 0 33px!important;font-size:14px!important}
 .receipt-data-card small{font-size:10px!important}
 .receipt-data-card strong{font-size:13px!important;overflow-wrap:anywhere}
 .receipt-payment-row{display:block!important;padding:9px!important}
 .receipt-amount-block{border-right:0!important;border-bottom:1px solid #cbe6d9!important;padding:5px 3px 11px!important}
 .receipt-amount-icon{width:44px!important;height:44px!important;flex:0 0 44px!important;font-size:22px!important}
 .receipt-amount-block strong{font-size:clamp(23px,8vw,31px)!important;overflow-wrap:anywhere}
 .receipt-status-block{margin-top:8px!important;padding:9px!important}
 .receipt-check{width:39px!important;height:39px!important;flex:0 0 39px!important;font-size:20px!important}
 .receipt-status-block strong,.receipt-status-block span{font-size:14px!important}
 .receipt-corp-footer{display:block!important;padding:12px 3px 0!important;text-align:center!important}
 .receipt-thanks{justify-content:center!important}
 .receipt-footer-values{margin-top:9px;text-align:center!important;font-size:6.5px!important;letter-spacing:.10em!important}
 .receipt-corner-top{width:145px!important;height:82px!important;right:-46px!important;top:-28px!important}
 .receipt-corner-bottom{width:165px!important;height:95px!important;left:-52px!important;bottom:-55px!important}
 .install-card{left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right))!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important}
}

@media(max-width:430px){
 .grid{grid-template-columns:1fr!important}
 .actions{grid-template-columns:1fr!important}
 table.table td.actions,table.table td .actions{grid-template-columns:1fr!important}
 .receipt-actions{grid-template-columns:1fr 1fr!important}
 .receipt-corp-logo{max-width:250px!important;max-height:90px!important}
 .receipt-contact-icon{width:27px!important;height:27px!important;flex:0 0 27px!important;font-size:10px!important}
 table.table td{grid-template-columns:92px minmax(0,1fr)!important}
}

@media(max-width:360px){
 .main{padding-left:6px!important;padding-right:6px!important}
 .receipt-actions{grid-template-columns:1fr!important}
 table.table td{display:block!important}
 table.table td::before{margin-bottom:3px}
 .receipt-corp-title-row h2{font-size:19px!important}
 .receipt-corp-logo{max-width:220px!important}
}


/* ===== v5.1.1 CORRECCIÓN MENÚ MÓVIL ===== */
.mobile-menu-close{
    display:none;
}

@media(max-width:820px){
    .sidebar{
        display:block!important;
        visibility:visible!important;
        opacity:1!important;
        transform:translate3d(-105%,0,0)!important;
        will-change:transform;
    }

    .sidebar.open{
        transform:translate3d(0,0,0)!important;
    }

    .mobile-menu{
        display:grid!important;
        visibility:visible!important;
        opacity:1!important;
        position:relative!important;
        z-index:10020!important;
        cursor:pointer!important;
        touch-action:manipulation!important;
    }

    .mobile-menu-close{
        display:grid!important;
        place-items:center;
        position:absolute;
        top:8px;
        right:8px;
        width:34px;
        height:34px;
        border:1px solid rgba(255,255,255,.22);
        border-radius:8px;
        background:rgba(255,255,255,.10);
        color:#fff;
        font-size:26px;
        line-height:1;
        cursor:pointer;
        z-index:10010;
    }

    .sidebar .brand{
        padding-right:38px!important;
    }

    body.menu-open{
        overflow:hidden!important;
        touch-action:none;
    }

    body.menu-open .sidebar{
        touch-action:auto;
    }

    body.menu-open::after{
        pointer-events:auto!important;
    }
}

@media(min-width:821px){
    .mobile-menu-close{
        display:none!important;
    }
}
