/* ====================================================================
   EMJOnet · CSS
   Base extraída del HTML original + breakpoints responsive
   ==================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background: #f4f6f4; color: #1a1a1a; }

/* ===== LOGIN ===== */
.lg-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#071a07,#2a0801); padding: 16px; }
.lb { background: #fff; border-radius: 16px; padding: 40px 36px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.llogo { text-align: center; margin-bottom: 18px; }
.llogo .li { font-size: 44px; display: block; line-height: 1.1; }
.llogo .lt { font-size: 22px; font-weight: 700; color: #4e1802; display: block; }
.llogo .ls { font-size: 11px; color: #0b8b0b; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; display: block; }
.lb h2 { font-size: 17px; font-weight: 600; text-align: center; margin-bottom: 3px; }
.lb > p { font-size: 12px; color: #8a9e8a; text-align: center; margin-bottom: 20px; }
.lf { display: block; width: 100%; padding: 10px 13px; border: 1.5px solid #e0e8e0; border-radius: 8px; font-size: 14px; font-family: 'Outfit', sans-serif; margin-bottom: 9px; outline: none; }
.lf:focus { border-color: #0b8b0b; }
.lbtn { display: block; width: 100%; padding: 11px; background: #0b8b0b; color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: 'Outfit', sans-serif; }
.lbtn:hover { background: #076507; }
.lerr { color: #dc2626; font-size: 12px; margin-top: 7px; text-align: center; min-height: 16px; }
.lhint { margin-top: 14px; background: #f8fafc; border-radius: 8px; padding: 10px 12px; font-size: 11px; color: #8a9e8a; line-height: 1.7; }
.lhint b { color: #1a1a1a; display: block; margin-bottom: 4px; }
.lhint .iso { color: #0b8b0b; font-weight: 700; }

/* ===== HEADER ===== */
.hdr { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: #4e1802; display: flex; align-items: center; padding: 0 20px; z-index: 100; gap: 10px; }
.hbrand { font-size: 17px; font-weight: 700; color: #fff; }
.hbrand span { color: #a8d5a8; font-size: 11px; font-weight: 400; margin-left: 6px; letter-spacing: .1em; text-transform: uppercase; }
.hr { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hbadge { background: rgba(255,255,255,.12); padding: 3px 10px; border-radius: 12px; font-size: 11px; color: rgba(255,255,255,.8); }
.hrole { background: #0b8b0b; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; color: #fff; }
.hav { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.hout { background: transparent; border: 1px solid rgba(255,255,255,.3); padding: 3px 10px; border-radius: 6px; font-size: 11px; color: rgba(255,255,255,.8); cursor: pointer; font-family: 'Outfit', sans-serif; text-decoration: none; }

/* Botón hamburguesa (oculto en desktop, visible en móvil) */
.hamb { display: none; background: transparent; border: none; color: #fff; font-size: 22px; cursor: pointer; padding: 4px 8px; }

/* ===== SIDEBAR ===== */
.sb { position: fixed; top: 60px; left: 0; bottom: 0; width: 220px; background: #fff; border-right: 1px solid #e0e8e0; overflow-y: auto; padding: 12px 0; z-index: 90; transition: transform .25s ease; }
.sl { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a9e8a; padding: 6px 13px 2px; }
.si { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 7px; cursor: pointer; font-size: 13px; color: #4a5c4a; margin: 1px 8px; }
.si:hover, .si.on { background: #e8f5e8; color: #0b8b0b; }
.si.on { font-weight: 600; }
.sbg { margin-left: auto; background: #0b8b0b; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; }
.sbg.red { background: #dc2626; }
.sdiv { height: 1px; background: #e0e8e0; margin: 7px 13px; }
.susr { background: #e8f5e8; border-radius: 8px; padding: 9px; text-align: center; margin: 7px 11px 0; }
.susr b { font-size: 12px; color: #076507; display: block; }
.susr span { font-size: 10px; color: #8a9e8a; }

/* Backdrop al abrir sidebar en móvil */
.sb-bd { display: none; position: fixed; inset: 60px 0 0 0; background: rgba(0,0,0,.45); z-index: 80; }

/* ===== MAIN ===== */
.mn { margin-left: 220px; margin-top: 60px; padding: 22px 26px; min-height: calc(100vh - 60px); }
.pg { display: none; }
.pg.on { display: block; }

/* ===== CARDS / GRIDS / TIPOGRAFÍA ===== */
.card { background: #fff; border: 1px solid #e0e8e0; border-radius: 11px; padding: 17px 21px; box-shadow: 0 1px 6px rgba(11,139,11,.06); margin-bottom: 15px; }
.ctit { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 14px; }
.ptit { font-size: 20px; font-weight: 700; }
.psub { font-size: 12px; color: #8a9e8a; margin-top: 2px; }
.prow { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; gap: 10px; flex-wrap: wrap; }
.stit { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #8a9e8a; margin-bottom: 9px; }
.g4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 11px; margin-bottom: 18px; }
.g3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; margin-bottom: 18px; }
.g2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 11px; margin-bottom: 14px; }
.kc { background: #fff; border: 1px solid #e0e8e0; border-radius: 10px; padding: 15px 17px; position: relative; overflow: hidden; box-shadow: 0 1px 5px rgba(0,0,0,.05); }
.kc::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #0b8b0b; }
.kc.r::before { background: #dc2626; }
.kc.a::before { background: #d97706; }
.kc.z::before { background: #4e1802; }
.kl { font-size: 10px; font-weight: 600; color: #8a9e8a; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.kv { font-size: 19px; font-weight: 700; line-height: 1.1; }
.ks { font-size: 11px; color: #8a9e8a; margin-top: 3px; }
.bono { border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 13px; }
.bono.ok { background: linear-gradient(135deg,#054a05,#0b8b0b); }
.bono.rk { background: linear-gradient(135deg,#7c2d12,#c2410c); }
.bono.no { background: linear-gradient(135deg,#7f1d1d,#b91c1c); }
.bi { font-size: 32px; flex-shrink: 0; }
.bono h3 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.bono p { font-size: 12px; color: rgba(255,255,255,.85); }

/* ===== TABLAS ===== */
.tb-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tb { width: 100%; border-collapse: collapse; font-size: 12px; }
.tb th { font-size: 9px; font-weight: 700; color: #8a9e8a; text-align: left; padding: 0 5px 7px 0; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1.5px solid #e0e8e0; }
.tb th.r, .tb td.r { text-align: right; padding-right: 0; }
.tb td { padding: 6px 5px 6px 0; border-bottom: 1px solid #e0e8e0; vertical-align: middle; }
.tb tr:last-child td { border-bottom: none; }

.bar { background: #e0e8e0; border-radius: 3px; height: 6px; }
.bf { height: 100%; border-radius: 3px; }
.chip { display: inline-flex; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.cu { background: #dcfce7; color: #14532d; }
.cd { background: #fee2e2; color: #7f1d1d; }
.ca { background: #fef3c7; color: #78350f; }
.fp { font-size: 11px; padding: 4px 11px; border: 1.5px solid #e0e8e0; border-radius: 13px; background: transparent; color: #4a5c4a; cursor: pointer; font-family: 'Outfit', sans-serif; }
.fp.on { background: #0b8b0b; color: #fff; border-color: #0b8b0b; font-weight: 600; }
.fr { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.cc { background: #f4f6f4; border: 1px solid #e0e8e0; border-radius: 8px; padding: 11px; }
.ccn { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #8a9e8a; margin-bottom: 3px; }
.ccp { font-size: 19px; font-weight: 700; margin-bottom: 2px; }
.cca { font-size: 10px; color: #8a9e8a; }
.comcard { border-left: 4px solid #0b8b0b; background: #fff; border-radius: 8px; padding: 12px 14px; margin-bottom: 9px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.comcard.u { border-left-color: #dc2626; }
.comcard.e { border-left-color: #d97706; }
.comcard.i { border-left-color: #2563eb; }
.ctag { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }
.tg { background: #e8f5e8; color: #14532d; }
.tu { background: #fee2e2; color: #b91c1c; }
.ti { background: #dbeafe; color: #1d4ed8; }
.te { background: #fef3c7; color: #92400e; }
.cg7 { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.ch { text-align: center; font-size: 9px; font-weight: 700; color: #8a9e8a; text-transform: uppercase; padding: 2px 0 5px; }
.cday { aspect-ratio: 1; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 11px; position: relative; cursor: pointer; }
.cday:hover { background: #e8f5e8; }
.cday.t { background: #0b8b0b; color: #fff; font-weight: 700; }
.cday.ev::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: #4e1802; }
.cday.om { color: #e0e8e0; cursor: default; }
.dg { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.dc { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #e0e8e0; border-radius: 9px; background: #fff; }
.da { width: 36px; height: 36px; border-radius: 50%; background: #e8f5e8; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #0b8b0b; flex-shrink: 0; }

.btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 13px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; font-family: 'Outfit', sans-serif; }
.btnp { background: #0b8b0b; color: #fff; }
.btnp:hover { background: #076507; }
.btno { background: transparent; color: #0b8b0b; border: 1.5px solid #0b8b0b; }
.btno:hover { background: #e8f5e8; }
.btnr { background: transparent; color: #dc2626; border: 1.5px solid #dc2626; }
.btnr:hover { background: #fee2e2; }
.sm { padding: 4px 10px; font-size: 11px; }
.xs { padding: 3px 7px; font-size: 10px; border-radius: 5px; }

.fi { display: block; width: 100%; padding: 9px 11px; border: 1.5px solid #e0e8e0; border-radius: 7px; font-size: 13px; font-family: 'Outfit', sans-serif; outline: none; margin-bottom: 8px; }
.fi:focus { border-color: #0b8b0b; }
.fsel { display: block; width: 100%; padding: 9px 11px; border: 1.5px solid #e0e8e0; border-radius: 7px; font-size: 13px; font-family: 'Outfit', sans-serif; outline: none; margin-bottom: 8px; cursor: pointer; }
.ftxt { display: block; width: 100%; padding: 9px 11px; border: 1.5px solid #e0e8e0; border-radius: 7px; font-size: 13px; font-family: 'Outfit', sans-serif; outline: none; resize: vertical; margin-bottom: 8px; }
.fl { font-size: 11px; font-weight: 600; color: #4a5c4a; margin-bottom: 2px; display: block; }
.cin { width: 50px; padding: 3px 6px; border: 1px solid #e0e8e0; border-radius: 5px; font-size: 12px; font-family: 'Outfit', sans-serif; text-align: center; }

.svbar { position: sticky; bottom: 0; background: #f4f6f4; padding: 10px 0 3px; display: flex; gap: 8px; align-items: center; justify-content: flex-end; border-top: 1px solid #e0e8e0; margin-top: 10px; flex-wrap: wrap; }
.comp { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid #e0e8e0; border-radius: 8px; background: #fff; margin-bottom: 7px; }
.comp.ok { background: #f0fdf4; border-color: #bbf7d0; }
.comp.ok .ct { text-decoration: line-through; color: #8a9e8a; }
.ct { flex: 1; font-size: 12px; }
.cf2 { font-size: 10px; color: #8a9e8a; white-space: nowrap; }

.mb { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500; display: none; align-items: center; justify-content: center; padding: 16px; }
.mb.open { display: flex; }
.md { background: #fff; border-radius: 13px; padding: 26px; width: 450px; max-width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.md h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.mf { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; padding-top: 13px; border-top: 1px solid #e0e8e0; flex-wrap: wrap; }
.ttabs { display: flex; gap: 0; margin-bottom: 13px; border-bottom: 2px solid #e0e8e0; overflow-x: auto; }
.ttab { padding: 6px 15px; border: none; background: transparent; font-size: 12px; font-weight: 500; color: #8a9e8a; border-bottom: 3px solid transparent; cursor: pointer; font-family: 'Outfit', sans-serif; margin-bottom: -2px; white-space: nowrap; }
.ttab.on { font-weight: 700; color: #0b8b0b; border-bottom-color: #0b8b0b; }
.alrt { border-left: 4px solid #dc2626; background: #fff; border-radius: 8px; padding: 11px 13px; margin-bottom: 7px; }
.alrt.wn { border-left-color: #d97706; }
.alrt.gn { border-left-color: #0b8b0b; }
.rt { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; margin-bottom: 3px; }
.sum { background: #dbeafe; color: #1e40af; }
.inc { background: #fee2e2; color: #991b1b; }
.rob { background: #fef3c7; color: #78350f; }
.mnt { background: #dcfce7; color: #14532d; }
.dk { background: #f4f6f4; border: 1px solid #e0e8e0; border-radius: 8px; padding: 11px; text-align: center; }
.dkl { font-size: 9px; font-weight: 700; text-transform: uppercase; color: #8a9e8a; margin-bottom: 3px; }
.dkv { font-size: 17px; font-weight: 700; }
.dks { font-size: 10px; color: #8a9e8a; margin-top: 2px; }

/* ====================================================================
   RESPONSIVE
   ==================================================================== */

/* Tablet (≤ 1024px) — 4 columnas pasan a 2 */
@media (max-width: 1024px) {
    .g4 { grid-template-columns: repeat(2,1fr); }
    .two { grid-template-columns: 1fr; }
    .mn { padding: 18px 18px; }
}

/* Mobile (≤ 768px) — sidebar oculto, hamburguesa visible */
@media (max-width: 768px) {
    .hamb { display: inline-flex; }
    .hbadge { display: none; }
    .hbrand span { display: none; }
    .hbrand { font-size: 15px; }

    .sb {
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0,0,0,.2);
    }
    .sb.open { transform: translateX(0); }
    .sb-bd.open { display: block; }

    .mn {
        margin-left: 0;
        padding: 14px 14px;
    }

    .g4, .g3, .g2 { grid-template-columns: 1fr; }
    .dg { grid-template-columns: 1fr; }
    .ptit { font-size: 18px; }
    .card { padding: 14px 15px; }
    .ctit { font-size: 12px; }
    .kv { font-size: 17px; }
    .cg7 { gap: 1px; }
}

/* Móvil chico (≤ 480px) */
@media (max-width: 480px) {
    .lb { padding: 28px 22px; }
    .hdr { padding: 0 12px; }
    .hrole { font-size: 10px; padding: 2px 7px; }
    .hav { width: 28px; height: 28px; font-size: 10px; }
}

/* Asegura que tablas grandes no rompan el layout móvil */
@media (max-width: 768px) {
    .card .tb { font-size: 11px; }
    .tb th, .tb td { padding: 5px 4px; }
}
