:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-light: #f1f5f9;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --pending: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--text-main);
  min-height: 100vh;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.02);
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 48px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.nav-menu {
  list-style: none;
  flex-grow: 1;
}

.nav-item {
  padding: 14px 16px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.nav-item:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.nav-item.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Sidebar Profile UI Enhancements */
#user-info-area {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

#display-user-name {
  font-size: 1.15rem !important; /* Larger font as requested */
  font-weight: 800 !important;
  color: var(--text-main);
  margin-bottom: 4px;
}

#display-user-id {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.8;
}

#display-hire-date {
  font-size: 0.9rem !important; /* Larger font as requested */
  font-weight: 600 !important;
  color: var(--primary-color) !important;
  margin-top: 8px;
}

/* Main Content */
.main-content {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
}

.view { display: none; }
.view.active { display: block; }

/* Grid Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

h2, h3 {
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.metric-card {
  background: white;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.04);
}

.metric-label { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }
.metric-value { font-size: 2.2rem; font-weight: 800; margin-top: 8px; color: var(--primary-color); }

/* Table Style */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th, td {
  padding: 18px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th { 
  color: var(--text-muted); 
  font-weight: 600; 
  font-size: 0.85rem;
  background: #f8fafc;
}

td { font-size: 0.95rem; }

/* Calendar */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.calendar-day {
  background: white;
  min-height: 120px;
  padding: 12px;
  position: relative;
  transition: background 0.2s;
}

.calendar-day:hover { background: #f8fafc; }

.calendar-header {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.day-num { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

.leave-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 8px;
  margin-top: 6px;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Modal/Form */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-card {
  background: white;
  padding: 48px;
  border-radius: 24px;
  width: 440px;
  border: 1px solid var(--border-color);
  box-shadow: 0 40px 60px rgba(0,0,0,0.1);
}

.input-group { margin-bottom: 24px; }
.input-group label { display: block; margin-bottom: 10px; font-size: 0.95rem; font-weight: 600; }
.input-group input, .input-group select, .input-group textarea {
  width: 100%;
  padding: 14px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  outline: none;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.input-group input:focus, .input-group select:focus {
  border-color: var(--primary-color);
}

.btn {
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary { background: var(--primary-color); color: white; width: 100%; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }

.btn-outline { 
  background: white; 
  color: var(--text-main); 
  border: 1.5px solid var(--border-color); 
}
.btn-outline:hover { background: #f8fafc; border-color: var(--text-muted); }

/* Status Badges */
.status-badge {
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-resigned { background: #f1f5f9; color: #475569; }

/* Sub-Tabs */
.tab-container {
  display: flex;
  gap: 16px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 32px;
}

.tab-item {
  padding: 12px 24px;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
  font-weight: 600;
  margin-bottom: -2px;
}

.tab-item:hover { color: var(--primary-color); }
.tab-item.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.sub-view { display: none; }
.sub-view.active { display: block; }

@media print {
  .sidebar, .btn, .no-print, .tab-container { display: none !important; }
  .main-content { padding: 0; }
  .card { border: none; }
}

/* Custom for code/hashes */
code {
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  color: #334155;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.9rem;
}
