/* ============================================================
   ZEDOOR Task Management — Brand Theme
   Overrides Bootstrap 5 + the project’s existing dark/light shell
   Load this AFTER bootstrap.min.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&display=swap');

:root {
  --zedoor-crimson: #8b1a2b;
  --zedoor-crimson-dark: #6e1421;
  --zedoor-crimson-light: #a8233a;
  --zedoor-cream: #faf8f5;
  --zedoor-charcoal: #0a0a0a;
  --zedoor-charcoal-lift: #141414;
  --zedoor-muted: #6b6b6b;
  --zedoor-muted-light: #a8a8a8;
  --zedoor-line-dark: rgba(250, 248, 245, 0.10);
  --zedoor-line-light: rgba(26, 26, 26, 0.08);

  --bg-body: #0a0a0a;
  --bg-sidebar: #0a0a0a;
  --bg-card: #141414;
  --bg-table: #0a0a0a;
  --bg-input: rgba(250, 248, 245, 0.04);
  --bg-hover: rgba(139, 26, 43, 0.08);
  --table-hover: rgba(248, 113, 133, 0.13);
  --border-color: rgba(250, 248, 245, 0.10);
  --border-light: rgba(250, 248, 245, 0.08);
  --text-primary: #faf8f5;
  --text-secondary: #a8a8a8;
  --text-muted: #6b6b6b;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.22);
  --input-focus-shadow: rgba(139, 26, 43, 0.15);
  --link-color: #f08a9b;
  --link-hover: #ffb4bf;

  --bs-primary: #8b1a2b;
  --bs-primary-rgb: 139, 26, 43;
  --bs-secondary: #6b6b6b;
  --bs-success: #4a7c59;
  --bs-warning: #b8860b;
  --bs-danger: #8b1a2b;
  --bs-body-bg: #0a0a0a;
  --bs-body-color: #faf8f5;
  --bs-border-color: rgba(250, 248, 245, 0.10);
  --bs-border-radius: 0px;
  --bs-border-radius-sm: 0px;
  --bs-border-radius-lg: 0px;
  --bs-font-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;
  --bs-body-font-size: 15px;
  --bs-body-line-height: 1.7;
}

html[data-theme="light"],
body[data-theme="light"] {
  --bg-body: #f4f6f8;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-table: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: rgba(139, 26, 43, 0.06);
  --table-hover: rgba(139, 26, 43, 0.11);
  --border-color: rgba(15, 23, 42, 0.12);
  --border-light: rgba(15, 23, 42, 0.08);
  --text-primary: #111827;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 14px 30px rgba(15, 23, 42, 0.12);
  --input-focus-shadow: rgba(139, 26, 43, 0.12);
  --link-color: #8b1a2b;
  --link-hover: #64121f;

  --bs-body-bg: #f4f6f8;
  --bs-body-color: #111827;
  --bs-border-color: rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] #sidebar {
  background: var(--bg-sidebar) !important;
  border-right: 1px solid var(--border-color);
}

body[data-theme="light"] #sidebar .brand-copy .brand-name,
body[data-theme="light"] #sidebar .nav-link,
body[data-theme="light"] #sidebar .nav-section,
body[data-theme="light"] #sidebar .dropdown-header,
body[data-theme="light"] #sidebar .dropdown-item,
body[data-theme="light"] #sidebar .nav-link i {
  color: var(--text-primary);
}

body[data-theme="light"] #sidebar .nav-link {
  color: #2a2a2a;
}

body[data-theme="light"] #sidebar .nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

body[data-theme="light"] #sidebar .nav-link.active {
  background: rgba(139, 26, 43, 0.08);
  color: var(--zedoor-crimson);
  border-left-color: var(--zedoor-crimson);
}

body[data-theme="light"] .theme-toggle {
  background: #f7f4f1;
  color: var(--text-primary);
}

body[data-theme="light"] .content {
  background: var(--bg-body);
}

body[data-theme="light"] .dropdown-menu,
body[data-theme="light"] .modal-content,
body[data-theme="light"] .card,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .stats-card,
body[data-theme="light"] .table,
body[data-theme="light"] .form-control,
body[data-theme="light"] .form-select,
body[data-theme="light"] .input-group-text {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body[data-theme="light"] .table thead th,
body[data-theme="light"] .table tbody td,
body[data-theme="light"] .page-header p,
body[data-theme="light"] .section-header p,
body[data-theme="light"] .activity-item small,
body[data-theme="light"] .dropdown-menu .text-secondary,
body[data-theme="light"] .form-label,
body[data-theme="light"] .text-secondary,
body[data-theme="light"] .small,
body[data-theme="light"] .text-muted {
  color: var(--text-secondary) !important;
}

body[data-theme="light"] .alert {
  background-color: #ffffff;
  color: var(--text-primary);
}

body[data-theme="light"] .card,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .stats-card {
  box-shadow: var(--shadow);
}

body[data-theme="light"] .content .card,
body[data-theme="light"] .content .stat-card,
body[data-theme="light"] .content .stats-card {
  border: 1px solid var(--border-color) !important;
}

html, body {
  background: var(--bg-body);
  color: var(--text-primary);
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  background-color: var(--bg-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.card-header,
.modal-title,
.display-6,
.display-5,
.stat-value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: -0.01em;
  color: inherit;
}

h1 { font-size: clamp(36px, 4vw, 52px); line-height: 1.08; }
h2 { font-size: clamp(30px, 3vw, 42px); line-height: 1.1; }
h3 { font-size: 26px; line-height: 1.15; }
h4 { font-size: 22px; line-height: 1.2; }
h5 { font-size: 18px; line-height: 1.2; }

p, li, td, th, label, input, textarea, select, button, .dropdown-item {
  font-family: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
a { color: var(--link-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--link-hover); text-decoration: none; }

.wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--bg-body);
}

#sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-sidebar) !important;
  border-right: 1px solid var(--border-color);
  padding: 20px 0 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#sidebar .brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: var(--zedoor-crimson);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  border-radius: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy .brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.brand-copy small {
  color: var(--text-secondary);
  letter-spacing: 0.18em;
  font-size: 9px;
  text-transform: uppercase;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--zedoor-crimson);
  color: var(--text-primary);
}

#sidebar .nav-section {
  padding: 16px 18px 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

#sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  padding: 12px 18px;
  margin: 2px 12px;
  border-left: 3px solid transparent;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
  background: transparent;
  border-radius: 0;
}

#sidebar .nav-link:hover {
  color: var(--text-primary);
  background: rgba(139, 26, 43, 0.06);
}

#sidebar .nav-link.active {
  background: rgba(139, 26, 43, 0.10);
  color: var(--zedoor-crimson-light);
  border-left-color: var(--zedoor-crimson);
}

#sidebar .nav-link i {
  width: 18px;
  text-align: center;
  font-size: 0.95rem;
}

#sidebar .nav-group {
  margin: 3px 12px;
  border: 1px solid transparent;
}

#sidebar .nav-group[open] {
  border-color: var(--border-color);
  background: var(--bg-hover);
}

#sidebar .nav-group summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#sidebar .nav-group summary::-webkit-details-marker {
  display: none;
}

#sidebar .nav-group summary::after {
  content: '\f078';
  margin-left: auto;
  font-family: 'Font Awesome 6 Free';
  font-size: 10px;
  font-weight: 900;
  transition: transform 0.18s ease;
}

#sidebar .nav-group[open] summary::after {
  transform: rotate(180deg);
}

#sidebar .nav-group summary:hover,
#sidebar .nav-group summary:focus-visible {
  color: var(--text-primary);
}

#sidebar .nav-group summary i {
  width: 18px;
  text-align: center;
}

#sidebar .nav-group .nav-link {
  min-height: 36px;
  padding: 8px 10px;
  margin: 1px 4px;
  font-size: 12px;
  letter-spacing: 0.025em;
  text-transform: none;
}

#sidebar .nav-group .nav-link.active {
  background: rgba(139, 26, 43, 0.12);
}

#sidebar .dropdown {
  list-style: none;
}

#sidebar .dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: var(--shadow);
}

#sidebar .dropdown-item {
  color: var(--text-primary);
}

#sidebar .dropdown-item:hover {
  background: var(--bg-hover);
}

#sidebar .dropdown-header {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.content {
  flex: 1;
  background: var(--bg-body);
  padding: 26px 28px 40px;
  min-height: 100vh;
}

.hide-sidebar #sidebar { display: none; }
.hide-sidebar .content { padding-left: 18px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0 !important;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}

.card:hover {
  border-color: rgba(139, 26, 43, 0.5);
  box-shadow: var(--shadow-hover);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 18px 20px;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
}

.card-body {
  padding: 20px;
}

.card-footer {
  background: transparent;
  border-top: 1px solid var(--border-color);
  padding: 16px 20px;
}

.table {
  --bs-table-color: var(--text-primary);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--border-color);
  border-collapse: collapse;
  color: var(--text-primary);
}

.table thead th {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(139, 26, 43, 0.35) !important;
  padding: 14px 16px;
}

.table tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  vertical-align: middle;
}

.table tbody tr > * {
  transition: background-color 0.16s ease;
}

.table tbody tr:hover > * {
  background-color: var(--table-hover) !important;
}

.badge {
  border-radius: 0 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 10px;
}

.badge.bg-success { background-color: #4a7c59 !important; }
.badge.bg-warning { background-color: #b8860b !important; }
.badge.bg-danger, .badge.bg-primary { background-color: var(--zedoor-crimson) !important; }
.badge.bg-secondary { background-color: var(--zedoor-muted) !important; }

.btn {
  border-radius: 0 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 24px;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--zedoor-crimson) !important;
  border-color: var(--zedoor-crimson) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--zedoor-crimson-dark) !important;
  border-color: var(--zedoor-crimson-dark) !important;
}

.btn-outline-primary {
  color: #f08a9b;
  border-color: #f08a9b;
}

.btn-outline-primary:hover {
  background-color: #f08a9b;
  border-color: #f08a9b;
  color: #0a0a0a;
}

.btn-outline-secondary {
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.form-control,
.form-select,
.form-control:focus,
.form-select:focus,
.input-group-text {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 0 !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--zedoor-crimson);
  box-shadow: 0 0 0 3px var(--input-focus-shadow);
  color: var(--text-primary);
}

.form-control::placeholder {
  color: rgba(168, 168, 168, 0.7);
}

:where(a, button, input, select, textarea, summary, [role="button"], [tabindex]):focus-visible {
  outline: 3px solid var(--zedoor-crimson-light);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--input-focus-shadow);
}

.project-card:hover,
.staff-card:hover {
  border-color: var(--zedoor-crimson);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.form-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.progress {
  height: 4px;
  border-radius: 0 !important;
  background: rgba(250, 248, 245, 0.08);
}

.progress-bar {
  background: var(--zedoor-crimson);
}

.progress-bar.bg-success {
  background-color: #4a7c59 !important;
}

.modal-content {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 0 !important;
  box-shadow: var(--shadow);
}

.modal-header,
.modal-footer {
  border-color: var(--border-color);
}

.modal-title {
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
}

.alert {
  border-radius: 0 !important;
  border-left: 3px solid;
  border-top: none;
  border-right: none;
  border-bottom: none;
  padding: 14px 18px;
}

.alert-success { background-color: rgba(74, 124, 89, 0.12); border-left-color: #4a7c59; }
.alert-warning { background-color: rgba(184, 134, 11, 0.12); border-left-color: #b8860b; }
.alert-danger { background-color: rgba(139, 26, 43, 0.15); border-left-color: var(--zedoor-crimson); }
.alert-info { background-color: rgba(250, 248, 245, 0.05); border-left-color: var(--zedoor-muted-light); }

.stat-card,
.stats-card {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 26px 22px;
  border-radius: 0;
  box-shadow: var(--shadow);
}

.stat-value,
.stat-card .stat-value,
.stat-card .display-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 44px;
  font-weight: 500;
  color: var(--zedoor-crimson) !important;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label,
.stat-card .stat-label,
.stat-card small {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  font-weight: 600;
}

.eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--zedoor-crimson-light);
  font-weight: 600;
}

.eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--zedoor-crimson-light);
}

.page-header,
.section-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1,
.section-header h1 {
  margin-bottom: 8px;
}

.page-header p,
.section-header p {
  margin: 0;
  color: var(--text-secondary);
}

.activity-feed {
  position: relative;
  padding-left: 16px;
}

.activity-item {
  position: relative;
  padding-left: 18px;
  margin-bottom: 20px;
  border-left: 2px solid var(--zedoor-crimson);
}

.activity-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--zedoor-crimson);
  border-radius: 50%;
}

.activity-item small {
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.navbar {
  background: rgba(10, 10, 10, 0.85) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 !important;
}

.dropdown-menu .text-secondary {
  color: var(--text-secondary) !important;
}

body[data-theme="light"] .dropdown-menu,
body[data-theme="light"] .dropdown-item {
  color: var(--text-primary);
}

/* ============================================================
   MOBILE LAYOUT — hidden sidebar, hamburger, stacked cards
   ============================================================ */
