/* ============================================================================
   ISO Align Design System
   Modern, sleek, brand-aligned styling
   ============================================================================ */

/* === CSS Variables & Design Tokens === */
:root {
  /* Brand Colors (from logo) */
  --brand-primary: #1c5c6e;
  --brand-success: #249355;
  --brand-accent: #0a273f;
  --brand-secondary: #056e26;
  --brand-light: #F4F9E9;
  --brand-danger: #d46a6a;
  --brand-muted: #084252;

  /* Semantic Colors */
  --color-success: var(--brand-success);
  --color-warning: #f59e0b;
  --color-danger: var(--brand-danger);
  --color-info: #3b82f6;

  /* Neutrals & Surfaces */
  --surface-0: #ffffff;
  --surface-1: #f8fafc;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;

  --text-0: #0f172a;
  --text-1: #475569;
  --text-2: #94a3b8;
  --text-3: #cbd5e1;

  --border: #e2e8f0;
  --border-dark: #cbd5e1;

  /* Interactive States */
  --focus-ring: 0 0 0 3px rgba(28, 92, 110, 0.1);
  --hover-bg: rgba(28, 92, 110, 0.04);
  --active-bg: rgba(28, 92, 110, 0.08);

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Sidebar */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 80px;
  --navbar-height: 70px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Base & Reset === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-0);
  background: var(--surface-1);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4) 0;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-0);
}

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

p {
  margin: 0 0 var(--space-4) 0;
}

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

a:hover {
  color: var(--brand-accent);
  text-decoration: none;
}

small, .text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-lg {
  font-size: 1.125rem;
}

/* === Utility Classes === */
.text-muted { color: var(--text-1); }
.text-muted-light { color: var(--text-2); }
.text-brand { color: var(--brand-primary) !important; }
.text-success { color: var(--brand-success) !important; }
.text-danger { color: var(--brand-danger) !important; }
.text-warning { color: var(--color-warning) !important; }

.bg-brand { background: var(--brand-primary) !important; color: white !important; }
.bg-surface-1 { background: var(--surface-1); }
.bg-surface-2 { background: var(--surface-2); }

.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Standalone button classes that include all base styles */
.btn-brand,
a.btn-brand,
button.btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.btn-brand:hover,
a.btn-brand:hover,
button.btn-brand:hover {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-brand:active,
a.btn-brand:active,
button.btn-brand:active {
  transform: translateY(0);
}

.btn-brand:focus-visible,
a.btn-brand:focus-visible,
button.btn-brand:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-success,
a.btn-success,
button.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
  background: var(--brand-success);
  color: white;
  border-color: var(--brand-success);
}

.btn-success:hover,
a.btn-success:hover,
button.btn-success:hover {
  background: var(--brand-secondary);
  border-color: var(--brand-secondary);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-danger,
a.btn-danger,
button.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
  background: var(--brand-danger);
  color: white;
  border-color: var(--brand-danger);
}

.btn-danger:hover,
a.btn-danger:hover,
button.btn-danger:hover {
  background: #b85555;
  border-color: #b85555;
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-ghost,
a.btn-ghost,
button.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
  background: transparent;
  color: var(--text-0);
  border-color: transparent;
}

.btn-ghost:hover,
a.btn-ghost:hover,
button.btn-ghost:hover {
  background: var(--hover-bg);
  color: var(--brand-primary);
  text-decoration: none;
}

.btn-outline,
a.btn-outline,
button.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
  background: white;
  color: var(--brand-primary);
  border-color: var(--border-dark);
}

.btn-outline:hover,
a.btn-outline:hover,
button.btn-outline:hover {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
  text-decoration: none;
}

.btn-outline-danger,
a.btn-outline-danger,
button.btn-outline-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
  background: white;
  color: var(--brand-danger);
  border-color: var(--brand-danger);
}

.btn-outline-danger:hover,
a.btn-outline-danger:hover,
button.btn-outline-danger:hover {
  background: var(--brand-danger);
  color: white;
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: 0.875rem;
}

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

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

