/* Funzy Workers – Premium Professional Platform
   - Modern gradient-based design
   - Smooth animations & micro-interactions
   - Glass-morphism effects
   - Consistent 8px spacing system
*/

:root {
  /* Background & Surfaces */
  --bg: #f8fafc;
  --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-hover: #fefeff;
  --glass-bg: rgba(255, 255, 255, 0.85);
  
  /* Borders */
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --border-focus: rgba(37, 99, 235, 0.35);
  
  /* Text Colors */
  --text: #0f172a;
  --text-secondary: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --muted-3: #cbd5e1;

  /* Primary Brand Colors - Blue Gradient */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --primary-gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --primary-soft: rgba(37, 99, 235, 0.08);
  --primary-soft-hover: rgba(37, 99, 235, 0.14);
  
  /* Success Colors - Green */
  --success: #10b981;
  --success-dark: #059669;
  --success-light: #34d399;
  --success-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --success-soft: rgba(16, 185, 129, 0.10);
  
  /* Warning Colors - Amber */
  --warning: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #fbbf24;
  --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --warning-soft: rgba(245, 158, 11, 0.10);
  
  /* Danger Colors - Rose */
  --danger: #f43f5e;
  --danger-dark: #e11d48;
  --danger-light: #fb7185;
  --danger-gradient: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
  --danger-soft: rgba(244, 63, 94, 0.10);

  /* Shadows - Layered for depth */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.14), 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-primary: 0 8px 24px rgba(37, 99, 235, 0.22), 0 4px 12px rgba(37, 99, 235, 0.14);
  --shadow-primary-hover: 0 12px 32px rgba(37, 99, 235, 0.26), 0 6px 16px rgba(37, 99, 235, 0.16);

  /* Border Radius - Consistent system */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Spacing - 8px grid system */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Transitions - Smooth and consistent */
  --transition-fast: 0.12s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-all: all 0.2s ease;

  /* Z-index layers */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  padding: var(--space-6);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: var(--space-2);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-3);
  line-height: 1.7;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background: var(--primary-soft);
  color: var(--primary);
}

::-moz-selection {
  background: var(--primary-soft);
  color: var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Buttons - Premium Design with Ripple Effect */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Button Variants */
.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: var(--shadow-primary);
  border-color: transparent;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-gradient-hover);
  box-shadow: var(--shadow-primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
  background: var(--surface-hover);
}

