/* SCR Sistema Control de Registro · estilos del panel */
:root { --azul:#0b2046; --celeste:#00aeef; --ok:#0ca678; --mal:#e03131; --aviso:#f59f00; --gris:#64748b; --fondo:#f1f5f9; --borde:#e2e8f0; }
* { box-sizing:border-box; }
body { margin:0; font-family:"Segoe UI", system-ui, sans-serif; background:var(--fondo); color:#0f172a; font-size:14px; }
header { background:var(--azul); color:#fff; padding:12px 20px; display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
header h1 { font-size:16px; margin:0; flex:1; min-width:180px; }
header select, header button { height:34px; border-radius:8px; border:none; padding:0 10px; font-size:13px; }
header button { background:#1e3a6e; color:#fff; cursor:pointer; }
nav { background:#fff; border-bottom:1px solid var(--borde); display:flex; gap:2px; padding:0 14px; overflow-x:auto; }
nav button { border:none; background:none; padding:12px 14px; font-size:14px; font-weight:600; color:var(--gris); cursor:pointer; border-bottom:3px solid transparent; white-space:nowrap; }
nav button.sel { color:#0077a8; border-bottom-color:var(--celeste); }
nav button.cfg { margin-left:auto; }
#subtabs { background:#f4f8fb; padding:6px 14px; gap:6px; } #subtabs.oculto { display:none; }
#subtabs button { border:1px solid transparent; border-radius:999px; padding:6px 14px; font-size:13px; }
#subtabs button:hover { background:#e8f1f7; } #subtabs button.sel { background:#fff; border-color:var(--borde); color:#0077a8; }
main { padding:18px; max-width:1240px; margin:0 auto; }
.card { background:#fff; border:1px solid var(--borde); border-radius:12px; padding:16px; margin-bottom:16px; }
.card h2 { margin:0 0 10px; font-size:15px; }
.fila { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-bottom:10px; }
.campo { display:flex; flex-direction:column; gap:4px; }
.campo label { font-size:11px; font-weight:700; color:var(--gris); text-transform:uppercase; }
input, select { height:36px; border:1px solid #cbd5e1; border-radius:8px; padding:0 10px; font-size:14px; background:#fff; }
button.b { height:36px; border:none; border-radius:8px; padding:0 14px; font-weight:600; cursor:pointer; background:var(--celeste); color:#fff; }
button.b.sec { background:#e2e8f0; color:#0f172a; }
button.b.mal { background:#fee2e2; color:var(--mal); }
button.b:disabled { opacity:.5; cursor:not-allowed; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--borde); vertical-align:middle; }
th { font-size:11px; text-transform:uppercase; color:var(--gris); }
.tabla { overflow-x:auto; }
.tag { display:inline-block; padding:2px 8px; border-radius:99px; font-size:12px; font-weight:600; background:#e2e8f0; }
.tag.ok { background:#d3f9e8; color:#087f5b; } .tag.mal { background:#ffe3e3; color:var(--mal); } .tag.av { background:#fff3bf; color:#8a5a00; }
.msg { padding:10px 12px; border-radius:8px; margin:8px 0; }
.msg.ok { background:#d3f9e8; color:#087f5b; } .msg.mal { background:#ffe3e3; color:var(--mal); } .msg.av { background:#fff3bf; color:#8a5a00; }
.peq { font-size:12px; color:var(--gris); }
#login { max-width:340px; margin:80px auto; }
.oculto { display:none !important; }
.canales label { display:flex; gap:8px; align-items:center; padding:6px 0; font-size:14px; }
.canales input { height:auto; }
.velo { position:fixed; inset:0; background:rgba(11,32,70,.55); display:flex; align-items:center; justify-content:center; z-index:50; padding:16px; }
.dlg { background:#fff; border-radius:14px; padding:20px; width:100%; max-width:460px; max-height:90vh; overflow:auto; }
.dlg h3 { margin:0 0 12px; font-size:16px; }
.dlg .campo { margin-bottom:10px; } .dlg input[type=text], .dlg input[type=password], .dlg input[type=email], .dlg input:not([type]), .dlg select { width:100%; }
.dlg .pie { display:flex; gap:8px; justify-content:flex-end; margin-top:14px; }
.dlg label.chk { display:flex; gap:8px; align-items:center; font-size:14px; padding:3px 0; } .dlg label.chk input { height:auto; }
.franja { display:grid; gap:10px; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); margin-bottom:16px; }
.franja:empty { display:none; }
#toasts { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); display:flex; flex-direction:column; gap:8px; z-index:80; width:min(540px, calc(100vw - 24px)); pointer-events:none; }
.toast { pointer-events:auto; display:flex; gap:12px; align-items:flex-start; background:#1e293b; color:#fff; border-radius:12px; padding:12px 14px; border-left:4px solid var(--c, #f59f00); box-shadow:0 10px 28px rgba(15,23,42,.35); font-size:14px; animation:sube .28s ease-out; }
.toast.mal { --c:#e03131; }
.toast b { display:block; margin-bottom:2px; }
.toast button { margin-left:auto; background:none; border:none; color:#cbd5e1; font-size:20px; line-height:1; cursor:pointer; padding:0 2px; }
@keyframes sube { from { transform:translateY(28px); opacity:0; } to { transform:none; opacity:1; } }
.lic { display:flex; gap:12px; align-items:flex-start; background:#fff; border:1px solid var(--borde); border-left:4px solid var(--c); border-radius:12px; padding:10px 14px; }
.lic.ok { --c:#0ca678; } .lic.av { --c:#f59f00; background:#fffbeb; } .lic.mal { --c:#e03131; background:#fff5f5; } .lic.nd { --c:#94a3b8; }
.lic.ancho { grid-column:1 / -1; }
.lic .pto { width:10px; height:10px; border-radius:50%; background:var(--c); margin-top:5px; flex:none; }
.lic .t { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--gris); }
.lic .v { font-weight:700; font-size:14px; }
.lic.mal .v { color:var(--mal); } .lic.av .v { color:#8a5a00; }
.lic .s { font-size:12px; color:var(--gris); margin-top:2px; }
body[data-fmt="mayusculas"] input.nom { text-transform:uppercase; }

#aviso { position:fixed; right:20px; bottom:20px; z-index:90; width:min(400px, calc(100vw - 24px)); pointer-events:none; }
#aviso .msg { margin:0; padding:11px 16px; border-radius:10px; font-weight:600; box-shadow:0 8px 24px rgba(15,23,42,.18); animation:sube .25s ease; transition:opacity .4s; }
#aviso .msg.sale { opacity:0; }
@keyframes baja { from { transform:translateY(-14px); opacity:0; } to { transform:none; opacity:1; } }
.form { display:grid; gap:14px 16px; grid-template-columns:repeat(12,1fr); }
.form .campo { grid-column:span 3; min-width:0; } .form .campo.c4 { grid-column:span 4; } .form .campo.c6 { grid-column:span 6; } .form .campo.c12 { grid-column:1 / -1; }
.form input, .form select { width:100%; }
@media (max-width:760px) { .form .campo, .form .campo.c4, .form .campo.c6 { grid-column:1 / -1; } }
.sec-t { font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--gris); margin:20px 0 8px; padding-top:14px; border-top:1px solid var(--borde); }
.sec-t.p { margin-top:0; padding-top:0; border:none; }
.opts { display:flex; flex-wrap:wrap; gap:6px 20px; }
.opts label { display:flex; gap:7px; align-items:center; font-size:14px; font-weight:400; text-transform:none; color:#0f172a; margin:0; }
.opts input { height:auto; width:auto; }
.pie-f { display:flex; justify-content:flex-end; margin-top:18px; }
.card h2 small { font-weight:500; color:var(--gris); font-size:12px; margin-left:6px; }
.card .sub { margin:-4px 0 14px; }
td .peq a, .lnk { color:#0077a8; cursor:pointer; font-weight:600; background:none; border:none; padding:0; font-size:12px; }
.acc { display:flex; gap:6px; justify-content:flex-end; flex-wrap:wrap; }
.acc button.b { height:30px; padding:0 11px; font-size:12px; }

.b.g { background:#fff; border:1px solid #d5dde8; color:#1e293b; height:30px; padding:0 11px; font-size:12px; font-weight:600; border-radius:8px; cursor:pointer; white-space:nowrap; }
.b.g:hover { background:#f8fafc; border-color:#b8c4d4; }
.b.g.mal { color:var(--mal); border-color:#f5c2c2; background:#fff; } .b.g.mal:hover { background:#fff5f5; }
.cab-card { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:4px; }
.cab-card h2 { margin:0; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
table.us { table-layout:auto; } table.us th { padding:10px 14px; font-weight:700; letter-spacing:.04em; border-bottom:1px solid #cbd5e1; }
table.us td { padding:14px; vertical-align:middle; } table.us tr:last-child td { border-bottom:none; }
table.us .pn { font-weight:600; } table.us .pn small { display:block; font-weight:400; color:var(--gris); font-size:12px; margin-top:2px; }
table.us .tag, table.us td.nw { white-space:nowrap; }
.us-nota { margin:14px 0 0; padding-top:12px; border-top:1px solid var(--borde); }

.form2 { display:grid; gap:12px 16px; grid-template-columns:1fr 1fr; } .form2 .campo { min-width:0; } .form2 input, .form2 select { width:100%; }
@media (max-width:560px) { .form2 { grid-template-columns:1fr; } .hoDia { grid-template-columns:110px 1fr 14px 1fr; } .hoDia .hoNota { grid-column:1/-1; } }
.hoDia { display:grid; grid-template-columns:130px 110px 18px 110px 1fr; gap:8px; align-items:center; padding:3px 0; }
.hoDia input[type=time] { width:100%; } .hoDia .chk { margin:0; }
.kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:6px 0 14px; } .kpis:empty { display:none; }
.kpi { border:1px solid var(--borde); border-radius:10px; padding:10px 14px; background:#fff; } .kpi b { display:block; font-size:20px; } .kpi span { font-size:12px; color:var(--gris); }
.kpi.mal { border-color:#f5c2c2; background:#fff5f5; } .kpi.mal b { color:var(--mal); } .kpi.av { border-color:#f3dc9a; background:#fffbeb; } .kpi.av b { color:#8a5a00; }
.seg { display:inline-flex; border:1px solid #cbd5e1; border-radius:8px; overflow:hidden; align-self:flex-end; height:36px; }
.seg button { border:none; background:#fff; padding:0 14px; font-size:13px; font-weight:600; color:var(--gris); cursor:pointer; } .seg button.sel { background:var(--azul); color:#fff; }
.req { font-size:12px; color:var(--gris); line-height:1.5; }
code { background:#f1f5f9; padding:2px 6px; border-radius:6px; word-break:break-all; }

/* Listas largas: paginación y tablas densas */
.pager { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:12px 4px 0; border-top:1px solid #e5eaf0; margin-top:4px; }
.pager .pg { display:flex; align-items:center; gap:10px; font-size:13px; color:#334155; }
.pager .b.g:disabled { opacity:.45; cursor:default; }
.pager select { height:28px; padding:0 6px; font-size:12px; width:auto; }
table.den th { padding:10px 8px; font-size:11px; } table.den td { padding:10px 8px; font-size:13px; }
.acc.emp { justify-content:flex-start; max-width:none; flex-wrap:nowrap; } .acc.emp button.b { padding:0 9px; white-space:nowrap; }
@media (max-width:1150px) { nav button { padding:12px 9px; font-size:13px; } }

/* Checadas anuladas: se ven tachadas pero siguen ahí */
tr.anulada td { color:var(--suave,#64748b); }
tr.anulada td:not(:last-child) { text-decoration:line-through; }
tr.anulada td .tag, tr.anulada td .peq { text-decoration:none; display:inline-block; }

/* La barra de arriba (logo, empresa y pestañas) siempre se queda visible al bajar */
#barra { position:sticky; top:0; z-index:40; box-shadow:0 2px 6px rgba(15,23,42,.12); }

/* Nómina: reglas agrupadas por tema */
.cfg-grupo { border:1px solid var(--borde); border-radius:12px; padding:14px 16px 16px; margin:14px 0; background:#fbfdff; }
.cfg-grupo h3 { margin:0 0 4px; font-size:14px; }
.cfg-grupo > .peq.sub { margin:0 0 12px; }

/* Login neutro (sin marca de ninguna empresa) */
/* Fondo opcional: pon tu imagen en panel/img/fondo-login.jpg. Si no existe, se ve el degradado. */
body:has(#login:not(.oculto)) { min-height:100vh; background:linear-gradient(rgba(15,23,42,.72),rgba(15,23,42,.72)), url("../img/fondo-login.jpg") center/cover no-repeat, radial-gradient(1200px 600px at 50% -10%, #1e293b 0%, #0f172a 60%) #0f172a; }
#login { max-width:360px; margin:0; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:calc(100% - 32px); padding:28px 26px; border:0; border-radius:16px; box-shadow:0 20px 60px rgba(0,0,0,.45); }
#login::before { content:""; display:block; width:52px; height:52px; margin:0 auto 12px; background:url("../img/logo-login.svg") center/contain no-repeat; }
#login.conlogo::before { display:none; }
#login h2 { text-align:center; font-size:17px; margin:0 0 4px; }
#login .peq { text-align:center; margin:0 0 16px !important; }
#login input { padding:10px 12px; }
#login .b { background:#0f172a; padding:11px; }
#login .b:hover { background:#1e293b; }

/* Chat del asistente */
.ia-burbuja { border-radius:12px; padding:12px 14px; line-height:1.5; font-size:14px; max-width:92%; }
.ia-yo { align-self:flex-end; background:#e0f4fd; color:#0b4a6b; border-bottom-right-radius:4px; white-space:pre-wrap; }
.ia-resp { align-self:flex-start; background:#fff; border:1px solid #dbe4ef; border-left:4px solid var(--celeste, #19b5ee); box-shadow:0 2px 8px rgba(15,23,42,.06); border-bottom-left-radius:4px; }
.ia-quien { font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:#0077a8; margin-bottom:6px; }
.ia-h { font-weight:700; color:#0f2a4a; margin:12px 0 4px; padding-bottom:3px; border-bottom:1px solid #e8eef6; }
.ia-h:first-of-type { margin-top:0; }
.ia-p { margin:4px 0; }
.ia-ul { margin:4px 0 4px 2px; padding-left:20px; }
.ia-ul li { margin:4px 0; }
.ia-pensando { color:#64748b; font-style:italic; }
