/* ══════════════════════════════════════════════════════════════════════════
   DATAMATIUM - PANEL DE EMPLEADOS CSS
   Estilos modernos y profesionales
══════════════════════════════════════════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  min-height: 100vh;
  font-family: 'DM Sans', sans-serif;
}

/* ══════════════════════════════════════════════════════════
   LOGIN CONTAINER
══════════════════════════════════════════════════════════ */
.login-container {
  max-width: 450px;
  margin: 60px auto;
  padding: 50px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e63946, #125e90);
}

.login-container h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 32px;
  color: #0f2040;
  margin-bottom: 12px;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-container p {
  text-align: center;
  color: #4a5e7a;
  margin-bottom: 30px;
  font-size: 14px;
  line-height: 1.5;
}

/* ── FORM GROUPS ── */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #0f2040;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-container input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e5f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #f8f9fc;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-container input::placeholder {
  color: #b0b8c8;
}

.login-container input:focus {
  outline: none;
  border-color: #125e90;
  background: white;
  box-shadow: 0 0 0 4px rgba(18, 94, 144, 0.1);
}

/* ── BUTTON ── */
.login-container button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #e63946, #d91f2d);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
}

.login-container button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(230, 57, 70, 0.4);
}

.login-container button:active {
  transform: translateY(0);
}

/* ── ERROR MESSAGE ── */
#error {
  color: #e63946;
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  min-height: 20px;
  font-weight: 500;
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD HEADER
══════════════════════════════════════════════════════════ */
.dashboard-header {
  display: none;
  background: linear-gradient(135deg, #0f2040, #1a3a5c);
  padding: 24px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e63946;
}

.dashboard-header.visible {
  display: flex;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.dashboard-header h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px;
  color: white;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ── LOGOUT BUTTON ── */
.logout-btn {
  padding: 12px 28px;
  background: linear-gradient(135deg, #e63946, #d91f2d);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.logout-btn:active {
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD CONTENT
══════════════════════════════════════════════════════════ */
.dashboard-content {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
}

.dashboard-content.visible {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dashboard-content h2 {
  font-family: 'Rajdhani', sans-serif;
  color: #0f2040;
  margin-bottom: 24px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ══════════════════════════════════════════════════════════
   STATS GRID
══════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background: white;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-top: 4px solid #125e90;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(18, 94, 144, 0.05), transparent);
  border-radius: 50%;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-top-color: #e63946;
}

.stat-card h3 {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #4a5e7a;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.stat-card .value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 36px;
  color: #0f2040;
  font-weight: 700;
  position: relative;
  z-index: 1;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════
   ATTENDANCE TABLE
══════════════════════════════════════════════════════════ */
.attendance-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.attendance-table thead {
  background: linear-gradient(135deg, #0f2040, #1a3a5c);
}

.attendance-table th {
  color: white;
  padding: 18px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 2px solid #e63946;
}

.attendance-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
  color: #0d1b30;
}

.attendance-table tbody tr {
  transition: all 0.2s;
}

.attendance-table tbody tr:hover {
  background: #f8f9fc;
  transform: scale(1.01);
}

.attendance-table tbody tr:last-child td {
  border-bottom: none;
}

/* ══════════════════════════════════════════════════════════
   NO DATA MESSAGE
══════════════════════════════════════════════════════════ */
.no-data {
  text-align: center;
  padding: 60px 40px;
  color: #4a5e7a;
  font-size: 16px;
}

.no-data::before {
  content: '📋';
  display: block;
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .login-container {
    margin: 40px 20px;
    padding: 40px 30px;
  }

  .dashboard-header {
    padding: 18px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .dashboard-header h1 {
    font-size: 20px;
  }

  .logout-btn {
    align-self: flex-end;
  }

  .dashboard-content {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-card .value {
    font-size: 28px;
  }

  .attendance-table th,
  .attendance-table td {
    padding: 12px;
    font-size: 12px;
  }
}