/* Button Group */
.btn-group {
  display: inline-flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.btn-group .btn {
  border-radius: 0;
  border-right: 1px solid var(--border);
}

.btn-group .btn:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-right: none;
}

/* === Cards === */
.card {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
}

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

.card-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--surface-1);
}

.card-brand {
  border-left: 4px solid var(--brand-primary);
}

.card-success {
  border-left: 4px solid var(--brand-success);
}

.card-danger {
  border-left: 4px solid var(--brand-danger);
}

.card-warning {
  border-left: 4px solid var(--color-warning);
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--border);
}

.card-flat:hover {
  box-shadow: var(--shadow-sm);
  transform: none;
}

/* === Badges & Status === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-brand {
  background: rgba(28, 92, 110, 0.1);
  color: var(--brand-primary);
}

.badge-success {
  background: rgba(36, 147, 85, 0.1);
  color: var(--brand-success);
}

.badge-danger {
  background: rgba(212, 106, 106, 0.1);
  color: var(--brand-danger);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

.badge-muted {
  background: var(--surface-2);
  color: var(--text-1);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: currentColor;
}

/* === Forms === */
.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-0);
}

.form-label-required::after {
  content: '*';
  margin-left: var(--space-1);
  color: var(--brand-danger);
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: 0.9375rem;
  font-family: inherit;
  line-height: 1.5;
  color: var(--text-0);
  background: var(--surface-0);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: var(--focus-ring);
}

.form-control:disabled,
.form-select:disabled {
  background: var(--surface-2);
  color: var(--text-2);
  cursor: not-allowed;
}

.form-control-sm,
.form-select-sm {
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
}

.form-control-lg,
.form-select-lg {
  padding: var(--space-4) var(--space-5);
  font-size: 1rem;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-text {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.875rem;
  color: var(--text-1);
}

.form-error {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.875rem;
  color: var(--brand-danger);
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.form-check-input:checked {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.form-check-input:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Django CheckboxSelectMultiple widget styling - generic for all checkbox groups */
div.form-check > div {
  margin-bottom: var(--space-2);
}

div.form-check label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  cursor: pointer;
}

div.form-check input[type="checkbox"].form-check {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

/* === Tables === */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-0);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

thead {
  background: var(--surface-1);
  border-bottom: 2px solid var(--border);
}

thead th {
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
  text-align: left;
  color: var(--text-0);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--surface-1);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody td {
  padding: var(--space-4) var(--space-5);
  color: var(--text-1);
}

/* Mobile: Stack rows as cards */
@media (max-width: 768px) {
  .table-wrap {
    border: none;
    background: transparent;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none;
  }

  tbody tr {
    margin-bottom: var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-0);
    box-shadow: var(--shadow-sm);
  }

  tbody td {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
  }

  tbody td:last-child {
    border-bottom: none;
  }

  tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-0);
    margin-right: var(--space-4);
  }
}

/* === Alerts === */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  margin-bottom: var(--space-4);
  font-size: 0.9375rem;
}

.alert-success {
  background: rgba(36, 147, 85, 0.05);
  border-color: var(--brand-success);
  color: var(--brand-secondary);
}

.alert-info {
  background: rgba(59, 130, 246, 0.05);
  border-color: var(--color-info);
  color: #1e40af;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.05);
  border-color: var(--color-warning);
  color: #92400e;
}

.alert-danger {
  background: rgba(212, 106, 106, 0.05);
  border-color: var(--brand-danger);
  color: #991b1b;
}

.alert-secondary {
  background: var(--surface-2);
  border-color: var(--border-dark);
  color: var(--text-0);
}

/* === Empty States === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  text-align: center;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-5);
  color: var(--text-2);
  opacity: 0.5;
}

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

.empty-state-text {
  font-size: 0.9375rem;
  color: var(--text-1);
  margin-bottom: var(--space-5);
  max-width: 400px;
}

/* === Top Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--navbar-height);
  background: var(--surface-0);
  border-bottom: 1px solid var(--border);
  z-index: 1040;
  box-shadow: var(--shadow-sm);
  transition: left var(--transition-base);
}

.navbar.navbar-expanded {
  left: var(--sidebar-collapsed-width);
}

.navbar .container-fluid {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  gap: var(--space-3);
}

/* Sidebar toggle button in navbar */
.btn-sidebar-toggle {
  padding: var(--space-2);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-1);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.btn-sidebar-toggle:hover {
  background: var(--hover-bg);
  color: var(--brand-primary);
}

