/* RecoverMetal UI v2 */
:root{--rm-green:#4d8c34;--rm-dark:#192f29;--rm-muted:#68766e;--rm-bg:#f4f7f5}
body.rm-dashboard{background:var(--rm-bg);color:#26352b}
.rm-app-layout{min-height:100vh}
.rm-dashboard #content{min-width:0}
.rm-topbar{background:white;min-height:75px;border-bottom:1px solid #e4eae5}
.rm-topbar-heading{font-size:1.08rem;font-weight:600}
.rm-topbar-actions{gap:8px}
.rm-topbar .btn-outline-danger{border-radius:8px}
.rm-dashboard #mainContent{padding-bottom:30px}
.rm-dashboard .card{border:1px solid #e4eae5;border-radius:12px;box-shadow:0 4px 16px rgba(20,50,30,.045)!important}
.rm-page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.rm-page-heading small{color:var(--rm-green);font-size:.73rem;font-weight:700;letter-spacing:.11em}
.rm-page-heading h1{font-size:1.8rem;font-weight:700;margin:6px 0}
.rm-year{border-radius:30px;padding:8px 15px;background:#e4f1de;color:#3a762d;font-weight:700}
.rm-subtitle{color:var(--rm-muted)}
.rm-kpi{display:flex;gap:18px;align-items:center;background:#fff;border:1px solid #e4eae5;border-radius:12px;padding:18px;min-height:94px}
.rm-kpi>i{display:grid;place-items:center;width:50px;height:50px;border-radius:9px;background:var(--rm-green);color:#fff;font-size:1.5rem}
.rm-kpi small{display:block;color:var(--rm-muted);margin-bottom:4px}
.rm-kpi strong{display:block;font-size:1.35rem}
.rm-dashboard .card h5{font-weight:650}
.rm-dashboard .card .bi-graph-up-arrow,.rm-dashboard .card .bi-graph-down-arrow{color:var(--rm-green)}
.rm-login{margin:0;background:#f3f7f5}
.rm-login-layout{display:grid;grid-template-columns:1.05fr 1fr;min-height:100vh}
.rm-login-hero{color:white;background:linear-gradient(120deg,rgba(13,46,34,.96),rgba(20,58,42,.80)),url('../img/patio_metales.webp') center/cover;display:flex;padding:6vw}
.rm-hero-inner{width:100%;display:flex;flex-direction:column;justify-content:space-between;gap:40px}
.rm-hero-brand{font-size:1.6rem;font-weight:900;letter-spacing:.04em}.rm-hero-brand span{color:#8ecb58}.rm-hero-brand small{display:block;font-size:.9rem;font-weight:400;letter-spacing:.23em;margin-top:5px}
.rm-hero-message h1{font-size:clamp(2.1rem,3.5vw,4rem);font-weight:800;line-height:1.1;max-width:650px;margin-bottom:25px}
.rm-hero-message h1 em{color:#9bdf64;font-style:normal}
.rm-hero-rule{height:4px;width:55px;background:#86cb54;margin-bottom:25px}
.rm-hero-message p{display:flex;align-items:center;gap:16px;margin-bottom:15px;font-size:1.06rem}
.rm-hero-message p i{color:#9bdf64;border:1px solid #8bd257;width:38px;height:38px;display:grid;place-items:center;border-radius:50%}
.rm-hero-footer{font-size:.94rem;border-top:1px solid rgba(255,255,255,.2);padding-top:20px}
.rm-login-side{display:flex;align-items:center;justify-content:center;padding:32px}
.rm-login-card{width:min(100%,520px);border:1px solid #e2e9e4;border-radius:15px;box-shadow:0 15px 45px rgba(25,47,41,.08)!important}
.rm-login-card .card-body{padding:clamp(24px,4vw,55px)}
.rm-login-logo{display:block;width:min(100%,350px);margin:0 auto 35px}
.rm-login-card .form-control{padding:12px;border-radius:8px}
.rm-login-btn{background:var(--rm-green);border-color:var(--rm-green);padding:12px;font-weight:600}
.rm-login-btn:hover{background:#376d2a;border-color:#376d2a}
@media(max-width:900px){.rm-login-layout{grid-template-columns:1fr}.rm-login-hero{min-height:280px;padding:30px}.rm-hero-inner{gap:20px}.rm-hero-message h1{font-size:2rem}.rm-hero-message p,.rm-hero-footer{display:none}.rm-login-side{padding:25px}}
@media(max-width:650px){.rm-topbar{min-height:64px}.rm-topbar-heading{font-size:.9rem}.rm-topbar-heading i{display:none}.rm-topbar-actions{gap:2px}.rm-topbar-actions .me-3{margin-right:.3rem!important}.rm-topbar-actions .btn{font-size:.72rem}.rm-dashboard #mainContent{padding-left:10px;padding-right:10px}.rm-page-heading h1{font-size:1.35rem}}

/* v3: reglas críticas de estructura, sin depender de estilos anteriores */
.rm-dashboard .rm-app-layout{display:flex!important;align-items:stretch;min-height:100vh}
.rm-dashboard #sidebar{width:245px!important;min-width:245px!important;max-width:245px!important;flex:0 0 245px!important;min-height:100vh;position:sticky;top:0;height:100vh;overflow-y:auto;overflow-x:hidden;background:#192f29!important}
.rm-dashboard #sidebar.collapsed{width:66px!important;min-width:66px!important;max-width:66px!important;flex-basis:66px!important}
.rm-dashboard #sidebar .rm-sidebar-logo{height:82px;min-height:82px;display:flex;justify-content:center;align-items:center;padding:10px;background:#fff;overflow:hidden}
.rm-dashboard #sidebar .rm-sidebar-logo img{display:block!important;width:190px!important;max-width:100%!important;height:58px!important;max-height:58px!important;object-fit:contain!important}
.rm-dashboard #sidebar.collapsed .rm-sidebar-logo img{width:52px!important;height:48px!important}
.rm-dashboard #content{min-width:0!important;width:calc(100% - 245px);flex:1 1 auto!important}
.rm-dashboard #ajaxOverlay{display:none;position:absolute;inset:0;background:rgba(245,248,246,.76);z-index:100;align-items:center;justify-content:center}
.rm-dashboard #ajaxOverlay .spinner{width:34px;height:34px;border:3px solid #d7e7d4;border-top-color:#4d8c34;border-radius:50%;animation:rmspin .8s linear infinite}
@keyframes rmspin{to{transform:rotate(360deg)}}
.rm-dashboard #mainContent{min-width:0;max-width:100%;margin-top:0!important;padding:26px 24px}
.rm-dashboard .rm-topbar{position:relative;z-index:2}
@media(max-width:767px){.rm-dashboard #sidebar{width:65px!important;min-width:65px!important;max-width:65px!important;flex-basis:65px!important}.rm-dashboard #sidebar .rm-sidebar-logo{height:65px}.rm-dashboard #sidebar .rm-sidebar-logo img{width:52px!important;height:48px!important}.rm-dashboard #mainContent{padding:16px 12px}}