.btn-success {
  background: var(--success-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-success:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-danger {
  background: var(--danger-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.25);
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35);
}

.btn-warning {
  background: var(--warning-gradient);
  color: #78350f;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* Button with icon */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Messages */
.error-message,
.success-message {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  margin-bottom: 16px;
  display: none;
}

.error-message:not(:empty) {
  display: block;
}

.success-message:not(:empty) {
  display: block;
}

.error-message {
  color: #7f1d1d;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.success-message {
  color: #14532d;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.22);
}

.loading-message {
  color: var(--muted);
  padding: 16px 0;
  font-size: 0.95rem;
}

.no-data-message {
  color: var(--muted);
  padding: 26px 0;
  font-size: 0.98rem;
}

/* App header shell */
.app-shell {
  max-width: 1200px;
  margin: 0 auto;
}

.app-shell--dashboard {
  max-width: 1280px;
}

.app-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.app-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.app-logo-title {
  font-weight: 800;
  letter-spacing: 0.03em;
}

.app-logo-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.app-nav {
  display: flex;
  gap: 10px;
}

.app-nav-btn {
  width: auto;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.user-pill-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.user-pill-name {
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
}

/* Cards - Premium Glass Design */
.dashboard-card,
.auth-card,
.landing-hero,
.landing-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.dashboard-card,
.worker-card,
.job-card,
.attendance-card,
.salary-card,
.landing-card {
  padding: var(--space-6) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
}

/* Card hover effect with lift */
.dashboard-card:hover,
.worker-card:hover,
.job-card:hover,
.attendance-card:hover,
.salary-card:hover,
.landing-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

/* Card shine effect on hover */
.dashboard-card::before,
.worker-card::before,
.job-card::before,
.attendance-card::before,
.salary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left var(--transition-slow);
}

.dashboard-card:hover::before,
.worker-card:hover::before,
.job-card:hover::before,
.attendance-card:hover::before,
.salary-card:hover::before {
  left: 100%;
}

.auth-card {
  max-width: 560px;
  width: 100%;
  padding: var(--space-8) var(--space-6);
  animation: fadeInUp 0.4s ease;
}

/* Card animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Titles */
.welcome-section {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.welcome-section h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.welcome-section p {
  color: var(--muted);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.section-header .btn {
  width: auto;
  padding: 10px 14px;
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input,
.form-group select {
  min-height: 48px;
  font-size: 1rem;
  font-weight: 500;

  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  font-family: inherit;
  color: var(--text);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2364748b' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 48px;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  border: 1.5px solid var(--border-strong);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.2s;
}

.form-group select:focus {
  border-color: var(--primary);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%232563eb' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E") no-repeat right 16px center;
  background-size: 16px;
  padding-right: 48px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.form-group select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background-color: #fff;
}

.form-group select:focus {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%232563eb' d='M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 16px;
}

.form-group small {
  color: var(--muted);
  display: block;
  margin-top: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Auth layout (login/signup) */
.auth-shell {
  max-width: 1120px;
  margin: 26px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.auth-side {
  border-radius: var(--radius-lg);
}

.auth-side--info {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 26px 22px;
}

.auth-side--form {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-side-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.auth-side-subtitle {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.auth-side-list {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--text);
}

.auth-side-list li {
  color: var(--muted);
}

.auth-side-list li::before {
  content: "•";
  color: var(--primary);
  margin-right: 8px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 16px;
}

.auth-links {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

/* Landing */
.landing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.landing-hero,
.landing-preview {
  padding: 22px;
}

.landing-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

.landing-title span {
  color: var(--primary);
}

.landing-subtitle {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.landing-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.landing-cta-group .btn {
  width: auto;
}

.landing-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
}

.landing-card-grid {
  display: grid;
  gap: 12px;
}

.landing-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.landing-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.landing-card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.landing-card ul {
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.landing-footer {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
}

/* Dashboard grids */
.dashboard-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: start;
}

.dashboard-card--wide {
  grid-column: 1 / -1;
}

/* Status/stat cards */
.status-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.status-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.status-card h4 {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.status-text {
  font-size: 1.05rem;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.stat-card h4 {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
}

/* Lists / cards */
.workers-list,
.jobs-list,
.attendance-list,
.salary-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.worker-card,
.job-card,
.attendance-card,
.salary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

.worker-card:hover,
.job-card:hover,
.attendance-card:hover,
.salary-card:hover,
.landing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.18);
}

.worker-card-header,
.job-card-header,
.attendance-card-header,
.salary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.worker-card-header h4,
.job-card-header h4,
.attendance-card-header h4,
.salary-card-header h4 {
  font-size: 1.02rem;
  font-weight: 900;
}

.worker-card-body,
.job-card-body,
.attendance-card-body,
.salary-card-body {
  display: grid;
  gap: 10px;
}

.detail-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.detail-item label, .detail-item span {
  max-width: 100%;
  word-break: break-all;
  box-sizing: border-box;
}

.detail-item span {
  flex: 1;
  display: block;
  overflow-wrap: anywhere;
}

.detail-item label {
  min-width: 120px;
  font-weight: 800;
  color: var(--muted);
}

.detail-item span {
  color: var(--text);
}

.job-actions,
.salary-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.job-actions .btn,
.salary-actions .btn {
  width: auto;
  flex: 1;
}

/* Badges */
.status-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid transparent;
  color: var(--text);
  background: #fff;
}

.status-open {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--primary);
}

.status-closed {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.35);
  color: #334155;
}

.status-accepted {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--primary);
}

.status-checked_in {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
  color: #92400e;
}

.status-completed {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.28);
  color: #166534;
}

.status-paid {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.28);
  color: #166534;
}

.status-unpaid {
  background: rgba(220, 38, 38, 0.10);
  border-color: rgba(220, 38, 38, 0.25);
  color: #991b1b;
}

.status-verified {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.28);
  color: #166534;
}

.status-rejected {
  background: rgba(220, 38, 38, 0.10);
  border-color: rgba(220, 38, 38, 0.25);
  color: #991b1b;
}

.status-pending {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
  color: #92400e;
}

/* Salary summary */
.salary-summary {
  margin-bottom: 12px;
}

.summary-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-card h4 {
  color: var(--muted);
  font-size: 0.95rem;
}

.summary-card .amount {
  font-size: 1.8rem;
  font-weight: 900;
}

/* Bank Details Box */
.bank-details-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.bank-details-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bank-info-grid {
  display: grid;
  gap: 6px;
}

.bank-info-row {
  display: flex;
  gap: 8px;
  font-size: 0.9rem;
}

.bank-info-row strong {
  min-width: 110px;
  color: #64748b;
  font-weight: 600;
}

.bank-info-row span {
  color: #1e293b;
  font-family: 'Segoe UI', system-ui, sans-serif;
  user-select: all;
  word-break: break-all;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.tab-btn:hover {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.tab-btn.active {
  background: var(--primary-soft);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Attendance images */
.attendance-images {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.image-container label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  color: var(--muted);
}

.attendance-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  padding: 18px;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 560px;
  margin: 8vh auto;
  padding: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.modal-content.large-modal {
  max-width: 900px;
}

.close-modal {
  position: absolute;
  right: 14px;
  top: 10px;
  font-size: 26px;
  color: var(--muted);
  cursor: pointer;
}

.close-modal:hover {
  color: var(--text);
}

.image-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 10px;
}

/* Filters */
.filter-section {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-section input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}

/* Spacing between stacked cards */
.dashboard-card+.dashboard-card {
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 980px) {
  .landing-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-cards {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .landing-cta-group {
    flex-direction: column;
  }
  
  .landing-cta-group .btn {
    width: 100%;
  }
  
  .header-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  body {
    padding: var(--space-3);
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .app-nav,
  .app-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .section-header .btn {
    width: 100%;
  }

  .job-actions,
  .salary-actions {
    flex-direction: column;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .modal-content {
    margin: 2vh auto;
    max-height: 96vh;
    overflow-y: auto;
  }
}

/* ========================================
   PAGINATION CONTROLS
   ======================================== */

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pagination-btn {
  padding: var(--space-2) !important;
  min-width: 36px;
}

.pagination-btn i {
  width: 16px;
  height: 16px;
}

.pagination-page-info {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 0 var(--space-2);
}

.pagination-page-size {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  color: var(--muted);
}

.pagination-page-size-select {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  background: var(--surface);
}

.pagination-jump {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  color: var(--muted);
}

.pagination-jump-input {
  width: 60px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: center;
}

.load-more-container {
  text-align: center;
  padding: var(--space-6) 0;
}

.load-more-btn {
  min-width: 200px;
}

/* ========================================
   FILTER PANEL
   ======================================== */

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.filter-panel-header h4 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.filter-panel-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-item label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-input,
.filter-select {
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition-base);
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.filter-multiselect {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  max-height: 150px;
  overflow-y: auto;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-xs);
  transition: var(--transition-base);
}

.filter-checkbox:hover {
  background: var(--surface);
}

.filter-daterange,
.filter-range {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.filter-daterange input,
.filter-range input {
  flex: 1;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.filter-panel-actions {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.filter-presets {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.filter-presets h5 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.filter-presets-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-preset-btn {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-base);
}

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

/* ========================================
   BULK OPERATIONS
   ======================================== */

.bulk-toolbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--primary-gradient);
  color: white;
  padding: var(--space-4);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-primary);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bulk-toolbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.bulk-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.bulk-selection-count {
  font-weight: 600;
  font-size: 15px;
}

.bulk-toolbar-actions {
  display: flex;
  gap: var(--space-2);
}

.bulk-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-right: var(--space-3);
}

.bulk-select-all-container {
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.bulk-select-all-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-weight: 500;
}

/* ========================================
   SEARCH MODAL
   ======================================== */

.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  animation: fadeIn 0.2s ease;
}

.search-modal-content {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: slideUpFade 0.3s ease;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.search-modal-input {
  flex: 1;
  padding: var(--space-3);
  border: none;
  font-size: 16px;
  outline: none;
}

.search-modal-close {
  padding: var(--space-2);
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-modal-close:hover {
  background: var(--bg);
}

.search-modal-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: var(--space-2);
}

.search-results {
  display: flex;
  flex-direction: column;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-base);
}

.search-result-item:hover,
.search-result-item.selected {
  background: var(--primary-soft);
}

.search-result-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
}

.search-result-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.search-result-field {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.search-result-field strong {
  color: var(--muted);
  font-weight: 500;
}

.search-result-field mark {
  background: var(--warning-soft);
  color: var(--warning-dark);
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
}

.search-empty {
  text-align: center;
  padding: var(--space-12);
  color: var(--muted);
}

.search-empty i {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.search-recent {
  padding: var(--space-4);
}

.search-recent h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--muted);
}

.search-recent-list {
  display: flex;
  flex-direction: column;
}

.search-recent-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-base);
}

.search-recent-item:hover {
  background: var(--bg);
}

.search-recent-item i {
  width: 16px;
  height: 16px;
  color: var(--muted-2);
}

.search-modal-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.search-shortcut-hint {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--muted);
}

.search-shortcut-hint kbd {
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* ========================================
   CHARTS & ANALYTICS
   ======================================== */

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.chart-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.chart-card-body {
  position: relative;
  min-height: 250px;
}

.quick-insights {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.insight-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-base);
}

.insight-item:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateX(4px);
}

