/* ================================================
   SOLVIX EGL — Sistema de Asistencia (Reloj Control)
   Asistencia.css — Tech Elite Design System
   03-05-2026
   ================================================ */

/* === TABS INTERNAS DEL MÓDULO ADMIN === */
.att-tabs {
    display: flex; gap: 2px; margin-bottom: 20px;
    background: rgba(0,0,0,0.3); border-radius: 12px; padding: 4px;
    border: 1px solid rgba(0,242,255,0.1);
}
.att-tab-btn {
    flex: 1; padding: 12px 16px; border: none; background: transparent;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.3s; color: rgba(255,255,255,0.5); border-radius: 10px;
}
.att-tab-btn.active {
    background: linear-gradient(135deg, rgba(0,242,255,0.15), rgba(0,100,180,0.15));
    color: var(--solvix-cyan, #00f2ff);
    border: 1px solid rgba(0,242,255,0.3);
    box-shadow: 0 0 12px rgba(0,242,255,0.1);
}
.att-tab-btn:hover:not(.active) { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8); }
.att-tab-content { display: none; animation: attFadeIn 0.4s ease; }
.att-tab-content.active { display: block; }
@keyframes attFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* === CHECKIN CARD (Home + Admin) === */
.att-checkin-card {
    background: rgba(15,23,42,0.6); backdrop-filter: blur(12px);
    border: 1px solid rgba(0,242,255,0.15); border-radius: 16px;
    padding: 24px; display: grid; grid-template-columns: 1fr 1fr;
    gap: 30px; align-items: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    transition: all 0.3s;
}
.att-checkin-card:hover { border-color: rgba(0,242,255,0.35); box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 15px rgba(0,242,255,0.1); }
@media (max-width: 900px) { .att-checkin-card { grid-template-columns: 1fr; } }

.att-employee-section {
    padding-right: 20px; border-right: 1px solid rgba(0,242,255,0.1);
}
@media (max-width: 900px) {
    .att-employee-section { padding-right: 0; border-right: none; border-bottom: 1px solid rgba(0,242,255,0.1); padding-bottom: 20px; }
}

.att-card-title {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px; color: var(--solvix-cyan, #00f2ff);
    font-size: 1.1rem; font-weight: 700; letter-spacing: 0.03em;
}
.att-card-title i { font-size: 1.3rem; }

/* Employee Display */
.att-employee-display { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.att-big-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,242,255,0.3), rgba(0,100,180,0.4));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 2rem; font-weight: 800;
    box-shadow: 0 4px 15px rgba(0,242,255,0.25);
    border: 2px solid rgba(0,242,255,0.3);
}
.att-display-details h3 { font-size: 1.3rem; margin: 0 0 6px 0; color: #e2e8f0; }
.att-display-details p {
    color: rgba(255,255,255,0.5); display: flex; align-items: center;
    gap: 6px; margin: 3px 0; font-size: 0.85rem;
}

/* Time Display */
.att-time-display {
    text-align: center; padding: 20px;
    background: rgba(0,0,0,0.3); border-radius: 14px;
    border: 1px solid rgba(0,242,255,0.1);
}
.att-current-time {
    font-size: 2.8rem; font-weight: 900; color: var(--solvix-cyan, #00f2ff);
    margin-bottom: 4px; font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(0,242,255,0.4);
}
.att-current-date { font-size: 1rem; color: rgba(255,255,255,0.5); margin-bottom: 16px; }

/* Action Buttons */
.att-action-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.att-btn {
    padding: 12px 20px; border: none; border-radius: 10px;
    font-size: 0.9rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.3s; min-width: 140px; justify-content: center;
}
.att-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }
.att-btn-checkin {
    background: linear-gradient(135deg, rgba(0,242,255,0.2), rgba(0,100,180,0.3));
    color: var(--solvix-cyan, #00f2ff); border: 1px solid rgba(0,242,255,0.4);
}
.att-btn-checkin:hover:not(:disabled) { box-shadow: 0 0 16px rgba(0,242,255,0.3); transform: translateY(-2px); }
.att-btn-break {
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(217,119,6,0.3));
    color: #fbbf24; border: 1px solid rgba(245,158,11,0.4);
}
.att-btn-break:hover:not(:disabled) { box-shadow: 0 0 16px rgba(245,158,11,0.3); transform: translateY(-2px); }
.att-btn-checkout {
    background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(22,163,74,0.3));
    color: #4ade80; border: 1px solid rgba(34,197,94,0.4);
}
.att-btn-checkout:hover:not(:disabled) { box-shadow: 0 0 16px rgba(34,197,94,0.3); transform: translateY(-2px); }

