/* ================================================================
   Softwave ERP – Additional Utilities & Components
================================================================ */

/* ── Mark Attendance Button ── */
.attendance-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  color: #fff;
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(52, 51, 128, 0.2);
}
.attendance-hero::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.attendance-hero::after {
  content: '';
  position: absolute; bottom: -60px; left: -30px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.mark-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: var(--primary);
  border: none;
  padding: 16px 40px;
  border-radius: 100px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 20px;
  transition: var(--transition);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
  text-decoration: none;
}
.mark-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  color: var(--primary-dark);
}
.already-marked {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 20px;
}

/* ── Top Employees List ── */
.employee-rank {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.employee-rank:last-child { border-bottom: none; }
.rank-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700; font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rank-name { flex: 1; font-weight: 600; font-size: 0.875rem; }
.rank-amount { font-weight: 700; color: var(--success); font-size: 0.875rem; }

/* ── Login Page Illustration ── */
.login-illustration {
  position: absolute;
  top: 20px; left: 20px;
  opacity: 0.5;
  pointer-events: none;
}

/* ── Modal ── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.25s ease;
  margin: 20px;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  background: none; border: none;
  font-size: 1.3rem; cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── Today Status Widget ── */
.today-status {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 24px;
  background: var(--bg-hover);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.status-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.status-dot.present  { background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,0.15); }
.status-dot.late     { background: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,0.15); }
.status-dot.absent   { background: var(--danger); box-shadow: 0 0 0 4px rgba(239,68,68,0.15); }
.status-dot.holiday  { background: var(--accent); box-shadow: 0 0 0 4px rgba(139,92,246,0.15); }
.status-dot.leave    { background: var(--info); box-shadow: 0 0 0 4px rgba(59,130,246,0.15); }
.status-dot.none     { background: var(--text-muted); }

/* ── Upcoming Holidays Widget ── */
.holiday-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.holiday-item:last-child { border-bottom: none; }
.holiday-date-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800; font-size: 0.75rem;
  padding: 6px 14px; border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.holiday-name { font-weight: 600; font-size: 0.875rem; }
.holiday-type { font-size: 0.72rem; color: var(--text-secondary); }

/* ── Animated Number ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-value { animation: countUp 0.5s ease both; }

/* ── Sidebar active indicator pulse ── */
.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.4));
}

/* ── Topbar notification / action icons ── */
.topbar-icon-btn {
  width: 36px; height: 36px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 1.05rem;
}
.topbar-icon-btn:hover { background: var(--primary-light); color: var(--primary); }

/* ── Quick action cards ── */
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: var(--transition);
  color: var(--text-primary);
  font-weight: 600; font-size: 0.82rem;
  box-shadow: var(--shadow-sm);
}
.quick-action:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-action-icon { font-size: 1.6rem; margin-bottom: 2px; }

/* ── Data highlight ── */
.highlight-row { background: #FFFBEB !important; }
/* ── Window Closed Message ── */
.window-closed-msg {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  margin-top: 16px;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.window-closed-msg i {
  font-size: 1.5rem;
  opacity: 0.9;
}
.window-closed-msg strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.window-closed-msg p {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* ── Attendance Status Card State Classes ── */
.attendance-hero.status-present {
  background: #dcfce7 !important; /* Light Green */
  color: #166534 !important; /* Dark Green */
  box-shadow: 0 10px 30px rgba(22, 101, 52, 0.1);
  border: 1px solid rgba(22, 101, 52, 0.2);
}
.attendance-hero.status-late {
  background: #ffedd5 !important; /* Light Orange */
  color: #9a3412 !important; /* Dark Orange */
  box-shadow: 0 10px 30px rgba(154, 52, 18, 0.1);
  border: 1px solid rgba(154, 52, 18, 0.2);
}
.attendance-hero.status-absent {
  background: #fee2e2 !important; /* Light Red */
  color: #991b1b !important; /* Dark Red */
  box-shadow: 0 10px 30px rgba(153, 27, 27, 0.1);
  border: 1px solid rgba(153, 27, 27, 0.2);
}
.attendance-hero[class*="status-"] .mark-btn,
.attendance-hero[class*="status-"] .window-closed-msg { display: none; }
.attendance-hero[class*="status-"] .status-display { padding: 10px 0; }
.attendance-hero[class*="status-"] i { opacity: 0.9; color: inherit !important; }
.attendance-hero[class*="status-"] .already-marked {
  background: transparent !important;
  color: inherit !important;
  border: 1.5px solid currentColor !important;
}
.attendance-hero[class*="status-"]::before,
.attendance-hero[class*="status-"]::after { background: currentColor; opacity: 0.05; }

