/* assets/css/style.css - HRMS India Premium Light Theme stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

html {
  font-size: 88.5%;
  zoom: 0.88;
}

:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Font size stack - compact, not bulky */
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.875rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  
  /* Color Palette - Slate / Indigo / Emerald */
  --bg-app: #f1f5f9;
  --bg-sidebar: #0f172a;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border: #e2e8f0;
  --border-focus: #cbd5e1;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #f0fdf4;
  
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  
  --info: #0284c7;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;
  
  /* Layout constraints */
  --sidebar-width: 230px;
  --header-height: 58px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  /* Shadow details */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Reset and basic setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* Layout Wrapper */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════
   PREMIUM DARK SIDEBAR
═══════════════════════════════════════════════════════ */

.app-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient( 180deg, color-mix(in srgb, var(--color-indigo) 5%, white) 0%, color-mix(in srgb, var(--color-indigo) 3%, white) 100% );;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

/* ── Logo / Brand area ── */
.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sidebar-logo-text strong {
  font-size: 13px;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.01em;
}

.sidebar-logo-text span {
  font-size: 10px;
  color: rgb(0 0 0 / 40%);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ── Scrollable nav area — hidden scrollbar ── */
.sidebar-menu {
  flex: 1;
  padding: 0px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  list-style: none;
  /* Hide scrollbar across all browsers */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE / Edge */
}
.sidebar-menu::-webkit-scrollbar {
  display: none;                  /* Chrome / Safari / Opera */
}

/* ── Section label (group header) ── */
.menu-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-state-400);
  padding: 14px 12px 4px;
  user-select: none;
}

/* ── Menu item ── */
.menu-item {
  margin-bottom: 2px;
}

.menu-item > .menu-link {
  border-radius: 8px;
  background:  white;
  box-shadow: 0 0 5px 
color-mix(in srgb, var(--color-indigo) 10%, transparent);
}

.menu-item > .menu-link > .menu-icon {
    background: color-mix(in srgb, var(--color-indigo) 12%, white);
    color: var(--color-indigo);
    border-radius: 50%;
    padding: 13px;
}

/* ── Nav link ── */
.menu-link {
  display: flex;
  align-items: center;
  color: var(--color-state-700);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px 8px 0px 0px;
  transition: background 0.18s ease, color 0.18s ease;
  gap: 7px;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.menu-link:hover {
  background: color-mix(in srgb, var(--color-indigo) 8%, white);
  color: color-mix(in srgb, var(--color-indigo) 85%, black);
  text-decoration: none;
}

/* ── Active state — left accent + highlight ── */
.menu-link.active {
  background: color-mix(in srgb, var(--color-indigo) 8%, white);
  color: color-mix(in srgb, var(--color-indigo) 85%, black);
  font-weight: 600;
}

/* 1. Apply the green indicator bar ONLY to top-level menu links */
.menu-item > .menu-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: color-mix(in srgb, var(--color-indigo) 85%, black);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px color-mix(in srgb, var(--color-indigo) 60%, transparent);
}

.menu-item > .menu-link.active > .menu-icon {
    background: var(--color-indigo);
    color: white;
	border-radius: 50%;
    padding: 13px;
}


/* 2. Optional: Tree-view style for the submenu container */
.submenu {
  position: relative;
}

/* Vertical line running down the submenu list */
.submenu::before {
  content: '';
  position: absolute;
  left: 23px; /* Adjust this value based on your spacing */
  top: 0;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--color-indigo) 65%, white); /* Match your theme line color */
}


.submenu-open > .menu-link > .menu-icon {
    background: var(--color-indigo);
    color: white;
	border-radius: 50%;
    padding: 13px;
}




.submenu-open > .menu-link > .menu-icon::before {
  content: '';
  position: absolute;
  left: 23px; /* Adjust this value based on your spacing */
  top: 34px;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--color-indigo) 65%, white); /* Match your theme line color */
}
/* 3. Style for active sub-links (matching the tree-node dot in your reference image) */
.submenu .sub-link.active {
  position: relative;
}

/* Small branch line pointing to the active item */
/*.submenu .sub-link::before {
  content: '';
  position: absolute;
  left: 20px; 
  top: 48%;
  width: 10px;
  height: 1.2px;
  background: color-mix(in srgb, var(--color-indigo) 85%, black); 
}*/