.btn-sidebar-toggle svg {
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

/* Rotate arrow when sidebar is collapsed */
.navbar-expanded .btn-sidebar-toggle svg {
  transform: rotate(180deg);
}

.navbar-collapse {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.navbar .navbar-nav.me-auto {
  margin-right: 0 !important;
  flex: 0 0 auto;
}

.navbar .navbar-nav:last-child {
  margin-left: auto;
  flex: 0 0 auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-0);
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--brand-primary);
}

.navbar-brand img {
  height: 45px;
  width: auto;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  color: var(--text-1);
  text-decoration: none;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--brand-primary);
  background: var(--hover-bg);
}

.nav-link.disabled {
  color: var(--text-2);
  cursor: default;
  pointer-events: none;
}

/* Top nav context selectors */
.nav-item .form-select-sm {
  min-width: 180px;
}

/* Mobile navbar toggle */
.navbar-toggler {
  display: none;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
}

.navbar-toggler:hover {
  background: var(--hover-bg);
}

/* Navbar without sidebar (unauthenticated) */
body:not(.has-sidebar) .navbar {
  left: 0;
}

@media (max-width: 991px) {
  .navbar {
    left: 0;
  }

  .navbar.navbar-expanded {
    left: 0;
  }

  .navbar-toggler {
    display: block;
  }

  /* Hide desktop sidebar toggle on mobile */
  .btn-sidebar-toggle {
    display: none;
  }

  .navbar-collapse {
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--surface-0);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  .navbar-collapse:not(.show) {
    display: none !important;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-left: 0 !important;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item .form-select-sm {
    width: 100%;
  }
}

/* === Sidebar === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface-0);
  border-right: 1px solid var(--border);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  overflow: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

/* Sidebar header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
  min-height: var(--navbar-height);
  background: var(--surface-1);
}

.sidebar-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex: 1;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.sidebar-logo-container:hover {
  background-color: var(--hover-bg);
  text-decoration: none;
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-primary);
  white-space: nowrap;
  transition: opacity var(--transition-base);
}

.sidebar.collapsed .sidebar-brand-text {
  display: none;
}

.sidebar.collapsed .sidebar-logo-container {
  justify-content: center;
}


/* Sidebar content */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-5);
}

.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-2);
}

/* Standard info badge */
.sidebar-standard-info {
  padding: var(--space-3);
  margin-bottom: var(--space-5);
  background: rgba(28, 92, 110, 0.05);
  border-left: 3px solid var(--brand-primary);
  border-radius: var(--radius-md);
  transition: opacity var(--transition-base);
}

.sidebar.collapsed .sidebar-standard-info {
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.sidebar-standard-info small {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  margin-bottom: var(--space-1);
}

.sidebar-standard-info .fw-semibold {
  font-size: 0.9375rem;
  color: var(--brand-primary);
}

/* Sidebar navigation */
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  margin-bottom: var(--space-1);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-1);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-link:hover {
  background: var(--hover-bg);
  color: var(--brand-primary);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: var(--brand-primary);
  color: white;
  font-weight: 600;
}

.sidebar-link.active:hover {
  background: var(--brand-accent);
  transform: none;
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: var(--space-3);
}

.sidebar.collapsed .sidebar-link span {
  display: none;
}

/* Details/Summary for expandable items */
.sidebar-details {
  margin-bottom: var(--space-1);
}

.sidebar-summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  color: var(--text-0);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  list-style: none;
  user-select: none;
}

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

