/* ========================================================
   Employee Management System (EMS) - Modern Stylesheet
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
:root {
  /* Primary - Red */
  --primary-color: #dc2626;
  --primary-hover: #b91c1c;
  --primary-light: #fef2f2;

  /* Sidebar - Dark Green */
  --sidebar-bg: #052e16;
  --sidebar-hover: #14532d;
  --sidebar-active: #16a34a;
  --sidebar-text: #bbf7d0;

  /* Backgrounds */
  --body-bg: #f8fafc;
  --card-bg: #ffffff;

  /* Borders & Text */
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;

  /* Status Colors */
  --success-color: #16a34a;
  --warning-color: #f59e0b;
  --danger-color: #dc2626;
  --info-color: #0891b2;

  /* UI Styling */
  --radius: 12px;
  --transition: all 0.2s ease-in-out;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Layout */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  z-index: 1040;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand i {
  color: var(--sidebar-active);
  font-size: 1.5rem;
}

.sidebar-menu {
  list-style: none;
  padding: 1rem 0.75rem;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-menu .menu-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0.75rem 0.75rem 0.25rem;
  font-weight: 700;
}

.sidebar-menu .nav-item {
  margin-bottom: 0.25rem;
}

.sidebar-menu .nav-link {
  color: var(--sidebar-text);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-menu .nav-link i {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
}

.sidebar-menu .nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-menu .nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Navbar */
.top-navbar {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

/* Content Area */
.page-body {
  padding: 1.75rem;
  flex-grow: 1;
}

/* Cards & Widgets */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
  background: var(--card-bg);
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

/* Stat Cards */
.stat-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border-color);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.25rem;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

/* Tables */
.table-custom {
  vertical-align: middle;
}

.table-custom thead th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
}

.table-custom tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

/* Status Badges */
.badge-status {
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.status-present { background: #d1fae5; color: #065f46; }
.status-late { background: #fef3c7; color: #92400e; }
.status-half_day { background: #fee2e2; color: #991b1b; }
.status-absent { background: #f3f4f6; color: #374151; }
.status-on_leave { background: #e0e7ff; color: #3730a3; }
.status-checked_in { background: #dbeafe; color: #1e40af; }

.priority-urgent { background: #fee2e2; color: #991b1b; font-weight: 700; }
.priority-high { background: #ffedd5; color: #9a3412; }
.priority-medium { background: #e0f2fe; color: #0369a1; }
.priority-low { background: #f3f4f6; color: #4b5563; }

.task-pending { background: #fef3c7; color: #92400e; }
.task-in_progress { background: #dbeafe; color: #1e40af; }
.task-submitted { background: #e0e7ff; color: #3730a3; }
.task-completed { background: #d1fae5; color: #065f46; }
.task-rejected { background: #fee2e2; color: #991b1b; }

/* Kiosk Attendance Page */
.kiosk-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top right, #1e3a8a, #0f172a);
  padding: 1.5rem;
}

.kiosk-card {
  width: 100%;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.kiosk-header {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
}

.kiosk-clock {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-family: monospace;
}

.kiosk-date {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* User Avatar Bubble */
.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
  border-radius: 8px;
  padding: 0.55rem 1.15rem;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -260px;
  }
  .sidebar.show {
    left: 0;
  }
}
