@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   AL FATAH HRM - MODERN ENTERPRISE DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Brand Palette - Deep Royal & Electric Indigo */
  --color-primary: #1e3a8a;          /* Deep Royal Blue */
  --color-primary-light: #2563eb;    /* Vibrant Sapphire */
  --color-primary-hover: #1d4ed8;
  --color-primary-active: #1e40af;
  --color-primary-subtle: #eff6ff;

  --color-accent-emerald: #059669;   /* Success / Present */
  --color-accent-emerald-light: #10b981;
  --color-accent-emerald-subtle: #ecfdf5;

  --color-accent-amber: #d97706;     /* Warning / Late */
  --color-accent-amber-light: #FCAF19;
  --color-accent-amber-subtle: #fffbeb;

  --color-accent-rose: #e11d48;      /* Danger / Absent / Rejected */
  --color-accent-rose-light: #f43f5e;
  --color-accent-rose-subtle: #fff1f2;

  --color-accent-purple: #7c3aed;    /* Leaves / Special */
  --color-accent-purple-light: #8b5cf6;
  --color-accent-purple-subtle: #f5f3ff;

  --color-accent-cyan: #0284c7;      /* Info / Official */
  --color-accent-cyan-subtle: #f0f9ff;

  /* Surfaces & Canvas */
  --bg-app: #ffffff;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-card-hover: #f1f5f9;

  /* Sidebar Palette (Obsidian Slate Theme) */
  --bg-sidebar: #090e1a;
  --bg-sidebar-surface: #0f172a;
  --bg-sidebar-hover: rgba(255, 255, 255, 0.06);
  --bg-sidebar-active: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --border-sidebar: rgba(255, 255, 255, 0.08);

  /* Text Colors */
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;

  /* Borders & Dividers */
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #3b82f6;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 4px -1px rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.09), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 32px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.05);

  --shadow-glow-primary: 0 4px 20px rgba(37, 99, 235, 0.35);
  --shadow-glow-emerald: 0 4px 18px rgba(16, 185, 129, 0.3);

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body, button, input, select, textarea {
  font-family: var(--font-sans);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.font-mono {
  font-family: var(--font-mono) !important;
  letter-spacing: -0.02em;
}

.font-semibold {
  font-weight: 600 !important;
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */

.app-container {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-app);
  position: relative;
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 190;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.sidebar-backdrop.backdrop-open {
  display: block;
  opacity: 1;
}

/* ==========================================================================
   SIDEBAR NAVIGATION - ESS PORTAL WHITE THEME (Screenshot Exact Match)
   ========================================================================== */
.app-sidebar {
  width: 260px;
  background: #ffffff;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 10px rgba(15, 23, 42, 0.03);
  z-index: 200;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: transform var(--transition-normal);
}

/* Sidebar Brand Header */
.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.sidebar-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand-icon {
  width: 38px;
  height: 38px;
  background: #0f172a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
  position: relative;
  overflow: hidden;
}

.sidebar-brand-icon svg,
.sidebar-brand-icon i {
  color: #38bdf8;
  font-size: 1.15rem;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-text h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
  line-height: 1.25;
  margin: 0;
}

.sidebar-portal-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-bc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.bc-dot-pulse {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Sidebar Nav Items */
.sidebar-nav {
  padding: 18px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.08em;
  padding: 10px 12px 4px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: #334155;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 8px;
  position: relative;
  transition: all var(--transition-fast);
}

.nav-item-link .nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #64748b;
  background: transparent;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.nav-item-link .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-link:hover {
  background: #f8fafc;
  color: #0f172a;
}

.nav-item-link:hover .nav-icon {
  color: #0f172a;
}

/* THE EXACT GOLDEN AMBER ACTIVE PILL FROM SCREENSHOT */
.nav-item-link.active {
  background: #FCAF19 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(252, 175, 25, 0.25);
}

.nav-item-link.active .nav-icon {
  color: #1e293b !important;
  background: transparent;
}

.nav-item-link.active .nav-label {
  color: #1e293b !important;
  font-weight: 700;
}

.nav-active-pill {
  display: none;
}

.shortcut-link {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.shortcut-link:hover {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #b45309;
}

.shortcut-link:hover .nav-icon {
  color: #b45309;
}

/* Sidebar Footer User Card - Light Theme */
.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
}

.user-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.user-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  border: 2px solid #ffffff;
}

.avatar-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.user-empid {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.badge-bc-tag {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ==========================================================================
   APP MAIN & TOPBAR
   ========================================================================== */

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* Frosted Glass Topbar */
.app-topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.sidebar-toggle-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.company-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  box-shadow: var(--shadow-xs);
}

.company-pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.company-name-text {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.topbar-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.breadcrumb-slash {
  color: #cbd5e1;
  font-weight: 300;
}

.breadcrumb-current {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: capitalize;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: #475569;
}

.user-chip-designation {
  font-weight: 600;
  color: #334155;
}

.user-chip-divider {
  color: #94a3b8;
}

.user-chip-empid {
  color: #1e293b;
  font-weight: 700;
}

.btn-signout {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 15px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.btn-signout:hover {
  background: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   APP CONTENT VIEWPORT
   ========================================================================== */

.app-content {
  padding: 32px;
  flex: 1;

  width: 100%;

}

/* Page Header */
.page-header {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* Flash Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.alert-danger {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.alert-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.alert-message {
  flex: 1;
}

.alert-dismiss-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: opacity var(--transition-fast);
}

.alert-dismiss-btn:hover {
  opacity: 1;
}

/* ==========================================================================
   STATISTICS & METRIC CARDS
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.stat-card:hover::before {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.stat-icon-primary {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.stat-icon-success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.stat-icon-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.stat-icon-danger {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.15);
}

.stat-icon-purple {
  background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.stat-info {
  min-width: 0;
}

.stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   CARDS & CONTAINERS
   ========================================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 28px;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
  border-color: #cbd5e1;
}

.card-header {
  padding: 20px 26px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  flex-wrap: wrap;
  gap: 14px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--color-primary-light);
  font-size: 1.05rem;
}

.card-body {
  padding: 26px;
}

/* Modern Form Grids */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.form-control-readonly {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
  font-weight: 600;
}

/* ==========================================================================
   DATA TABLES
   ========================================================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.custom-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.custom-table td {
  padding: 15px 20px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background-color: rgba(248, 250, 252, 0.9);
}

.table-row-clickable {
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.table-row-clickable:hover td {
  background-color: #f1f5f9;
}

/* ==========================================================================
   BADGES & CHIPS
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge-success .badge-dot { background: #10b981; }

.badge-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge-warning .badge-dot { background: #f59e0b; }

.badge-danger {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}
.badge-danger .badge-dot { background: #f43f5e; }

.badge-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.badge-info .badge-dot { background: #3b82f6; }

.badge-purple {
  background: #faf5ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}
.badge-purple .badge-dot { background: #a855f7; }

.badge-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.badge-secondary .badge-dot { background: #94a3b8; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 13px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   EXECUTIVE PROFILE VIEWPORT
   ========================================================================== */

.profile-hero {
  background: radial-gradient(circle at 10% 20%, #1e3a8a 0%, #0f172a 90%);
  border-radius: var(--radius-xl);
  padding: 36px;
  color: #ffffff;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.profile-hero-content {
  display: flex;
  align-items: center;
  gap: 28px;
  z-index: 2;
  position: relative;
}

.profile-avatar-large {
  width: 92px;
  height: 92px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border: 4px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.profile-hero-name {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.profile-hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Detail Item Block */
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid #eef2f6;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.detail-item:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.detail-item-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-item-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

/* Quick Metrics Row for Profile */
.profile-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.metric-strip-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}

.metric-strip-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.metric-strip-info {
  min-width: 0;
}

.metric-strip-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-strip-val {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

/* ==========================================================================
   AUTH / LOGIN PAGE
   ========================================================================== */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 80% 20%, #1e3a8a 0%, #0b1329 70%, #060913 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-wrapper::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: 15%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 10;
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
  position: relative;
}

.auth-logo-badge::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 4px;
}

/* ==========================================================================
   ANIMATIONS & UTILITIES
   ========================================================================== */

.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVENESS & MEDIA QUERIES
   ========================================================================== */

@media (max-width: 992px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
  }

  .app-sidebar.sidebar-open {
    transform: translateX(0);
  }

  .sidebar-toggle-btn {
    display: inline-flex;
  }

  .topbar-breadcrumb {
    display: none;
  }

  .app-topbar {
    padding: 12px 20px;
  }

  .app-content {
    padding: 20px;
  }

  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .company-badge-pill .company-name-text {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-badge-chip {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   MODAL COMPONENT SYSTEM
   ========================================================================== */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.custom-modal-backdrop.modal-active {
  opacity: 1;
  visibility: visible;
}

.custom-modal-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal-backdrop.modal-active .custom-modal-dialog {
  transform: scale(1) translateY(0);
}

.custom-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.custom-modal-close {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.custom-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.custom-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 160px);
}

.custom-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  gap: 16px;
  flex-wrap: wrap;
}

/* Print Stylesheet for Formal Vouchers & Reports */
@media print {
  .app-sidebar,
  .app-topbar,
  .sidebar-backdrop,
  .btn,
  .page-header > div:last-child {
    display: none !important;
  }

  body, .app-container, .app-main, .app-content {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  .card {
    border: 1px solid #000000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
}


/* ==========================================================================
   Global List Table Action Buttons ("View Details")
   ========================================================================== */
.btn-action-view {
  width: 98.58999633789062px;
  height: 28px;
  opacity: 1;
  border-radius: 8px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.24px;
  text-align: center;
  vertical-align: middle;
  color: #131B2E !important;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.btn-action-view .btn-action-view-text,
.btn-action-view span {
  width: 74.58999633789062px;
  height: 16px;
  line-height: 16px;
  display: inline-block;
  text-align: center;
  vertical-align: middle;
  color: inherit;
  opacity: 1;
}

.btn-action-view.view-pending {
  background-color: #FCAF19;
  color: #131B2E !important;
}

.btn-action-view.view-pending:hover {
  background-color: #e69d27;
  color: #131B2E !important;
}

.btn-action-view.view-neutral {
  background-color: #dfe2e6;
  color: #131B2E !important;
}

.btn-action-view.view-neutral:hover {
  background-color: #cbd5e1;
  color: #131B2E !important;
}

/* ==========================================================================
   Shared Custom Date Picker (Resignation Effective Date & Movement Date)
   ========================================================================== */
.date-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.custom-date-input {
  position: relative;
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 11px 40px 11px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #15294B;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.custom-date-input:focus {
  border-color: #FCAF19;
  box-shadow: 0 0 0 3px rgba(252, 175, 25, 0.15);
}

.custom-date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 44px;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.date-input-icon {
  position: absolute;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.date-picker-icon-img {
  width: 15px;
  height: 16.66666603088379px;
  transform: rotate(0deg);
  opacity: 1;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.is-hidden {
  display: none !important;
}

/* Shared Personal Reason Toggle Switch (Create & Details Movement Forms) */
.personal-reason-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.personal-reason-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.personal-reason-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
}

.personal-reason-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.personal-reason-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.personal-reason-slider {
  position: absolute;
  inset: 0;
  background: #E2E8F0;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.personal-reason-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  top: 2px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease;
}

.personal-reason-checkbox:checked ~ .personal-reason-slider {
  background: #FCAF19;
}

.personal-reason-checkbox:checked ~ .personal-reason-slider::before {
  transform: translateX(20px);
}

.personal-reason-checkbox:focus-visible ~ .personal-reason-slider {
  box-shadow: 0 0 0 3px rgba(252, 175, 25, 0.25);
}