/* === STATUS CARD === */
.att-status-card {
    background: rgba(15,23,42,0.6); backdrop-filter: blur(12px);
    border: 1px solid rgba(0,242,255,0.1); border-radius: 16px; padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.att-status-row {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px; padding: 12px;
    background: rgba(0,0,0,0.2); border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}
.att-status-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.att-status-dot.present { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.att-status-dot.late { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.att-status-dot.absent { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.att-status-text { font-weight: 600; font-size: 0.9rem; color: #e2e8f0; }
.att-status-value { margin-left: auto; color: rgba(255,255,255,0.6); font-family: 'Courier New', monospace; font-size: 0.85rem; }

/* === STATS CARD === */
.att-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.att-stat-item {
    text-align: center; padding: 16px;
    background: rgba(0,0,0,0.25); border-radius: 12px;
    border: 1px solid rgba(0,242,255,0.06);
}
.att-stat-value { font-size: 2rem; font-weight: 900; color: var(--solvix-cyan, #00f2ff); margin-bottom: 4px; }
.att-stat-label { color: rgba(255,255,255,0.5); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* === HISTORY TABLE === */
.att-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid rgba(0,242,255,0.08); }
.att-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.att-table th {
    text-align: left; padding: 12px 14px; color: rgba(255,255,255,0.45);
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0,242,255,0.1); background: rgba(0,0,0,0.2);
}
.att-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); color: rgba(255,255,255,0.85); }
.att-table tr:hover td { background: rgba(0,242,255,0.04); }

/* Status Badges */
.att-badge { padding: 4px 10px; border-radius: 16px; font-size: 0.72rem; font-weight: 700; }
.att-badge-present { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.att-badge-late { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.att-badge-absent { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

/* === EMPLOYEE CARDS (LIST) === */
.att-employees-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.att-emp-card {
    background: rgba(0,0,0,0.25); border-radius: 14px; padding: 18px;
    border: 1px solid rgba(0,242,255,0.08); transition: all 0.3s;
    border-left: 3px solid rgba(0,242,255,0.4);
}
.att-emp-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); border-color: rgba(0,242,255,0.2); }
.att-emp-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.att-emp-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,242,255,0.25), rgba(0,100,180,0.35));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem; font-weight: 800;
    border: 1px solid rgba(0,242,255,0.3);
}
.att-emp-info h4 { margin: 0 0 3px; font-size: 1rem; color: #e2e8f0; }
.att-emp-info p { margin: 0; color: rgba(255,255,255,0.45); font-size: 0.78rem; display: flex; align-items: center; gap: 4px; }
.att-emp-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06); }
.att-detail-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.8rem; }
.att-detail-label { color: rgba(255,255,255,0.4); }
.att-detail-value { color: #e2e8f0; font-weight: 600; }
.att-emp-actions { display: flex; gap: 8px; margin-top: 12px; }
.att-emp-btn {
    padding: 6px 12px; border-radius: 8px; border: none; cursor: pointer;
    transition: all 0.2s; font-size: 0.75rem; font-weight: 600;
    display: flex; align-items: center; gap: 4px;
}
.att-emp-btn-edit { background: rgba(0,242,255,0.1); color: var(--solvix-cyan, #00f2ff); border: 1px solid rgba(0,242,255,0.2); }
.att-emp-btn-edit:hover { background: rgba(0,242,255,0.2); }
.att-emp-btn-delete { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.att-emp-btn-delete:hover { background: rgba(239,68,68,0.2); }
.att-emp-btn-clock { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.att-emp-btn-clock:hover { background: rgba(34,197,94,0.2); }

/* === FORM STYLES === */
.att-form-card {
    background: rgba(15,23,42,0.5); backdrop-filter: blur(10px);
    border: 1px solid rgba(0,242,255,0.1); border-radius: 16px; padding: 24px;
    max-width: 800px; margin: 0 auto; box-sizing: border-box;
    overflow: hidden;
}
.att-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 768px) { .att-form-grid { grid-template-columns: 1fr; } }
.att-form-group { margin-bottom: 4px; min-width: 0; overflow: hidden; }
.att-form-group.full-width { grid-column: 1 / -1; }
.att-form-group label {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 6px; font-weight: 600; font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
}
.att-form-input, .att-form-select {
    width: 100%; padding: 12px 14px; box-sizing: border-box;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(0,242,255,0.12);
    border-radius: 10px; font-size: 0.9rem; color: #e2e8f0;
    transition: all 0.3s; outline: none;
}
.att-form-input::placeholder { color: rgba(255,255,255,0.25); }
.att-form-input:focus, .att-form-select:focus {
    border-color: rgba(0,242,255,0.5);
    box-shadow: 0 0 0 3px rgba(0,242,255,0.08);
}
.att-form-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.att-btn-save {
    background: linear-gradient(135deg, rgba(34,197,94,0.25), rgba(22,163,74,0.35));
    color: #4ade80; border: 1px solid rgba(34,197,94,0.4);
}
.att-btn-save:hover { box-shadow: 0 0 16px rgba(34,197,94,0.3); transform: translateY(-2px); }
.att-btn-reset {
    background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(185,28,28,0.25));
    color: #f87171; border: 1px solid rgba(239,68,68,0.3);
}
.att-btn-reset:hover { box-shadow: 0 0 12px rgba(239,68,68,0.2); transform: translateY(-2px); }

/* === CUSTOM FIELDS MANAGER === */
.att-custom-fields-section {
    margin-top: 16px; padding-top: 16px;
    border-top: 1px dashed rgba(0,242,255,0.15);
}
.att-custom-field-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
    animation: attFadeIn 0.3s ease;
}
.att-custom-field-row .att-form-input { flex: 1; }
.att-remove-field-btn {
    width: 32px; height: 32px; border-radius: 8px; border: none;
    background: rgba(239,68,68,0.15); color: #f87171; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; transition: all 0.2s; flex-shrink: 0;
}
.att-remove-field-btn:hover { background: rgba(239,68,68,0.3); }
.att-add-field-btn {
    width: 100%; padding: 10px; border-radius: 10px; cursor: pointer;
    background: rgba(0,242,255,0.06); border: 1px dashed rgba(0,242,255,0.25);
    color: rgba(0,242,255,0.7); font-size: 0.82rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: all 0.2s;
}
.att-add-field-btn:hover { background: rgba(0,242,255,0.12); border-color: rgba(0,242,255,0.4); color: var(--solvix-cyan, #00f2ff); }

/* === DEPARTMENT MANAGER (Admin) === */
.att-dept-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att-dept-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600;
    background: rgba(0,242,255,0.08); color: var(--solvix-cyan, #00f2ff);
    border: 1px solid rgba(0,242,255,0.2);
}
.att-dept-remove {
    width: 16px; height: 16px; border-radius: 50%; border: none;
    background: rgba(239,68,68,0.3); color: #fff; font-size: 10px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; line-height: 1;
}
.att-dept-remove:hover { background: rgba(239,68,68,0.6); }

/* === SELECT EMPLOYEE (Home) === */
.att-select-employee { margin-bottom: 20px; }
.att-select-employee label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.att-select-employee select {
    width: 100%; padding: 12px 14px; font-size: 0.95rem;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(0,242,255,0.15);
    border-radius: 10px; color: #e2e8f0; outline: none; transition: all 0.3s;
}
.att-select-employee select:focus { border-color: rgba(0,242,255,0.5); box-shadow: 0 0 0 3px rgba(0,242,255,0.08); }
.att-select-employee select option { background: #0f172a; color: #e2e8f0; }

/* === HOME LAYOUT: checkin + status side by side === */
.att-home-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .att-home-grid { grid-template-columns: 1fr; } }

/* === NOTIFICATION === */
.att-notification {
    position: fixed; bottom: 25px; right: 25px; padding: 16px 22px;
    background: rgba(15,23,42,0.95); backdrop-filter: blur(12px);
    border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    display: flex; align-items: center; gap: 12px;
    transform: translateY(100px); opacity: 0; transition: all 0.5s ease;
    z-index: 9999; border-left: 4px solid var(--solvix-cyan, #00f2ff);
    max-width: 400px; color: #e2e8f0;
}
.att-notification.show { transform: translateY(0); opacity: 1; }
.att-notification.success { border-left-color: #22c55e; }
.att-notification.warning { border-left-color: #f59e0b; }
.att-notification.error { border-left-color: #ef4444; }
.att-notification i { font-size: 1.3rem; }
.att-notification.success i { color: #4ade80; }
.att-notification.warning i { color: #fbbf24; }
.att-notification.error i { color: #f87171; }
.att-notif-content strong { display: block; font-size: 0.88rem; margin-bottom: 2px; }
.att-notif-content p { margin: 0; font-size: 0.78rem; color: rgba(255,255,255,0.6); }

/* === BREAK PULSE ANIMATION === */
@keyframes attPulseBreak {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(245,158,11,0.5); }
    50% { opacity: 0.4; box-shadow: 0 0 16px rgba(245,158,11,0.8); }
}

/* === BOTÓN HISTORIAL === */
.att-emp-btn-history {
    background: rgba(139,92,246,0.1); color: #a78bfa;
    border: 1px solid rgba(139,92,246,0.2);
}
.att-emp-btn-history:hover { background: rgba(139,92,246,0.25); box-shadow: 0 0 10px rgba(139,92,246,0.2); }

/* === MODAL EDICIÓN EMPLEADO === */
.att-modal-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.35s ease;
    padding: 20px; box-sizing: border-box;
}
.att-modal-overlay.show { opacity: 1; }
.att-modal-content {
    background: rgba(15,23,42,0.97); backdrop-filter: blur(16px);
    border: 1px solid rgba(0,242,255,0.2); border-radius: 18px;
    padding: 28px; width: 100%; max-width: 680px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(0,242,255,0.08);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s ease;
    max-height: 90vh; overflow-y: auto;
}
.att-modal-overlay.show .att-modal-content {
    transform: scale(1) translateY(0);
}
.att-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; padding-bottom: 14px;
    border-bottom: 1px solid rgba(0,242,255,0.12);
}
.att-modal-header h3 {
    margin: 0; font-size: 1.15rem; font-weight: 700;
    color: #e2e8f0; display: flex; align-items: center; gap: 10px;
}
.att-modal-close {
    width: 36px; height: 36px; border-radius: 10px; border: none;
    background: rgba(239,68,68,0.12); color: #f87171;
    font-size: 1.4rem; cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: all 0.2s;
}
.att-modal-close:hover { background: rgba(239,68,68,0.3); transform: scale(1.1); }

/* Scrollbar dentro del modal */
.att-modal-content::-webkit-scrollbar { width: 6px; }
.att-modal-content::-webkit-scrollbar-track { background: transparent; }
.att-modal-content::-webkit-scrollbar-thumb {
    background: rgba(0,242,255,0.2); border-radius: 3px;
}
.att-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0,242,255,0.4);
}
/* === SELECTOR DE VISTAS (Admin) === */
.att-view-toggle {
    display: flex; background: rgba(0,0,0,0.4); border-radius: 8px; padding: 2px;
    border: 1px solid rgba(0,242,255,0.1);
}
.att-view-btn {
    width: 36px; height: 32px; border: none; background: transparent;
    color: rgba(255,255,255,0.4); cursor: pointer; border-radius: 6px;
    transition: all 0.3s; font-size: 0.9rem;
}
.att-view-btn.active {
    background: rgba(0,242,255,0.15); color: var(--solvix-cyan, #00f2ff);
    box-shadow: 0 0 8px rgba(0,242,255,0.1);
}

.att-view-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.att-view-opt {
    background: rgba(0,0,0,0.25); border: 1px solid rgba(0,242,255,0.1);
    border-radius: 12px; padding: 16px; text-align: center; cursor: pointer;
    transition: all 0.3s; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.att-view-opt i { font-size: 1.5rem; color: rgba(255,255,255,0.3); transition: all 0.3s; }
.att-view-opt span { font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.5); }
.att-view-opt:hover { border-color: rgba(0,242,255,0.3); background: rgba(0,242,255,0.05); }
.att-view-opt.active {
    border-color: rgba(0,242,255,0.5); background: rgba(0,242,255,0.1);
    box-shadow: 0 0 15px rgba(0,242,255,0.1);
}
.att-view-opt.active i { color: var(--solvix-cyan, #00f2ff); }
.att-view-opt.active span { color: #fff; }

/* === GRID DE MONITOREO EN VIVO === */
.att-admin-monitor-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.att-monitor-card {
    background: rgba(15,23,42,0.6); border-radius: 14px; padding: 16px;
    border: 1px solid rgba(255,255,255,0.05); border-top: 3px solid rgba(255,255,255,0.1);
    transition: all 0.3s; position: relative; overflow: hidden;
}
.att-monitor-card.working {
    border-top-color: var(--solvix-cyan, #00f2ff);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.att-mon-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.att-mon-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.05); display: flex; align-items: center;
    justify-content: center; font-weight: 800; font-size: 0.85rem;
    color: #fff; border: 1px solid rgba(255,255,255,0.1);
}
.att-mon-info { flex: 1; min-width: 0; }
.att-mon-name { font-size: 0.9rem; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-mon-sub { font-size: 0.72rem; color: rgba(255,255,255,0.4); }

.att-mon-body {
    text-align: center; background: rgba(0,0,0,0.2); border-radius: 10px;
    padding: 12px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,0.03);
}
.att-mon-timer {
    font-size: 1.5rem; font-weight: 900; font-family: 'Courier New', monospace;
    color: var(--solvix-cyan, #00f2ff); margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(0,242,255,0.2);
}
.att-mon-stats { display: flex; justify-content: space-between; font-size: 0.7rem; color: rgba(255,255,255,0.4); }

.att-mon-footer { display: flex; gap: 6px; flex-wrap: wrap; }
