body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: #f6f9fc;
}

/* Estilos para enlaces deshabilitados */
.disabled-link {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.disabled-link:hover {
    opacity: 0.6;
    background: none !important;
    color: #6b7280 !important;
}
.sidebar {
    width: 280px;
    background: #fff;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 0 0 24px rgba(0,0,0,0.04);
    padding: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 32px;
    margin-bottom: 32px;
}
.sidebar .logo img {
    width: 32px;
    height: 32px;
}
.sidebar .logo .title {
    font-weight: 700;
    font-size: 1.25rem;
}
.sidebar .logo .subtitle {
    font-size: 0.9rem;
    color: #6b7280;
}
.sidebar nav {
    padding-left: 32px;
}
.sidebar nav .nav-title {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 12px;
}
.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar nav ul li {
    margin-bottom: 8px;
}
.sidebar nav ul li.nav-separator {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 32px 8px 32px;
    list-style: none;
}
.sidebar nav ul li a {
    display: block;
    padding: 8px 16px;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}
.sidebar nav ul li a.with-icon { display:flex; align-items:center; gap:10px; }
.sidebar nav ul li a.with-icon .nav-icon { width:22px; height:22px; object-fit:contain; display:block; flex-shrink:0; }
.sidebar nav ul li a.with-icon .nav-text { display:flex; flex-direction:column; justify-content:center; line-height:1.2; }
.sidebar nav ul li a.active,
.sidebar nav ul li a:hover {
    background: #eaf1ff;
    color: #2563eb;
}
.sidebar .logout {
    padding: 24px 32px;
    color: #ef4444;
    font-weight: 600;
    font-size: 1rem;
    border-top: 1px solid #f3f4f6;
    cursor: pointer;
    text-align: left;
    background: none;
}
.admin-btn {
    padding: 14px 32px;
    font-weight: 700;
    font-size: 1rem;
    border-top: 1px solid #f3f4f6;
    cursor: pointer;
    text-align: left;
    background: none;
    border: none;
    width: 100%;
    display: block;
}
.admin-btn--login { color: #16a34a; }
.admin-btn--logout { color: #ef4444; }
.main {
    margin-left: 280px;
    padding: 32px 0 0 0;
    min-height: 100vh;
}
.mobile-topbar { display:none; position:fixed; top:0; left:0; right:0; height:56px; background:#fff; border-bottom:1px solid #eef2f7; z-index:10001; align-items:center; justify-content:space-between; padding:0 12px; }
.mobile-topbar-title { font-weight:700; color:#111827; }
.mobile-toggle { width:40px; height:40px; background:#f3f4f6; border:1px solid #e5e7eb; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.mobile-toggle .burger, .mobile-toggle .burger:before, .mobile-toggle .burger:after { content:""; display:block; width:18px; height:2px; background:#111827; border-radius:2px; position:relative; }
.mobile-toggle .burger:before { position:absolute; top:-6px; }
.mobile-toggle .burger:after { position:absolute; top:6px; }
.sidebar-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.35); z-index:10000; }
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}
.container--wide { max-width: 1200px; }
.card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    padding: 32px;
    margin-bottom: 24px;
}
/* Reducir altura del bloque de fichaje (tarjeta con .clock-title) */
.card:has(.clock-title) { display: flex; flex-direction: column; justify-content: center; }
.clock-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    justify-content: center;
}
@media (min-width: 769px) {
  .card:has(.clock-title) { min-height: 28vh; }
}
@media (max-width: 768px) {
  .card:has(.clock-title) { min-height: 24vh; }
}
.clock-time {
    font-size: 3rem;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-align: center;
}
.clock-date {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 4px;
    text-align: center;
}
.clock-client {
    font-size: 1rem;
    color: #6b7280;
    text-align: center;
}
.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.worker-select {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px 24px;
    width: fit-content;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}
.worker-select .icon {
    color: #ef4444;
    font-size: 1.5rem;
}
.worker-select .name {
    font-weight: 600;
    color: #374151;
}
.status-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.status-active {
    color: #22c55e;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 4px;
}
.status-desc {
    color: #6b7280;
    font-size: 1rem;
    font-style: italic;
}
/* Lista de trabajadores activos (Estado Actual) */
.active-workers-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.active-worker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.active-worker-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.aw-avatar {
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #2563eb;
    background: #eef2ff;
    box-shadow: inset 0 0 0 1px rgba(37,99,235,0.22);
}
.aw-info {
    display: flex;
    flex-direction: column;
}
.aw-name {
    font-weight: 600;
    color: #111827;
}
.aw-sub {
    font-size: 0.82rem;
    color: #6b7280;
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
}
.badge--working {
    background: #eafaf1;
    color: #16a34a;
    box-shadow: inset 0 0 0 1px rgba(22,163,74,0.22);
}
/* Icon styles */
.icon-clock {
    color: #2563eb !important;
    font-size: 2.5rem !important;
    margin-bottom: 4px !important;
    display: block !important;
}
.icon-user {
    color: #2563eb;
    font-size: 1.5rem;
}
.icon-check {
    color: #22c55e;
    font-size: 1.5rem;
}
.worker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.worker-item {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    min-width: 180px;
}
.worker-dni { font-size: 0.85rem; color:#6b7280; }
.worker-avatar {
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    margin-right: 12px;
}
.pin-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.40);
    display: grid;
    place-items: center;
    z-index: 10005;
}
/* Ajustes de modal PIN */
.pin-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px 20px 20px;
    min-width: 320px;
    max-width: 420px;
    width: 92vw;
    box-shadow: 0 4px 32px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin: 0;
}
.pin-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}
.pin-close:hover {
    background: #f3f4f6;
    color: #111827;
}
.pin-avatar {
    width: 64px;
    height: 64px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(37,99,235,0.10);
}
.pin-name {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 16px;
}
.pin-instruction {
    color: #374151;
    margin-bottom: 10px;
}
.pin-input-group {
    position: relative;
    margin-bottom: 12px;
}
#pin-input {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}
/* Dots del PIN: más grandes y centrados */
.pin-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 2em;
    letter-spacing: 0.5em;
    color: #374151;
    margin-bottom: 8px;
}
.pin-keypad {
    margin: 12px 0 18px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pin-keypad div {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.pin-key {
    width: 60px;
    height: 48px;
    font-size: 1.3em;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    margin: 0;
    cursor: pointer;
    transition: background 0.15s;
}
.pin-key:active {
    background: #dbeafe;
}
.pin-submit {
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1.1em;
    margin-top: 10px;
    margin-bottom: 4px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(34,197,94,0.10);
}
.pin-cancel {
    background: none;
    color: #2563eb;
    border: none;
    margin-top: 4px;
    font-size: 1em;
    cursor: pointer;
}
/* Icono de estado al lado del nombre */
.worker-status-icon {
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
}
.status-icon {
    font-size: 1.1em;
}
.status-icon--green {
    color: #22c55e;
}
.status-icon--red {
    color: #ef4444;
}

/* Botón de salida en rojo */
.pin-submit--danger {
    background: #ef4444;
    box-shadow: 0 2px 8px rgba(239,68,68,0.10);
}
.pin-submit--danger:hover {
    background: #dc2626;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.toast {
    min-width: 260px;
    max-width: 90vw;
    background: #111827;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 180ms ease, transform 180ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.toast--success { background: #16a34a; }
.toast--error { background: #ef4444; }
.toast--exit { background: #ef4444; }

/* --- Trabajadores (lista y edición) --- */
.workers-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
.workers-title { font-size: 2rem; font-weight: 800; color:#111827; }
.page-header { display:flex; align-items:center; gap:10px; margin-bottom: 8px; }
.page-header .page-icon { width:26px; height:26px; object-fit:contain; }
.page-header .page-text { display:flex; flex-direction:column; line-height:1.2; }
.workers-subtitle { color:#6b7280; margin-bottom: 4px; }
.client-line { color:#6b7280; margin: 12px 0 28px 0; }
.btn-primary { background:#2563eb; color:#fff; border:none; border-radius:10px; padding:10px 14px; font-weight:700; cursor:pointer; text-decoration:none; }
.btn-primary:hover, .btn-primary:focus { text-decoration:none; }
.workers-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:24px; }
.workers-header .btn-primary { margin-top:24px; }
.worker-card { background:#fff; border-radius:16px; box-shadow:0 0 24px rgba(0,0,0,0.04); padding:18px; border:1px solid #eef2f7; }
.worker-row { display:flex; align-items:center; justify-content:space-between; }
.worker-left { display:flex; align-items:center; gap:14px; }
.worker-avatar { width:44px; height:44px; border-radius:9999px; background:#e8f0ff; color:#2563eb; font-weight:800; display:flex; align-items:center; justify-content:center; }
.text-muted { color:#6b7280; font-size:.92rem; }
.worker-kpi { display:flex; align-items:center; gap:8px; margin-top:10px; color:#374151; }
.worker-kpi--right { justify-content: flex-end; width: 100%; text-align: right; }
.worker-divider { height:1px; background:#eef2f7; margin:12px 0; }
.btn-edit { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:8px 12px; cursor:pointer; text-decoration:none; color:#111827; font-weight:600; }
.badge-active { background:#eafaf1; color:#16a34a; border:1px solid rgba(22,163,74,.25); padding:6px 10px; border-radius:9999px; font-weight:700; }

/* Edición */
.worker-edit { background:#fff; border-radius:16px; box-shadow:0 0 24px rgba(0,0,0,0.04); padding:20px; border:1px solid #eef2f7; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:12px; }
.form-field { display:flex; flex-direction:column; gap:6px; }
.form-field input, .form-field select { padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; font-size:1rem; }

#edit-modal .form-field input,
#edit-modal .form-field select {
    width: 100%;
    box-sizing: border-box;
}
.switch-line { display:inline-flex; align-items:center; gap:10px; }
.form-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:12px; }
.btn-secondary { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:10px 14px; font-weight:700; cursor:pointer; text-decoration:none; color:#111827; display:inline-flex; align-items:center; gap:8px; line-height:1; min-height:42px; }
.btn-success { background:#15803d; color:#fff; border:none; border-radius:10px; padding:10px 14px; font-weight:700; cursor:pointer; display:inline-flex; align-items:center; gap:8px; line-height:1; min-height:42px; }
.btn-save { background:#2563eb; color:#fff; border:none; border-radius:12px; padding:14px 26px; font-weight:800; cursor:pointer; display:inline-flex; align-items:center; gap:10px; box-shadow:0 6px 20px rgba(37,99,235,0.25); }
.btn-save:hover { background:#1d4ed8; }
.btn-save:active { transform: translateY(1px); }

/* Modal éxito */
.modal-overlay { position: fixed; inset: 0; display:none; place-items:center; background: rgba(0,0,0,0.45); z-index: 10000; }
.modal-card { background: linear-gradient(180deg,#1e3a8a 0%, #1f3f97 100%); color:#fff; width: min(92vw, 520px); border-radius:14px; padding:24px; box-shadow: 0 10px 40px rgba(0,0,0,0.35); text-align:center; }
.modal-card .modal-icon { width:56px; height:56px; background:#22c55e; border-radius:10px; display:grid; place-items:center; margin: 4px auto 12px auto; box-shadow:0 6px 18px rgba(34,197,94,.35); }
.modal-card .modal-title { font-size:1.5rem; font-weight:800; margin:8px 0 6px 0; }
.modal-card .modal-sub { color:#d1d5db; }
.btn-go { background:#16a34a; color:#fff; border:none; border-radius:10px; padding:12px 18px; font-weight:800; display:inline-flex; align-items:center; gap:8px; margin-top:16px; cursor:pointer; box-shadow:0 6px 16px rgba(22,163,74,.35); }
.btn-go:hover { background:#15803d; }

/* --- Toggle Switch --- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 12px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #2196F3;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Dashboard --- */
.dashboard-clock { font-size: 2.4rem; font-weight: 800; color:#1d4ed8; letter-spacing:2px; }
.dashboard-date { color:#6b7280; margin-top:4px; }
.kpi-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:16px; margin:16px 0 8px; }
.kpi-grid--wide { grid-template-columns: repeat(4, 1fr); }
.kpi-card { 
    background:#fff; 
    border:1px solid #eef2f7; 
    border-radius:14px; 
    padding:14px; 
    box-shadow:0 6px 20px rgba(0,0,0,0.12); 
    position: relative;
}
.kpi-card--blue { 
    border-top: 4px solid #3b82f6 !important; 
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
}
.kpi-card--green { 
    border-top: 4px solid #10b981 !important; 
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
}
.kpi-card--purple { 
    border-top: 4px solid #8b5cf6 !important; 
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
}
.kpi-card--orange { 
    border-top: 4px solid #f59e0b !important; 
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
}
.kpi-title { font-weight:400; color:#374151; display:flex; align-items:center; justify-content:space-between; }
.kpi-ico { opacity:.6; }
.kpi-value { font-size:1.8rem; font-weight:800; margin-top:8px; }
.kpi-sub { color:#6b7280; font-size:.7rem; margin-top:4px; }
.dashboard-two { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.dashboard-two--wide { grid-template-columns: 1.2fr 1fr; }
.activity-list { display:flex; flex-direction:column; gap:10px; }
.activity-item { display:flex; align-items:center; justify-content:space-between; border:1px solid #eef2f7; border-radius:12px; padding:10px 12px; }
.activity-left { display:flex; flex-direction:column; }
.activity-name { font-weight:400; }
.activity-type { font-weight:400; font-size:.9rem; }
.activity-in { color:#16a34a; }
.activity-out { color:#ef4444; }
.activity-right { text-align:right; color:#6b7280; }
.system-list { display:flex; flex-direction:column; gap:12px; }
.system-row { display:flex; align-items:center; gap:10px; justify-content:space-between; color:#374151; }
.status-dot { width:8px; height:8px; border-radius:9999px; display:inline-block; }
.status-dot--ok { background:#16a34a; }
.system-ad { margin-top:12px; padding:10px 12px; background:#fffbeb; border:1px solid #fde68a; border-radius:10px; color:#6b7280; font-size:0.92rem; }
.system-ad i { color:#f59e0b; margin-right:6px; }
.status-dot--bad { background:#ef4444; }
.status-text { margin-left: auto; text-align: right; }

/* --- Configuración --- */
.settings-title { font-size:2rem; font-weight:800; color:#111827; }
.settings-subtitle { color:#6b7280; margin-bottom:12px; }
.settings-grid { display:flex; flex-direction:column; gap:16px; }
.settings-card { background:#fff; border-radius:16px; box-shadow:0 0 24px rgba(0,0,0,0.04); padding:16px; border:1px solid #eef2f7; }
.settings-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:10px; align-items:start; }
@media (max-width: 768px) {
  .settings-row { grid-template-columns: 1fr !important; }
}
.field { display:flex; flex-direction:column; gap:6px; }
.field input { padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; font-size:1rem; width:98%; box-sizing:border-box; }
.field + .field { margin-top:8px; }
.switch-wrap { display:flex; align-items:center; justify-content:space-between; }
.switch { position:relative; width:42px; height:24px; background:#e5e7eb; border-radius:9999px; cursor:pointer; }
.switch input { display:none; }
.switch .knob { position:absolute; top:3px; left:3px; width:18px; height:18px; background:#fff; border-radius:9999px; transition:left .15s; box-shadow:0 1px 2px rgba(0,0,0,0.15); }
.switch input:checked + .knob { left:21px; }
.switch input:checked ~ .track { background:#22c55e; }
.danger { background:#fef2f2; border:1px solid #fee2e2; }
.danger .section-title { color:#b91c1c; }
.danger-row { display:flex; align-items:center; justify-content:space-between; background:#fff; border:1px solid #fee2e2; border-radius:12px; padding:12px; }
.btn-danger { background:#ef4444; color:#fff; border:none; border-radius:10px; padding:10px 14px; font-weight:700; cursor:pointer; }
.settings-actions { display:flex; justify-content:flex-end; margin-top:16px; }

/* --- Soporte --- */
.support-hero { text-align:center; padding: 20px 0 6px 0; }
.support-hero-ico { width:64px; height:64px; border-radius:9999px; background:#f1f5ff; display:grid; place-items:center; margin: 4px auto 12px auto; box-shadow:0 10px 26px rgba(37,99,235,.18); }
.support-title { font-size:2.4rem; font-weight:800; margin: 0 0 8px 0; }
.support-sub { color:#6b7280; margin:0; }
.support-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:28px; margin-top:22px; }
.support-card { background:#fff; border-radius:16px; box-shadow:0 10px 34px rgba(0,0,0,0.10); padding:26px; border:1px solid #eef2f7; text-align:center; }
.support-card-ico { width:64px; height:64px; border-radius:9999px; background:#eaf1ff; display:grid; place-items:center; margin: 0 auto 12px auto; box-shadow: inset 0 0 0 1px rgba(37,99,235,.22); }
.support-card-title { font-weight:400; margin-bottom:8px; color:#111827; }
.support-card-value { font-size:1.6rem; font-weight:500; color:#2563eb; letter-spacing:.2px; }
.support-card-value a { color:#2563eb; text-decoration:none; }
.support-card-sub { color:#6b7280; margin-top:6px; }
.support-card-actions { margin-top:16px; }
.btn-blue { background:#2563eb; color:#fff; border:none; border-radius:10px; padding:10px 14px; font-weight:700; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:8px; line-height:1; min-height:42px; }
.btn-blue--sm { padding:10px 16px; }
.support-alert { background:#fff; border:1px solid #e5e7eb; border-radius:14px; margin-top:26px; padding:18px; text-align:center; box-shadow:0 6px 20px rgba(0,0,0,0.06); }
.support-alert-title { font-weight:700; }
.support-alert-sub { color:#6b7280; }

@media (max-width: 768px) {
    .sidebar { position:fixed; transform: translateX(-100%); transition: transform .2s ease; z-index:10002; }
    .sidebar.open { transform: translateX(0); }
    .mobile-topbar { display:flex; }
    .main { margin-left: 0; padding-top: 64px; }
    /* Lista de selección de trabajadores: ocupar ancho completo en móvil */
    .worker-list { flex-direction: column; flex-wrap: nowrap; gap: 12px; }
    .worker-item { width: 100%; box-sizing: border-box; }
    .support-grid { grid-template-columns: 1fr; gap:16px; }
    .kpi-grid, .kpi-grid--wide { grid-template-columns: 1fr !important; }
    .dashboard-two, .dashboard-two--wide { grid-template-columns: 1fr !important; }
    .workers-grid { grid-template-columns: 1fr; gap:14px; }
    .worker-edit .form-grid { grid-template-columns: 1fr; }
    /* Editar registro responsive en móviles */
    #edit-modal .pin-modal-content { width: 94vw; max-width: 560px; min-width: 0; }
    #edit-modal .form-grid { grid-template-columns: 1fr; }

    /* Empequeñecer modal de PIN en móvil */
    .pin-modal-content { width: 86vw; max-width: 360px; padding: 18px 16px 16px 16px; }
    .pin-avatar { width: 52px; height: 52px; font-size: 1.6em; margin-bottom: 8px; }
    .pin-name { font-size: 1.1em; margin-bottom: 10px; }
    .pin-dots { font-size: 1.6em; gap: 12px; margin-bottom: 6px; }
    .pin-key { width: 48px; height: 40px; font-size: 1.1em; }
    .pin-keypad { margin: 8px 0 12px 0; }
    .pin-submit { padding: 10px 24px; font-size: 1em; }
    /* Alinear teclado: 3 columnas fijas, teclas iguales */
    .pin-keypad div { display:grid; grid-template-columns: repeat(3, 1fr); gap:6px; justify-content:unset; }
    .pin-key { width:auto; min-width:0; }
    .pin-key--clear { background:#fdecec; color:#b91c1c; }
    .pin-key--spacer { visibility:hidden; }

    /* Ocultar círculos con inicial en móvil */
    .worker-avatar, .aw-avatar { display:none; }
    .worker-left { gap:8px; }
    .active-worker-left { gap:8px; }

    /* Reloj más pequeño en móvil */
    .clock-time { font-size: 2.1rem; }
    .icon-clock { font-size: 2rem !important; }

    /* Asegurar visibilidad de Estado Actual en móvil */
    .active-workers-list { display: flex !important; }
    .active-worker { display:flex !important; padding:12px 12px; }
    .aw-info { display:flex; flex-direction:column; }
}

/* Tablet: 769px–1024px → 2 columnas */
@media (min-width: 769px) and (max-width: 1024px) {
    .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap:20px; }
}

/* Escritorio ≥1025px → 3 columnas forzadas */
@media (min-width: 1025px) {
    .support-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* Forzar tarjetas de registros en vertical (una por línea) en escritorio */
.registros-grid { grid-template-columns: 1fr !important; }

/* Desktop: acciones (editar/eliminar) en la misma línea que las horas */
@media (min-width: 1025px) {
    .registro-card { display: grid; grid-template-columns: 1fr auto; grid-auto-rows: auto; gap: 12px; }
    .registro-header { grid-column: 1 / -1; }
    .registro-mobile-layout { display: none !important; }
    .registro-times { grid-column: 1 / 2; margin-bottom: 0 !important; gap: 10px; }
    .registro-actions { grid-column: 2 / 3; margin-top: 0 !important; align-self: center; justify-content: flex-end; }
    /* Compactar tarjeta en escritorio */
    .registro-card { padding: 14px 16px !important; }
    .time-total { padding: 8px 6px !important; }
    .time-value { font-size: 0.95rem; }
}

/* --- Estilos para modal de importación --- */
.btn-warning {
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-warning:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.import-content {
    margin: 20px 0;
}

.file-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 32px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-input-container:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.file-input-container:hover::before {
    opacity: 1;
}

.file-input-container.drag-over {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    transform: scale(1.02);
}

.file-input-container.drag-over::before {
    background: linear-gradient(90deg, #10b981, #059669);
    opacity: 1;
}

.file-name {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    min-width: 200px;
    text-align: center;
    transition: all 0.2s ease;
}

.file-name.has-file {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
    font-weight: 600;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.file-input-container:hover .file-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.file-text {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.file-text strong {
    color: #334155;
    font-weight: 600;
}

.import-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.9rem;
}

.import-warning i {
    color: #f59e0b;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Animaciones adicionales para el modal de importación */
@keyframes fileUploadPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.file-input-container.uploading {
    animation: fileUploadPulse 1.5s ease-in-out infinite;
}

.file-input-container.uploading .file-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.file-input-container.uploading .file-icon i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mejoras para el botón de selección */
#select-file-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#select-file-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

#select-file-btn:hover::before {
    left: 100%;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .file-input-container {
        padding: 24px 16px;
        margin-bottom: 16px;
    }
    
    .file-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .file-text {
        font-size: 0.85rem;
    }
    
    .file-name {
        min-width: 150px;
        font-size: 0.9rem;
    }
}

