.ce-section{background:var(--white);border-radius:var(--r2);border:1px solid var(--border);box-shadow:var(--sh);padding:14px;margin-bottom:12px}
.ce-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-wrap:wrap;gap:8px}
.ce-title{font-size:13px;font-weight:700}
.ce-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:6px}
.ce-row{display:flex;align-items:center;gap:8px;padding:6px 8px;background:var(--bg);border-radius:7px;border:1px solid var(--border)}
.ce-swatch{width:30px;height:30px;border-radius:6px;flex-shrink:0;border:1.5px solid rgba(0,0,0,.1);cursor:pointer;position:relative}
.ce-swatch input[type=color]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.ce-name{flex:1;font-size:11.5px;font-weight:600;color:var(--ink2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ce-hex{font-family:var(--mono);font-size:10px;color:var(--ink3)}
.ce-add{display:flex;gap:8px;align-items:flex-end;margin-top:10px;flex-wrap:wrap}
.ce-add input[type=text]{height:34px;border:1.5px solid var(--border);border-radius:var(--r);padding:0 10px;font-family:var(--font);font-size:12px;color:var(--ink);background:var(--white);width:150px}
.ce-add input[type=text]:focus{outline:none;border-color:var(--p)}
.ce-add input[type=color]{width:40px;height:34px;padding:2px;cursor:pointer;border:1.5px solid var(--border);border-radius:var(--r)}
.users-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;margin-bottom:14px}
.user-card{background:var(--white);border:1px solid var(--border);border-radius:var(--r2);padding:14px;display:flex;flex-direction:column;gap:10px;box-shadow:var(--sh)}
.uc-head{display:flex;align-items:center;gap:10px}
.uc-av{width:38px;height:38px;border-radius:50%;background:var(--p);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:white;flex-shrink:0}
.uc-name{font-weight:700;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uc-username{font-size:10.5px;color:var(--ink3);font-family:var(--mono)}
.uc-foot{display:flex;align-items:center;justify-content:space-between;gap:6px}
.role-chip{font-size:10px;font-weight:700;padding:3px 10px;border-radius:99px}
.rc-admin{background:var(--amberbg);color:#92400e}.rc-oper{background:var(--p3);color:var(--p)}
.rc-visor{background:#f1f5f9;color:#475569}.rc-medico{background:var(--purplebg);color:#4c1d95}
.rc-dev{background:#1e293b;color:#f8fafc}.rc-rrhh{background:#ecfccb;color:#3f6212}
.rc-tes{background:#e0f2fe;color:#075985}.rc-due{background:#fce7f3;color:#9d174d}
/* Toggle segmentado (ej. "Todas / Nóminas / Facturas" en Mi Perfil) */
.seg-toggle{display:inline-flex;background:var(--bg);border:1px solid var(--border);border-radius:99px;padding:2px;gap:2px}
.seg-btn{border:none;background:transparent;font-family:var(--font);font-size:11px;font-weight:600;color:var(--ink3);padding:5px 12px;border-radius:99px;cursor:pointer;transition:background .15s,color .15s}
.seg-btn:hover{color:var(--ink)}
.seg-btn.active{background:var(--white);color:var(--p);box-shadow:var(--sh)}
.uc-btns{display:flex;gap:4px}
.danger-zone{background:var(--redbg);border:1.5px solid var(--redbd);border-radius:var(--r2);padding:14px}
.danger-zone h4{font-size:13px;font-weight:700;color:var(--red);margin-bottom:6px}
.danger-zone p{font-size:12px;color:#7f1d1d;margin-bottom:10px}
.import-zone{border:2px dashed var(--border);border-radius:var(--r2);padding:24px;text-align:center;cursor:pointer;background:var(--bg);transition:.2s}
.import-zone:hover{border-color:var(--p);background:var(--p3)}
.import-zone input[type=file]{display:none}
.import-zone svg{width:28px;height:28px;fill:none;stroke:var(--ink4);stroke-width:1.5;stroke-linecap:round;margin-bottom:7px}
.prev-wrap{max-height:180px;overflow-y:auto;overflow-x:auto;border-radius:var(--r);border:1px solid var(--border);margin-top:8px}
.medico-panel{background:var(--white);border-radius:var(--r2);border:1px solid var(--border);box-shadow:var(--sh);margin-bottom:12px}
.mp-header{padding:14px 16px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px}
.mp-av{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;color:white}
.mp-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--border)}
.mp-stat{background:var(--white);padding:12px 16px;text-align:center}
.mp-stat-val{font-size:20px;font-weight:700;font-family:var(--mono)}
.mp-stat-lbl{font-size:10px;color:var(--ink3);text-transform:uppercase;letter-spacing:.5px;margin-top:2px}
.mp-event-item{padding:10px 12px;border-radius:var(--r);margin-bottom:6px;display:flex;align-items:flex-start;gap:12px;border:1px solid rgba(0,0,0,.06)}

/* ==================== Módulo Usuarios (rediseño) ==================== */
.au-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-bottom:14px}
.au-stat-card{background:var(--white);border:1px solid var(--border);border-radius:var(--r2);box-shadow:var(--sh);padding:12px 14px}
.au-stat-icotxt{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.au-stat-icotxt span{font-size:11px;font-weight:600;color:var(--ink3)}
.au-stat-ico{width:26px;height:26px;border-radius:7px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.au-stat-ico svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.au-si-p{background:var(--p3);color:var(--p)}.au-si-green{background:var(--greenbg);color:#065f46}
.au-si-blue{background:var(--bluebg);color:var(--blue)}.au-si-amber{background:var(--amberbg);color:var(--amber)}
.au-si-red{background:var(--redbg);color:var(--red)}
.au-stat-val{font-size:22px;font-weight:700}
.au-stat-sub{font-size:10.5px;font-weight:600;margin-top:2px}
.au-sub-green{color:#059669}

.au-body{display:grid;grid-template-columns:1fr 320px;gap:12px;align-items:start}
/* !important porque nomina.js pone un grid-template-columns inline
   (proporción 1.3fr/1fr para escritorio) que si no, gana siempre por
   especificidad y nunca se colapsaría a 1 columna en móvil. */
@media(max-width:1000px){.au-body{grid-template-columns:1fr!important}}
.au-main{min-width:0}
.au-filter-card{margin-bottom:10px}
.au-filter-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.au-search{flex:1;min-width:180px;display:flex;align-items:center;gap:6px;border:1.5px solid var(--border);border-radius:var(--r);padding:0 10px;height:34px}
.au-search svg{width:14px;height:14px;fill:none;stroke:var(--ink4);stroke-width:2;flex-shrink:0}
.au-search input{border:none;outline:none;font-family:var(--font);font-size:12px;color:var(--ink);flex:1;height:100%;background:transparent}
.au-filter-row select{height:34px;border:1.5px solid var(--border);border-radius:var(--r);padding:0 10px;font-family:var(--font);font-size:12px;color:var(--ink);background:var(--white)}

.au-tbl-wrap{overflow-x:auto}
.au-table{width:100%;border-collapse:collapse;font-size:12px}
.au-table thead th{text-align:left;font-size:10px;font-weight:700;color:var(--ink3);text-transform:uppercase;letter-spacing:.5px;padding:10px 14px;border-bottom:1px solid var(--border);white-space:nowrap}
.au-row{border-bottom:1px solid var(--border);cursor:pointer;transition:background .1s}
.au-row:last-child{border-bottom:none}
.au-row:hover{background:var(--bg)}
.au-row-sel{background:var(--p3)}
.au-table td{padding:9px 14px;vertical-align:middle}
.au-user-cell{display:flex;align-items:center;gap:9px}
.au-av{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:white;flex-shrink:0}
.au-av-lg{width:46px;height:46px;font-size:15px}
.au-uname{font-weight:600;font-size:12px}
.au-ulogin{font-size:10.5px;color:var(--ink3);font-family:var(--mono)}
.au-muted{color:var(--ink3);font-size:11.5px}
.au-estado{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:600;padding:3px 9px;border-radius:99px}
.au-estado-dot{width:6px;height:6px;border-radius:50%}
.au-estado-on{background:var(--greenbg);color:#065f46}.au-estado-on .au-estado-dot{background:#10b981}
.au-estado-off{background:#f1f5f9;color:#64748b}.au-estado-off .au-estado-dot{background:#94a3b8}
.au-actions{display:flex;gap:4px}
.au-icon-btn{width:28px;height:28px;border:1.5px solid var(--border);background:var(--white);border-radius:7px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--ink3);flex-shrink:0}
.au-icon-btn:hover{border-color:var(--p);color:var(--p)}
.au-icon-btn svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}

.au-tbl-footer{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-top:1px solid var(--border);flex-wrap:wrap;gap:8px}
.au-pagination{display:flex;gap:4px}
.au-page-btn{min-width:28px;height:28px;border:1.5px solid var(--border);background:var(--white);border-radius:7px;font-size:11.5px;font-weight:600;color:var(--ink2);cursor:pointer;padding:0 6px}
.au-page-btn:hover:not(:disabled){border-color:var(--p);color:var(--p)}
.au-page-btn.active{background:var(--p);border-color:var(--p);color:white}
.au-page-btn:disabled{opacity:.4;cursor:default}

.au-side{background:var(--white);border:1px solid var(--border);border-radius:var(--r2);box-shadow:var(--sh);padding:16px;position:sticky;top:12px}
.au-detail-empty{font-size:11.5px;color:var(--ink4);text-align:center;padding:20px 6px}
.au-detail-hdr{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:8px}
.au-detail-name{font-size:14.5px;font-weight:700}
.au-detail-login{font-size:11px;color:var(--ink3);font-family:var(--mono);margin-top:1px}
.au-detail-list{border-top:1px solid var(--border);padding-top:10px;margin-bottom:14px}
.au-detail-row{display:flex;justify-content:space-between;gap:10px;padding:6px 0;font-size:11.5px;border-bottom:1px dashed var(--border)}
.au-detail-row:last-child{border-bottom:none}
.au-detail-lbl{color:var(--ink3)}
.au-detail-val{color:var(--ink);font-weight:600;text-align:right}
.au-detail-perms-title{font-size:10px;font-weight:700;color:var(--ink3);text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}
.au-detail-perms{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}
.au-perm-item{display:flex;align-items:center;gap:7px;font-size:11.5px;color:var(--ink2)}
.au-perm-item svg{width:13px;height:13px;fill:none;stroke:#10b981;stroke-width:2.5;stroke-linecap:round;flex-shrink:0}
.au-detail-actions{display:flex;flex-direction:column;gap:7px}

/* ==================== Módulo Nómina (rediseño) ==================== */
.nm-strip{display:flex;gap:10px;overflow-x:auto;padding-bottom:4px}
.nm-worker-card{flex:0 0 150px;background:var(--white);border:1px solid var(--border);border-radius:var(--r2);padding:14px 12px;text-align:center;box-shadow:var(--sh)}
.nm-w-av{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;margin:0 auto 8px}
.nm-w-name{font-size:12px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.nm-dropzone{border:2px dashed var(--border);border-radius:var(--r2);padding:20px 14px;text-align:center;cursor:pointer;background:var(--bg);transition:.15s}
.nm-dropzone:hover,.nm-dropzone.drag{border-color:var(--p);background:var(--p3)}
.nm-dropzone svg{width:22px;height:22px;fill:none;stroke:var(--ink4);stroke-width:1.5;stroke-linecap:round;margin-bottom:6px}
.nm-dz-txt{font-size:11.5px;color:var(--ink3)}
.nm-dz-txt span{color:var(--p);font-weight:600}
.nm-dz-name{font-size:11px;font-weight:600;color:var(--ink);margin-top:6px}
