/* ── Section 1 — CSS Custom Properties ─────────────────────────────────── */
:root {
  --color-primary:       #1F3C88;
  --color-action:        #3656A6;
  --color-card:          #6B87C9;  /* decorative only — never on text */
  --color-light-ui:      #A0B0D6;  /* borders/dividers only — never on text */
  --color-background:    #E3E9F9;
  --color-dark-bg:       #0F1F4A;

  --color-surface:       #FFFFFF;
  --color-surface-hover: #F0F4FC;
  --color-border:        #A0B0D6;
  --color-border-focus:  #1F3C88;

  --color-text-primary:   #0F1F4A;
  --color-text-secondary: #1F3C88;
  --color-text-muted:     #3656A6;
  --color-text-on-dark:   #E3E9F9;
  --color-text-on-action: #FFFFFF;

  --color-success:     #1A6B3A;
  --color-success-bg:  #D4EDDA;
  --color-warning:     #7A4F00;
  --color-warning-bg:  #FFF3CD;
  --color-danger:      #8B1A1A;
  --color-danger-bg:   #F8D7DA;
  --color-info:        #1F3C88;
  --color-info-bg:     #E3E9F9;

  --color-sidebar:        #0F1F4A;
  --color-sidebar-active: #1F3C88;
  --color-sidebar-hover:  #1A2E6B;

  --font-base:      'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm:   0.875rem;
  --font-size-xs:   0.8125rem;
  --line-height:    1.6;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(15,31,74,0.10);
  --shadow-md: 0 4px 12px rgba(15,31,74,0.12);
  --shadow-lg: 0 8px 24px rgba(15,31,74,0.15);

  --focus-ring:    0 0 0 3px rgba(31,60,136,0.45);
  --touch-target:  44px;
  --transition:    150ms ease;
  --sidebar-width: 240px;
  --header-height: 60px;
}

/* ── Section 2 — Reset and Base ────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
}

body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text-primary);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* ── Section 3 — Accessibility Utilities ───────────────────────────────── */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: var(--color-text-on-action);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ── Section 4 — App Shell Layout ──────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100%;
  background: var(--color-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 250ms ease;
  overflow: hidden;
}
.sidebar.is-open {
  transform: translateX(0);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,31,74,0.55);
  z-index: 199;
}
.sidebar-overlay.is-visible {
  display: block;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 0;
  transition: margin-left 250ms ease;
}

@media (min-width: 1024px) {
  .sidebar {
    transform: translateX(0);
    position: fixed;
  }
  .sidebar-overlay {
    display: none !important;
  }
  .main-content {
    margin-left: var(--sidebar-width);
  }
}

/* ── Section 5 — Header ─────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  gap: var(--space-sm);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}
.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 1024px) {
  .hamburger {
    display: none;
  }
}

.header-title {
  flex: 1;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-logout {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.375rem 0.75rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  min-height: var(--touch-target);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition),
              background var(--transition);
}
.header-logout:hover {
  color: var(--color-danger);
  border-color: var(--color-danger);
  background: var(--color-danger-bg);
}

/* ── Section 6 — Sidebar Components ────────────────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md) var(--space-sm);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.sidebar-brand img {
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}
.sidebar-brand-name {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text-on-dark);
  letter-spacing: -0.01em;
}
.sidebar-brand-sub {
  font-size: 0.6875rem;
  color: var(--color-text-on-dark);
  opacity: 0.6;
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm) 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

.nav-section {
  margin-top: var(--space-sm);
}
.nav-section-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-on-dark);
  opacity: 0.6;
  padding: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-xs);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-md);
  min-height: var(--touch-target);
  color: var(--color-text-on-dark);
  opacity: 0.75;
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
  text-decoration: none;
  border-radius: 0;
  border-left: 3px solid transparent;
}
.nav-item svg {
  flex-shrink: 0;
  color: var(--color-light-ui);
  transition: color var(--transition);
}
.nav-item:hover {
  background: var(--color-sidebar-hover);
  opacity: 1;
  text-decoration: none;
}
.nav-item:hover svg {
  color: var(--color-text-on-dark);
}
.nav-item.is-active {
  background: var(--color-sidebar-active);
  opacity: 1;
  border-left-color: var(--color-background);
}
.nav-item.is-active svg {
  color: var(--color-text-on-dark);
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-xs);
  color: var(--color-text-on-dark);
  opacity: 0.6;
  flex-shrink: 0;
}

/* ── Section 7 — Page Header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-md) var(--space-md);
}

.page-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

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

/* ── Section 8 — Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.5rem 1rem;
  min-height: var(--touch-target);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform 80ms ease,
              box-shadow var(--transition);
  white-space: nowrap;
}
.btn:focus-visible {
  box-shadow: var(--focus-ring);
}
.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-on-action);
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-dark-bg);
  border-color: var(--color-dark-bg);
  text-decoration: none;
  color: var(--color-text-on-action);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}
.btn--secondary:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-primary);
  text-decoration: none;
}

.btn--danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.btn--danger:hover {
  background: var(--color-danger);
  color: var(--color-surface);
  text-decoration: none;
}

.btn--sm {
  padding: 0.25rem 0.625rem;
  min-height: 32px;
  font-size: var(--font-size-xs);
}

.btn--full {
  width: 100%;
}

/* ── Section 9 — Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md) var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

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

/* ── Section 10 — Stat Cards ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  padding: 0 var(--space-md) var(--space-md);
}
@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.stat-card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-card-sub {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ── Section 11 — Tables ────────────────────────────────────────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

/* Mobile first — stack as cards */
thead {
  display: none;
}