.sidebar-summary::before {
  content: '▶';
  font-size: 0.75rem;
  color: var(--text-2);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-details[open] .sidebar-summary::before {
  transform: rotate(90deg);
}

.sidebar-summary:hover {
  background: var(--hover-bg);
  color: var(--brand-primary);
}

.sidebar.collapsed .sidebar-details {
  display: none;
}

/* Submenu */
.sidebar-submenu {
  padding-left: var(--space-6);
  padding-top: var(--space-2);
  margin-bottom: var(--space-2);
  list-style: none;
}

.sidebar-submenu li {
  margin-bottom: var(--space-1);
}

.sidebar-submenu .sidebar-link {
  font-size: 0.875rem;
  font-weight: 400;
  padding: var(--space-2) var(--space-3);
}

/* === Main Content === */
body {
  padding-top: var(--navbar-height);
}

.main-content {
  margin-left: var(--sidebar-width);
  padding: var(--space-8);
  min-height: calc(100vh - var(--navbar-height));
  transition: margin-left var(--transition-base);
}

.main-content.expanded {
  margin-left: var(--sidebar-collapsed-width);
}

/* Mobile toggle buttons */
.sidebar-toggle-btn,
.sidebar-reopen-btn {
  position: fixed;
  z-index: 1025;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-1);
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.sidebar-toggle-btn:hover,
.sidebar-reopen-btn:hover {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.sidebar-toggle-btn {
  top: calc(var(--navbar-height) + var(--space-4));
  left: var(--space-4);
  display: none;
}

.sidebar-reopen-btn {
  top: calc(var(--navbar-height) + var(--space-4));
  left: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

/* Show reopen button when sidebar is collapsed on desktop */
@media (min-width: 769px) {
  .sidebar.collapsed ~ .main-content .sidebar-reopen-btn {
    opacity: 1;
    visibility: visible;
  }
}

/* === Responsive === */
@media (max-width: 768px) {
  /* Hide sidebar by default on mobile */
  .sidebar {
    transform: translateX(-100%);
  }

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

  /* Main content takes full width */
  .main-content {
    margin-left: 0;
    padding: var(--space-4);
  }

  .main-content.expanded {
    margin-left: 0;
  }

  /* Show mobile toggle */
  .sidebar-toggle-btn {
    display: flex;
  }

  /* Hide desktop reopen button */
  .sidebar-reopen-btn {
    display: none;
  }

  /* Backdrop for mobile sidebar */
  .sidebar-backdrop {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1020;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .sidebar.show ~ .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }
}

/* === Page Headers === */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.page-title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-0);
}

.page-subtitle {
  margin: var(--space-2) 0 0 0;
  font-size: 0.9375rem;
  color: var(--text-1);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* === Utility: Spacing === */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }

/* === Utility: Display & Flex === */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* === Keep Bootstrap Grid System === */
.container-fluid,
.container {
  width: 100%;
  padding-right: var(--space-4);
  padding-left: var(--space-4);
  margin-right: auto;
  margin-left: auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--space-3) * -1);
  margin-left: calc(var(--space-3) * -1);
}

.row > * {
  padding-right: var(--space-3);
  padding-left: var(--space-3);
}

.col,
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
  position: relative;
  width: 100%;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }

@media (min-width: 768px) {
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
}

@media (min-width: 992px) {
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
}

.g-3 {
  margin-right: calc(var(--space-4) * -1);
  margin-left: calc(var(--space-4) * -1);
}

.g-3 > * {
  padding-right: var(--space-4);
  padding-left: var(--space-4);
  margin-bottom: var(--space-4);
}

.g-4 {
  margin-right: calc(var(--space-5) * -1);
  margin-left: calc(var(--space-5) * -1);
}

.g-4 > * {
  padding-right: var(--space-5);
  padding-left: var(--space-5);
  margin-bottom: var(--space-5);
}

/* ============================================================================
   Drag & Drop File Upload Styles
   ============================================================================ */

.file-upload-wrapper {
  position: relative;
  width: 100%;
}

.file-upload-dropzone {
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.02);
}

.file-upload-dropzone::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: calc(var(--radius-lg) - 4px);
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.file-upload-dropzone:hover {
  border-color: var(--brand-primary);
  background: linear-gradient(135deg, rgba(28, 92, 110, 0.03) 0%, rgba(28, 92, 110, 0.08) 100%);
  box-shadow: inset 0 2px 12px rgba(28, 92, 110, 0.06);
}