@media (max-width: 900px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    height: 100vh;
    z-index: 2000;
    transition: left 0.28s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  }

  body.sidebar-open #sidebar { left: 0; }

  body.sidebar-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1999;
    animation: fadeIn 0.2s ease;
  }

  .content {
    padding: 14px 14px 90px !important;
    margin-left: 0 !important;
    width: 100%;
  }

  #sidebar .brand { display: flex; padding: 18px 18px 16px; }
  #sidebar .brand-copy { display: block !important; }
  #sidebar .nav-section { display: block !important; }
  #sidebar .nav-link {
    justify-content: flex-start !important;
    padding: 12px 18px !important;
    text-align: left !important;
    font-size: 13px !important;
    margin: 2px 10px !important;
  }
  #sidebar .nav-link span { display: inline !important; }
  #sidebar .nav-link i { margin-right: 10px; }

  .mobile-topbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1500;
    margin: -14px -14px 14px;
  }

  .mobile-topbar .brand-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
  }

  .mobile-topbar .brand-name .logo-dot {
    display: inline-block;
    width: 26px;
    height: 26px;
    background: var(--zedoor-crimson);
    color: #fff;
    text-align: center;
    line-height: 26px;
    font-size: 16px;
    margin-right: 8px;
    vertical-align: middle;
  }

  .hamburger-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
  }

  .row.g-3 .col-6,
  .row.g-4 .col-6 { flex: 0 0 50%; max-width: 50%; }
  .stat-card, .card.p-3 h3 { font-size: 1.4rem !important; }
  .card.p-3 h6, .stat-label { font-size: 0.65rem !important; }
  h1.h2, .h2 { font-size: 1.5rem !important; }
  h4 { font-size: 1.1rem !important; margin-top: 20px !important; }
  h5 { font-size: 1rem !important; }
  .d-flex.flex-wrap.gap-2 > .btn { flex: 1; min-width: 130px; }

  .table-responsive { border: none !important; }
  .table thead { display: none; }
  .table tbody tr {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    padding: 14px;
  }
  .table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0 !important;
    border: none !important;
    text-align: right;
    gap: 12px;
  }
  .table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.1em;
    flex-shrink: 0;
    text-align: left;
  }
  .table tbody td:last-child {
    display: block;
    padding-top: 12px !important;
    border-top: 1px solid var(--border-color) !important;
    margin-top: 8px;
  }
}