tr {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  padding: var(--space-sm) 0;
  box-shadow: var(--shadow-sm);
}

td {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
  border: none;
  min-height: 32px;
}
td::before {
  content: attr(data-label);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  flex-shrink: 0;
  padding-top: 2px;
}

/* Desktop table layout */
@media (min-width: 768px) {
  thead {
    display: table-header-group;
  }
  tr {
    display: table-row;
    background: none;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    padding: 0;
    box-shadow: none;
  }
  tr:hover td {
    background: var(--color-surface-hover);
  }
  td {
    display: table-cell;
    padding: 0.75rem var(--space-md);
    border-bottom: 1px solid var(--color-border);
    min-height: 0;
  }
  td::before {
    display: none;
  }
  th {
    padding: 0.625rem var(--space-md);
    text-align: left;
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    background: var(--color-surface-hover);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
  }
  th:first-child { border-radius: var(--radius-md) 0 0 0; }
  th:last-child  { border-radius: 0 var(--radius-md) 0 0; }
}

/* ── Section 12 — Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.625em;
  border-radius: 20px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.4;
}

.badge--active {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.badge--inactive {
  background: var(--color-background);
  color: var(--color-text-muted);
}
.badge--completed {
  background: var(--color-info-bg);
  color: var(--color-info);
}
.badge--terminated {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}
.badge--expired {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}
.badge--on-hold {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
.badge--warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
.badge--caution {
  background: #FFF0E0;
  color: #8B4500;
}

/* ── Section 13 — Forms ─────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 768px) {
  .form-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-label.required::after {
  content: ' *';
  color: var(--color-danger);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem var(--space-sm);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  background: var(--color-surface);
  min-height: var(--touch-target);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: var(--focus-ring);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: var(--color-background);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

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

.field-error {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  margin-top: var(--space-xs);
}

/* ── Section 14 — Flash Messages (Toasts) ─────────────────────────────────── */
.toast {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border-left: 4px solid transparent;
    box-shadow: var(--shadow-lg);
    font-size: var(--font-size-sm);
    animation: toast-in 300ms ease forwards;
    background: var(--color-surface);
}
.toast--success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-left-color: var(--color-success);
}
.toast--error {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border-left-color: var(--color-danger);
}
.toast--warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border-left-color: var(--color-warning);
}
.toast--info {
    background: var(--color-info-bg);
    color: var(--color-info);
    border-left-color: var(--color-info);
}
.toast-body { flex: 1; }
.toast-close {
    background: none;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    opacity: 0.6;
    color: inherit;
    padding: 0;
    line-height: 1;
    min-width: 24px;
    min-height: 24px;
}
.toast-close:hover { opacity: 1; }
@keyframes toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes toast-out {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

/* ── Section 15 — Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,31,74,0.60);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  z-index: 1;
}
.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
}
.modal-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.modal-close:hover {
  color: var(--color-danger);
  background: var(--color-danger-bg);
}

.modal-body {
  padding: var(--space-md);
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

/* Mobile — bottom sheet */
@media (max-width: 767px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: slide-up 250ms ease;
  }
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ── Section 16 — Search Bar ────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: 0 var(--space-sm);
  min-height: var(--touch-target);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar:focus-within {
  border-color: var(--color-border-focus);
  box-shadow: var(--focus-ring);
}
.search-bar svg {
  color: var(--color-light-ui);
  flex-shrink: 0;
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  padding: 0.375rem 0;
}
.search-bar input::placeholder {
  color: var(--color-text-muted);
}

/* ── Section 17 — Avatar ─────────────────────────────────────────────────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-text-on-action);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 2px solid var(--color-background);
  flex-shrink: 0;
  text-transform: uppercase;
  user-select: none;
}

/* ── Section 18 — Empty State ───────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  gap: var(--space-sm);
}
.empty-state svg {
  color: var(--color-light-ui);
  margin-bottom: var(--space-sm);
}
.empty-state-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
}
.empty-state-sub {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  max-width: 300px;
}

/* ── Section 19 — Back To Top ───────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: var(--touch-target);
  height: var(--touch-target);
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-text-on-action);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 150;
  transition: background var(--transition), transform var(--transition);
}
.back-to-top.is-visible {
  display: flex;
}
.back-to-top:hover {
  background: var(--color-dark-bg);
  transform: translateY(-2px);
}
.back-to-top:focus-visible {
  box-shadow: var(--focus-ring);
}

/* ── Section 20 — Print Styles and Utilities ────────────────────────────── */
@media print {
  .sidebar,
  .app-header,
  .btn,
  .back-to-top,
  .modal-overlay,
  .hamburger,
  .search-bar,
  .sidebar-overlay {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
  }
  body {
    background: #fff !important;
  }
  .card,
  .stat-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  a {
    text-decoration: underline;
  }
}

/* Utility classes */
.text-muted    { color: var(--color-text-muted); }
.text-danger   { color: var(--color-danger); }
.text-success  { color: var(--color-success); }
.text-sm       { font-size: var(--font-size-sm); }
.text-xs       { font-size: var(--font-size-xs); }
.font-bold     { font-weight: 700; }
.mt-sm         { margin-top: var(--space-sm); }
.mt-md         { margin-top: var(--space-md); }
.mb-md         { margin-bottom: var(--space-md); }
.d-flex        { display: flex; }
.align-center  { align-items: center; }
.w-full        { width: 100%; }
.page-content  { padding: 0 var(--space-md) var(--space-xl); }
