.alert-success-soft { background: var(--gradient-success); color: white; }
.btn-outline-primary-strong { border: 2px solid var(--primary) !important; color: var(--primary) !important; transition: var(--transition); }
.card-header-soft { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.avatar-primary-soft { background: var(--gradient-primary); color: #1e293b; box-shadow: var(--shadow-md); }
.avatar-success-soft { background: var(--gradient-success); color: #1e293b; box-shadow: var(--shadow-md); }
.badge-primary-soft { background: var(--gradient-primary); color: #1e293b; border-radius: var(--radius-lg); font-weight: 600; box-shadow: var(--shadow-sm); }
.badge-success-soft { background: var(--gradient-success); color: #1e293b; border-radius: var(--radius-lg); font-weight: 600; box-shadow: var(--shadow-sm); }
.badge-danger-soft { background: var(--gradient-danger); color: #7f1d1d; border-radius: var(--radius-lg); font-weight: 700; box-shadow: var(--shadow-sm); }
.badge-warning-soft { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #92400e; border-radius: var(--radius-lg); font-weight: 700; box-shadow: var(--shadow-sm); }
.badge-info-soft { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); color: #075985; border-radius: var(--radius-lg); font-weight: 700; box-shadow: var(--shadow-sm); }
.th-soft-header {
  background: rgba(var(--bs-body-bg-rgb), 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(var(--bs-border-color-rgb), 0.95);
  color: var(--bs-body-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.link-inherit-no-underline { color: inherit; text-decoration: none; }
.hover-row { transition: var(--transition); }
.modal-soft { backdrop-filter: blur(20px); background: rgba(255, 255, 255, 0.95); border: 1px solid rgba(255, 255, 255, 0.3); }
.modal-footer-soft { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border-top: 1px solid rgba(255, 255, 255, 0.3); }
.btn-soft-outline { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border: 2px solid rgba(255, 255, 255, 0.3); }
/* ===== VARIABLES & RESETS ===== */
:root {
  --primary: #06b6d4;
  --secondary: #64748b;
  --success: #10b981;
  --danger: #dc2626;
  --warning: #f59e0b;
  --info: #0ea5e9;
  --light: #f0f4f8;
  --dark: #1e293b;
  --muted: #64748b;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #ecf8fb 0%, #e0f7fa 100%);
  --gradient-secondary: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  --gradient-success: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --gradient-danger: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}
.th-40 { width: 40px; }
.th-100 { width: 100px; }
.th-140 { width: 140px; }

/* Soft alert variants */
.alert-modern { backdrop-filter: blur(20px); box-shadow: var(--shadow-md); }
.alert-danger-soft { background: var(--gradient-danger); color: #7f1d1d; }

/* Card variants */
.card-body-soft { backdrop-filter: blur(10px); background: rgba(255, 255, 255, 0.8); }
.card-header-primary-soft { background: var(--gradient-primary); color: #1e293b; backdrop-filter: blur(10px); }

/* Icon sizing */
.icon-08 { font-size: 0.8rem; }
.text-07 { font-size: 0.7rem; }
.xx-small { font-size: 0.65rem; }

/* Soft surface utility */
.soft-surface { backdrop-filter: blur(20px); background: rgba(255, 255, 255, 0.9); }

/* Page title utility */
.page-title { letter-spacing: -1.5px; font-size: 2.5rem; }

/* Fixed width utility */
.w-140 { max-width: 140px; }

/* Max width utility */
.max-w-250 { max-width: 250px; }

/* Soft progress bars */
.progress-soft { height: 6px; background: rgba(255, 255, 255, 0.5); border-radius: var(--radius-xl); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1); }
.progress-bar-gradient-primary { background: var(--gradient-primary); border-radius: var(--radius-xl); }
.progress-bar-gradient-success { background: var(--gradient-success); border-radius: var(--radius-xl); }
.progress-bar-gradient-danger { background: var(--gradient-danger); border-radius: var(--radius-xl); }

/* Height utilities */
.progress-8 { height: 8px; }
.h-250 { height: 250px; }
.h-180 { height: 180px; }

/* Max-width utilities */
.max-w-80 { max-width: 80px; }

/* Card left accent utility */
.card-danger-left { border-left: 5px solid var(--danger) !important; }

/* Chart surface blocks */
.chart-surface { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border-radius: var(--radius-lg); }
.soft-block { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.3); }
.pill-stat { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; font-weight: 700; font-size: 0.75rem; border: 1px solid rgba(17, 24, 39, 0.06); box-shadow: var(--shadow-sm); }

/* Error page styles moved from config.php */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.error-container {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}
.error-icon { font-size: 80px; margin-bottom: 20px; }
.error-title { color: #333; font-size: 28px; margin-bottom: 15px; font-weight: 700; }
.error-text { color: #666; font-size: 16px; line-height: 1.6; margin-bottom: 20px; }
.error-code { background: #f5f5f5; padding: 15px; border-radius: 10px; font-family: 'Courier New', monospace; font-size: 13px; color: #d32f2f; margin-top: 20px; word-break: break-word; }
.btn-error { display: inline-block; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 30px; border-radius: 10px; text-decoration: none; font-weight: 600; margin-top: 20px; transition: transform 0.2s; }
.btn-error:hover { transform: translateY(-2px); }
.checklist { text-align: left; margin: 20px 0; padding: 20px; background: #f8f9fa; border-radius: 10px; }
.checklist li { margin: 10px 0; color: #555; list-style-position: inside; }
.error-hint { font-size: 14px; color: #999; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: linear-gradient(135deg, #f0f4f8 0%, #dbeafe 50%, #eff6ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ===== CONSISTENT BASE COMPONENTS ===== */
body {
  color: var(--bs-body-color, var(--dark));
}

.card,
.card-header,
.card-body,
.card-footer {
  border-color: rgba(var(--bs-border-color-rgb, 226, 232, 240), 0.8);
}

.card,
.card-body {
  background: var(--bs-body-bg, #ffffff);
}

.card-header,
.card-footer {
  background: var(--bs-secondary-bg, #f8fafc);
}

.table {
  color: inherit;
}

.table thead th {
  background: var(--bs-secondary-bg, #f8fafc);
  color: var(--bs-body-color, #1e293b);
  border-bottom-color: rgba(var(--bs-border-color-rgb, 226, 232, 240), 0.9);
}

.table td,
.table th {
  border-color: rgba(var(--bs-border-color-rgb, 226, 232, 240), 0.7);
}

.form-control,
.form-select,
.input-group-text {
  background-color: var(--bs-body-bg, #ffffff);
  color: var(--bs-body-color, #1e293b);
  border-color: rgba(var(--bs-border-color-rgb, 226, 232, 240), 0.8);
}

.form-control::placeholder {
  color: var(--bs-secondary-color, #64748b);
}

.btn {
  border-radius: 0.6rem;
}

.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-danger {
  background: transparent;
}

/* ===== DARK MODE (Bootstrap 5.3 data-bs-theme) ===== */
[data-bs-theme="dark"] {
  color-scheme: dark;

  --bs-body-bg: #0d1117;
  --bs-body-bg-rgb: 13, 17, 23;
  --bs-body-color: #c9d1d9;
  --bs-body-color-rgb: 201, 209, 217;
  --bs-secondary-color: #8b949e;
  --bs-secondary-bg: #161b22;
  --bs-tertiary-bg: #161b22;
  --bs-border-color: #30363d;
  --bs-border-color-rgb: 48, 54, 61;
  --bs-primary: #58a6ff;
  --bs-primary-rgb: 88, 166, 255;
  --bs-info: #58a6ff;
  --bs-info-rgb: 88, 166, 255;
  --bs-success: #3fb950;
  --bs-success-rgb: 63, 185, 80;
  --bs-warning: #d29922;
  --bs-warning-rgb: 210, 153, 34;
  --bs-danger: #f85149;
  --bs-danger-rgb: 248, 81, 73;
  --bs-link-color: #58a6ff;
  --bs-link-hover-color: #79c0ff;

  /* Keep custom tokens usable by mapping to Bootstrap theme vars */
  --dark: var(--bs-body-color);
  --muted: var(--bs-secondary-color);

  --gradient-card: linear-gradient(135deg, var(--bs-tertiary-bg) 0%, var(--bs-secondary-bg) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--bs-tertiary-bg) 0%, var(--bs-secondary-bg) 100%);
  --gradient-primary: linear-gradient(
    135deg,
    rgba(var(--bs-primary-rgb), 0.18) 0%,
    rgba(var(--bs-primary-rgb), 0.06) 100%
  );
  --gradient-success: linear-gradient(
    135deg,
    rgba(var(--bs-success-rgb), 0.16) 0%,
    rgba(var(--bs-success-rgb), 0.06) 100%
  );
  --gradient-danger: linear-gradient(
    135deg,
    rgba(var(--bs-danger-rgb), 0.16) 0%,
    rgba(var(--bs-danger-rgb), 0.06) 100%
  );
}

[data-bs-theme="dark"] body {
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
  background-attachment: initial;
}

[data-bs-theme="dark"] .navbar {
  background: var(--bs-body-bg) !important;
  border-bottom: 1px solid rgba(var(--bs-border-color-rgb), 0.6);
}

[data-bs-theme="dark"] .bg-white {
  background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: var(--bs-secondary-bg) !important;
}

[data-bs-theme="dark"] .text-dark {
  color: var(--bs-body-color) !important;
}

/* Legacy pages still use Bootstrap's `text-black` which breaks readability in dark mode */
[data-bs-theme="dark"] .text-black {
  color: var(--bs-body-color) !important;
}

/* Legacy pages still use hard-coded light backgrounds; normalize them in dark mode */
[data-bs-theme="dark"] .bg-white {
  background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: var(--bs-secondary-bg) !important;
}

[data-bs-theme="dark"] .text-black {
  color: var(--bs-body-color) !important;
}

/* Forms & common UI (beats inline light backgrounds) */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: var(--bs-secondary-color) !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: rgba(var(--bs-primary-rgb), 0.6) !important;
}

[data-bs-theme="dark"] .input-group-text {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .btn-light,
[data-bs-theme="dark"] .btn.btn-light {
  background-color: var(--bs-tertiary-bg) !important;
  border-color: var(--bs-border-color) !important;
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .modal-content {
  background-color: var(--bs-tertiary-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.35) !important;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
  background-color: var(--bs-tertiary-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.35) !important;
}

/* Cards (GitHub dark palette) */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-body,
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
  background-color: #161b22 !important;
  color: var(--bs-body-color) !important;
  border-color: #30363d !important;
}

[data-bs-theme="dark"] .card-header {
  border-bottom-color: #30363d !important;
}

[data-bs-theme="dark"] .card-footer {
  border-top-color: #30363d !important;
}

[data-bs-theme="dark"] .card.shadow,
[data-bs-theme="dark"] .card.shadow-sm,
[data-bs-theme="dark"] .card.shadow-lg {
  box-shadow: 0 0 0 1px rgba(48, 54, 61, 0.9) !important;
}

/* Schedule page (Project Schedule) */
[data-bs-theme="dark"] .schedule-sidebar,
[data-bs-theme="dark"] .schedule-sidebar-header,
[data-bs-theme="dark"] .schedule-toolbar {
  background: var(--bs-tertiary-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .schedule-sidebar-reveal {
  background: var(--bs-tertiary-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.55) !important;
}

[data-bs-theme="dark"] .schedule-mode-chip {
  background: rgba(var(--bs-body-bg-rgb), 0.6) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.55) !important;
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .section-heading {
  color: var(--bs-secondary-color) !important;
}

[data-bs-theme="dark"] .compact-input {
  background: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: rgba(var(--bs-primary-rgb), 0.65) !important;
  box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.12) !important;
}

[data-bs-theme="dark"] .table-schedule {
  box-shadow: 0 0 0 2px rgba(var(--bs-border-color-rgb), 0.7) !important;
}

[data-bs-theme="dark"] .table-schedule th,
[data-bs-theme="dark"] .table-schedule td {
  border-right-width: 2px !important;
  border-bottom-width: 2px !important;
  border-right-color: rgba(var(--bs-border-color-rgb), 0.5) !important;
  border-bottom-color: rgba(var(--bs-border-color-rgb), 0.5) !important;
}

[data-bs-theme="dark"] .table-schedule thead th {
  background: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
  border-bottom-color: rgba(var(--bs-border-color-rgb), 0.65) !important;
  border-right-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .table-schedule .col-name,
[data-bs-theme="dark"] .table-schedule td.col-name,
[data-bs-theme="dark"] .table-schedule th.col-name {
  background: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
  border-bottom-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .table-schedule tbody tr:nth-child(odd) td {
  background: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .table-schedule tbody tr:nth-child(even) td {
  background: var(--bs-tertiary-bg) !important;
}

[data-bs-theme="dark"] .table-schedule tbody td.is-holiday,
[data-bs-theme="dark"] .table-schedule tbody td.is-weekend,
[data-bs-theme="dark"] .col-day.is-holiday,
[data-bs-theme="dark"] .col-day.is-weekend {
  background:
    linear-gradient(
      135deg,
      rgba(var(--bs-danger-rgb), 0.14),
      rgba(var(--bs-danger-rgb), 0.06)
    ),
    var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .cell-act {
  background: inherit !important;
  color: var(--bs-body-color) !important;
  border-bottom-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
  border-right-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .cell-act:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35) !important;
}

[data-bs-theme="dark"] .table-wrapper {
  background: var(--bs-body-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .badge.text-dark.border {
  color: var(--bs-body-color) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.7) !important;
  background-color: rgba(var(--bs-body-color-rgb), 0.1) !important;
}

[data-bs-theme="dark"] .table tr[style] {
  background-color: transparent !important;
}

/* Gantt wrappers (Add Project / Weekly Report / Project Detail) */
[data-bs-theme="dark"] .gantt-wrapper,
[data-bs-theme="dark"] #ganttWrapper {
  background: var(--bs-tertiary-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .gantt-left-pane {
  background: var(--bs-tertiary-bg) !important;
}

[data-bs-theme="dark"] .gantt-left-pane td,
[data-bs-theme="dark"] .gantt-left-pane th {
  background: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .gantt-timeline-table td,
[data-bs-theme="dark"] .gantt-timeline-table th {
  background: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .gantt-timeline-table th.month-header {
  /* keep month header styling (blue) */
  color: #ffffff !important;
}

/* Small action icon buttons used in User Management */
[data-bs-theme="dark"] .btn-action-sm {
  background: var(--bs-secondary-bg) !important;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.55) !important;
  backdrop-filter: none !important;
}

/* Projects List action icon buttons */
[data-bs-theme="dark"] .btn-action {
  background: var(--bs-secondary-bg) !important;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.55) !important;
  backdrop-filter: none !important;
}

[data-bs-theme="dark"] .btn-action:hover {
  background: rgba(var(--bs-body-color-rgb), 0.12) !important;
}

[data-bs-theme="dark"] .modal-soft,
[data-bs-theme="dark"] .modal-footer-soft,
[data-bs-theme="dark"] .soft-surface,
[data-bs-theme="dark"] .chart-surface,
[data-bs-theme="dark"] .soft-block,
[data-bs-theme="dark"] .card-body-soft,
[data-bs-theme="dark"] .card-header-soft,
[data-bs-theme="dark"] .btn-soft-outline {
  background: var(--bs-tertiary-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.35) !important;
}

[data-bs-theme="dark"] .th-soft-header {
  background: rgba(var(--bs-body-bg-rgb), 0.92) !important;
  border-bottom-color: rgba(var(--bs-border-color-rgb), 0.6) !important;
  color: var(--bs-secondary-color) !important;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER STYLES ===== */
.header {
  background: linear-gradient(135deg, #f0f4f8 0%, #dbeafe 100%);
  backdrop-filter: none;
  color: var(--dark);
  padding: 0.1rem 0 !important;
  margin-bottom: 3rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-bottom: 2px solid rgba(6, 182, 212, 0.2);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.08);
}

.navbar {
  background: linear-gradient(135deg, #f0f4f8 0%, #dbeafe 100%) !important;
  backdrop-filter: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: auto !important;
}

/* Keep top navbar above all page overlays (Weekly Report header card, etc.) */
nav.navbar.sticky-top {
  position: sticky;
  top: 0;
  z-index: 20000 !important;
}

.navbar .container-fluid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo i {
  font-size: 2rem;
  color: var(--primary);
}

/* ===== DASHBOARD CARDS ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.dashboard-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.08);
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #06b6d4 0%, #0ea5e9 50%, #06b6d4 100%);
}

.dashboard-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.dashboard-card.alert {
  border-left-color: var(--danger);
}

.dashboard-card.alert::before {
  background: var(--gradient-secondary);
}

.card-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.card-label {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

.card-label span {
  display: block;
  font-size: 0.9rem;
  margin-top: 0.3rem;
  color: var(--gray-500);
}

.card-icon {
  position: absolute;
  right: 2rem;
  top: 2rem;
  font-size: 2.5rem;
  opacity: 0.1;
  color: var(--primary);
  transition: var(--transition);
}

.dashboard-card:hover .card-icon {
  opacity: 0.2;
  transform: scale(1.1);
}

.dashboard-card.alert .card-icon {
  color: var(--danger);
}

/* ===== PROJECT LIST ===== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-list {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

.project-list thead {
  background: var(--gradient-primary);
  color: white;
}

.project-list th {
  padding: 1.5rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-list td {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.project-list tr:nth-child(even) {
  background: linear-gradient(135deg, rgba(224, 247, 250, 0.4) 0%, rgba(240, 249, 255, 0.3) 100%);
}

.project-list tr:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
  transform: scale(1.01);
  transition: var(--transition);
}


.status-preparation {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #3730a3;
  border-radius: var(--radius-lg);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}
.status-instalation {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #3730a3;
  border-radius: var(--radius-lg);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}
.status-hold {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border-radius: var(--radius-lg);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}
.status-handover {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border-radius: var(--radius-lg);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}
.status-finish {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border-radius: var(--radius-lg);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

/* ===== PROGRESS BAR ===== */
.progress-container {
  background-color: var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  background: var(--gradient-primary);
  height: 100%;
  border-radius: var(--radius-xl);
  transition: width 0.6s ease;
  position: relative;
}

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

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress {
  height: 24px;
  background: var(--gray-200);
  border-radius: 50px;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--info));
  border-radius: 50px;
  transition: width 0.6s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  text-shadow: 0 0 2px rgba(0,0,0,0.3);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  gap: 0.5rem;
  border: none;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
}

/* ===== SEARCH & FILTER ===== */
.search-filter {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search-box {
  position: relative;
  width: 250px;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 0.9rem;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
  outline: none;
}

.filter-select {
  padding: 0.65rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  min-width: 180px;
  background-color: white;
}

/* ===== MESSAGES ===== */
.alert {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background-color: #f0fdf4;
  color: #166534;
  border-left: 4px solid #22c55e;
}

.alert-error {
  background-color: #fef2f2;
  color: #b91c1c;
  border-left: 4px solid #ef4444;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .search-filter {
    width: 100%;
    flex-direction: column;
  }
  
  .filter-select {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ===== PROJECTS PAGE STYLES ===== */
.projects-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
}

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

.projects-header h1 {
  font-size: 26px;
  color: #5b21b6;
  display: flex;
  align-items: center;
  gap: 10px;
}

.projects-table {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.projects-table th {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #1e293b;
  padding: 12px;
  text-align: left;
}

.projects-table td {
  padding: 15px;
  border-bottom: 1px solid #f1f5f9;
}

.projects-table tr:nth-child(even) {
  background: rgba(243, 232, 255, 0.5);
}

.projects-table tr:hover {
  background: #f1f5f9;
}

.empty-state {
  padding: 50px;
  text-align: center;
  color: #7f8c8d;
}

.empty-state i {
  font-size: 50px;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* ===== FORM STYLES ===== */
.form-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.form-header h1 {
  font-size: 28px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4361ee;
  text-decoration: none;
  font-weight: 500;
}

#projectForm {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

/* ===== HEADER STYLES ===== */
.main-header {
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  color: #1e293b;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 20000 !important;
}

/* Some pages still use a legacy `.header` wrapper; keep it above content too */
.header {
  position: sticky;
  top: 0;
  z-index: 20000 !important;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
  color: white;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  gap: 4px;
}

.logo-icon-svg {
  margin-right: 12px;
  filter: drop-shadow(0 2px 4px rgba(6, 182, 212, 0.2));
  transition: all 0.3s ease;
}

.navbar-brand:hover .logo-icon-svg {
  filter: drop-shadow(0 4px 8px rgba(6, 182, 212, 0.4)) brightness(1.1);
  transform: scale(1.05);
}

.logo-main {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  text-transform: capitalize;
  transition: all 0.3s ease;
}

.logo-sub {
  font-size: 12px;
  opacity: 0.8;
}

.main-nav ul {
  display: flex;
  gap: 15px;
  list-style: none;
}

.main-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.main-nav a:hover, 
.main-nav a.active {
  background: rgba(255,255,255,0.15);
  color: white;
}

.main-nav a i {
  font-size: 16px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}

.user-avatar {
  font-size: 32px;
  color: white;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

.user-role {
  font-size: 12px;
  opacity: 0.8;
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 12px;
  cursor: pointer;
}

.content-wrapper {
  min-height: calc(100vh - 70px - 250px);
  padding: 0px 0;
}

/* ===== FOOTER STYLES ===== */
.main-footer {
  background: #2b2d42;
  color: white;
  padding: 0px 0 0;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 50px;
}

.footer-left {
  flex: 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-logo i {
  font-size: 24px;
}

.footer-description {
  opacity: 0.8;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 400px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: #4361ee;
  transform: translateY(-3px);
}

.footer-right {
  flex: 2;
}

.footer-links {
  display: flex;
  gap: 50px;
}

.link-group h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: white;
}

.link-group ul {
  list-style: none;
}

.link-group li {
  margin-bottom: 12px;
}

.link-group a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.link-group a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  background: rgba(0,0,0,0.2);
  padding: 20px 0;
  margin-top: 50px;
}

.footer-bottom .footer-container {
  justify-content: space-between;
  align-items: center;
}

.copyright {
  font-size: 13px;
  opacity: 0.8;
}

.footer-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

.footer-meta a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-meta a:hover {
  color: white;
}

/* ===== DASHBOARD ENHANCEMENTS ===== */
.dashboard-card.success {
  border-left-color: var(--success);
}

.dashboard-card.warning {
  border-left-color: var(--warning);
}

.card-trend {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.trend-up {
  color: #4ade80;
}

.trend-down {
  color: #f72585;
}

.progress-container.mini {
  height: 6px;
  margin-top: 0.8rem;
  background-color: #e2e8f0;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.health-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
}

.health-good {
  border-top: 4px solid #4ade80;
}

.health-warning {
  border-top: 4px solid #f8961e;
}

.health-danger {
  border-top: 4px solid #f72585;
}

.health-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.health-label {
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.health-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-full {
  flex-grow: 1;
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 50px;
  overflow: hidden;
}

.health-progress .progress-bar {
  height: 100%;
  border-radius: 50px;
}

.health-good .progress-bar {
  background-color: #4ade80;
}

.health-warning .progress-bar {
  background-color: #f8961e;
}

.health-danger .progress-bar {
  background-color: #f72585;
}

.health-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  font-size: 0.9rem;
}

.health-legend i {
  font-size: 0.7rem;
}

.health-good .health-legend i {
  color: #4ade80;
}

.health-warning .health-legend i {
  color: #f8961e;
}

.health-danger .health-legend i {
  color: #f72585;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.project-info {
  flex: 1;
}

.project-meta {
  display: flex;
  gap: 1rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.project-dates {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.project-dates span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.project-progress {
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.status-legend {
  margin-top: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-label {
  flex: 1;
  font-size: 0.9rem;
}

.legend-value {
  font-weight: 600;
}

@media (max-width: 768px) {
  .health-grid {
    grid-template-columns: 1fr;
  }
  
  .project-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .project-progress {
    width: 100%;
    align-items: flex-start;
  }
}

/* Management Container */
.management-container {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Tab Styles */
.management-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}

.tab-button {
  padding: 12px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  position: relative;
}

.tab-button.active {
  color: var(--primary);
  background: white;
}

.tab-button.active:after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.tab-content {
  display: none;
  padding: 20px;
}

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

/* Header Styles */
.management-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.25);
}

.management-header h2 {
  font-size: 1.5rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Card Styles */
.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 245, 255, 0.98) 100%);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.15);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.9) 0%, rgba(243, 232, 255, 0.8) 100%);
  backdrop-filter: blur(5px);
}

.card-header h3 {
  font-size: 18px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
  color: var(--gray-700);
}

/* Form Styles */
.management-form {
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 245, 255, 0.95) 100%);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  box-shadow: var(--shadow-md);
}

.form-title {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--dark);
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
  outline: none;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Table Styles */
.responsive-table {
  overflow-x: auto;
}

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

thead {
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.95) 0%, rgba(243, 232, 255, 0.9) 100%);
  backdrop-filter: blur(5px);
}

th {
  padding: 12px 15px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5b21b6;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(167, 139, 250, 0.3);
}

td {
  padding: 1px 15px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  font-size: 0.9rem;
  vertical-align: middle;
}

tr:hover {
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.5) 0%, rgba(243, 232, 255, 0.5) 100%);
}

/* User Info */
.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 500;
  color: var(--dark);
}

/* Project Stats */
.project-stats {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.stat-value {
  font-weight: 500;
  color: var(--dark);
}


.status-active {
  background-color: #e6f7ee;
  color: #10b981;
}

.status-inactive {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* Action Buttons */
.actions {
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  gap: 5px;
}

/* Responsive */
@media (max-width: 768px) {
  .management-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .search-box {
    width: 100%;
  }
}

/* Base Styles */
.report-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header Styles */
.report-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 255, 0.95));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
  padding: 12px 16px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left h1 {
  font-size: 22px;
  color: #5b21b6;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6c757d;
}

.breadcrumbs i {
  font-size: 12px;
  opacity: 0.6;
}

.breadcrumbs .active {
  color: #7c3aed;
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* Button Styles */
.btn-action {
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
}

.btn-primary {
  background: #4361ee;
  color: white;
  
  border: none;
  border-radius: 6px;
  padding: 1px 5px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  
}

.btn-primary:hover {
  background: #3f37c9;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
}

.btn-outline {
  background: transparent;
  color: #4361ee;
  border-color: #4361ee;
}

.btn-outline:hover {
  background: #e6f7ff;
  transform: translateY(-2px);
}

/* Project Selection Card */
.project-selection-card {
  margin-bottom: 0px;
}

.select2-style {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #eaeaea;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s;
}

.select2-style:focus {
  border-color: #4361ee;
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  height: 18px;
  width: 18px;
  background-color: white;
  border: 1px solid #eaeaea;
  border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: #f1f1f1;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #4361ee;
  border-color: #4361ee;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Project Info Card */
.project-info-card .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 5px;
}

.info-item {
  padding: 12px;
  border-radius: 6px;
  background: #ffffff;
}

.info-label {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  color: black;
  text-transform: capitalize;
}

.progress-container {
  height: 24px;
  background: #e2e8f0;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4361ee, #4895ef);
  border-radius: 50px;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 0 2px rgba(0,0,0,0.3);
}

/* Timeline Card */
.timeline-card {
  margin-bottom: 20px;
}

.timeline-container {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.timeline-scroll-container {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #ddd #f5f5f5;
}

.timeline-scroll-container::-webkit-scrollbar {
  height: 8px;
}

.timeline-scroll-container::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.timeline-scroll-container::-webkit-scrollbar-thumb {
  background-color: #ddd;
  border-radius: 6px;
}

.timeline-header, .timeline-row {
  display: grid;
  grid-template-columns: 180px auto;
  align-items: stretch;
}

.timeline-header-container {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #eaeaea;
}

.row-label {
  padding: 12px 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  color: var(--dark);
  position: sticky;
  left: 0;
  z-index: 5;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  gap: 10px;
}

.month-headers, .week-cells {
  display: flex;
  width: fit-content;
}

.month-group {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #eaeaea;
}

.month-title {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  color: var(--dark);
  font-weight: 600;
}

.week-headers {
  display: flex;
}

.week-header {
  width: 120px;
  min-width: 120px;
  padding: 10px 5px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  color: var(--dark);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.week-cell {
  width: 120px;
  min-width: 120px;
  padding: 10px;
  border-right: 1px solid #eaeaea;
  font-size: 15px;
  line-height: 1.5;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  height: 100%;
}

.week-header:hover {
  background: #e9ecef;
}

.week-header.active {
  background: #e6f7ff;
  color: #4361ee;
  font-weight: 600;
}

.week-dates {
  font-size: 13px;
  font-weight: 500;
}

.week-num {
  font-size: 12px;
  color: #6c757d;
}

.timeline-body {
  min-width: fit-content;
}

.timeline-row {
  border-bottom: 1px solid #eaeaea;
  transition: background 0.2s;
}

.timeline-row:hover {
  background: rgba(255, 255, 255, 0.7);
}

.week-cell.current-week {
  background: #e6f7ff;
}

.week-cell.has-data {
  background: #f8f9fa;
}

.week-cell.has-data:hover {
  background: #e9ecef;
  cursor: pointer;
}

.cell-content {
  overflow: visible;
  white-space: normal;
  word-wrap: break-word;
  height: 100%;
}

.cell-content.empty {
  color: #95a5a6;
  font-style: italic;
}

/* Report Form Card */
.report-form-card {
  margin-top: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .row-label {
    width: 160px;
    min-width: 160px;
  }
  
  .week-header, .week-cell {
    width: 110px;
    min-width: 110px;
  }
}

@media (max-width: 992px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .info-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .row-label {
    width: 120px;
    min-width: 120px;
    padding: 10px;
    font-size: 13px;
  }
  
  .week-header, .week-cell {
    width: 90px;
    min-width: 90px;
    padding: 8px 5px;
  }
  
  .week-dates {
    font-size: 12px;
  }
  
  .form-group textarea {
    min-height: 100px;
  }
  
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .report-container {
    padding: 15px;
  }
  
  .header-left h1 {
    font-size: 20px;
  }
  
  .breadcrumbs {
    font-size: 12px;
  }
  
  .btn-action {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .card-header h3 {
    font-size: 16px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-submit, .btn-delete {
    width: 100%;
  }
}

#jobList {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  line-height: 1.5;
  min-height: 200px;
  resize: vertical;
}

#jobList:focus {
  border-color: #4361ee;
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.job-checklist {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  border-radius: var(--radius-md);
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: 10px;
}

.checklist-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1px;
}

.checklist-item {
  display: flex;
  align-items: center;
  padding: 8px;
  background: white;
  border-radius: 4px;
  transition: all 0.2s;
}

.checklist-item:hover {
  background: #e9ecef;
}

.checklist-item input[type="checkbox"] {
  margin-right: 10px;
  width: 16px;
  height: 16px;
}

.checklist-item label {
  cursor: pointer;
  user-select: none;
  flex-grow: 1;
}

/* ===== INDEX PAGE SPECIFIC ===== */
.card-stats {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Compact variant (used on dashboard quick stats) */
.card-stats.card-stats-compact {
  padding: 0.85rem 0.95rem;
}

.card-stats.card-stats-compact .icon-box-shape {
  width: 48px;
  height: 48px;
}

.card-stats.card-stats-compact p {
  font-size: 0.8rem !important;
  margin-bottom: 0.25rem !important;
}

.card-stats.card-stats-compact .fw-800 {
  font-size: 1.35rem !important;
  line-height: 1.1;
}

.card-stats:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.icon-box-shape {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-md);
}

.bg-primary-soft { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: var(--primary); }
.bg-info-soft { background: linear-gradient(135deg, #cffafe, #a5f3fc); color: var(--info); }
.bg-success-soft { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: var(--success); }
.bg-danger-soft { background: linear-gradient(135deg, #fee2e2, #fecaca); color: var(--danger); }

.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }
.ls-1 { letter-spacing: 0.05em; }
.x-small { font-size: 0.75rem; }
.text-muted-600 { color: var(--muted); }

.btn-primary-grad {
  background: var(--gradient-primary);
  color: white;
  border: none;
  box-shadow: var(--shadow-md);
}

.btn-primary-grad:hover {
  background: var(--gradient-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.shadow-btn {
  box-shadow: var(--shadow-lg) !important;
}

.bg-dashboard {
  background: var(--gradient-primary);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ===== MODERN ALERTS ===== */
.alert-modern {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.alert-modern.danger {
  border-left: 4px solid var(--danger);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
}

.alert-modern .alert-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.alert-modern .alert-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
}

/* ===== USER MANAGEMENT PAGE STYLES ===== */
.user-management-container {
  background: var(--bg-gradient);
  min-height: 100vh;
  padding: 2rem 0;
}

.user-management-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 255, 0.95));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: var(--radius-xl);
  padding: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.user-management-header h1 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.user-management-header .subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
}

.user-stats-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.user-stats-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.user-stats-card .stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  color: white;
}

.user-stats-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.user-stats-card .stat-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-management-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.user-management-card .card-header {
  background: var(--gradient-primary);
  color: white;
  padding: 1.5rem 2rem;
  border: none;
  font-weight: 700;
  font-size: 1.25rem;
}

.user-management-card .card-body {
  padding: 0;
}

.user-table {
  width: 100%;
  margin: 0;
}

.user-table thead th {
  background: rgba(255, 255, 255, 0.9);
  z-index: 10;
}

.user-table tbody tr {
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transform: scale(1.01);
}

.user-table tbody td {
  padding: 1rem 1.5rem;
  vertical-align: middle;
  font-weight: 600;
}

.user-table .user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-right: 0.75rem;
}

.user-table .user-info h6 {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--dark);
}

.user-table .user-info small {
  color: var(--text-muted);
  font-weight: 600;
}

.user-role-badge {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-role-badge.admin {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.user-role-badge.manager {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.user-role-badge.user {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.user-status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-status-badge.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.user-status-badge.inactive {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
}

.user-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-action {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.btn-action.edit {
  background: var(--gradient-primary);
  color: white;
}

.btn-action.edit:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-action.password {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.btn-action.password:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-action.delete {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-action.delete:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-action.toggle {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
}

.btn-action.toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-create-user {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.btn-create-user:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Modal Enhancements */
.modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.input-group-text {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .user-management-header {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .user-management-header h1 {
    font-size: 2rem;
  }

  .user-stats-card {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .user-stats-card .stat-value {
    font-size: 1.5rem;
  }

  .user-table thead th,
  .user-table tbody td {
    padding: 0.75rem 1rem;
  }

  .user-table .user-avatar {
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
  }

  .user-actions {
    flex-direction: column;
    gap: 0.25rem;
  }

  .btn-action {
    padding: 0.375rem 0.75rem;
    font-size: 0.7rem;
  }
}

/* ===== HEADER SPECIFIC STYLES ===== */
.btn-quick-logout {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  color: var(--muted-600);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-left: 12px;
  transition: var(--transition);
  text-decoration: none;
  font-size: 0.8rem;
  backdrop-filter: blur(10px);
}

.btn-quick-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
  transform: translateY(-1px);
}

.text-center-all {
  text-align: center;
  vertical-align: middle;
}

/* ===== PROJECT SCHEDULE SPECIFIC STYLES ===== */
.text-dark-blue { color: var(--dark); }
.fw-900 { font-weight: 900; }
.fw-800 { font-weight: 800; }
.fw-600 { font-weight: 600; }
.fw-500 { font-weight: 500; }
.ls-1 { letter-spacing: 1px; }
.x-small { font-size: 0.7rem; }

.main-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: transparent;
  height: 100vh;
}

.sidebar-controls {
  width: 280px;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 95vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.table-wrapper {
  flex-grow: 1;
  overflow-x: auto;
  overflow-y: visible;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  height: auto;
  min-height: 400px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

/* Schedule capture framing: avoid table hugging the left edge */
.table-wrapper#captureArea {
  padding-left: 12px;
  padding-right: 12px;
}

/* ===== PROJECT SCHEDULE (Modern Layout) ===== */
.schedule-page-header {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
}

/* Mobile schedule (HP) */
@media (max-width: 576px) {
  .schedule-sidebar {
    position: static;
    top: auto;
    max-height: none;
  }

  .schedule-toolbar {
    padding: 10px;
  }

  .schedule-toolbar-row {
    flex-direction: column;
    align-items: stretch !important;
  }

  .schedule-toolbar-left,
  .schedule-toolbar-right {
    width: 100%;
  }

  .schedule-toolbar-right {
    flex-direction: column;
    align-items: stretch !important;
  }

  .schedule-person-filter,
  .schedule-date-range {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
  }

  .schedule-person-filter .section-heading,
  .schedule-date-range .section-heading {
    text-align: left;
  }

  .schedule-toolbar-right .btn {
    width: 100%;
  }

  .schedule-mode-chip {
    height: 30px;
    font-size: 0.75rem;
  }

  /* Override inline widths so controls fit on small screens */
  #personFilter {
    min-width: 0 !important;
    width: 100% !important;
  }
  #dateRangePicker {
    width: 100% !important;
  }

  .table-wrapper {
    min-height: 260px;
  }

  /* Aim: 1 week (7 days) fits within one screen width */
  .table-schedule {
    width: 100% !important;
    min-width: 100% !important;
    /* Outer border is handled by ::before; keep it thinner on mobile */

    /* Bootstrap container adds horizontal padding; subtract a small constant */
    --schedule-name-col: 92px;
    --schedule-day-col: calc((100vw - 28px - var(--schedule-name-col)) / 7);
  }

  .table-schedule::before {
    border-width: 1px;
  }

  thead th {
    height: 40px;
    font-size: 0.68rem;
  }

  .col-name {
    width: var(--schedule-name-col) !important;
    font-size: 0.78rem;
    padding-left: 12px !important;
  }

  .col-day { width: var(--schedule-day-col) !important; }

  .day-num-box { font-size: 0.8rem; }
  .day-name-box { display: none; }

  .cell-act {
    height: 44px !important;
    padding: 2px;
  }

  /* Thinner grid lines on mobile to reduce visual clutter */
  .table-schedule th,
  .table-schedule td {
    border-right-width: 1px;
    border-bottom-width: 1px;
  }

  .col-day.is-tomorrow,
  .table-schedule tbody td.is-tomorrow {
    border-left-width: 3px !important;
    border-right-width: 3px !important;
  }

  .table-schedule thead th:first-child,
  .table-schedule tbody td:first-child {
    border-left-width: 1px;
  }

  .kantor-label,
  .cuti-label,
  .absen-label {
    font-size: 0.6rem;
    margin-top: 12px;
  }
}

.schedule-page-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-success);
  box-shadow: var(--shadow-md);
  color: var(--dark);
}

.schedule-year-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.schedule-sidebar {
  position: sticky;
  /* Offset below the sticky-top navbar so the top isn't clipped */
  top: 84px;
  max-height: 88vh;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.schedule-sidebar-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}

.schedule-sidebar-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-md);
}

.schedule-sidebar-body {
  padding: 8px;
  overflow-y: auto;
  max-height: calc(88vh - 60px);
}

/* Tighter vertical rhythm inside Schedule Control */
#sidebarContent .mt-3 {
  margin-top: 0.35rem !important;
}

#sidebarContent .mode-btn {
  padding: 6px 10px;
  margin-bottom: 4px;
}

#sidebarContent .section-heading {
  margin-top: 0.35rem !important;
  margin-bottom: 0.25rem !important;
}

#sidebarContent .mb-2,
#sidebarContent .mb-3 {
  margin-bottom: 0.2rem !important;
}

#sidebarContent .form-control,
#sidebarContent .form-select {
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.schedule-sidebar-reveal {
  position: fixed;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1050;
  width: 36px;
  height: 36px;
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.9);
  align-items: center;
  justify-content: center;
}

.schedule-main {
  border-radius: var(--radius-lg);
}

.schedule-toolbar {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 12px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.schedule-mode-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.2px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-sm);
  color: var(--dark);
}

.schedule-section-title {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0 10px;
}

.table-schedule {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: max-content;
  border-radius: var(--radius-lg);
  position: relative;
}

/* Outer border as a rounded overlay (tables don't reliably clip to radius, esp. with sticky cells) */
.table-schedule::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #94a3b8;
  border-radius: var(--radius-lg);
  pointer-events: none;
  z-index: 120;
}

[data-bs-theme="dark"] .table-schedule::before {
  border-color: rgba(var(--bs-border-color-rgb), 0.5);
}

/* Rounded corners: make table corners follow the container radius */
.table-schedule thead tr:first-child th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.table-schedule thead tr:first-child th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.table-schedule tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-lg);
}

.table-schedule tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-lg);
}

/* Sticky first column needs explicit rounding too */
.table-schedule thead th.col-name {
  border-top-left-radius: var(--radius-lg);
  overflow: hidden;
}

.table-schedule tbody tr:last-child td.col-name {
  border-bottom-left-radius: var(--radius-lg);
  overflow: hidden;
}

.table-schedule tbody tr {
  border-bottom: none;
}

/* Zebra striping across full row */
.table-schedule tbody tr:nth-child(odd) td {
  background: rgba(229, 231, 235, 0.4) !important; /* light gray for odd rows */
}

.table-schedule tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.6) !important; /* white for even rows */
}

/* Project color grouping (toggleable) */
#captureArea.schedule-colors-on .table-schedule tbody td.cell-act.has-project-color {
  background: var(--proj-bg) !important;
  color: var(--proj-fg) !important;
}

/* Blend zebra with holiday background */
.table-schedule tbody tr:nth-child(odd) td.is-holiday {
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.3), rgba(229, 231, 235, 0.2)), 
              linear-gradient(135deg, rgba(255, 228, 230, 0.8), rgba(254, 226, 226, 0.8)) !important;
  border-right-color: rgba(220, 38, 38, 0.25) !important;
  border-bottom-color: rgba(220, 38, 38, 0.25) !important;
  box-shadow: inset -1px 0 0 rgba(220, 38, 38, 0.35), inset 0 -1px 0 rgba(220, 38, 38, 0.35) !important;
}

.table-schedule tbody tr:nth-child(even) td.is-holiday {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2)), 
              linear-gradient(135deg, rgba(255, 228, 230, 0.8), rgba(254, 226, 226, 0.8)) !important;
  border-right-color: rgba(220, 38, 38, 0.25) !important;
  border-bottom-color: rgba(220, 38, 38, 0.25) !important;
  box-shadow: inset -1px 0 0 rgba(220, 38, 38, 0.35), inset 0 -1px 0 rgba(220, 38, 38, 0.35) !important;
}

/* Blend zebra with weekend background (similar to holiday) */
.table-schedule tbody tr:nth-child(odd) td.is-weekend {
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.3), rgba(229, 231, 235, 0.2)), 
              linear-gradient(135deg, rgba(255, 228, 230, 0.8), rgba(254, 226, 226, 0.8)) !important;
  border-right-color: rgba(220, 38, 38, 0.25) !important;
  border-bottom-color: rgba(220, 38, 38, 0.25) !important;
  box-shadow: inset -1px 0 0 rgba(220, 38, 38, 0.35), inset 0 -1px 0 rgba(220, 38, 38, 0.35) !important;
}

.table-schedule tbody tr:nth-child(even) td.is-weekend {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2)), 
              linear-gradient(135deg, rgba(255, 228, 230, 0.8), rgba(254, 226, 226, 0.8)) !important;
  border-right-color: rgba(220, 38, 38, 0.25) !important;
  border-bottom-color: rgba(220, 38, 38, 0.25) !important;
  box-shadow: inset -1px 0 0 rgba(220, 38, 38, 0.35), inset 0 -1px 0 rgba(220, 38, 38, 0.35) !important;
}

.table-schedule thead th.col-day.is-holiday,
.table-schedule thead th.col-day.is-weekend {
  box-shadow: inset -1px 0 0 rgba(220, 38, 38, 0.45), inset 0 -2px 0 rgba(220, 38, 38, 0.45) !important;
}

/* Dark mode must override the light holiday/weekend gradients above */
[data-bs-theme="dark"] .table-schedule tbody tr:nth-child(odd) td.is-holiday,
[data-bs-theme="dark"] .table-schedule tbody tr:nth-child(even) td.is-holiday,
[data-bs-theme="dark"] .table-schedule tbody tr:nth-child(odd) td.is-weekend,
[data-bs-theme="dark"] .table-schedule tbody tr:nth-child(even) td.is-weekend {
  background:
    linear-gradient(
      135deg,
      rgba(var(--bs-danger-rgb), 0.08),
      rgba(var(--bs-danger-rgb), 0.03)
    ),
    var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .col-day.is-holiday,
[data-bs-theme="dark"] .col-day.is-weekend,
[data-bs-theme="dark"] .is-weekend {
  background:
    linear-gradient(
      135deg,
      rgba(var(--bs-danger-rgb), 0.08),
      rgba(var(--bs-danger-rgb), 0.03)
    ),
    var(--bs-tertiary-bg) !important;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--gray-200);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  height: 50px;
  text-align: center;
  color: var(--dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
}

/* Subtle tint for schedule headers (date + NAMA) */
.table-schedule thead th.col-day,
.table-schedule thead th.col-name {
  background: rgba(226, 232, 240, 0.96) !important;
}

/* Dark mode: the rule above uses !important, so re-override for dark theme */
[data-bs-theme="dark"] .table-schedule thead th.col-day,
[data-bs-theme="dark"] .table-schedule thead th.col-name {
  background: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
}

.col-day { width: 100px; }

/* Holiday styling for header columns */
.col-day.is-holiday {
  background: linear-gradient(135deg, rgba(255, 228, 230, 0.8), rgba(254, 226, 226, 0.8)) !important;
  border-right-color: rgba(220, 38, 38, 0.35) !important;
  border-bottom-color: rgba(220, 38, 38, 0.35) !important;
  backdrop-filter: blur(10px);
}

.col-day.is-weekend {
  background: linear-gradient(135deg, rgba(255, 228, 230, 0.8), rgba(254, 226, 226, 0.8)) !important;
  border-right-color: rgba(220, 38, 38, 0.35) !important;
  border-bottom-color: rgba(220, 38, 38, 0.35) !important;
  backdrop-filter: blur(10px);
}

.table-schedule tbody td.is-holiday,
.table-schedule tbody td.is-weekend {
  border-right-color: rgba(220, 38, 38, 0.25) !important;
  border-bottom-color: rgba(220, 38, 38, 0.25) !important;
}

/* H+1 (Tomorrow) column with distinct grid lines */
.col-day.is-tomorrow {
  border-left: 4px solid var(--primary) !important;
  border-right: 4px solid var(--primary) !important;
  box-shadow:
    inset 0 0 0 9999px rgba(var(--bs-primary-rgb), 0.06);
}

.table-schedule tbody td.is-tomorrow {
  border-left: 4px solid var(--primary) !important;
  border-right: 4px solid var(--primary) !important;
  box-shadow:
    inset 0 0 0 9999px rgba(var(--bs-primary-rgb), 0.04);
}

[data-bs-theme="dark"] .col-day.is-tomorrow,
[data-bs-theme="dark"] .table-schedule tbody td.is-tomorrow {
  box-shadow:
    inset 0 0 0 9999px rgba(var(--bs-primary-rgb), 0.10);
}

.day-num-box { font-size: 0.9rem; font-weight: 900; color: var(--dark); }

[data-bs-theme="dark"] .day-num-box {
  color: var(--bs-body-color) !important;
}

/* Modern subtle grid lines for schedule */
.table-schedule th,
.table-schedule td {
  border-right: 2px solid #94a3b8; /* slate-400 */
  border-bottom: 2px solid #94a3b8; /* slate-400 */
}

/* Ensure the very left table edge is visible (sticky first column covers table shadow) */
.table-schedule thead th:first-child,
.table-schedule tbody td:first-child {
  border-left: 2px solid #94a3b8; /* slate-400 */
}

[data-bs-theme="dark"] .table-schedule thead th:first-child,
[data-bs-theme="dark"] .table-schedule tbody td:first-child {
  border-left-color: rgba(var(--bs-border-color-rgb), 0.5) !important;
}

.table-schedule tr:last-child td { border-bottom: 0; }
.table-schedule th:last-child,
.table-schedule td:last-child { border-right: 0; }

/* Slightly stronger boundary at the left frozen column */
.table-schedule .col-name {
  border-right: 2px solid #94a3b8; /* slate-400 for stronger separator */
}
.day-name-box { font-size: 0.7rem; font-weight: 700; color: var(--muted); }

.col-name {
  width: 120px;
  position: sticky;
  left: 0;
  background: rgba(var(--bs-body-bg-rgb), 1);
  backdrop-filter: none;
  z-index: 101;
  border-right: 4px solid var(--primary);
  border-left: 2px solid #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 8px 8px 16px !important;
  color: var(--dark);
}

/* Force the sticky name column to be fully opaque (zebra striping uses nth-child + !important) */
.table-schedule tbody tr:nth-child(odd) td.col-name,
.table-schedule tbody tr:nth-child(even) td.col-name {
  background: rgba(var(--bs-body-bg-rgb), 1) !important;
}

[data-bs-theme="dark"] .table-schedule tbody tr:nth-child(odd) td.col-name,
[data-bs-theme="dark"] .table-schedule tbody tr:nth-child(even) td.col-name {
  background: var(--bs-tertiary-bg) !important;
}

[data-bs-theme="dark"] .col-name {
  border-left-color: rgba(var(--bs-border-color-rgb), 0.5) !important;
}

.is-weekend {
  background: linear-gradient(135deg, rgba(255, 228, 230, 0.8), rgba(254, 226, 226, 0.8)) !important;
  backdrop-filter: blur(5px);
}

.cell-act {
  height: 65px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  color: var(--dark);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
}

.cell-act:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.cell-act[style*="background-color"] { color: #fff !important; }
.cell-act[style*="background-color: rgb(252, 211, 77)"], .cell-act[style*="background-color: #fcd34d"] { color: #000 !important; }
.cell-act[style*="background-color"] span { color: inherit !important; }

.kantor-label, .cuti-label, .izin-label, .absen-label {
  color: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  display: block;
  text-align: center;
  margin-top: 20px;
  letter-spacing: 0.5px;
}

.mode-btn {
  margin-bottom: 8px;
  font-size: 0.75rem !important;
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  border: none;
  position: relative;
}

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

.mode-btn.active {
  box-shadow:
    inset 6px 0 0 var(--primary),
    0 0 0 2px rgba(var(--bs-body-bg-rgb), 0.95),
    0 0 0 5px rgba(var(--bs-primary-rgb), 0.40),
    var(--shadow-md);
  transform: translateY(-1px);
  font-weight: 900;
}

.mode-btn:focus-visible {
  outline: 3px solid rgba(var(--bs-primary-rgb), 0.55);
  outline-offset: 2px;
}

/* Project select: only highlighted when a project is selected */
.active-select.compact-input {
  box-shadow:
    0 0 0 2px rgba(var(--bs-body-bg-rgb), 0.95),
    0 0 0 5px rgba(var(--bs-primary-rgb), 0.35);
}

.btn-dlk-navy {
  background: linear-gradient(135deg, #1e40af, #1e3a8a) !important;
  color: white !important;
  border: none;
}

.btn-lembur-orange {
  background: linear-gradient(135deg, #ea580c, #c2410c) !important;
  color: white !important;
  border: none;
}

.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 15px;
  margin-bottom: 8px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 4px;
  letter-spacing: 0.5px;
}

.badge-dlk {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #000;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 2px 6px;
  border: 1px solid #000;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.badge-lembur {
  position: absolute;
  top: 3px;
  right: 3px;
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 2px 6px;
  border: 1px solid #fff;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.badge-absen-proyek {
  position: absolute;
  top: 3px;
  right: 3px;
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 2px 6px;
  border: 1px solid #fff;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.badge-libur {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff !important;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 2px 6px;
  border: 1px solid #7f1d1d;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.btn-export-wa {
  background: var(--gradient-success) !important;
  color: white !important;
  border: none;
  font-weight: 700;
  margin-bottom: 15px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.btn-export-wa:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.filter-container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 15px;
  border-radius: var(--radius-lg);
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
}

.form-control-sm {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.form-control-sm:focus {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.btn-xs {
  padding: 6px 12px;
  font-size: 0.7rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  transition: var(--transition);
}

.btn-xs:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ===== PERSONNEL MANAGEMENT SPECIFIC STYLES ===== */
.avatar-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.4rem;
}

.bg-primary-soft { background: #e0e7ff; color: var(--primary); }
.bg-success-soft { background: #d1fae5; color: var(--success); }
.bg-info-soft { background-color: #cffafe; color: #0891b2; }

.custom-table thead th {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--gray-200);
  padding: 15px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
}

.hover-row:hover {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.sort-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.sort-link:hover {
  color: var(--primary);
  transform: scale(1.02);
}

.badge-premium {
  padding: 5px 14px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.bg-soft-primary { background: #e0e7ff; color: var(--primary); }
.bg-soft-success { background: #d1fae5; color: var(--success); }

.btn-primary-premium {
  background: var(--gradient-primary);
  color: white;
  border: none;
  transition: var(--transition);
}

.btn-primary-premium:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.bg-dark-blue { background: var(--dark); }

.btn-action-sm {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  font-size: 0.85rem;
}

.btn-action-sm:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 1);
}

.form-control-lg {
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control-lg:focus {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.modal-content {
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-lg);
}

.progress {
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  border-radius: var(--radius-xl);
  transition: width 0.6s ease;
}

/* ===========================================
   PROJECTS LIST SPECIFIC STYLES
   =========================================== */

    /* Header Stats */
    .stats-pill {
        font-size: 0.7rem;
        font-weight: 800;
        text-transform: uppercase;
        color: var(--text-muted);
    }
    .stats-pill span { margin-left: 6px; font-size: 1rem; font-weight: 900; }

    /* Table Design */
    .custom-table-premium thead th {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-bottom: 2px solid var(--gray-200);
        padding: 18px 12px;
        font-size: 0.75rem;
        font-weight: 800;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .custom-table-premium tbody tr {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--gray-200);
        transition: var(--transition);
    }

    .shadow-hover:hover {
        transform: scale(1.002);
        box-shadow: var(--shadow-lg);
        z-index: 2;
        background-color: rgba(255, 255, 255, 0.95) !important;
    }

    /* Modern Search Box */
    .search-box {
        position: relative;
    }
    .search-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        font-size: 1rem;
    }
    .search-box .form-control {
        padding-left: 2.5rem;
        border-radius: var(--radius-lg);
        border: 2px solid var(--gray-200);
        font-weight: 600;
        font-size: 0.9rem;
        transition: var(--transition);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
    }
    .search-box .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    /* Modern Badges & Progress */
    .badge-premium {
        padding: 0.5rem 1rem;
        border-radius: var(--radius-lg);
        font-weight: 700;
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        display: inline-block;
        box-shadow: var(--shadow-sm);
    }

    .progress-premium {
        height: 10px;
        background: var(--gray-200);
        border-radius: var(--radius-xl);
        overflow: hidden;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    .progress-bar-premium {
        height: 100%;
        border-radius: var(--radius-xl);
        transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        background: var(--gradient-primary);
        position: relative;
    }
    .progress-bar-premium::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        animation: shimmer 2s infinite;
    }

    /* Modern Team Assignee */
    .avatar-sm {
        width: 28px;
        height: 28px;
        background: var(--gradient-primary);
        color: white;
        border-radius: var(--radius-lg);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: 800;
        box-shadow: var(--shadow-sm);
    }

    /* Modern Buttons */
    .btn-primary-premium {
        background: var(--gradient-primary);
        border: none;
        font-weight: 700;
        font-size: 0.85rem;
        color: #fff;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
        transition: var(--transition);
    }
    .btn-primary-premium:hover {
        background: var(--gradient-secondary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .btn-action {
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        color: var(--primary);
        transition: var(--transition);
        text-decoration: none;
        font-size: 0.9rem;
        box-shadow: var(--shadow-sm);
    }
    .btn-action:hover {
        background: var(--gradient-primary);
        color: #fff !important;
        transform: translateY(-3px) scale(1.05);
        box-shadow: var(--shadow-md);
    }

    .customer-tag {
        font-size: 0.85rem;
        letter-spacing: -0.2px;
        background: var(--gradient-primary);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-weight: 600;
    }

    .bg-soft-primary { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
    .bg-soft-success { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
    .bg-soft-danger { background: linear-gradient(135deg, #fee2e2, #fecaca); }
    .bg-soft-warning { background: linear-gradient(135deg, #fef3c7, #fde68a); }

    .pulse-text {
        animation: pulse-red 2s infinite;
    }

    @keyframes pulse-red {
        0% { opacity: 1; }
        50% { opacity: 0.6; }
        100% { opacity: 1; }
    }

    @media (min-width: 992px) {
        .border-start-lg { border-left: 1px solid var(--gray-200) !important; }
    }

/* ===========================================
   PROJECT DETAIL SPECIFIC STYLES
   =========================================== */

    .x-small {
        font-size: 11px;
    }

    .tracking-wider {
        letter-spacing: 0.05em;
    }

    .icon-box {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-lg);
        font-size: 1rem;
        box-shadow: var(--shadow-md);
        transition: var(--transition);
    }

    .icon-box:hover {
        transform: scale(1.1);
    }

    .avatar-xs {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: bold;
        border-radius: 50%;
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
    }

    .bg-soft-primary {
        background: var(--gradient-primary);
        color: white;
    }

    .bg-soft-danger {
        background: var(--gradient-danger);
        color: white;
    }

    .bg-soft-info {
        background: var(--gradient-info);
        color: white;
    }

    .bg-soft-success {
        background: var(--gradient-success);
        color: white;
    }

    .table-excel {
        width: 100%;
        border-collapse: collapse;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    .table-excel thead th {
      background: var(--bs-secondary-bg);
      color: var(--bs-body-color);
      border: 1px solid rgba(var(--bs-border-color-rgb), 0.95);
        font-size: 11px;
        padding: 12px 8px;
        text-transform: uppercase;
        font-weight: 700;
    }

    .table-excel td {
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: 10px 8px;
        vertical-align: middle;
        transition: var(--transition);
    }

    .table-excel tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .table-excel tbody tr:hover {
        background: rgba(99, 102, 241, 0.05);
        transform: scale(1.01);
    }

    .gantt-wrapper {
        overflow-x: auto;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-radius: var(--radius-lg);
    }

    .gantt-table {
        border-collapse: collapse;
        table-layout: fixed;
        width: 100%;
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    .gantt-table th, .gantt-table td {
        border: 1px solid rgba(255, 255, 255, 0.3);
        height: 40px;
        padding: 0;
        text-align: center;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
    }

    .gantt-table tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .sticky-task {
        position: sticky;
        left: 0;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px);
        z-index: 5;
        width: 250px;
        text-align: left !important;
        padding-left: 12px !important;
        border-right: 2px solid var(--primary) !important;
        font-size: 11px;
        font-weight: 600;
        color: var(--text-primary);
        box-shadow: var(--shadow-sm);
    }

    .month-header {
        background: var(--gradient-primary);
        color: white;
        font-size: 10px;
        text-transform: uppercase;
        padding: 5px 0;
        font-weight: 700;
    }

    .day-header {
        background: rgba(99, 102, 241, 0.1);
        backdrop-filter: blur(10px);
        font-size: 10px;
        font-weight: bold;
        color: var(--text-primary);
    }

    .weekend {
        background: rgba(239, 68, 68, 0.05);
        backdrop-filter: blur(10px);
    }

    .bar-container {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 2px;
        height: 100%;
        justify-content: center;
    }

    .bar-planned {
        background: var(--gradient-primary);
        height: 8px;
        width: 100%;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
    }

    .bar-planned:hover {
        transform: scale(1.2);
    }

    .bar-actual {
        background: var(--gradient-success);
        height: 8px;
        width: 100%;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
    }

    .bar-actual:hover {
        transform: scale(1.2);
    }

/* ===========================================
   LOGIN SPECIFIC STYLES
   =========================================== */

  /* Simple login page: keep inputs compact even though .form-control is styled globally */
  .login-page {
    min-height: 100vh;
    --sf1-x: 0px;
    --sf1-y: 0px;
    --sf2-x: 0px;
    --sf2-y: 0px;
    --sf3-x: 0px;
    --sf3-y: 0px;
    background-image:
      radial-gradient(800px circle at 20% 10%, rgba(var(--bs-primary-rgb), 0.10), rgba(var(--bs-primary-rgb), 0) 55%),
      radial-gradient(900px circle at 80% 90%, rgba(var(--bs-info-rgb), 0.08), rgba(var(--bs-info-rgb), 0) 60%);
    background-repeat: no-repeat;
  }

  .login-page main {
    position: relative;
    z-index: 1;
  }

  .login-page .login-bg-starfield {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    opacity: 1;
  }

  [data-bs-theme="dark"] .login-page .login-bg-starfield {
    /* Theme tuning for star readability */
  }

  .login-page .login-bg-starfield .sf-star {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 999px;
    background: rgba(var(--bs-body-color-rgb), 1);
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }

  [data-bs-theme="dark"] .login-page .login-bg-starfield .sf-star {
    box-shadow:
      0 0 6px rgba(var(--bs-body-color-rgb), 0.22),
      0 0 14px rgba(var(--bs-body-color-rgb), 0.12);
  }

  @media (prefers-reduced-motion: reduce) {
    .login-page .login-bg-starfield {
      display: none;
    }
  }

  .login-page .login-card {
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.65) !important;
    border-radius: 1rem;
    background: rgba(var(--bs-body-bg-rgb), 0.95);
    backdrop-filter: blur(16px);
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }

  .login-page .login-form-col {
    /* Keep the form from becoming too wide (esp. on small screens) */
    width: 92%;
    width: min(92vw, 380px);
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }

  .login-page .login-theme-toggle {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.5rem;
    line-height: 1;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    animation: pulse-glow 3s ease-in-out infinite;
  }

  @keyframes pulse-glow {
    0%, 100% {
      box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.5);
      transform: scale(1);
    }
    50% {
      box-shadow: 0 0 0 8px rgba(var(--bs-primary-rgb), 0);
      transform: scale(1.05);
    }
  }

  .login-page .login-theme-toggle:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 4px 16px rgba(var(--bs-primary-rgb), 0.4) !important;
    animation: none;
  }

  /* Fix dark mode password toggle button background */
  [data-bs-theme="dark"] .login-page .password-toggle-btn.btn-outline-secondary {
    background-color: rgba(108, 117, 125, 0.15) !important;
    border-color: rgba(var(--bs-border-color-rgb), 0.5) !important;
    color: var(--bs-body-color) !important;
  }

  [data-bs-theme="dark"] .login-page .password-toggle-btn.btn-outline-secondary:hover {
    background-color: rgba(108, 117, 125, 0.25) !important;
    border-color: rgba(var(--bs-border-color-rgb), 0.7) !important;
  }

  .login-page .form-label {
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
  }

  /* Narrower credential fields (username/password) */
  .login-page .login-card form .form-label,
  .login-page .login-card form .form-control.form-control-sm {
    width: 100%;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
  }

  .login-page .login-card form .form-label {
    display: block;
  }

  .login-page .form-control.form-control-sm {
    padding: 0.35rem 0.6rem;
    font-weight: 600;
    background: var(--bs-body-bg);
    border-color: rgba(var(--bs-border-color-rgb), 0.95);
  }

  .login-page .form-control.form-control-sm:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.85);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.20);
  }

  [data-bs-theme="dark"] .login-page .form-control.form-control-sm {
    border-color: rgba(var(--bs-border-color-rgb), 0.85);
  }

    .form-floating {
        margin-bottom: 1.5rem;
    }

    .form-control {
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-lg);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        padding: 1rem 1.25rem;
        font-weight: 600;
        transition: var(--transition);
    }
    .form-control:focus {
        border-color: rgba(102, 126, 234, 0.5);
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        background: rgba(255, 255, 255, 0.95);
    }
    .form-label {
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .alert {
        border-radius: var(--radius-lg);
        border: none;
        backdrop-filter: blur(10px);
        font-weight: 600;
    }
    .alert-danger {
        background: rgba(239, 68, 68, 0.1);
        border-left: 4px solid var(--danger);
        color: var(--danger);
    }
    .alert-success {
        background: rgba(16, 185, 129, 0.1);
        border-left: 4px solid var(--success);
        color: var(--success);
    }

/* ===========================================
   INDEX/DASHBOARD SPECIFIC STYLES
   =========================================== */

    .bg-dashboard {
        min-height: 100vh;
    }

    .x-small {
        font-size: 0.72rem;
    }

    .ls-1 {
        letter-spacing: 0.5px;
    }

    .card-stats {
        transition: var(--transition);
        border-radius: var(--radius-lg);
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .card-stats:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-xl);
    }

    .icon-box-shape {
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
        transition: var(--transition);
    }

    .icon-box-shape:hover {
        transform: scale(1.1);
    }

    .btn-primary-grad {
        background: var(--gradient-primary);
        border: none;
        color: white;
        font-weight: 700;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
    }

    .btn-primary-grad:hover {
        background: var(--gradient-secondary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-xl);
    }

    .shadow-btn {
        box-shadow: var(--shadow-lg);
    }

    .bg-primary-soft {
        background: var(--gradient-primary);
        color: white;
    }

    .bg-info-soft {
        background: var(--gradient-info);
        color: white;
    }

    .bg-success-soft {
        background: var(--gradient-success);
        color: white;
    }

    .bg-danger-soft {
        background: var(--gradient-danger);
        color: white;
    }

    .bg-light-blue {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
    }

    /* Table hover effects */
    .table-hover tbody tr:hover {
        background: rgba(99, 102, 241, 0.05);
        transform: scale(1.01);
        transition: var(--transition);
    }

/* ===========================================
   WEEKLY REPORT SPECIFIC STYLES
   =========================================== */

    .header-card {
        overflow: visible !important;
        position: relative;
      /* Keep the weekly-report header card behind the sticky navbar */
      z-index: 1 !important;
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
    }

    .header-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-xl);
    }

    .header-card .card-body {
        overflow: visible !important;
        background: transparent;
    }

    .search-wrapper {
        position: relative;
      /* Needs to stay above the header card, but not above the navbar */
      z-index: 3 !important;
    }

    #searchResult {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: var(--radius-lg);
        margin-top: 8px;
        box-shadow: var(--shadow-xl) !important;
        max-height: 250px;
        overflow-y: auto;
        /* Must stay above the header-card but below the navbar */
        z-index: 100 !important;
    }

    .search-item {
        background: transparent !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        transition: var(--transition);
    }

    .search-item:hover {
        background: rgba(99, 102, 241, 0.1) !important;
        cursor: pointer;
        transform: translateX(5px);
    }

    .table-container-card {
        z-index: 10;
        position: relative;
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: var(--shadow-lg);
        border-radius: var(--radius-lg);
        transition: var(--transition);
    }

    .table-container-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-xl);
    }

    /* Weekly report: CATEGORY column gridlines only (week columns keep original look) */
    .table-container-card {
      --weekly-report-category-grid: rgba(var(--bs-body-color-rgb), 0.30);
      --weekly-report-category-grid-w: 0.5px;
    }

    .table-container-card .table > :not(caption) > * > *.sticky-col {
      border-left: var(--weekly-report-category-grid-w) solid var(--weekly-report-category-grid) !important;
      border-top: var(--weekly-report-category-grid-w) solid var(--weekly-report-category-grid) !important;
      border-bottom: var(--weekly-report-category-grid-w) solid var(--weekly-report-category-grid) !important;
      box-shadow: inset 0 0 0 var(--weekly-report-category-grid-w) var(--weekly-report-category-grid) !important;
    }

    .sticky-col {
        position: sticky;
        left: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
      z-index: 20 !important;
        box-shadow: var(--shadow-md);
        border-right: 2px solid var(--primary) !important;
    }

    /* Weekly report: keep sticky CATEGORY column in front of week columns */
    .table-container-card .table thead th:not(.sticky-col) {
      position: relative;
      z-index: 1;
    }

    /* Weekly report header backgrounds (CATEGORY + week headers) */
    .table-container-card .table thead th.sticky-col {
      background: var(--bs-secondary-bg) !important;
      color: var(--bs-body-color) !important;
    }

    .table-container-card .table thead th:not(.sticky-col):not(.current-week-marker) {
      background: var(--bs-secondary-bg) !important;
      color: var(--bs-body-color) !important;
    }

    .table-container-card .table tbody td:not(.sticky-col) {
      position: relative;
      z-index: 0;
    }

    .table-container-card .table thead th.sticky-col,
    .table-container-card .table tbody td.sticky-col {
      position: sticky;
      left: 0;
      z-index: 30 !important;
    }

    .border-category {
        border-right: 3px solid var(--primary) !important;
    }

    .timeline-textarea {
        height: 120px;
        min-width: 300px;
        resize: none;
        overflow: hidden;
        border-radius: var(--radius-lg);
        border: 2px solid rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        transition: var(--transition);
        box-shadow: var(--shadow-sm);
    }

    .timeline-textarea:focus {
        background: rgba(255, 255, 255, 0.95) !important;
        outline: none;
        overflow-y: auto;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    .save-indicator {
        position: absolute;
        bottom: 8px;
        right: 12px;
        font-size: 10px;
        color: var(--success);
        font-weight: bold;
        opacity: 0;
        transition: var(--transition);
    }

    .save-indicator.show {
        opacity: 1;
    }

    .btn-white {
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(10px);
        color: var(--primary) !important;
        border: 1px solid rgba(255, 255, 255, 0.3);
        transition: var(--transition);
        box-shadow: var(--shadow-sm);
    }

    .btn-white:hover {
        background: var(--gradient-primary) !important;
        color: white !important;
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    /* GANTT STYLE */
    .gantt-table {
        border-collapse: collapse;
        width: 100%;
        border: 1px solid rgba(255, 255, 255, 0.3);
        table-layout: fixed;
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    .gantt-table th, .gantt-table td {
        border: 1px solid rgba(255, 255, 255, 0.3);
        height: 32px;
        text-align: center;
        padding: 0;
        font-size: 10px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
    }

    .gantt-table tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .gantt-sticky-col {
        position: sticky;
        left: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        z-index: 12;
        width: 180px;
        text-align: left !important;
        padding-left: 10px !important;
        font-weight: bold;
        border-right: 2px solid var(--primary);
        box-shadow: var(--shadow-sm);
    }

    .gantt-type-col {
        position: sticky;
        left: 180px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        z-index: 11;
        width: 60px;
        font-weight: bold;
        border-right: 2px solid var(--primary);
        box-shadow: var(--shadow-sm);
    }

    .gantt-weight-col {
        position: sticky;
        left: 240px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        z-index: 11;
        width: 50px;
        font-weight: bold;
        color: var(--warning);
        border-right: 2px solid var(--primary);
        box-shadow: var(--shadow-sm);
    }

    .day-header {
        background: rgba(99, 102, 241, 0.1);
        backdrop-filter: blur(10px);
        font-weight: bold;
        width: 35px;
    }

    .weekend {
        background: rgba(239, 68, 68, 0.05);
        backdrop-filter: blur(10px);
    }

    .bar-planned {
        background: rgba(99, 102, 241, 0.15);
        color: var(--primary);
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        border-radius: var(--radius-sm);
        transition: var(--transition);
    }

    .bar-planned:hover {
        background: rgba(99, 102, 241, 0.25);
        transform: scale(1.05);
    }

    .bar-actual {
        background: rgba(34, 197, 94, 0.15);
        color: var(--success);
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        cursor: pointer;
        border-radius: var(--radius-sm);
        transition: var(--transition);
    }

    .bar-actual:hover {
        background: rgba(34, 197, 94, 0.25);
        transform: scale(1.05);
    }

    /* S-Curve Style */
    .scurve-container {
        height: 400px;
        width: 100%;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-radius: var(--radius-lg);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: var(--shadow-md);
    }

    /* Cards */
    .card {
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.9);
        box-shadow: var(--shadow-md);
        border-radius: var(--radius-lg);
        transition: var(--transition);
    }

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

    /* Form controls */
    .form-select {
        border-radius: var(--radius-lg);
        border: 2px solid rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        transition: var(--transition);
        box-shadow: var(--shadow-sm);
    }

    .form-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    /* Progress bar */
    .progress {
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(10px);
        border-radius: var(--radius-xl);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .progress-bar {
        background: var(--gradient-primary);
        border-radius: var(--radius-xl);
        transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

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

    /* Table */
    .table {
        background: transparent;
    }

    .table thead th {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 2px solid var(--gray-200);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-primary);
    }

    .table tbody tr {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        transition: var(--transition);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .table tbody tr:hover {
        background: rgba(255, 255, 255, 0.95);
        transform: scale(1.002);
        box-shadow: var(--shadow-sm);
    }

    /* Current week marker */
    .current-week-marker {
        background: var(--gradient-primary) !important;
        color: white !important;
        box-shadow: var(--shadow-md);
    }

    .current-week-marker .small {
        color: rgba(0, 0, 0, 0.8) !important;
    }

    /* Input group */
    .input-group {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-radius: var(--radius-xl);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
    }

    .input-group:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    .input-group-text {
        background: transparent;
        border: none;
        color: var(--text-muted);
    }

    .form-control {
        background: transparent;
        border: none;
        color: var(--text-primary);
    }

    .form-control:focus {
        box-shadow: none;
    }

    /* Button group */
    .btn-group .btn {
        border-radius: var(--radius-xl) !important;
        transition: var(--transition);
    }

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

    /* Animations */
    @keyframes shimmer {
        0% { transform: translateX(-100%); }
        100% { transform: translateX(100%); }
    }

/* ===========================================
   ADD PROJECT SPECIFIC STYLES
   =========================================== */

    .card {
        border-radius: var(--radius-lg);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: var(--shadow-md);
        margin-bottom: 20px;
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.9);
        transition: var(--transition);
    }

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

    .card-header {
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        padding: 16px 20px;
    }

    /* Excel Table Styling */
    .table-excel {
        border-collapse: collapse;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        width: 100%;
        border-radius: var(--radius-lg);
        overflow: hidden;
    }
    .table-excel thead th {
      background: var(--bs-secondary-bg);
      color: var(--bs-body-color);
      border: 1px solid rgba(var(--bs-border-color-rgb), 0.95);
        font-size: 12px;
        padding: 12px 8px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .table-excel td {
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: 0;
    }
    .table-excel tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    .table-excel input, .table-excel select {
        border: none !important;
        width: 100%;
        padding: 10px 8px;
        font-size: 13px;
        background: transparent;
        color: var(--text-primary);
        transition: var(--transition);
    }
    .table-excel input:focus {
        background: rgba(99, 102, 241, 0.1);
        outline: none;
        border-radius: var(--radius-sm);
    }
    .total-row {
        background: var(--gradient-success);
        color: white;
        font-weight: bold;
    }

    /* Gantt Chart ala Excel */
    .gantt-wrapper {
        overflow-x: auto;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: var(--radius-lg);
    }
    .gantt-table {
        border-collapse: collapse;
        table-layout: fixed;
        width: 100%;
        border-radius: var(--radius-lg);
        overflow: hidden;
    }
    .gantt-table th, .gantt-table td {
        border: 1px solid rgba(255, 255, 255, 0.3);
        height: 32px;
        padding: 0;
        text-align: center;
    }
    .gantt-table tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    .sticky-task {
        position: sticky;
        left: 0;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px);
        z-index: 5;
        width: 250px;
        text-align: left !important;
        padding-left: 12px !important;
        border-right: 2px solid var(--primary) !important;
        font-size: 12px;
        font-weight: 600;
    }

    .month-header {
        background: var(--gradient-primary);
        color: white;
        font-size: 11px;
        text-transform: uppercase;
        font-weight: 700;
    }
    .day-header {
        background: rgba(99, 102, 241, 0.1);
        font-size: 10px;
        font-weight: bold;
        color: var(--text-primary);
    }
    .weekend {
        background: rgba(0, 0, 0, 0.05);
    }
    .bar-excel {
        background: var(--gradient-primary);
        height: 18px;
        margin: 0;
        width: 100%;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
    }

    .btn-excel {
        border-radius: var(--radius-lg);
        font-weight: 600;
        font-size: 13px;
        transition: var(--transition);
        box-shadow: var(--shadow-sm);
    }

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

    /* Form controls */
    .form-control, .form-select {
        border-radius: var(--radius-lg);
        border: 2px solid rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        transition: var(--transition);
        box-shadow: var(--shadow-sm);
    }

    .form-control:focus, .form-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        background: rgba(255, 255, 255, 0.95);
    }

    /* Submit button */
    #btnSubmit {
        background: var(--gradient-primary);
        border: none;
        font-weight: 700;
        font-size: 1rem;
        color: #fff;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
        transition: var(--transition);
        padding: 12px 30px;
    }

    #btnSubmit:hover:not(:disabled) {
        background: var(--gradient-secondary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    #btnSubmit:disabled {
        background: var(--gray-400);
        cursor: not-allowed;
        transform: none;
        box-shadow: var(--shadow-sm);
    }

/* ===========================================
   TEST FILES SPECIFIC STYLES
   =========================================== */

    /* Test Access Page */
    .test-access-container {
        max-width: 800px;
        margin: 0 auto;
    }
    .test-access-header {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-xl);
        padding: 2rem;
        margin-bottom: 2rem;
        box-shadow: var(--shadow-lg);
        text-align: center;
    }
    .test-access-header h1 {
        background: var(--gradient-primary);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-weight: 800;
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    .test-access-header p {
        color: var(--text-muted);
        font-weight: 600;
        font-size: 1.1rem;
    }
    .test-info {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        margin-bottom: 2rem;
        box-shadow: var(--shadow-md);
    }
    .test-info strong {
        color: var(--dark);
        font-weight: 700;
    }
    .access-list {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-xl);
        padding: 2rem;
        margin-bottom: 2rem;
        box-shadow: var(--shadow-lg);
    }
    .access-list h2 {
        color: var(--dark);
        font-weight: 700;
        margin-bottom: 1.5rem;
        font-size: 1.5rem;
    }
    .access-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        margin-bottom: 0.5rem;
        background: rgba(255, 255, 255, 0.8);
        border-radius: var(--radius-md);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
    .access-item.pass {
        border-left: 4px solid var(--success);
        background: rgba(16, 185, 129, 0.05);
    }
    .access-item.fail {
        border-left: 4px solid var(--danger);
        background: rgba(239, 68, 68, 0.05);
    }
    .page-name {
        font-weight: 700;
        color: var(--dark);
    }
    .page-url {
        color: var(--text-muted);
        font-size: 0.9rem;
        font-weight: 600;
    }
    .status {
        font-weight: 700;
        padding: 0.25rem 0.75rem;
        border-radius: var(--radius-md);
        font-size: 0.8rem;
        text-transform: uppercase;
    }
    .status.pass {
        background: rgba(16, 185, 129, 0.2);
        color: var(--success);
    }
    .status.fail {
        background: rgba(239, 68, 68, 0.2);
        color: var(--danger);
    }
    .timestamp {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        margin-bottom: 2rem;
        box-shadow: var(--shadow-md);
        text-align: center;
    }
    .timestamp strong {
        color: var(--dark);
        font-weight: 700;
    }
    .back-link {
        display: inline-block;
        background: var(--gradient-primary);
        color: white;
        padding: 0.75rem 2rem;
        border-radius: var(--radius-lg);
        text-decoration: none;
        font-weight: 700;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
    }
    .back-link:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        color: white;
        text-decoration: none;
    }

    /* Test Session Page */
    .test-session-container {
        max-width: 600px;
        margin: 0 auto;
    }
    .session-id {
        font-family: monospace;
        background: rgba(0,0,0,0.1);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-weight: 700;
    }

    /* Test Logout Page */
    .test-section {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        box-shadow: var(--shadow-md);
    }
    .test-section h2 {
        color: var(--dark);
        font-weight: 700;
        margin-bottom: 1rem;
        font-size: 1.25rem;
    }
    .test-section p {
        margin-bottom: 0.5rem;
        font-weight: 600;
    }
    .test-section strong {
        color: var(--dark);
    }
    .status.success {
        background: rgba(16, 185, 129, 0.2);
        color: var(--success);
    }
    .status.logged-out {
        background: rgba(239, 68, 68, 0.2);
        color: var(--danger);
    }

    /* Test Offline Page */
    .test-result {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: var(--shadow-md);
        transition: var(--transition);
    }
    .test-result:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }
    .test-result.pass {
        border-left: 4px solid var(--success);
        background: rgba(16, 185, 129, 0.05);
    }
    .test-result.fail {
        border-left: 4px solid var(--danger);
        background: rgba(239, 68, 68, 0.05);
    }
    .test-result strong {
        font-weight: 700;
        font-size: 1.1rem;
        display: block;
        margin-bottom: 0.5rem;
    }
    .summary {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-xl);
        padding: 2rem;
        margin: 2rem 0;
        box-shadow: var(--shadow-lg);
        text-align: center;
        font-weight: 700;
        font-size: 1.25rem;
    }
    .summary.pass {
        border-left: 4px solid var(--success);
        background: rgba(16, 185, 129, 0.1);
        color: var(--success);
    }
    .summary.fail {
        border-left: 4px solid var(--danger);
        background: rgba(239, 68, 68, 0.1);
        color: var(--danger);
    }
    .features-list {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-xl);
        padding: 2rem;
        margin: 2rem 0;
        box-shadow: var(--shadow-lg);
    }
    .features-list h2 {
        color: var(--dark);
        font-weight: 700;
        margin-bottom: 1rem;
    }
    .features-list ul {
        list-style: none;
        padding: 0;
    }
    .features-list li {
        padding: 0.5rem 0;
        font-weight: 600;
        color: var(--text-muted);
    }
    .features-list li:before {
        content: "✅";
        margin-right: 0.5rem;
        color: var(--success);
    }

/* ===========================================
   PROJECT S-CURVE SPECIFIC STYLES
   =========================================== */

    .gantt-table {
        font-size: 11px;
        border-collapse: collapse;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-lg);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    .gantt-table th, .gantt-table td {
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: 4px;
        text-align: center;
        font-weight: 600;
    }
    .gantt-table thead {
        background: var(--gradient-primary);
        color: white;
    }
    .gantt-table tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    .bg-plan {
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        color: white;
        font-weight: 700;
    }
    .bg-act {
        background: linear-gradient(135deg, #f093fb, #f5576c) !important;
        color: white;
        font-weight: 700;
    }
    .col-activity {
        text-align: left !important;
        width: 150px;
        font-weight: 700;
        color: var(--dark);
    }

/* ===== INDEX PAGE SPECIFIC STYLES ===== */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
}

.bg-dashboard {
    min-height: 100vh;
}

.fw-800 {
    font-weight: 800;
}

.x-small {
    font-size: 0.72rem;
}

.ls-1 {
    letter-spacing: 0.5px;
}

.card-stats {
    transition: var(--transition);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-stats:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

[data-bs-theme="dark"] .card-stats {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .card-stats .stats-label {
  color: #8b949e !important;
}

[data-bs-theme="dark"] .card-stats .stats-value {
  background: none !important;
  -webkit-text-fill-color: #c9d1d9 !important;
  color: #c9d1d9 !important;
}

[data-bs-theme="dark"] .card-stats .stats-icon {
  background: transparent !important;
  color: #c9d1d9 !important;
}

[data-bs-theme="dark"] .card-stats .icon-box-shape {
  background: transparent !important;
  border: 1px solid #30363d !important;
  box-shadow: none !important;
}

.icon-box-shape {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.icon-box-shape:hover {
    transform: scale(1.1);
}

.btn-primary-grad {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 700;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.btn-primary-grad:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.shadow-btn {
    box-shadow: var(--shadow-lg);
}

.bg-primary-soft {
    background: var(--gradient-primary);
    color: white;
}

.bg-info-soft {
    background: var(--gradient-info);
    color: white;
}

.bg-success-soft {
    background: var(--gradient-success);
    color: white;
}

.bg-danger-soft {
    background: var(--gradient-danger);
    color: white;
}

.bg-light-blue {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .kpi-overview-card {
  background: #0d1117 !important;
  border-color: #30363d !important;
}

[data-bs-theme="dark"] .kpi-overview-card .badge.bg-light {
  background: #21262d !important;
  color: #c9d1d9 !important;
  border: 1px solid #30363d;
}

[data-bs-theme="dark"] .kpi-tile {
  background: #161b22 !important;
  border-color: #30363d !important;
}

[data-bs-theme="dark"] .kpi-tile .text-dark {
  color: #c9d1d9 !important;
}

[data-bs-theme="dark"] .kpi-insight {
  background: #161b22 !important;
}

/* Table hover effects */
.table-hover tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
    transition: var(--transition);
}

/* Badge improvements */
.badge {
    border-radius: var(--radius-lg);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Progress bar improvements */
.progress {
    border-radius: var(--radius-xl);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: var(--radius-xl);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================================
   TEXT READABILITY OVERRIDES (GLOBAL)
   Ensure all text is solid, high-contrast, and readable
   =========================================== */
:root {
  --text-strong: #0b1220;   /* strongest headings */
  --text-default: #1f2937;  /* main body text */
  --text-muted-strong: #334155; /* readable muted */
  --text-subtle-strong: #475569; /* placeholders/help */
  --text-invert: #ffffff;   /* text on dark buttons */
  --link: #0ea5e9;
  --link-hover: #0284c7;
}

/* Dark mode: map readability tokens to Bootstrap theme colors */
[data-bs-theme="dark"] {
  --text-strong: rgba(var(--bs-body-color-rgb), 0.95);
  --text-default: rgba(var(--bs-body-color-rgb), 0.90);
  --text-muted-strong: rgba(var(--bs-body-color-rgb), 0.80);
  --text-subtle-strong: rgba(var(--bs-body-color-rgb), 0.70);
  --link: var(--bs-link-color);
  --link-hover: var(--bs-link-hover-color);
}

html, body {
  color: var(--text-default);
}

/* Headings and titles */
h1, h2, h3, h4, h5, h6,
.card-title, .modal-title,
.table thead th {
  color: var(--text-strong) !important;
}

/* General content text */
p, li, td, th, span, div,
label, input, select, textarea,
small, .form-text,
.list-group-item {
  color: var(--text-default);
}

/* Muted/subtle without low opacity */
.text-muted, .text-secondary,
.subtitle, .help-text, .note, .hint {
  color: var(--text-muted-strong) !important;
  opacity: 1 !important;
}
.text-subtle {
  color: var(--text-subtle-strong) !important;
  opacity: 1 !important;
}

/* Placeholders readable */
::placeholder {
  color: var(--text-subtle-strong);
  opacity: 1;
}

/* Links */
a, .link { color: var(--link); text-decoration: none; }
a:hover, .link:hover { color: var(--link-hover); }

/* Tables */
.table thead th { color: var(--text-strong) !important; }
.table tbody td { color: var(--text-default); }

/* Cards */
.card .card-header,
.card .card-body { color: var(--text-default); }

/* Badges */
.badge { color: var(--text-strong); }
.badge.bg-primary, .badge-primary,
.badge.bg-success, .badge-success,
.badge.bg-danger, .badge-danger,
.badge.bg-warning, .badge-warning { color: var(--text-invert); }

/* Buttons */
.btn { color: var(--text-default); }
.btn-primary, .btn-success, .btn-danger, .btn-warning { color: var(--text-invert); }
.btn-outline-primary, .btn-outline-secondary, .btn-outline-danger, .btn-outline-success { color: var(--text-strong); }

/* Navbar (assuming light nav; adjust to dark if needed) */
.navbar .nav-link { color: var(--text-strong); }
.navbar .nav-link.active, .nav-link:focus, .nav-link:hover { color: var(--link-hover); }

/* Specific faint elements */
.progress-label, .stat-label, .table-caption, .card-subtitle {
  color: var(--text-muted-strong) !important;
  opacity: 1 !important;
}

/* Remove low-opacity text globally */
.opacity-50, .opacity-60, .opacity-75 { opacity: 1 !important; }

/* Schedule cells text */
.table-schedule td, .table-schedule th,
.schedule-cell, .schedule-cell .label {
  color: var(--text-default) !important;
}

/* WBS table cells */
.table-excel td, .table-excel th { color: var(--text-default); }

/* Inputs readable on light backgrounds */
.form-control, .form-select { color: var(--text-default); }
.form-control:disabled, .form-select:disabled { color: var(--text-muted-strong); }

/* Override gradient text utilities to solid */
.text-gradient-primary {
  color: var(--text-strong) !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
}

/* Solid logo text instead of gradient */
.logo {
  color: var(--primary) !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
}

/* Solid large page titles */
.page-title-large {
  color: var(--text-strong) !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
}

/* ===== WEEKLY REPORT PAGE SPECIFIC STYLES ===== */
.position-relative {
    position: relative;
}

.overflow-visible {
    overflow: visible;
}

.font-size-10px {
    font-size: 10px;
}

.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SCHEDULE PAGE STYLES (moved from project_schedule.php) ===== */
/* Daterangepicker layout and positioning */
.daterangepicker {
  background-color: var(--bs-body-bg) !important;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.6) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: calc(100vw - 2rem) !important;
  position: fixed !important;
  z-index: 9999 !important;
  top: 150px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  color: var(--bs-body-color) !important;
}

.daterangepicker .drp-calendar {
  max-width: 270px !important;
  background-color: var(--bs-body-bg) !important;
}

.daterangepicker .drp-calendar.left,
.daterangepicker .drp-calendar.right {
  background-color: var(--bs-body-bg) !important;
  padding: 15px !important;
}

.daterangepicker table.table-condensed {
  width: 100% !important;
  background-color: var(--bs-body-bg) !important;
}

.daterangepicker th,
.daterangepicker td {
  text-align: center !important;
  vertical-align: middle !important;
  min-width: 32px !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  padding: 0 !important;
  background-color: transparent !important;
  color: var(--bs-body-color) !important;
}

.daterangepicker thead tr:first-child th {
  background-color: var(--bs-tertiary-bg) !important;
  font-weight: 600 !important;
  padding: 8px 0 !important;
}

.daterangepicker thead tr:last-child th {
  background-color: var(--bs-tertiary-bg) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}

.daterangepicker td.available:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background-color: var(--bs-primary) !important;
  color: var(--bs-white) !important;
}

.daterangepicker td.in-range {
  background-color: rgba(var(--bs-primary-rgb), 0.12) !important;
}

.daterangepicker .calendar-table {
  background-color: var(--bs-body-bg) !important;
  border: none !important;
  padding: 0 !important;
}

.daterangepicker .drp-buttons {
  background-color: var(--bs-body-bg) !important;
  border-top: 1px solid rgba(var(--bs-border-color-rgb), 0.6) !important;
  padding: 10px !important;
  text-align: right !important;
  clear: both !important;
}

.daterangepicker .drp-selected {
  background-color: rgba(var(--bs-body-color-rgb), 0.08) !important;
  padding: 10px !important;
}

.daterangepicker:before,
.daterangepicker:after {
  border-bottom-color: var(--bs-body-bg) !important;
}

.daterangepicker select.monthselect,
.daterangepicker select.yearselect {
  background-color: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.6) !important;
}

[data-bs-theme="dark"] .daterangepicker select {
  color-scheme: dark;
}

.daterangepicker .calendar-table .next span,
.daterangepicker .calendar-table .prev span {
  border-color: rgba(var(--bs-body-color-rgb), 0.85) !important;
}

.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date {
  color: rgba(var(--bs-body-color-rgb), 0.35) !important;
}

/* Compact controls matching Sync button styling */
.btn-synclike {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  border: none;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.45rem 0.5rem;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
  transition: all 0.2s ease;
  line-height: 1.2;
}

.btn-synclike:hover {
  filter: brightness(1.05);
}

.btn-synclike:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.compact-input {
  border: 2px solid #6366f1;
  background: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  line-height: 1.3;
  color: #1e293b;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.08);
  transition: all 0.2s ease;
}

/* Normalize vertical spacing in sidebar to the tighter size */
#sidebarContent .mb-2,
#sidebarContent .mb-3 {
  margin-bottom: 0.2rem !important;
}

#sidebarContent .mt-4 {
  margin-top: 0.35rem !important;
}

.section-heading {
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.75rem;
  line-height: 1.4;
  display: block;
}

.text-primary-bold {
    color: var(--primary);
    font-weight: 700;
}

.progress-thin {
    height: 10px;
}

/* Weekly report: make thin progress bars more visible on light/dark backgrounds */
.progress.progress-thin {
  background: rgba(var(--bs-body-color-rgb), 0.12) !important;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.85) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--bs-body-bg-rgb), 0.35);
}

/* Status & Progress bar fill */
#progressBarFill.progress-bar {
  background-color: var(--info) !important;
  background-image: none !important;
  box-shadow:
    inset 0 0 0 1px rgba(var(--bs-body-bg-rgb), 0.55),
    0 0 0 1px rgba(var(--bs-body-color-rgb), 0.18);
}

/* Prevent global shimmer/overlays from washing out this bar */
#progressBarFill.progress-bar::after {
  content: none !important;
}

.min-width-220 {
    min-width: 220px;
}

.min-width-300 {
    min-width: 300px;
}

.bg-light-blue-row {
    background: #f0f7ff;
}

.bg-light-green-row {
    background: #e6ffed;
}

.z-index-5 {
    z-index: 5;
}

.total-weight-plan-row {
    background: #f0f7ff;
    font-weight: bold;
}

.total-weight-actual-row {
    background: #e6ffed;
    font-weight: bold;
}

.total-weight-plan-cell {
    background: #f0f7ff;
}

.total-weight-actual-cell {
    background: #e6ffed;
}

/* ===== USER MANAGEMENT PAGE SPECIFIC STYLES ===== */
.page-title-large {
    letter-spacing: -1.5px;
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.alert-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.alert-success-custom {
    background: var(--gradient-success);
    color: white;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.glass-card-main {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.glass-card-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.table-header-cell {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--gray-200);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================================================================
   DARK MODE (STRONG OVERRIDES) — keep at end of file
   ===================================================================== */

[data-bs-theme="dark"] .header {
  background: var(--bs-body-bg) !important;
  border-bottom-color: rgba(var(--bs-border-color-rgb), 0.6) !important;
}

[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .table-container,
[data-bs-theme="dark"] .glass-card,
[data-bs-theme="dark"] .glass-card-main,
[data-bs-theme="dark"] .glass-card-header,
[data-bs-theme="dark"] .error-container {
  background: var(--bs-tertiary-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .dashboard-card::before {
  opacity: 0.8;
}

[data-bs-theme="dark"] .card-label,
[data-bs-theme="dark"] .card-label span {
  color: var(--bs-secondary-color) !important;
}

[data-bs-theme="dark"] .project-list thead,
[data-bs-theme="dark"] .th-soft-header,
[data-bs-theme="dark"] .table-header-cell {
  background: rgba(var(--bs-body-bg-rgb), 0.92) !important;
  border-bottom-color: rgba(var(--bs-border-color-rgb), 0.6) !important;
}

[data-bs-theme="dark"] .project-list,
[data-bs-theme="dark"] table,
[data-bs-theme="dark"] .table {
  color: var(--bs-body-color);
}

/* Dashboard + global tables: prevent bright row/cell backgrounds in dark mode */
[data-bs-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--bs-body-color);
  --bs-table-border-color: rgba(var(--bs-border-color-rgb), 0.45);
  --bs-table-striped-bg: rgba(var(--bs-body-color-rgb), 0.04);
  --bs-table-hover-bg: rgba(var(--bs-body-color-rgb), 0.06);
}

[data-bs-theme="dark"] .table > :not(caption) > * > * {
  background-color: transparent !important;
}

[data-bs-theme="dark"] .table thead th {
  background: rgba(var(--bs-body-bg-rgb), 0.92) !important;
  color: var(--bs-secondary-color) !important;
  border-bottom-color: rgba(var(--bs-border-color-rgb), 0.6) !important;
}

[data-bs-theme="dark"] .table tbody tr {
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .table tbody tr:hover {
  background: rgba(var(--bs-body-color-rgb), 0.06) !important;
  transform: none !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .progress {
  background: rgba(var(--bs-body-color-rgb), 0.12) !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .badge.bg-light {
  background-color: var(--bs-secondary-bg) !important;
}

/* Soft badges (standby pills, small status badges) */
[data-bs-theme="dark"] .badge-primary-soft {
  background: rgba(var(--bs-primary-rgb), 0.20) !important;
  color: rgba(var(--bs-body-color-rgb), 0.92) !important;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.35);
  box-shadow: none;
}

[data-bs-theme="dark"] .badge-success-soft {
  background: rgba(var(--bs-success-rgb), 0.18) !important;
  color: rgba(var(--bs-body-color-rgb), 0.92) !important;
  border: 1px solid rgba(var(--bs-success-rgb), 0.35);
  box-shadow: none;
}

[data-bs-theme="dark"] .badge-info-soft {
  background: rgba(var(--bs-info-rgb), 0.18) !important;
  color: rgba(var(--bs-body-color-rgb), 0.92) !important;
  border: 1px solid rgba(var(--bs-info-rgb), 0.35);
  box-shadow: none;
}

[data-bs-theme="dark"] .badge-warning-soft {
  background: rgba(var(--bs-warning-rgb), 0.16) !important;
  color: rgba(var(--bs-body-color-rgb), 0.92) !important;
  border: 1px solid rgba(var(--bs-warning-rgb), 0.30);
  box-shadow: none;
}

[data-bs-theme="dark"] .badge-danger-soft {
  background: rgba(var(--bs-danger-rgb), 0.18) !important;
  color: rgba(var(--bs-body-color-rgb), 0.92) !important;
  border: 1px solid rgba(var(--bs-danger-rgb), 0.32);
  box-shadow: none;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: rgba(var(--bs-body-bg-rgb), 0.25);
}

[data-bs-theme="dark"] .modal-content {
  background-color: var(--bs-body-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .dropdown-menu {
  background-color: var(--bs-body-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .dropdown-item {
  color: var(--bs-body-color) !important;
}

/* Schedule header holiday/weekend override (force) */
.table-schedule thead th.col-day.is-holiday,
.table-schedule thead th.col-day.is-weekend {
  background: rgba(248, 81, 73, 0.14) !important;
  color: #b42318 !important;
}

[data-bs-theme="dark"] .table-schedule thead th.col-day.is-holiday,
[data-bs-theme="dark"] .table-schedule thead th.col-day.is-weekend {
  background: rgba(248, 81, 73, 0.22) !important;
  color: #fca5a5 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
}

[data-bs-theme="dark"] .navbar .nav-link {
  color: rgba(var(--bs-body-color-rgb), 0.82) !important;
}

[data-bs-theme="dark"] .navbar .nav-link.active {
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .card {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color);
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .card-stats {
  background: var(--bs-tertiary-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
  box-shadow: none;
  backdrop-filter: none;
}

/* Dashboard top stat cards: label text is set inline for light theme, so override it here */
[data-bs-theme="dark"] .card-stats.card-stats-compact p.text-uppercase {
  color: rgba(var(--bs-body-color-rgb), 0.82) !important;
}

[data-bs-theme="dark"] .card-stats .fw-800 {
  background: none !important;
  background-clip: initial !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: var(--bs-body-color) !important;
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .text-dark-blue {
  color: rgba(var(--bs-body-color-rgb), 0.85) !important;
}

[data-bs-theme="dark"] .text-dark {
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
  background-color: var(--bs-body-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.6) !important;
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: rgba(var(--bs-body-color-rgb), 0.6) !important;
}

[data-bs-theme="dark"] .total-weight-plan-cell {
  background: rgba(var(--bs-primary-rgb), 0.12) !important;
}

[data-bs-theme="dark"] .total-weight-actual-cell {
  background: rgba(var(--bs-success-rgb), 0.12) !important;
}

.table-body-row {
    transition: var(--transition);
}

.text-primary-custom {
    color: var(--text-primary);
    font-weight: 700;
}

.text-muted-custom {
    color: var(--text-muted);
    font-weight: 600;
}

.avatar-icon-custom {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.badge-users {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-lg);
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.table-transparent {
    background: transparent;
}

/* Tab Content Styling */
.tab-pane {
    display: none;
}

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

.tab-pane.show {
    display: block;
}

.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #495057;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: #dee2e6;
    color: #212529;
}

.nav-tabs .nav-link.active {
    color: #0c63e4;
    border-bottom-color: #0c63e4;
    background-color: transparent;
}

/* Dark Mode for Weekly Report */
[data-bs-theme="dark"] .header-card {
  background: var(--bs-body-bg) !important;
  border-color: rgba(var(--bs-border-color-rgb), 0.45) !important;
}

[data-bs-theme="dark"] .btn-white {
    background: rgba(var(--bs-body-bg-rgb), 0.8) !important;
    color: var(--bs-body-color) !important;
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.3) !important;
}

[data-bs-theme="dark"] .btn-white:hover {
    background: rgba(var(--bs-primary-rgb), 0.2) !important;
    color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] #searchResult {
    background: var(--bs-secondary-bg) !important;
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.5) !important;
}

[data-bs-theme="dark"] .search-item {
    background: transparent !important;
    border-bottom: 1px solid rgba(var(--bs-border-color-rgb), 0.3) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .search-item:hover {
    background: rgba(var(--bs-primary-rgb), 0.15) !important;
}

[data-bs-theme="dark"] .search-item .text-dark,
[data-bs-theme="dark"] .search-item .text-black {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .scurve-container {
    background: var(--bs-body-bg) !important;
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.3) !important;
}

[data-bs-theme="dark"] .table-container-card {
  /* Solid background to avoid "see-through" weekly report table in dark mode */
  background: var(--bs-body-bg) !important;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.2) !important;
  --weekly-report-category-grid: rgba(var(--bs-body-color-rgb), 0.40);
  --weekly-report-category-grid-w: 0.5px;
}

/* Compatibility: some pages still use body.dark-mode instead of data-bs-theme */
body.dark-mode .table-container-card {
  background: var(--bs-body-bg) !important;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.2) !important;
  --weekly-report-category-grid: rgba(var(--bs-body-color-rgb), 0.40);
  --weekly-report-category-grid-w: 0.5px;
}

[data-bs-theme="dark"] .sticky-col {
  background: var(--bs-body-bg) !important;
}

body.dark-mode .sticky-col {
  background: var(--bs-body-bg) !important;
}

/* Weekly report table cells (non-sticky) should be opaque in dark mode */
[data-bs-theme="dark"] .table-container-card .table tbody td,
body.dark-mode .table-container-card .table tbody td {
  background: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .table-container-card .table thead th.sticky-col {
  z-index: 30 !important;
}

/* Weekly report header backgrounds in dark mode */
[data-bs-theme="dark"] .table-container-card .table thead th.sticky-col,
[data-bs-theme="dark"] .table-container-card .table thead th:not(.sticky-col):not(.current-week-marker) {
  background: var(--bs-secondary-bg) !important;
  color: var(--bs-body-color) !important;
}

body.dark-mode .table-container-card .table thead th.sticky-col,
body.dark-mode .table-container-card .table thead th:not(.sticky-col):not(.current-week-marker) {
  background: var(--bs-secondary-bg) !important;
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .table-container-card .table tbody td.sticky-col {
  z-index: 30 !important;
}

[data-bs-theme="dark"] .table-container-card .timeline-textarea,
[data-bs-theme="dark"] .table-container-card .timeline-textarea.bg-transparent {
  background: var(--bs-body-bg) !important;
  border: 2px solid rgba(var(--bs-border-color-rgb), 0.3) !important;
  color: var(--bs-body-color) !important;
}

body.dark-mode .table-container-card .timeline-textarea,
body.dark-mode .table-container-card .timeline-textarea.bg-transparent {
  background: var(--bs-body-bg) !important;
  border: 2px solid rgba(var(--bs-border-color-rgb), 0.3) !important;
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .table-container-card .timeline-textarea:focus,
[data-bs-theme="dark"] .table-container-card .timeline-textarea.bg-transparent:focus {
  background: var(--bs-body-bg) !important;
  border-color: var(--bs-primary) !important;
}

body.dark-mode .table-container-card .timeline-textarea:focus,
body.dark-mode .table-container-card .timeline-textarea.bg-transparent:focus {
  background: var(--bs-body-bg) !important;
  border-color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .gantt-table th,
[data-bs-theme="dark"] .gantt-table td {
    background: rgba(var(--bs-body-bg-rgb), 0.9) !important;
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.4) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .gantt-table .total-weight-plan-row td,
[data-bs-theme="dark"] .gantt-table .total-weight-actual-row td {
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.4) !important;
}

[data-bs-theme="dark"] .gantt-sticky-col,
[data-bs-theme="dark"] .gantt-type-col,
[data-bs-theme="dark"] .gantt-weight-col {
    background: rgba(var(--bs-body-bg-rgb), 0.95) !important;
}

[data-bs-theme="dark"] .weekend {
  background: rgba(var(--bs-danger-rgb), 0.22) !important;
}

[data-bs-theme="dark"] .weekend-cell {
  background: rgba(var(--bs-danger-rgb), 0.22) !important;
}

[data-bs-theme="dark"] .day-header {
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.4) !important;
}

/* Ensure weekend/holiday cells can override base gantt cell background */
[data-bs-theme="dark"] .gantt-table th.weekend-cell,
[data-bs-theme="dark"] .gantt-table th.holiday-cell,
[data-bs-theme="dark"] .gantt-table td.weekend-cell,
[data-bs-theme="dark"] .gantt-table td.holiday-cell {
  background: rgba(var(--bs-danger-rgb), 0.22) !important;
}

[data-bs-theme="dark"] .card {
    background: var(--bs-secondary-bg) !important;
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.3) !important;
}

[data-bs-theme="dark"] .header-card {
    background: var(--bs-secondary-bg) !important;
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.3) !important;
}

[data-bs-theme="dark"] .form-select {
    background: rgba(var(--bs-body-bg-rgb), 0.9) !important;
    border: 2px solid rgba(var(--bs-border-color-rgb), 0.3) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .progress {
    background: rgba(var(--bs-body-bg-rgb), 0.5) !important;
}

[data-bs-theme="dark"] .progress.progress-thin {
  background: rgba(var(--bs-body-color-rgb), 0.16) !important;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.55) !important;
}

[data-bs-theme="dark"] .table thead th {
    background: rgba(var(--bs-body-bg-rgb), 0.95) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .table tbody tr {
    background: rgba(var(--bs-body-bg-rgb), 0.9) !important;
}

/* Dark mode for Add Project page */
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] html {
    background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .container-fluid,
[data-bs-theme="dark"] .row,
[data-bs-theme="dark"] form {
    background: transparent !important;
}

[data-bs-theme="dark"] .col-xl-3,
[data-bs-theme="dark"] .col-xl-9,
[data-bs-theme="dark"] .col-lg-4,
[data-bs-theme="dark"] .col-lg-8 {
    background: transparent !important;
}

[data-bs-theme="dark"] .gantt-wrapper {
    background: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .gantt-table,
[data-bs-theme="dark"] .gantt-activity-table {
    background: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .gantt-table th,
[data-bs-theme="dark"] .gantt-table td,
[data-bs-theme="dark"] .gantt-activity-table th,
[data-bs-theme="dark"] .gantt-activity-table td {
    border-color: var(--bs-border-color) !important;
    background: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}
