:root {
  --primary: #1e3a8a;
  --primary-hover: #1e40af;
  --secondary: #0f172a;
  --accent: #3b82f6;
  --surface: #ffffff;
  --background: #f8fafc;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --sidebar-width: 270px;
  --sidebar-bg: #0b132b;
  --sidebar-active: #1c2541;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  margin: 0;
  padding: 0;
}

/* Application Layout Structure */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.25s ease-in-out;
  z-index: 1000;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-brand i {
  color: var(--accent);
  font-size: 1.5rem;
}

.sidebar-menu {
  list-style: none;
  padding: 1rem 0.5rem;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.menu-header {
  padding: 0.75rem 0.75rem 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  font-weight: 700;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.menu-item a:hover, .menu-item.active a {
  background: var(--sidebar-active);
  color: #ffffff;
}

.menu-item a i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

/* Main Content Area */
.app-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Navigation Bar */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-clock-badge {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: 30px;
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dashboard Metric Cards */
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

/* Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-present { background: #dcfce7; color: #15803d; }
.badge-late { background: #fef3c7; color: #b45309; }
.badge-absent { background: #fee2e2; color: #b91c1c; }
.badge-leave { background: #e0e7ff; color: #4338ca; }
.badge-early { background: #ffedd5; color: #c2410c; }