.file-upload-dropzone:hover::before {
  opacity: 0.8;
}

.file-upload-dropzone.drag-over {
  border-color: var(--brand-primary);
  border-width: 3px;
  background: linear-gradient(135deg, rgba(28, 92, 110, 0.08) 0%, rgba(28, 92, 110, 0.12) 100%);
  border-style: solid;
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(28, 92, 110, 0.15), inset 0 2px 12px rgba(28, 92, 110, 0.08);
}

.file-upload-dropzone.drag-over::before {
  opacity: 0.9;
}

.file-upload-dropzone.has-files {
  min-height: auto;
  padding: var(--space-4);
  background: var(--surface-0);
  border-style: solid;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(28, 92, 110, 0.08);
}

.file-upload-dropzone.has-files::before {
  display: none;
}

.file-upload-dropzone.has-files .file-upload-content {
  display: none;
}

.file-upload-icon {
  color: var(--brand-primary);
  opacity: 0.4;
  margin-bottom: var(--space-3);
}

.file-upload-text {
  color: var(--text-1);
}

.file-upload-primary {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: var(--space-1);
}

.file-upload-secondary {
  font-size: 0.875rem;
  color: var(--text-1);
}

.file-upload-list {
  width: 100%;
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.file-upload-list-header {
  font-size: 0.875rem;
  color: var(--text-1);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-1);
}

.file-upload-list-header strong {
  color: var(--brand-primary);
  font-weight: 700;
}

.file-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.file-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-success);
  transition: width 0.2s ease;
}

.file-item:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(28, 92, 110, 0.1);
  transform: translateY(-1px);
}

.file-item:hover::before {
  width: 6px;
}

.file-item::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  opacity: 0.5;
}

.file-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(28, 92, 110, 0.2);
}

.file-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.file-item-name {
  font-weight: 600;
  color: var(--text-0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9375rem;
}

.file-item-size {
  font-size: 0.8125rem;
  color: var(--text-1);
  white-space: nowrap;
}

.file-item-remove {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  color: var(--text-1);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.file-item-remove:hover {
  background: var(--brand-danger);
  color: white;
  transform: rotate(90deg);
  box-shadow: 0 2px 8px rgba(212, 106, 106, 0.3);
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .file-upload-dropzone {
    padding: var(--space-6);
    min-height: 150px;
  }

  .file-upload-icon svg {
    width: 40px;
    height: 40px;
  }

  .file-upload-primary {
    font-size: 0.875rem;
  }

  .file-upload-secondary {
    font-size: 0.75rem;
  }

  .file-item {
    padding: var(--space-3);
    gap: var(--space-2);
  }

  .file-item-icon {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }

  .file-item-name {
    font-size: 0.875rem;
  }

  .file-item-size {
    font-size: 0.75rem;
  }

  .file-item-remove {
    width: 28px;
    height: 28px;
    font-size: 1.125rem;
  }
}

/* === Quill Rich Text Editor Styling === */
.ql-container {
  background: #ffffff !important;
  font-family: inherit;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.ql-editor {
  background: #ffffff !important;
  min-height: 150px;
  font-family: inherit;
  color: var(--text-0);
}

.ql-toolbar {
  background: var(--surface-1);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  border: 1px solid var(--border-dark);
}

.ql-container.ql-snow {
  border: 1px solid var(--border-dark);
  border-top: none;
  background: #ffffff !important;
}

.quill-holder {
  margin-bottom: var(--space-3);
}

.ql-editor.ql-blank::before {
  color: var(--text-2);
  font-style: italic;
}

/* === Bootstrap Dropdown Base Styles === */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  z-index: 1000;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0;
  font-size: 1rem;
  color: var(--text-0);
  text-align: left;
  list-style: none;
  background-color: var(--surface-1);
  background-clip: padding-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu-end {
  right: 0;
  left: auto;
}

.dropdown-toggle {
  cursor: pointer;
}

/* === Dropdown Menu with Forms === */
.dropdown-menu form {
  margin: 0;
  padding: 0;
}

.dropdown-menu form .dropdown-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-0);
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.dropdown-menu form .dropdown-item:hover {
  background-color: var(--surface-1);
  color: var(--brand-primary);
}

.dropdown-menu form .dropdown-item:focus {
  background-color: var(--surface-1);
  color: var(--brand-primary);
  outline: none;
}

.dropdown-menu form .dropdown-item.text-danger:hover {
  background-color: rgba(212, 106, 106, 0.1);
  color: var(--brand-danger);
}

.dropdown-menu form .dropdown-item svg {
  vertical-align: middle;
}

/* === Inline Forms in Button Groups === */
.btn-group form.d-inline {
  display: inline-block !important;
  margin: 0;
}

.btn-group form.d-inline button {
  border-radius: 0;
  border-left-width: 0;
}

.btn-group > form.d-inline:first-child button {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
  border-left-width: 1px;
}

.btn-group > form.d-inline:last-child button {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.btn-group > a:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.btn-group > a + form.d-inline button {
  border-left-width: 0;
}

/* ========================================
   NOTIFICATION CENTRE
   ======================================== */

/* Notification badge */
.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: var(--brand-danger);
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  min-width: 18px;
  text-align: center;
}

/* Notification dropdown - extends Bootstrap dropdown-menu */
.dropdown-menu.notification-dropdown {
  min-width: 380px;
  max-width: 420px;
  max-height: 500px;
  padding: 0;
}

@media (max-width: 576px) {
  .dropdown-menu.notification-dropdown {
    min-width: 320px;
    max-width: 95vw;
  }
}

/* Notification header */
.notification-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--surface-0);
}