.insight-icon {
  font-size: 24px;
}

.insight-content {
  flex: 1;
}

.insight-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.activity-feed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.activity-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.activity-feed-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
  cursor: pointer;
}

.activity-item:hover {
  background: var(--bg);
}

.activity-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.activity-time {
  font-size: 12px;
  color: var(--muted);
}

/* ========================================
   KEYBOARD SHORTCUTS PANEL
   ======================================== */

.shortcuts-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shortcuts-modal-content {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 80vh;
  overflow-y: auto;
}

.shortcuts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-3);
  padding: var(--space-6);
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.shortcut-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.shortcut-keys {
  display: flex;
  gap: var(--space-1);
}

.shortcut-keys kbd {
  padding: 4px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* ========================================
   TABLE VIEW
   ======================================== */

.view-toggle {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.view-toggle-btn {
  padding: var(--space-2) var(--space-3);
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 13px;
  color: var(--muted);
}

.view-toggle-btn.active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.data-table th:hover {
  background: var(--surface);
}

.data-table th.sortable::after {
  content: '↕';
  margin-left: var(--space-2);
  opacity: 0.3;
}

.data-table th.sorted-asc::after {
  content: '↑';
  opacity: 1;
}

.data-table th.sorted-desc::after {
  content: '↓';
  opacity: 1;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition-base);
}

.data-table tbody tr:hover {
  background: var(--bg);
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 768px) {
  .pagination-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-panel-body {
    grid-template-columns: 1fr;
  }
  
  .bulk-toolbar-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .bulk-toolbar-actions {
    flex-wrap: wrap;
  }
  
  .search-modal-content {
    margin: var(--space-4);
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 13px;
  }
  
  .data-table th,
  .data-table td {
    padding: var(--space-2) var(--space-3);
  }
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.15s ease;
  margin-bottom: 4px;
  text-decoration: none;
}

.sidebar-nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar-nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.btn-block {
  width: 100%;
}

/* Main Content Area */
.main-content {
  margin-left: 260px;
  padding: 24px 32px;
  min-height: 100vh;
}

.content-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.content-header-left {
  min-width: 0;
}

.content-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.mobile-menu-btn:hover {
  box-shadow: var(--shadow-md);
}

.no-scroll {
  overflow: hidden;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* Stats Row (Worker Overview) */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.stat-box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-box-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  border-radius: 12px;
  flex-shrink: 0;
}

.stat-box-content {
  flex: 1;
}

.stat-box-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-box-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

/* Salary Summary Box */
.salary-summary-box {
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}

.salary-summary-content {
  text-align: center;
}

.salary-summary-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.salary-summary-amount {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Form Section Title */
.form-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Form Hint */
.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

/* Salary Breakdown in Approve Modal */
.salary-breakdown {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
}

.salary-breakdown h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #166534;
  margin-bottom: 10px;
}

.salary-breakdown .detail-item {
  padding: 6px 0;
  border-bottom: 1px dashed #bbf7d0;
}

.salary-breakdown .detail-item:last-child {
  border-bottom: none;
}

/* ========================================
   ADVANCED UI COMPONENTS
======================================== */

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 420px;
  width: 100%;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  animation: slideInRight 0.3s ease;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
}