/* The dot element */
.submenu .sub-link::after {
  content: '';
  position: absolute;
  left: 19.2px; /* Position right after the branch line */
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border: 1px solid color-mix(in srgb, var(--color-indigo) 85%, black);
  background: #f8fcf8;
  border-radius: 50%;
}

/* ── Icon wrapper ── */
.menu-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.menu-link.active .menu-icon,
.menu-link:hover  .menu-icon {
  opacity: 1;
}

/* ── Sub-item (indented links like Field Tracking, Leave Policies) ── */
.menu-link.sub-link {
  padding-left: 36px;
  font-size: 12px;
  color: rgb(0 0 0 / 80%);
}

.menu-link.sub-link:hover {
    background: color-mix(in srgb, var(--color-indigo) 8%, transparent);
    color: color-mix(in srgb, var(--color-indigo) 85%, black);
	border-radius: 0px;
}

.submenu-open > .submenu-toggle {
    background: color-mix(in srgb, var(--color-indigo) 10%, white);
	color: color-mix(in srgb, var(--color-indigo) 85%, black);
    font-weight: 600;;
	border-radius: 8px 8px 0px 0px;
	box-shadow: 0 0 5px color-mix(in srgb, var(--color-indigo) 30%, transparent);
}

.menu-link.sub-link.active {
background: color-mix(in srgb, var(--color-indigo) 8%, transparent);
color: color-mix(in srgb, var(--color-indigo) 85%, black);
    border-radius: 0px;
}

/* ── Bottom user card ── */
.sidebar-user-card {
  margin: 0 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.sidebar-user-info small {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}

/* Divider line in sidebar */
.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 6px 12px;
}

/* Main Content Area */
.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  /*display: flex;
  flex-direction: column;
  min-width: 0;*/ /* Prevents flex items from breaking layout overflow */
}

/* Top Header */
.app-header {
  height: var(--header-height);
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 9;
  box-shadow: 0 1px 0 var(--border);
}

.header-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-main);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  background-color: #f1f5f9;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
}

.user-name {
  font-size: var(--fs-sm);
  font-weight: 500;
}

.content-body {
  padding: 24px;
  flex: 1;
}

/* Typography & Headers */
h1 { font-size: var(--fs-2xl); font-weight: 700; margin-bottom: 16px; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-xl); font-weight: 600; margin-bottom: 12px; }
h3 { font-size: var(--fs-lg); font-weight: 600; margin-bottom: 8px; }
p { font-size: var(--fs-base); color: var(--text-muted); margin-bottom: 16px; }

/* Grid Layouts */
.grid {
  display: grid;
  gap: 16px;
 /* margin-bottom: 24px;*/
}

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .grid-cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-5, .grid-cols-6 {
    grid-template-columns: 1fr;
  }
}


/* Card Components - Premium Flat Light Style */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Stats Card details */
.stat-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.stat-desc {
  font-size: var(--fs-xs);
  color: var(--text-light);
}

/* Table Design - Sleek and compact */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  margin-bottom: 20px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--fs-sm);
}

.table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 14px;
/*border-bottom: 1px solid var(--border);*/
  border: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
/*border-bottom: 1px solid var(--border);*/
  border: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background-color: #fafafa;
}

/* Form Styling - Clean and compact */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  font-size: var(--fs-sm);
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
  color: var(--text-light);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: var(--fs-sm);
  font-weight: 500;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 6px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.btn-secondary {
  background-color: #ffffff;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: var(--border-focus);
  text-decoration: none;
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #b91c1c;
  text-decoration: none;
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #047857;
  text-decoration: none;
}

.btn-sm {
  padding: 4px 8px;
  font-size: var(--fs-xs);
}

/* Badges - compact status tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: var(--fs-xs);
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid transparent;
}

.badge-success {
  background-color: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.badge-warning {
  background-color: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
}

.badge-danger {
  background-color: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.badge-info {
  background-color: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info);
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: var(--fs-sm);
  border: 1px solid transparent;
}

.alert-success {
  background-color: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.alert-danger {
  background-color: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.alert-warning {
  background-color: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
}

.alert-info {
  background-color: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info);
}

/* Page Headers */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-title-area {
  display: flex;
  flex-direction: column;
}