.notification-header h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-0);
  margin: 0;
}

.notification-header .btn {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.notification-header .btn-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

.notification-header .btn-link:hover {
  color: var(--brand-accent);
  background-color: rgba(28, 92, 110, 0.05);
}

/* Notification list */
.notification-list {
  max-height: 360px;
  overflow-y: auto;
}

/* Empty state - centered */
.notification-list > .text-center {
  padding: 48px 24px;
  text-align: center;
}

.notification-list > .text-center svg {
  opacity: 0.3;
  color: var(--text-2);
}

.notification-list > .text-center p {
  color: var(--text-1);
  font-size: 14px;
  margin-top: 12px;
}

/* Notification item */
.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-0);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background-color 0.2s;
  cursor: pointer;
  position: relative;
}

.notification-item:hover {
  background-color: var(--surface-0);
}

.notification-item.unread {
  background-color: rgba(28, 92, 110, 0.03);
}

.notification-item.unread:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--brand-primary);
}

/* Notification icon */
.notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-assignment {
  background-color: rgba(28, 92, 110, 0.1);
  color: var(--brand-primary);
}

.notif-change {
  background-color: rgba(10, 39, 63, 0.1);
  color: var(--brand-accent);
}

.notif-due-soon {
  background-color: rgba(244, 249, 233, 0.5);
  color: #f9a825;
}

.notif-overdue {
  background-color: rgba(212, 106, 106, 0.1);
  color: var(--brand-danger);
}

.notif-completed {
  background-color: rgba(36, 147, 85, 0.1);
  color: var(--brand-success);
}

.notif-comment {
  background-color: rgba(5, 110, 38, 0.1);
  color: var(--brand-secondary);
}

.notif-mention {
  background-color: rgba(28, 92, 110, 0.15);
  color: var(--brand-primary);
}

.notif-default {
  background-color: var(--surface-0);
  color: var(--text-1);
}

/* Notification content */
.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 4px;
  line-height: 1.4;
}

.notification-message {
  font-size: 12px;
  color: var(--text-1);
  margin-bottom: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-time {
  font-size: 11px;
  color: var(--text-2);
}

/* Notification arrow */
.notification-arrow {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.notification-item:hover .notification-arrow {
  opacity: 1;
}

/* Notification footer */
.notification-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background-color: var(--surface-0);
  text-align: center;
}

.notification-footer .btn-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  display: inline-block;
}

.notification-footer .btn-link:hover {
  color: var(--brand-accent);
  background-color: rgba(28, 92, 110, 0.05);
}

.notification-footer .btn-link:active {
  color: var(--brand-accent);
  text-decoration: underline;
}