.toast-success::before { background: var(--success); }
.toast-error::before { background: var(--danger); }
.toast-warning::before { background: var(--warning); }
.toast-info::before { background: var(--primary); }

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.toast-success .toast-icon {
  background: var(--success-soft);
  color: var(--success);
}

.toast-error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast-warning .toast-icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--text);
}

.toast-message {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.toast-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.toast-close:hover {
  color: var(--text);
}

/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: var(--space-3);
}

.skeleton-text {
  height: 16px;
  width: 100%;
  margin-bottom: var(--space-2);
}

.skeleton-text:last-child {
  width: 80%;
  margin-bottom: 0;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}

.skeleton-button {
  height: 40px;
  width: 120px;
  border-radius: var(--radius);
}

/* Spinner Loader */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-small {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-large {
  width: 60px;
  height: 60px;
  border-width: 4px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-overlay);
  animation: fadeIn 0.2s ease;
}

/* Tooltips */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--text);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: var(--z-tooltip);
}

.tooltip:hover .tooltip-content {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text);
}

/* Progress Bars */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 1.5s infinite;
}

/* Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid transparent;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-6) 0;
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background: var(--border);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
  opacity: 0.3;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text);
}

.empty-state-description {
  color: var(--muted);
  margin-bottom: var(--space-6);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Alert Banners */
.alert {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert-info {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.alert-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--success);
  color: var(--success-dark);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--warning);
  color: var(--warning-dark);
}

.alert-danger {
  background: rgba(244, 63, 94, 0.08);
  border-color: var(--danger);
  color: var(--danger-dark);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2);
  min-width: 200px;
  z-index: var(--z-dropdown);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: var(--transition-fast);
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--surface-2);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-2) 0;
}

/* Checkbox & Radio Styling */
.checkbox,
.radio {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-xs);
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.radio {
  border-radius: var(--radius-full);
}

.checkbox:checked,
.radio:checked {
  background: var(--primary-gradient);
  border-color: var(--primary);
}

.checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.radio:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: var(--radius-full);
}

/* Responsive Sidebar */
@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    max-width: none;
  }
}