.page-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.page-subtitle {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Main content inner wrapper used in newer pages */
.main-content {
  padding: 0;
}

/* Page header actions group */
.header-actions, .page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Data table — compact premium table used across new modules */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.data-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover  { background: #fafafa; }



/* Detail fields for 360 profile */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: var(--fs-xs);
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
}

.detail-value {
  font-size: var(--fs-sm);
  color: var(--text-main);
  font-weight: 600;
  margin-top: 2px;
}

/* Tab Layouts */
.tabs-container {
  margin-bottom: 20px;
}


.tab-btn.active {
    color: #fff;
    background: linear-gradient(
        to right,
        var(--color-indigo),
        var(--color-indigo-700)
    );
    box-shadow: 0 1px 2px 0 color-mix(
        in srgb,
        var(--color-indigo) 20%,
        transparent
    );
}

.tab-btn:not(.active) {
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.tab-btn:not(.active):hover {
    background: #f8fafc;
}


/*.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  list-style: none;
}

.tab-btn {
  padding: 8px 16px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}*/

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Printing styles for payslips */
@media print {
  body {
    background-color: #ffffff;
    color: #000000;
    font-size: 10pt;
  }
  .app-sidebar, .app-header, .btn, .no-print {
    display: none !important;
  }
  .app-main {
    margin-left: 0 !important;
  }
  .content-body {
    padding: 0 !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .print-only-border {
    border: 1px solid #000000 !important;
    padding: 15px !important;
    border-radius: 4px !important;
  }
}

/* ═══════════════════════════════════════════════════════
   STATUTORY FIELD VALIDATION STATES
═══════════════════════════════════════════════════════ */

.form-control.is-valid {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2310b981' d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
}

.form-control.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ef4444' d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath fill='%23ef4444' d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
}

.field-hint {
  font-size: 11px;
  margin-top: 4px;
  min-height: 16px;
  transition: all 0.2s;
}

/* ═══════════════════════════════════════════════════════
   DOCUMENT UPLOAD ZONE
═══════════════════════════════════════════════════════ */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: #f0f0ff;
}
.upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-zone .upload-icon { font-size: 28px; margin-bottom: 8px; }
.upload-zone .upload-label { font-size: 13px; font-weight: 600; color: var(--text); }
.upload-zone .upload-hint  { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════
   DOCUMENT GRID
═══════════════════════════════════════════════════════ */

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.doc-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  background: white;
  transition: box-shadow 0.15s;
}
.doc-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.doc-card .doc-icon { font-size: 32px; margin-bottom: 8px; }
.doc-card .doc-name { font-size: 11px; color: var(--text); font-weight: 600; word-break: break-all; }
.doc-card .doc-size { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.doc-card .doc-actions { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }

/* ═══════════════════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════════════════ */

.section-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 6px;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════
   ID CARD STYLES
═══════════════════════════════════════════════════════ */

.id-card-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  justify-content: center;
}

.id-card-container {
  width: 54mm;
  height: 86mm;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow: hidden;
  position: relative;
  font-family: var(--font-sans);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  /* CR80 Standard */
}

/* Print Specific Rules for ID Cards */
@media print {
  @page {
    size: A4;
    margin: 10mm;
  }
  body, html {
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .id-card-wrapper {
    padding: 0;
    gap: 15px; /* Adjust gap for printing */
    justify-content: flex-start;
  }
  .id-card-container {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .no-print {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════
   100% MOBILE RESPONSIVE & TOUCH UI ENHANCEMENTS
═══════════════════════════════════════════════════════ */

.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px;
  margin-right: 10px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1030;
}

@media (max-width: 768px) {
  .mobile-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
  .app-sidebar.show-mobile {
    transform: translateX(0);
  }
  .sidebar-overlay.active {
    display: block;
  }
  .app-main {
    margin-left: 0 !important;
    /*width: 100% !important;*/
  }
  .app-header {
    padding: 0 14px;
    height: 56px;
  }
  .content-body {
    padding: 16px 12px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-title-area {
    width: 100%;
  }
  .page-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .tab-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin-bottom: 14px;
  }
  .tab-nav::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 13px;
  }
  /*.grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-5, .grid-cols-6 {
    grid-template-columns: 1fr !important;
  }*/
  .modal-content {
    width: 95% !important;
    max-width: 100% !important;
    margin: 10px !important;
    max-height: 90vh;
    overflow-y: auto;
    padding: 16px;
  }
  .data-table, .table {
    font-size: 12px;
  }
  .data-table th, .data-table td, .table th, .table td {
    padding: 8px 10px;
  }
}

@media (max-width: 991px) {
  .mobile-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    /*box-shadow: 4px 0 24px rgba(0,0,0,0.3);*/
  }
  .app-sidebar.show-mobile {
    transform: translateX(0);
  }
  .sidebar-overlay.active {
    display: block;
  }
  .app-main {
    margin-left: 0 !important;
    /*width: 100% !important;*/
  }
  .app-header {
    padding: 0 14px;
    height: 56px;
  }
  .content-body {
    padding: 16px 12px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-title-area {
    width: 100%;
  }
  .page-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .tab-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin-bottom: 14px;
  }
  .tab-nav::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 13px;
  }
  .data-table, .table {
    font-size: 12px;
  }
  .data-table th, .data-table td, .table th, .table td {
    padding: 8px 10px;
  }
}
/* Universal Modal System */
.modal, .modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active, .modal-overlay.active {
  display: flex !important;
}

.modal-content, .modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border, #e2e8f0);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.modal-title, .modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main, #1e293b);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #ef4444;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════
   PREMIUM CORPORATE SAAS DASHBOARD STYLES (COMPACT 100% SCALE)
═══════════════════════════════════════════════════════ */

/* Stat Card Interactive Styling - Compact & Slim */
.stat-card-interactive {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.stat-card-interactive::after {
  content: '';
  position: absolute;
  top: 0; right: 0; width: 3px; height: 100%;
  background: transparent;
  transition: background 0.2s ease;
  border-radius: 0 12px 12px 0;
}

.stat-card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.stat-card-interactive.stat-blue:hover { border-color: #93c5fd; }
.stat-card-interactive.stat-blue:hover::after { background: #3b82f6; }

.stat-card-interactive.stat-emerald:hover { border-color: #6ee7b7; }
.stat-card-interactive.stat-emerald:hover::after { background: #10b981; }

.stat-card-interactive.stat-amber:hover { border-color: #fde68a; }
.stat-card-interactive.stat-amber:hover::after { background: #f59e0b; }

.stat-card-interactive.stat-rose:hover { border-color: #fca5a5; }
.stat-card-interactive.stat-rose:hover::after { background: #f43f5e; }

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.stat-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.stat-card-interactive:hover .stat-icon-wrapper {
  transform: scale(1.06);
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-emerald { background: #ecfdf5; color: #059669; }
.icon-amber { background: #fffbeb; color: #d97706; }
.icon-rose { background: #fff1f2; color: #e11d48; }

.stat-click-hint {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.75;
  transition: all 0.2s ease;
}

.stat-card-interactive:hover .stat-click-hint {
  opacity: 1;
  color: var(--primary);
  transform: translateX(2px);
}

.stat-card-body {
  display: flex;
  flex-direction: column;
}

.stat-title-text {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-state-400);
  margin-bottom: 2px;
}

.stat-number-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.stat-sub-text {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Top Payroll Alert Banner - Compact Strip */
.payroll-top-alert {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.05);
  flex-wrap: nowrap;
}

.payroll-top-alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payroll-top-alert-icon {
  width: 28px;
  height: 28px;
  background: #fef3c7;
  color: #d97706;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.payroll-top-alert-text {
  font-size: 12px;
  color: #78350f;
  line-height: 1.3;
}

.payroll-top-alert-text strong {
  color: #92400e;
  font-weight: 700;
}

/* Slim Button Pill Switch for Auto Sync */
.auto-sync-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.auto-sync-pill-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.auto-sync-pill-btn input[type="checkbox"] {
  display: none;
}

.auto-sync-toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.25s ease;
}

.auto-sync-pill-btn.active {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.auto-sync-pill-btn.active .auto-sync-toggle-dot {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
  animation: pulse 1.5s infinite;
}

@media (max-width: 640px) {
  .payroll-top-alert {
    flex-direction: column;
    align-items: flex-start;
  }
  .payroll-top-alert .btn {
    width: 100%;
  }
}

/* Mobile Responsive Navbar & Header Optimizations */
@media (max-width: 768px) {
  .app-header {
    height: 48px !important;
    padding: 0 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }
  .header-title {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-user {
    gap: 5px !important;
  }
  .branch-switcher-container select {
    padding: 2px 4px !important;
    font-size: 10px !important;
    height: 26px !important;
    max-width: 90px !important;
  }
  .user-badge {
    display: none !important;
  }
  .user-name {
    font-size: 10.5px !important;
    max-width: 75px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .content-body {
    padding: 10px !important;
  }
  .ess-mobile-header {
    margin-bottom: 10px !important;
    padding: 8px 12px !important;
  }
}