@media (max-width: 380px) {
  .stat-card h3 { font-size: 1.2rem !important; }
}

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

.mobile-topbar { display: none; }

.notification-item, .notification-page-item {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  cursor: pointer;
}

.notification-page-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.notification-page-item.unread {
  background: rgba(139, 26, 43, 0.06);
  border-left: 3px solid var(--zedoor-crimson);
}

.notification-page-item:hover {
  background: rgba(139, 26, 43, 0.03);
}

.notification-message {
  display: block;
  color: var(--text-primary);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  #notificationList {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}


/* ============================================================
   LIGHT MODE FIX — override Bootstrap Darkly's hardcoded .text-white
   Prevents "white on white" invisible text on light theme.
   ============================================================ */
body[data-theme="light"] .text-white,
body[data-theme="light"] h1.text-white,
body[data-theme="light"] h2.text-white,
body[data-theme="light"] h3.text-white,
body[data-theme="light"] h4.text-white,
body[data-theme="light"] h5.text-white,
body[data-theme="light"] h6.text-white,
body[data-theme="light"] .h1.text-white,
body[data-theme="light"] .h2.text-white,
body[data-theme="light"] .h3.text-white,
body[data-theme="light"] .h4.text-white,
body[data-theme="light"] .h5.text-white,
body[data-theme="light"] .h6.text-white,
body[data-theme="light"] p.text-white,
body[data-theme="light"] span.text-white,
body[data-theme="light"] strong.text-white,
body[data-theme="light"] div.text-white {
  color: var(--text-primary) !important;
}

/* Keep colored text classes readable on light backgrounds */
body[data-theme="light"] .text-success { color: #2f6b41 !important; }
body[data-theme="light"] .text-warning { color: #8a6100 !important; }
body[data-theme="light"] .text-danger  { color: #a01829 !important; }

@media (max-width: 900px) {
  #sidebar a[href*="notifications"] {
    display: none !important;
  }

  .notification-page-item {
    flex-direction: column;
    align-items: stretch;
  }

  .notification-page-item > .d-flex:last-child {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

body[data-theme="light"] #sidebar .nav-link:hover { background: rgba(139, 26, 43, 0.10); color: var(--zedoor-crimson); }
body[data-theme="light"] .card:hover { border-color: rgba(139, 26, 43, 0.45); box-shadow: 0 8px 24px rgba(139, 26, 43, 0.10); }
body[data-theme="light"] .table tbody tr:hover > * { background-color: var(--table-hover) !important; }

.project-card, .staff-card { height: 100%; padding: 20px; border: 1px solid var(--border-color); background: var(--bg-card); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.project-card .project-name, .staff-card .staff-name { color: var(--text-primary); font-family: 'Cormorant Garamond', Georgia, serif; }
.project-card .project-progress-text { color: var(--text-secondary); display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; }
body[data-theme="light"] .text-info    { color: #1a5c88 !important; }
body[data-theme="light"] .text-primary { color: #8b1a2b !important; }
body[data-theme="light"] .btn-outline-primary {
  color: var(--zedoor-crimson);
  border-color: var(--zedoor-crimson);
}
body[data-theme="light"] .btn-outline-primary:hover,
body[data-theme="light"] .btn-outline-primary:focus,
body[data-theme="light"] .btn-outline-primary:active {
  background-color: var(--zedoor-crimson);
  border-color: var(--zedoor-crimson);
  color: #fff;
}

/* Card header titles inside light cards */
body[data-theme="light"] .card-header {
  color: var(--text-primary) !important;
  background: transparent !important;
}

/* Ensure stat-card big numbers stay crimson but readable */
body[data-theme="light"] .stat-value,
body[data-theme="light"] .stat-card .stat-value {
  color: var(--zedoor-crimson) !important;
}

/* ============================================================
   LIGHT MODE — override Bootstrap Darkly's hardcoded .text-white
   Prevents invisible text on light theme.
   ============================================================ */
body[data-theme="light"] .text-white,
body[data-theme="light"] h1.text-white,
body[data-theme="light"] h2.text-white,
body[data-theme="light"] h3.text-white,
body[data-theme="light"] h4.text-white,
body[data-theme="light"] h5.text-white,
body[data-theme="light"] h6.text-white,
body[data-theme="light"] .h1.text-white,
body[data-theme="light"] .h2.text-white,
body[data-theme="light"] .h3.text-white,
body[data-theme="light"] .h4.text-white,
body[data-theme="light"] .h5.text-white,
body[data-theme="light"] .h6.text-white,
body[data-theme="light"] p.text-white,
body[data-theme="light"] span.text-white,
body[data-theme="light"] strong.text-white,
body[data-theme="light"] div.text-white {
  color: var(--text-primary) !important;
}

body[data-theme="light"] .text-success { color: #2f6b41 !important; }
body[data-theme="light"] .text-warning { color: #8a6100 !important; }
body[data-theme="light"] .text-danger  { color: #a01829 !important; }
body[data-theme="light"] .text-info    { color: #1a5c88 !important; }
body[data-theme="light"] .text-primary { color: #8b1a2b !important; }

body[data-theme="light"] .card-header { color: var(--text-primary) !important; background: transparent !important; }
body[data-theme="light"] .modal-title { color: var(--text-primary) !important; }
body[data-theme="light"] .dropdown-menu .dropdown-item { color: var(--text-primary) !important; }
body[data-theme="light"] hr,
body[data-theme="light"] .border-secondary { border-color: var(--border-color) !important; }

/* Dropdown menu items readable in light mode */
body[data-theme="light"] .dropdown-menu .dropdown-item {
  color: var(--text-primary) !important;
}

/* Modal titles stay dark */
body[data-theme="light"] .modal-title {
  color: var(--text-primary) !important;
}

/* Make sure hr / dividers are visible on light bg */
body[data-theme="light"] hr,
body[data-theme="light"] .border-secondary {
  border-color: var(--border-color) !important;
}

@media (max-width: 575px) {
  .staff-page-toolbar .staff-export-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }

  .staff-page-toolbar .staff-export-form input[type="date"] {
    min-width: 0;
    width: 100%;
  }

  .staff-page-toolbar .staff-export-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .attendance-table tbody td {
    display: grid;
    grid-template-columns: minmax(76px, 27%) minmax(0, 1fr);
    align-items: start;
    justify-content: initial;
    gap: 10px;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .attendance-table tbody td::before {
    grid-column: 1;
  }

  .attendance-table tbody td > * {
    min-width: 0;
  }

  .attendance-table tbody td:last-child {
    display: grid;
    grid-template-columns: minmax(76px, 27%) minmax(0, 1fr);
    margin-top: 8px;
    padding-top: 12px !important;
  }

  .attendance-table tbody td[colspan] {
    display: block;
    text-align: center;
  }

  .staff-project-task-table tbody td {
    display: grid;
    grid-template-columns: minmax(88px, 29%) minmax(0, 1fr);
    align-items: start;
    justify-content: initial;
    gap: 10px;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .staff-project-task-table tbody td[data-label="#"] {
    display: none;
  }

  .staff-project-task-table tbody td:last-child {
    display: grid;
    grid-template-columns: minmax(88px, 29%) minmax(0, 1fr);
    margin-top: 8px;
    padding-top: 12px !important;
  }

  .staff-project-task-table .staff-task-main {
    display: grid;
    min-width: 0;
    gap: 4px;
    overflow-wrap: anywhere;
  }

  .staff-project-task-table .staff-task-assignee {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    overflow-wrap: anywhere;
  }

  .staff-project-task-table td > * {
    min-width: 0;
  }

  .staff-project-task-table form {
    width: 100%;
  }

  .staff-project-task-table form .form-control {
    width: 100% !important;
  }

  .staff-project-task-table form .btn {
    min-width: 42px;
    min-height: 42px;
    padding: 6px 10px;
  }
}

/* Stage C: readable actions and scroll-safe forms across desktop and phones. */
.content, .card-body, .table-responsive { min-width: 0; }
.table-responsive { max-width: 100%; overflow-x: auto; }
.card h5, .notification-message { overflow-wrap: anywhere; }
.notification-page-item .btn { white-space: nowrap; flex-shrink: 0; }
.notification-page-item > .d-flex { gap: 1rem; flex-wrap: wrap; }
.modal-dialog-scrollable form { display: flex; flex-direction: column; min-height: 0; }
.modal-dialog-scrollable form .modal-body { overflow-y: auto; }
.modal { z-index: 2100; }
.modal-backdrop { z-index: 2090; }
.modal-header, .modal-footer { flex-shrink: 0; }
.modal form p { margin-bottom: 1.25rem; }
.modal form .helptext { display: block; margin-top: .4rem; font-size: .875rem; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--zedoor-crimson); outline-offset: 3px; }
form:has([data-task-status]) .form-control { flex-basis: 100%; min-width: 0; }
form [data-task-status] { min-height: 44px; min-width: 44px; }
@media (max-width: 575px) {
  .modal-dialog { margin: .5rem; }
  .modal .btn, .office-staff-option { min-height: 44px; }
  .content > form.d-flex { flex-wrap: wrap; }
  .notification-page-item .btn { min-height: 44px; }
}

/* Studio workspace: hierarchy, everyday priorities, and readable controls. */
.content h1, .content h2, .content h3, .content h4, .content h5, .content h6,
.content .card-header, .modal-title {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: -.025em;
  font-weight: 650;
}
.content h1.h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; }
.content .card, .workspace-focus, .workspace-project-card {
  border-radius: 12px !important;
}
.modal-content { border-radius: 12px !important; }
.btn { letter-spacing: .01em; text-transform: none; border-radius: 7px !important; font-weight: 600; }
.form-control, .form-select { border-radius: 7px !important; }
#sidebar .nav-link { font-size: 13px; line-height: 1.5; border-radius: 7px; }
.workspace-eyebrow { display: block; margin-bottom: .5rem; font-size: .73rem; letter-spacing: .09em; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); }
.workspace-focus { background: var(--bg-card); border: 1px solid var(--border-color); border-top: 3px solid var(--zedoor-crimson); padding: 24px; }
.workspace-focus-heading, .workspace-day-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.workspace-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 24px 0; }
.workspace-metrics > * { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text-secondary); font-size: .85rem; }
.workspace-metric-value { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--text-primary); }
.workspace-task-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border-color); text-decoration: none; color: var(--text-primary); }
.workspace-task-row > div { min-width: 0; }
.workspace-task-row strong { display: block; overflow-wrap: anywhere; font-size: .9rem; }
.workspace-task-row small { display: block; color: var(--text-secondary); overflow-wrap: anywhere; }
.workspace-task-row .badge { flex-shrink: 0; white-space: normal; max-width: 110px; }
.workspace-task-row:hover strong { color: var(--zedoor-crimson); }
.workspace-project-card { display: block; height: 100%; background: var(--bg-card); border: 1px solid var(--border-color); padding: 22px; text-decoration: none; color: var(--text-primary); }
.workspace-project-card:hover { border-color: var(--zedoor-crimson); }
.workspace-project-card h3 { overflow-wrap: anywhere; margin-bottom: 20px; }
.workspace-project-card .progress { height: 7px; border-radius: 8px; }
.workspace-project-card .progress-bar { background-color: var(--zedoor-crimson); }
.workspace-empty { margin: 0; padding: 18px; background: var(--bg-input); border-radius: 8px; color: var(--text-secondary); font-size: .9rem; }
.workspace-assistant { border: 1px solid var(--border-color); border-radius: 10px; padding: 16px; background: var(--bg-card); }
.workspace-assistant > summary { display: flex; gap: 12px; align-items: center; cursor: pointer; font-weight: 600; min-height: 32px; }
.workspace-assistant > summary .small { margin-left: auto; }
.workspace-assistant > summary::after { content: '+'; font-size: 1.3rem; }
.workspace-assistant[open] > summary::after { content: '-'; }
.workspace-assistant > .card { margin-top: 16px !important; }
@media (max-width: 575px) {
  .workspace-focus { padding: 18px; }
  .workspace-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .workspace-focus-heading .btn, .workspace-day-header .btn { width: 100%; }
  .workspace-task-row { align-items: start; }
  .btn { min-height: 44px; }
}
