/**
 * Portal / shared UI components — consolidated from template <style> blocks (Phase 2).
 */

/* --- from templates/components/activity_feed.html --- */
/* Activity Feed Styles */
.activity-feed-container {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 600px;
}

.activity-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-bg-light), var(--color-bg-primary));
}

.activity-feed-header h3 {
  margin: 0;
  font-size: var(--font-size-lg);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.activity-feed-controls {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.activity-filter-select {
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.activity-refresh-btn {
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.activity-refresh-btn:hover {
  background: var(--color-secondary);
  transform: rotate(180deg);
}

.activity-feed {
  flex: 1;
  overflow-y: auto;
}

.activity-list {
  padding: 0;
}

.activity-item {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: var(--spacing-md);
  transition: background-color var(--transition-fast);
  cursor: pointer;
}

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

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-md);
  color: white;
}

.activity-icon.admin {
  background: var(--color-primary);
}

.activity-icon.student {
  background: var(--color-secondary);
}

.activity-icon.system {
  background: var(--color-accent);
}

.activity-icon.enrollment {
  background: var(--color-primary, var(--school-primary));
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-xs) 0;
  word-break: break-word;
}

.activity-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.activity-meta {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-xs);
}

.activity-timestamp {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.activity-user {
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.activity-badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--color-bg-light);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
}

.activity-loading {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  height: 100%;
}

.activity-empty {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-muted);
}

.activity-feed-footer {
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-light);
  text-align: center;
}

.activity-load-more {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.activity-load-more:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
}

/* Scrollbar styling */
.activity-feed::-webkit-scrollbar {
  width: 6px;
}

.activity-feed::-webkit-scrollbar-track {
  background: transparent;
}

.activity-feed::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: 3px;
}

.activity-feed::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .activity-feed-container {
    height: auto;
    max-height: 400px;
  }

  .activity-feed-header {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: flex-start;
  }

  .activity-item {
    padding: var(--spacing-md);
  }
}

/* --- from templates/components/ai_copilot.html --- */
.ai-copilot-wrapper {
    position: fixed;
    bottom: 16px;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
    left: auto !important;
    right: max(16px, env(safe-area-inset-right)) !important;
    z-index: 9999 !important;
    pointer-events: auto;
  }

  /* Ensure Copilot is never overlapped by other fixed elements */
  body > .ai-copilot-wrapper, html > .ai-copilot-wrapper {
    z-index: 9999 !important;
  }

  .ai-copilot-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-indigo-700) 100%);
    border: none;
    color: white;
    font-size: var(--type-size-headline-m);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    outline: none;
  }

  .ai-shortcut-hint {
    position: absolute;
    right: 0;
    bottom: 70px;
    transform: translateX(10%);
    background: rgba(26, 22, 18, 0.85); /* off-token-allow: tooltip-always-dark */
    color: var(--text-on-brand, var(--color-base-0));
    font-size: var(--type-size-eyebrow);
    padding: 4px 8px;
    border-radius: 999px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.18);
    white-space: nowrap; /* horizontal-overflow-risk-allow: short-controlled-content-by-design */
    pointer-events: none;
    display: none;
    opacity: 0;
  }

  @media (max-width: 576px) {
    .ai-shortcut-hint {
      display: none !important;
    }
  }

  .ai-copilot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.6);
  }

  .ai-copilot-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.45);
    transform: scale(1.02);
  }

  .ai-copilot-trigger .pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--color-indigo-500);
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0.6;
  }

  @keyframes pulse {
    0% {
      transform: scale(1);
      opacity: 0.6;
    }
    50% {
      transform: scale(1.3);
      opacity: 0;
    }
    100% {
      transform: scale(1);
      opacity: 0;
    }
  }

  .ai-copilot-panel {
    position: fixed;
    bottom: 100px;
    right: 24px;
    left: auto !important;
    right: 24px !important;
    width: 420px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 140px);
    background: var(--admin-content-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
  }

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

  .ai-copilot-panel.active {
    display: flex;
  }

  .ai-copilot-header {
    /* Phase S (2026-05-12): use the tenant-aware --brand-gradient so tenant brand
       cascades into the AI copilot header. Was hardcoded indigo. */
    background: var(--brand-gradient, linear-gradient(135deg, var(--school-primary), var(--color-indigo-800, #3730a3)));
    color: var(--text-on-brand, white);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Phase E (2026-05-12): live AI health pill inside the copilot header.
     Three states: ok (green dot), degraded (amber dot), error/unknown (red dot). */
  .ai-copilot-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill, 999px);
    font-size: var(--type-size-micro);
    line-height: 1;
    background: rgba(255, 255, 255, 0.14); /* off-token-allow: white-overlay */
    color: rgba(255, 255, 255, 0.92); /* off-token-allow: white-overlay */
    border: var(--border-width-hairline, 0.5px) solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: var(--material-blur, blur(10px));
    backdrop-filter: var(--material-blur, blur(10px));
  }
  .ai-copilot-status .ai-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d9d0c2; /* off-token-allow: hex-literal-decorative */
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
  }
  .ai-copilot-status[data-state="ok"] .ai-status-dot { background: var(--ds-success, #22c55e); }
  .ai-copilot-status[data-state="degraded"] .ai-status-dot { background: var(--ds-warning, #f59e0b); }
  .ai-copilot-status[data-state="error"] .ai-status-dot { background: var(--ds-danger, #ef4444); }
  .ai-copilot-status[data-state="unknown"] .ai-status-dot { background: rgba(255, 255, 255, 0.5); /* off-token-allow: white-overlay */ }

  .ai-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2); /* off-token-allow: white-overlay */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--type-size-body-l);
  }

  .ai-copilot-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--surface-elevated, var(--color-base-50));
    scroll-behavior: smooth;
  }

  .ai-message {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
  }

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

  .ai-message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-indigo-700) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--type-size-body);
    flex-shrink: 0;
  }

  .ai-message-content {
    background: var(--admin-content-bg);
    border-radius: 12px;
    padding: 12px 16px;
    flex: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: var(--text-primary, var(--color-base-900));
    line-height: 1.45;
  }

  .ai-message-content p {
    margin: 0;
    color: inherit;
  }

  .user-message {
    flex-direction: row-reverse;
  }

  .user-message .ai-message-avatar {
    background: linear-gradient(135deg, var(--school-primary) 0%, var(--color-primary-700) 100%); /* theme-locked-allow: decorative-tint-mix */
  }

  .user-message .ai-message-content {
    background: color-mix(in oklab, var(--color-primary-300) 25%, var(--color-base-0)); /* theme-locked-allow: decorative-tint-mix */
    color: var(--text-primary, var(--color-base-900));
  }

  .ai-quick-actions {
    border-top: 1px solid var(--hairline, var(--color-base-200)); /* theme-locked-allow: manual-review */
    padding: 12px 0;
  }

  .ai-quick-btn {
    font-size: var(--type-size-eyebrow);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap; /* horizontal-overflow-risk-allow: short-pill-content-bounded */
  }

  .ai-copilot-footer {
    border-top: 1px solid var(--hairline, var(--color-base-200)); /* theme-locked-allow: manual-review */
    padding: 1rem;
    background: var(--admin-content-bg);
  }

  .ai-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
  }

  .ai-input {
    flex: 1;
    border-radius: 12px;
    resize: none;
    border: 2px solid var(--hairline, var(--color-base-200)); /* theme-locked-allow: manual-review */
    transition: border-color 0.2s ease;
  }

  .ai-input:focus {
    border-color: var(--color-indigo-500);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
  }

  .ai-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-indigo-700) 100%);
    border: none;
    transition: all 0.2s ease;
    outline: none;
  }

  .ai-send-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  }

  .ai-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .ai-send-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
  }

  /* Loading animation */
  .ai-loading {
    display: flex;
    gap: 4px;
    padding: 8px 0;
  }

  .ai-loading span {
    width: 8px;
    height: 8px;
    background: var(--color-indigo-500);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
  }

  .ai-loading span:nth-child(1) {
    animation-delay: -0.32s;
  }

  .ai-loading span:nth-child(2) {
    animation-delay: -0.16s;
  }

  @keyframes bounce {
    0%, 80%, 100% {
      transform: scale(0);
    }
    40% {
      transform: scale(1);
    }
  }

  /* Mobile Responsive */
  @media (max-width: 576px) {
    .ai-copilot-panel {
      right: 12px;
      bottom: 90px;
      left: auto !important;
      right: 12px !important;
      width: calc(100vw - 24px);
    }

    .ai-copilot-trigger {
      width: 56px;
      height: 56px;
      font-size: var(--type-size-headline-m);
    }
  }

/* --- from templates/components/announcement_banner.html --- */
.announcement-banner {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease;
  }

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

  .announcement-banner.info {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(79, 70, 229, 0.04)); /* off-token-allow: decorative-gradient */
    border-left-color: var(--school-primary);
    color: var(--color-primary-700); /* theme-locked-allow: brand-token */
  }
  .announcement-banner.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.04)); /* off-token-allow: decorative-gradient */
    border-left-color: var(--school-accent);
    color: color-mix(in oklab, var(--color-emerald-600) 50%, var(--color-base-900)); /* theme-locked-allow: decorative-tint-mix */
  }
  .announcement-banner.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.08), rgba(255, 193, 7, 0.04)); /* off-token-allow: decorative-gradient */
    border-left-color: var(--color-amber-500); /* theme-locked-allow: decorative-tint-mix */
    color: color-mix(in oklab, var(--color-amber-700) 80%, var(--color-base-900)); /* theme-locked-allow: decorative-tint-mix */
  }
  .announcement-banner.danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08), rgba(220, 53, 69, 0.04)); /* off-token-allow: decorative-gradient */
    border-left-color: var(--color-red-500); /* theme-locked-allow: decorative-tint-mix */
    color: color-mix(in oklab, var(--color-red-600) 60%, var(--color-base-900)); /* theme-locked-allow: decorative-tint-mix */
  }

  .announcement-content {
    flex: 1;
  }

  .announcement-title {
    font-weight: 600;
    font-size: var(--type-size-body);
    margin-bottom: 0.25rem;
  }

  .announcement-message {
    font-size: var(--type-size-body);
    opacity: 0.9;
    margin: 0;
  }

  .announcement-close {
    background: none;
    border: none;
    font-size: var(--type-size-body-l);
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
    margin-left: 1rem;
    transition: opacity 0.2s ease;
  }

  .announcement-close:hover {
    opacity: 1;
  }

  @media (max-width: 576px) {
    .announcement-banner {
      flex-direction: column;
      text-align: center;
      align-items: flex-start;
    }

    .announcement-close {
      margin-left: 0;
      margin-top: 0.75rem;
      align-self: flex-end;
    }
  }

/* --- Page context help FAB (control_plane_skeleton / admin base_site) --- */
.rmc-page-help-fab {
  /* bottom/right/z-index: rmc-shell-fab-stack.css */
}

/* --- back_to_top.html: canonical styles in rmc-back-to-top.css --- */

/* --- from templates/components/backend_datetime_weather.html --- */
.backend-dtw {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.4rem;
    margin-bottom: 0.35rem;
    border-top: 1px solid var(--admin-border, var(--color-base-300)); /* theme-locked-allow: manual-review */
    padding-top: 0.4rem;
  }
  .backend-dtw__line {
    line-height: 1.25;
  }
  .backend-dtw__month-year {
    font-size: var(--type-size-body);
    font-weight: 600;
    color: var(--admin-text, var(--color-base-900));
  }
  .backend-dtw__time {
    font-size: var(--type-size-body);
    font-weight: 600;
    color: var(--admin-text, var(--color-base-900));
  }
  .backend-dtw__weather {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--type-size-body);
  }
  .backend-dtw__weather-icon {
    font-size: var(--type-size-body-l);
    color: var(--admin-text, var(--color-base-900));
  }
  .backend-dtw__temp {
    font-weight: 700;
    color: var(--admin-text, var(--color-base-900));
  }
  .backend-dtw__location {
    font-size: var(--type-size-eyebrow);
    color: var(--admin-muted, var(--color-base-500));
  }

/* --- from templates/components/backend_mini_calendar.html --- */
.backend-dtw-and-calendar .backend-calendar-dow,
  .backend-dtw-and-calendar .backend-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1.1rem);
    gap: 1px;
    justify-content: center;
  }
  .backend-dtw-and-calendar .backend-cal-dow-cell {
    text-align: center;
    font-size: var(--type-size-micro);
    color: var(--admin-muted, var(--color-base-500));
    font-weight: 600;
  }
  .backend-dtw-and-calendar .backend-cal-cell {
    text-align: center;
    font-size: var(--type-size-micro);
    min-width: 1.1rem;
    color: var(--admin-text, var(--color-base-900));
  }
  .backend-dtw-and-calendar .backend-cal-empty { opacity: 0.35; }
  .backend-dtw-and-calendar .backend-cal-today {
    border-radius: 3px;
    background: var(--school-primary, var(--bs-primary));
    color: var(--text-on-brand, var(--color-base-0));
  }

/* --- from templates/components/backend_sidebar_calendar_clock.html --- */
.backend-calendar-dow, .backend-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1.15rem);
    gap: 1px;
    justify-content: center;
  }
  .backend-cal-dow-cell {
    text-align: center;
    font-size: var(--type-size-micro);
    color: var(--bs-secondary, var(--color-base-500));
    font-weight: 600;
  }
  .backend-cal-cell {
    text-align: center;
    font-size: var(--type-size-micro);
    min-width: 1.15rem;
  }
  .backend-cal-empty { opacity: 0.3; }
  .backend-cal-today { border-radius: 3px; background: var(--bs-primary); color: var(--text-on-brand, var(--color-base-0)); }

/* --- from templates/components/breadcrumb.html --- */
.breadcrumb-nav {
  background: var(--admin-content-bg);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--hairline, var(--color-base-100)); /* theme-locked-allow: manual-review */
  margin: 0;
}

.breadcrumb {
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  font-size: var(--type-size-caption);
}

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

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--text-tertiary, var(--color-base-300));
  padding: 0 0.5rem;
  font-size: var(--type-size-body-l);
}

.breadcrumb-item a {
  color: var(--text-secondary, var(--color-base-500));
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--school-primary);
  background: var(--surface-elevated, var(--color-base-50));
}

.breadcrumb-item a i {
  font-size: var(--type-size-body);
}

.breadcrumb-item.active {
  color: var(--text-primary, var(--color-base-800));
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.breadcrumb-item.active i {
  color: var(--school-primary);
}

@media (max-width: 768px) {
  .breadcrumb-nav {
    padding: 0.5rem 1rem;
  }
  
  .breadcrumb {
    font-size: var(--type-size-caption);
  }
  
  .breadcrumb-item a span {
    display: none;
  }
  
  .breadcrumb-item a i {
    margin: 0;
  }
}

/* --- from templates/components/dashboard_empty_state.html --- */
.dashboard-empty-state {
  text-align: center;
  padding: var(--dashboard-gap-lg, 3rem) var(--dashboard-gap-md, 1rem);
  color: var(--admin-content-text-muted, var(--color-base-600));
}

.dashboard-empty-icon {
  font-size: var(--type-size-headline-xl);
  color: var(--admin-content-text-muted, var(--color-base-400));
  margin-bottom: var(--dashboard-gap-md, 1rem);
  opacity: 0.6;
}

.dashboard-empty-title {
  font-size: var(--dashboard-section-size, 1.125rem);
  font-weight: 600;
  color: var(--admin-content-text, var(--color-base-900));
  margin-bottom: var(--token-space-sm, 0.5rem);
}

.dashboard-empty-message {
  font-size: var(--type-size-body);
  color: var(--admin-content-text-muted, var(--color-base-500));
  margin-bottom: var(--dashboard-gap-md, 1rem);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-empty-purpose {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-empty-actions {
  margin-top: var(--token-space-md, 1rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-empty-action {
  margin-top: 0;
}

/* Dark mode */
:root[data-theme="dark"] .dashboard-empty-state,
html[data-bs-theme="dark"] .dashboard-empty-state {
  color: var(--admin-content-text-muted, var(--color-base-400));
}

:root[data-theme="dark"] .dashboard-empty-icon,
html[data-bs-theme="dark"] .dashboard-empty-icon {
  color: var(--admin-content-text-muted, var(--color-base-500));
}

:root[data-theme="dark"] .dashboard-empty-title,
html[data-bs-theme="dark"] .dashboard-empty-title {
  color: var(--admin-content-text, var(--color-base-100));
}

:root[data-theme="dark"] .dashboard-empty-message,
html[data-bs-theme="dark"] .dashboard-empty-message {
  color: var(--admin-content-text-muted, var(--color-base-400));
}

/* --- from templates/components/dashboard_footer.html --- */
/* Footer height reduced ~15%: padding, gaps, min-heights and font sizes scaled; width and layout unchanged */
.dashboard-footer {
  width: 100%;
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 0.4rem 1.2rem;
  border-top: 1px solid var(--footer-border);
  font-size: var(--type-size-caption);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.footer-shell {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.8fr);
  gap: 0.55rem;
  align-items: stretch;
}
.footer-card {
  background: rgba(255, 255, 255, 0.02); /* off-token-allow: white-overlay */
  border: 1px solid rgba(168, 160, 146, 0.18); /* off-token-allow: warm-neutral-overlay */
  border-radius: 14px;
  padding: 0.5rem 0.7rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  min-height: 92px;
}
.brand-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 0.85rem;
  align-items: center;
}
.brand-logo img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(168, 160, 146, 0.35); /* off-token-allow: warm-neutral-overlay */
}
.brand-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: var(--type-size-body);
}
.brand-pill {
  grid-column: span 2;
  display: inline-flex;
  align-items: center;
  background: radial-gradient(circle at 20% 20%, rgba(55, 99, 246, 0.7), rgba(37, 73, 180, 0.7)); /* off-token-allow: decorative-gradient */
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 0.06rem;
  font-size: var(--type-size-eyebrow);
}
.brand-micro {
  grid-column: span 2;
  margin: 0.04rem 0 0;
  font-size: var(--type-size-micro);
  color: rgba(226, 232, 240, 0.78); /* off-token-allow: slate-text-on-dark */
}
.help-card {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  justify-content: center;
}
.help-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--type-size-micro);
  color: rgba(226, 232, 240, 0.82); /* off-token-allow: slate-text-on-dark */
}
.help-hours {
  font-weight: 600;
  font-size: var(--type-size-caption);
}
.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.4); /* off-token-allow: success-emerald-overlay */
  background: rgba(34, 197, 94, 0.15); /* off-token-allow: success-emerald-overlay */
  color: var(--color-emerald-500);
  font-weight: 700;
  font-size: var(--type-size-caption);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pill-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.2);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem;
}
.list-card .segment-title {
  font-size: var(--type-size-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.65); /* off-token-allow: slate-text-on-dark */
  margin-bottom: 0.22rem;
}
.segment-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.segment-links a {
  color: var(--text-tertiary, var(--color-base-200));
  text-decoration: none;
  font-size: var(--type-size-caption);
  transition: color 0.2s ease;
}
.segment-links a:hover {
  color: var(--color-indigo-300);
}
.muted-link {
  color: rgba(226, 232, 240, 0.65); /* off-token-allow: slate-text-on-dark */
  font-size: var(--type-size-eyebrow);
}
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.1); /* off-token-allow: info-blue-overlay */
  border: 1px solid rgba(59, 130, 246, 0.35); /* off-token-allow: info-blue-overlay */
  font-weight: 700;
  font-size: var(--type-size-eyebrow);
  margin-top: 0.18rem;
}
.footer-status-row {
  display: flex;
  gap: 0.28rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  border-top: 1px solid rgba(168, 160, 146, 0.16);
  padding-top: 0.28rem;
}
.status-pill {
  padding: 0.18rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 160, 146, 0.25); /* off-token-allow: warm-neutral-overlay */
  background: rgba(255, 255, 255, 0.04); /* off-token-allow: white-overlay */
  font-size: var(--type-size-micro);
}
.status-pill.secure {
  background: rgba(16, 185, 129, 0.15); /* off-token-allow: success-emerald-overlay */
  border-color: rgba(16, 185, 129, 0.35); /* off-token-allow: success-emerald-overlay */
  color: var(--color-emerald-400);
}
.status-pill.compliant {
  background: rgba(59, 130, 246, 0.12); /* off-token-allow: info-blue-overlay */
  border-color: rgba(59, 130, 246, 0.38); /* off-token-allow: info-blue-overlay */
  color: var(--color-primary-300); /* theme-locked-allow: brand-token */
}
.footer-meta.small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: var(--type-size-micro);
  color: rgba(226, 232, 240, 0.7); /* off-token-allow: slate-text-on-dark */
  border-top: 1px solid rgba(168, 160, 146, 0.16);
  padding-top: 0.24rem;
}
.meta-powered strong {
  color: var(--color-indigo-300);
  font-weight: 700;
}
@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}
/* Mobile: compact accordion for footer columns (expand only when needed) */
@media (max-width: var(--bp-mobile, 768px)) {
  .dashboard-footer {
    padding: 0.95rem 1.2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid-accordion .footer-details {
    border-bottom: 1px solid rgba(168, 160, 146, 0.2);
  }
  .footer-grid-accordion .footer-details:last-child {
    border-bottom: none;
  }
  .footer-accordion-summary {
    list-style: none;
    cursor: pointer;
    padding: 0.4rem 0;
    font-size: var(--type-size-micro);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.9); /* off-token-allow: slate-text-on-dark */
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
  }
  .footer-accordion-summary::-webkit-details-marker {
    display: none;
  }
  .footer-accordion-summary::after {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.4rem;
  }
  .footer-details[open] .footer-accordion-summary::after {
    transform: rotate(-135deg);
  }
  .footer-grid-accordion .segment-links {
    padding-bottom: 0.6rem;
  }
  .footer-status-row {
    justify-content: center;
  }
  .footer-meta.small {
    flex-direction: column;
    text-align: center;
  }
}

/* Desktop: details always open, summary looks like section title (no arrow) */
@media (min-width: var(--bp-mobile, 768px)) {
  .footer-accordion-summary {
    cursor: default;
  }
  .footer-accordion-summary::after {
    display: none;
  }
}

/* --- from templates/components/dashboard_skeleton.html --- */
.dashboard-skeleton {
  margin-bottom: 24px;
}

.student-list-skeleton .skeleton-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline, var(--color-base-100)); /* theme-locked-allow: manual-review */
}

.student-list-skeleton .skeleton-info {
  flex: 1;
  margin-left: 12px;
}

.student-list-skeleton .skeleton-actions {
  margin-left: auto;
}

.skeleton-button {
  width: 80px;
  height: 32px;
  border-radius: 4px;
}

.skeleton-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.skeleton-card {
  padding: 20px;
  border: 1px solid var(--hairline, var(--color-base-200)); /* theme-locked-allow: manual-review */
  border-radius: 8px;
  text-align: center;
}

.table-skeleton {
  border: 1px solid var(--hairline, var(--color-base-200)); /* theme-locked-allow: manual-review */
  border-radius: 8px;
  overflow: hidden;
}

.skeleton-table-header,
.skeleton-table-row {
  display: flex;
  padding: 12px 16px;
  gap: 16px;
}

.skeleton-table-header {
  background: var(--surface-elevated, var(--color-base-50));
  border-bottom: 1px solid var(--hairline, var(--color-base-200)); /* theme-locked-allow: manual-review */
}

.skeleton-table-row {
  border-bottom: 1px solid var(--hairline, var(--color-base-100)); /* theme-locked-allow: manual-review */
}

.skeleton-table-row:last-child {
  border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .student-list-skeleton .skeleton-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .student-list-skeleton .skeleton-info {
    margin-left: 0;
    margin-top: 8px;
  }

  .student-list-skeleton .skeleton-actions {
    margin-left: 0;
    margin-top: 8px;
  }

  .skeleton-table-header,
  .skeleton-table-row {
    flex-direction: column;
    gap: 8px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .skeleton-table-header {
    background: var(--color-base-800); /* theme-locked-allow: manual-review */
  }

  .skeleton-table-row {
    border-bottom-color: var(--color-base-600); /* theme-locked-allow: manual-review */
  }

  .skeleton-card {
    border-color: var(--color-base-600); /* theme-locked-allow: manual-review */
  }
}

[data-theme="dark"] .skeleton-table-header {
  background: var(--color-base-800); /* theme-locked-allow: manual-review */
}

[data-theme="dark"] .skeleton-table-row {
  border-bottom-color: var(--color-base-600); /* theme-locked-allow: manual-review */
}

[data-theme="dark"] .skeleton-card {
  border-color: var(--color-base-600); /* theme-locked-allow: manual-review */
}

/* --- from templates/components/global_search.html --- */
.global-search {
  flex: 1;
  max-width: 400px;
}

.search-container {
  width: 100%;
}

.search-trigger {
  width: 100%;
  padding: 0.5rem 1rem;
  background: var(--admin-content-surface, var(--color-base-50));
  border: 1px solid var(--admin-content-border, var(--color-base-200)); /* theme-locked-allow: manual-review */
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--admin-content-text-muted, var(--color-base-500));
}

.search-trigger:hover {
  background: var(--admin-content-bg);
  border-color: var(--focus-ring-color, var(--school-primary));
  color: var(--focus-ring-color, var(--school-primary));
}

.search-trigger i {
  font-size: var(--type-size-body-l);
}

.search-hint {
  flex: 1;
  text-align: left;
  font-size: var(--type-size-body);
}

.search-hint kbd {
  float: right;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-content-border, var(--color-base-200)); /* theme-locked-allow: manual-review */
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: var(--type-size-eyebrow);
  font-family: monospace;
}

.search-modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.search-modal-header {
  padding: 1rem;
  border-bottom: 1px solid var(--admin-content-border, var(--color-base-100)); /* theme-locked-allow: manual-review */
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-tertiary, var(--color-base-400));
  font-size: var(--type-size-body-l);
}

.search-input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 3rem;
  border: 1px solid var(--admin-content-border, var(--color-base-200)); /* theme-locked-allow: manual-review */
  border-radius: 8px;
  font-size: var(--type-size-body);
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: var(--school-primary);
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-tertiary, var(--color-base-400));
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.search-clear:hover {
  background: var(--admin-content-surface, var(--color-base-100));
  color: var(--admin-content-text-muted, var(--color-base-500));
}

.search-close {
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.search-close kbd {
  background: var(--admin-content-surface, var(--color-base-100));
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: var(--type-size-eyebrow);
  border: 1px solid var(--admin-content-border, var(--color-base-200)); /* theme-locked-allow: manual-review */
}

.search-modal-body {
  flex: 1;
  overflow-y: auto;
  max-height: 60vh;
}

.search-section {
  padding: 1rem;
  border-bottom: 1px solid var(--hairline, var(--color-base-100)); /* theme-locked-allow: manual-review */
}

.search-section:last-child {
  border-bottom: none;
}

.search-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: var(--type-size-caption);
  font-weight: 600;
  color: var(--admin-content-text-muted, var(--color-base-500));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-clear-history {
  background: none;
  border: none;
  color: var(--text-tertiary, var(--color-base-400));
  font-size: var(--type-size-caption);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.btn-clear-history:hover {
  background: var(--admin-content-surface, var(--color-base-100));
  color: var(--admin-content-text-muted, var(--color-base-500));
}

.search-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-item-story {
  flex-direction: column;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(255, 255, 255, 0.95)); /* off-token-allow: decorative-gradient */
  border: 1px solid rgba(79, 70, 229, 0.12); /* off-token-allow: indigo-accent-overlay */
}
.search-item-story .search-story-rows {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: var(--type-size-caption);
  color: var(--admin-content-text-muted, var(--color-base-500));
}
.search-item-story .search-story-rows span strong {
  color: var(--admin-content-text, var(--color-base-700));
  font-weight: 600;
  margin-right: 0.35rem;
}

.search-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  cursor: pointer;
}

.search-item:hover,
.search-item.active {
  background: var(--surface-elevated, var(--color-base-50));
}

.search-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-brand, var(--color-base-0));
  flex-shrink: 0;
}

.search-item-icon i {
  font-size: var(--type-size-body-l);
}

.search-item-content {
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-weight: 600;
  font-size: var(--type-size-body);
  color: var(--admin-content-text, var(--color-base-800));
  margin-bottom: 0.125rem;
}

.search-item-desc {
  font-size: var(--type-size-caption);
  color: var(--admin-content-text-muted, var(--color-base-500));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--type-size-eyebrow);
  color: var(--text-tertiary, var(--color-base-400));
  margin-top: 0.25rem;
}

.search-item-badge {
  padding: 0.125rem 0.5rem;
  background: var(--surface-elevated, var(--color-base-100));
  border-radius: 999px;
  font-weight: 500;
}

.search-loading,
.search-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-tertiary, var(--color-base-400));
}

.search-empty i {
  font-size: var(--type-size-headline-xl);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.search-modal-footer {
  padding: 0.75rem 1rem;
  background: var(--surface-elevated, var(--color-base-50));
  border-top: 1px solid var(--hairline, var(--color-base-100)); /* theme-locked-allow: manual-review */
  border-radius: 0 0 16px 16px;
}

.search-tips {
  display: flex;
  gap: 1rem;
  font-size: var(--type-size-caption);
  color: var(--admin-content-text-muted, var(--color-base-500));
}

.search-tips span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search-tips kbd {
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-content-border, var(--color-base-200)); /* theme-locked-allow: manual-review */
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: var(--type-size-micro);
}

/* Scrollbar */
.search-modal-body::-webkit-scrollbar {
  width: 6px;
}

.search-modal-body::-webkit-scrollbar-track {
  background: var(--surface-elevated, var(--color-base-100));
}

.search-modal-body::-webkit-scrollbar-thumb {
  background: var(--admin-content-border, var(--color-base-300));
  border-radius: 3px;
}

.search-error {
  text-align: center;
  padding: 1.5rem 1rem;
}
.search-error i { font-size: var(--type-size-headline-l); }
.search-error p { margin-bottom: 0.25rem; }

@media (max-width: 768px) {
  .global-search {
    max-width: none;
  }
  
  .search-hint {
    display: none;
  }
}

/* --- from templates/components/header_weather_widget.html --- */
.header-context-dock {
    min-width: 0;
    flex: 0 0 auto;
  }

  .header-context-dock__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3); /* off-token-allow: white-overlay */
    background: rgba(255, 255, 255, 0.12); /* off-token-allow: white-overlay */
    color: var(--header-brand-fg, rgba(255, 255, 255, 0.95));
    font-size: var(--type-size-eyebrow);
    line-height: 1.2;
    padding: 0.28rem 0.58rem;
    white-space: nowrap; /* horizontal-overflow-risk-allow: bounded-header-chip */
  }

  .header-context-dock__trigger::after {
    margin-left: 0.15rem;
  }

  .header-context-dock__clock,
  .header-context-icon {
    font-size: var(--type-size-eyebrow);
    line-height: 1;
    flex: 0 0 auto;
  }

  .header-context-dock__time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }

  .header-context-dock__weather {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-variant-numeric: tabular-nums;
  }

  .header-context-dock__menu {
    min-width: 16.5rem;
    max-width: min(22rem, calc(100vw - 1rem));
    padding: 0.55rem;
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--hairline, rgba(15, 23, 42, 0.1));
    box-shadow: var(--elev-2, 0 10px 22px rgba(15, 23, 42, 0.16));
    background: var(--surface-popover, var(--surface-elevated, #fff));
  }

  .header-context-dock__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.35rem 0.2rem;
  }

  .header-context-dock__row + .header-context-dock__row {
    border-top: 1px solid var(--hairline, rgba(15, 23, 42, 0.08));
  }

  .header-context-dock__row--quote {
    align-items: flex-start;
  }

  .header-context-dock__label {
    color: var(--text-secondary, inherit);
    font-size: var(--type-size-eyebrow);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap; /* horizontal-overflow-risk-allow: short-label */
  }

  .header-context-dock__value {
    min-width: 0;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* horizontal-overflow-risk-allow: bounded-data-values */
    color: var(--text-primary, inherit);
  }

  .header-context-dock__row--quote .header-context-dock__value {
    white-space: normal;
    text-align: left;
  }

/* --- from templates/components/keyboard_shortcuts.html --- */
.table-sm td:first-child {
  width: 140px;
  font-weight: 600;
}

/* --- from templates/components/logo_admin_settings.html --- */
.admin-settings-card {
    margin-bottom: 2rem;
  }

  .admin-settings-card .form-range {
    height: 6px;
  }

  .admin-settings-card .form-range::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    background: var(--school-primary);
    cursor: pointer;
  }

  .admin-settings-card .badge {
    font-size: var(--type-size-eyebrow);
    padding: 6px 12px;
  }

/* --- from templates/components/notification_center.html --- */
/* block 1 */
.notification-center {
  position: relative;
}

.notification-bell {
  position: relative;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  color: var(--admin-content-text-muted, var(--color-base-500));
}

.notification-bell:hover {
  background: var(--admin-accent-light, rgba(79, 70, 229, 0.1));
  color: var(--focus-ring-color, var(--school-primary));
}

.notification-bell i {
  font-size: var(--type-size-body-l);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, var(--admin-content-danger, var(--color-red-500)), var(--color-danger, var(--color-red-600)));
  color: var(--header-brand-fg, var(--color-base-0));
  font-size: var(--type-size-micro);
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
  animation: pulse-badge 2s ease-in-out infinite;
}

.notification-badge:empty {
  display: none;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.notification-dropdown {
  width: 380px;
  max-width: 90vw;
  padding: 0;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  overflow: hidden;
}

.notification-header {
  padding: 1rem;
  background: linear-gradient(135deg, var(--school-primary), var(--color-indigo-500));
  color: var(--text-on-brand, var(--color-base-0));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-header h6 {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notification-actions {
  display: flex;
  gap: 0.25rem;
}

.notification-actions .btn-link {
  color: rgba(255, 255, 255, 0.9); /* off-token-allow: white-overlay */
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  font-size: var(--type-size-caption);
}

.notification-actions .btn-link:hover {
  color: var(--text-on-brand, var(--color-base-0));
  background: rgba(255, 255, 255, 0.1); /* off-token-allow: white-overlay */
  border-radius: 6px;
}

.notification-tabs {
  display: flex;
  background: var(--admin-content-surface, var(--color-base-50));
  border-bottom: 1px solid var(--admin-content-border, var(--color-base-200)); /* theme-locked-allow: manual-review */
}

.notification-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: none;
  font-size: var(--type-size-caption);
  font-weight: 500;
  color: var(--text-secondary, var(--color-base-500));
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.notification-tab:hover {
  background: rgba(79, 70, 229, 0.05); /* off-token-allow: indigo-accent-overlay */
  color: var(--school-primary);
}

.notification-tab.active {
  color: var(--school-primary);
  background: var(--admin-content-bg);
}

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

.notification-body {
  max-height: 400px;
  overflow-y: auto;
  background: var(--admin-content-bg);
}

.notification-loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary, var(--color-base-500));
  font-size: var(--type-size-body);
}

.notification-item {
  padding: 1rem;
  border-bottom: 1px solid var(--hairline, var(--color-base-100)); /* theme-locked-allow: manual-review */
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.notification-item:hover {
  background: var(--surface-elevated, var(--color-base-50));
}

.notification-item.unread {
  background: rgba(79, 70, 229, 0.05); /* off-token-allow: indigo-accent-overlay */
}

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

.notification-content {
  display: flex;
  gap: 0.75rem;
}

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

.notification-icon.message {
  background: rgba(79, 70, 229, 0.1); /* off-token-allow: indigo-accent-overlay */
  color: var(--school-primary);
}

.notification-icon.task {
  background: rgba(255, 193, 7, 0.1); /* off-token-allow: warning-amber-overlay */
  color: var(--color-amber-500);
}

.notification-icon.alert {
  background: rgba(220, 53, 69, 0.1); /* off-token-allow: danger-red-overlay */
  color: var(--color-red-500);
}

.notification-icon.success {
  background: rgba(16, 185, 129, 0.1); /* off-token-allow: success-emerald-overlay */
  color: var(--school-accent);
}

.notification-details {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: var(--type-size-body);
  font-weight: 600;
  color: var(--text-primary, var(--color-base-800));
  margin-bottom: 0.25rem;
}

.notification-message {
  font-size: var(--type-size-caption);
  color: var(--text-secondary, var(--color-base-500));
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--type-size-eyebrow);
  color: var(--text-tertiary, var(--color-base-400));
}

.notification-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.notification-category {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background: var(--surface-elevated, var(--color-base-100));
  border-radius: 999px;
  font-weight: 500;
}

.notification-footer {
  padding: 0.75rem;
  background: var(--surface-elevated, var(--color-base-50));
  border-top: 1px solid var(--hairline, var(--color-base-200)); /* theme-locked-allow: manual-review */
  text-align: center;
}

.notification-footer-link {
  color: var(--school-primary);
  text-decoration: none;
  font-size: var(--type-size-body);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.notification-footer-link:hover {
  color: var(--color-primary-700); /* theme-locked-allow: brand-token */
  text-decoration: underline;
}

.notification-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-tertiary, var(--color-base-400));
}

.notification-empty i {
  font-size: var(--type-size-headline-xl);
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Custom scrollbar for notifications */
.notification-body::-webkit-scrollbar {
  width: 6px;
}

.notification-body::-webkit-scrollbar-track {
  background: var(--surface-elevated, var(--color-base-100));
}

.notification-body::-webkit-scrollbar-thumb {
  background: var(--surface-canvas, var(--color-base-300));
  border-radius: 3px;
}

.notification-body::-webkit-scrollbar-thumb:hover {
  background: var(--surface-canvas, var(--color-base-400));
}

/* block 2 */
/* Toast notification styles */
.notification-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--admin-content-bg);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  min-width: 320px;
  max-width: 400px;
  z-index: 9999;
  transform: translateX(450px);
  transition: transform 0.3s ease;
}

.notification-toast.show {
  transform: translateX(0);
}

.notification-toast-content {
  flex: 1;
}

.notification-toast-title {
  font-weight: 600;
  font-size: var(--type-size-body);
  color: var(--text-primary, var(--color-base-800));
  margin-bottom: 0.25rem;
}

.notification-toast-message {
  font-size: var(--type-size-caption);
  color: var(--text-secondary, var(--color-base-500));
}

/* --- from templates/components/quick_actions.html --- */
.contextual-featured-action { display: flex; justify-content: space-between; gap: 0.85rem; padding: 1rem; border-bottom: 1px solid rgba(226, 232, 240, 0.9); background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(16,185,129,0.05)); /* off-token-allow: decorative-gradient */ }
.contextual-featured-meta { display: grid; gap: 0.25rem; }
.contextual-featured-badge { display: inline-flex; width: fit-content; padding: 0.25rem 0.55rem; border-radius: 999px; background: rgba(79,70,229,0.14); /* off-token-allow: rgba-decorative */ color: var(--bs-primary); font-size: var(--type-size-micro); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.contextual-actions-panel { padding: 0.75rem 1rem; }
.contextual-action-group { margin-bottom: 0.75rem; }
.contextual-action-group:last-child { margin-bottom: 0; }
.contextual-action-group-label { font-size: var(--type-size-micro); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--bs-secondary); margin-bottom: 0.35rem; }
.contextual-action-list { display: flex; flex-direction: column; gap: 0.25rem; }
.contextual-action-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem; border-radius: 10px; text-decoration: none; color: inherit; transition: background 0.15s; }
.contextual-action-item:hover { background: rgba(0,0,0,0.05); /* off-token-allow: black-overlay */ text-decoration: none; color: inherit; }
.contextual-action-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--bs-primary); color: var(--text-on-brand, var(--color-base-0)); display: flex; align-items: center; justify-content: center; font-size: var(--type-size-body); flex-shrink: 0; }
.contextual-action-copy { display: grid; gap: 0.1rem; min-width: 0; }
.contextual-action-title { font-size: var(--type-size-body); font-weight: 600; }
.contextual-action-reason { color: var(--text-secondary, var(--bs-secondary-color)); }
.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1px; background: var(--surface-elevated, var(--color-base-200)); }
.quick-action-item { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--admin-content-bg); text-decoration: none; color: inherit; transition: all 0.2s ease; border: none; }
.quick-action-item:hover { background: var(--surface-elevated, var(--color-base-50)); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); text-decoration: none; color: inherit; }
.quick-action-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: var(--type-size-body-l); color: white; flex-shrink: 0; }
.quick-action-content { flex: 1; min-width: 0; }
.quick-action-title { font-weight: 600; font-size: var(--type-size-body); color: var(--text-primary, var(--color-base-800)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* theme-locked-allow: manual-review */
.quick-action-desc { font-size: var(--type-size-eyebrow); color: var(--text-secondary, var(--color-base-500)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* theme-locked-allow: manual-review */
@media (max-width: 768px) { .quick-actions-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .quick-action-item { padding: 12px; } .quick-action-icon { width: 40px; height: 40px; font-size: var(--type-size-body-l); } .contextual-featured-action { flex-direction: column; } }

/* --- from templates/components/recent_activity.html --- */
.activity-list {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline, var(--color-base-200)); /* theme-locked-allow: manual-review */
  transition: background 0.2s ease;
}

.activity-item:hover {
  background: var(--surface-elevated, var(--color-base-50));
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  font-size: var(--type-size-body-l);
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-header {
  font-size: var(--type-size-caption);
  margin-bottom: 4px;
}

.activity-action {
  color: var(--text-secondary, var(--color-base-500));
  margin: 0 4px; /* theme-locked-allow: decorative-tint-mix */
}

.activity-model {
  background: color-mix(in oklab, var(--color-indigo-300) 40%, var(--color-base-0)); /* theme-locked-allow: decorative-tint-mix */
  color: var(--color-indigo-600);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: var(--type-size-eyebrow);
  font-weight: 600;
}

.activity-object {
  color: var(--text-primary, var(--color-base-800));
  font-size: var(--type-size-caption);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-time {
  font-size: var(--type-size-eyebrow);
  color: var(--text-tertiary, var(--color-base-400));
}

.activity-time i {
  margin-right: 4px;
}

/* Scrollbar styling */
.activity-list::-webkit-scrollbar {
  width: 6px;
}

.activity-list::-webkit-scrollbar-track {
  background: var(--surface-elevated, var(--color-base-100));
}

.activity-list::-webkit-scrollbar-thumb {
  background: var(--surface-canvas, var(--color-base-300));
  border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
  background: var(--surface-canvas, var(--color-base-400));
} /* theme-locked-allow: decorative-tint-mix */

/* --- from templates/components/skeleton_loader.html --- */
.skeleton {
  background: linear-gradient(90deg,
    var(--skeleton-bg, var(--color-base-100)) 25%,
    var(--skeleton-highlight, var(--color-base-200)) 50%,
    var(--skeleton-bg, var(--color-base-100)) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
}

.skeleton-card {
  padding: 16px;
  border: 1px solid var(--hairline, var(--color-base-200)); /* theme-locked-allow: manual-review */
  border-radius: 8px;
  margin-bottom: 16px;
}

.skeleton-card .skeleton-text {
  margin-bottom: 12px;
}

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

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .skeleton {
    --skeleton-bg: var(--color-base-700); /* theme-locked-allow: manual-review */
    --skeleton-highlight: var(--color-base-600); /* theme-locked-allow: manual-review */
  }
}

[data-theme="dark"] .skeleton {
  --skeleton-bg: var(--color-base-700); /* theme-locked-allow: manual-review */
  --skeleton-highlight: var(--color-base-600); /* theme-locked-allow: manual-review */
}

/* --- from templates/components/student_360_tabs.html --- */
/* Student 360 Styles */

.student-360-container {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
}

.student-360-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  gap: var(--spacing-lg);
}

.student-360-info {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  flex: 1;
}

.student-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid white;
  object-fit: cover;
}

.student-details h2 {
  margin: 0;
  font-size: var(--font-size-xl);
}

.student-details p {
  margin: var(--spacing-xs) 0 0 0;
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

.close-student-360 {
  background: rgba(255, 255, 255, 0.2); /* off-token-allow: white-overlay */
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: var(--font-size-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.close-student-360:hover {
  background: rgba(255, 255, 255, 0.3); /* off-token-allow: white-overlay */
}

/* Tabs */

.student-360-tabs {
  display: flex;
  flex-direction: column;
}

.student-360-tabs .nav-tabs {
  border-bottom: 2px solid var(--color-border);
  background: var(--color-bg-light);
  margin: 0;
  padding: 0 var(--spacing-lg);
}

.student-360-tabs .nav-link {
  color: var(--color-text-muted);
  border: none;
  border-bottom: 3px solid transparent;
  padding: var(--spacing-md) var(--spacing-lg);
  font-weight: var(--font-weight-semibold);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.student-360-tabs .nav-link:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.student-360-tabs .nav-link.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: transparent;
}

/* Content */

.student-360-content {
  padding: var(--spacing-xl);
  min-height: 400px;
}

.student-360-section {
  margin-bottom: var(--spacing-xl);
}

.student-360-section h3 {
  margin: 0 0 var(--spacing-md) 0;
  font-size: var(--font-size-lg);
  color: var(--color-text-primary);
}

/* Academic Grid */

.academic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.subject-card {
  background: var(--color-bg-light);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-primary);
}

.subject-name {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-xs);
}

.subject-grade {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

/* Info Cards */

.info-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
}

.info-label {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.info-value {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  color: var(--color-text-primary);
}

/* Lists */

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-title {
  font-weight: var(--font-weight-semibold);
}

.list-item-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Responsive */

@media (max-width: 768px) {
  .student-360-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .student-360-info {
    width: 100%;
  }

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

  .student-360-tabs .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

/* --- from templates/components/toast_notifications.html --- */
/* v2 Phase P (2026-05-12): Apple-tier toast grammar.
   Top-right anchored, frosted material, slide-from-top with 8px overshoot,
   auto-dismiss progress bar, max 3 stacked (handled by toast JS). */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-height: calc(100vh - 120px);
  overflow: visible;
}

.toast-notification {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 320px;
  max-width: 420px;
  padding: 0.85rem 0.95rem 0.95rem;
  border-radius: var(--radius-md, 12px);
  border: var(--border-width-hairline, 0.5px) solid var(--hairline);
  background: var(--surface-popover, var(--surface-elevated));
  color: var(--text-primary);
  -webkit-backdrop-filter: var(--material-blur, saturate(180%) blur(20px));
  backdrop-filter: var(--material-blur, saturate(180%) blur(20px));
  box-shadow: var(--elev-3, 0 12px 32px rgba(26, 22, 18,0.18));
  opacity: 0;
  transform: translateY(-12px) scale(0.96);
  transition: opacity var(--motion-normal), transform var(--motion-spring);
  pointer-events: auto;
  overflow: hidden;
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(8px) scale(1);
  animation: rmc-toast-settle var(--motion-spring) cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes rmc-toast-settle {
  0%   { transform: translateY(-12px) scale(0.96); opacity: 0; }
  60%  { transform: translateY(10px) scale(1.01); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.toast-notification.hiding {
  opacity: 0;
  transform: translateX(24px) scale(0.96);
  transition: opacity var(--motion-fast), transform var(--motion-fast);
}

/* Auto-dismiss progress bar (4px bar across top, animated to 0% width). */
.toast-notification::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: 0.35;
  transform-origin: left center;
  animation: rmc-toast-progress var(--toast-duration, 4500ms) linear forwards;
}
@keyframes rmc-toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
.toast-notification.toast-persistent::before { animation: none; opacity: 0; }

/* Type identity: subtle tint + accent color on icon/progress bar */
.toast-success { color: var(--ds-success); }
.toast-success { background: color-mix(in oklab, var(--ds-success) 6%, var(--surface-popover)); }
.toast-error,
.toast-danger { color: var(--ds-danger); }
.toast-error,
.toast-danger { background: color-mix(in oklab, var(--ds-danger) 6%, var(--surface-popover)); }
.toast-warning { color: var(--ds-warning); }
.toast-warning { background: color-mix(in oklab, var(--ds-warning) 6%, var(--surface-popover)); }
.toast-info { color: var(--ds-info); }
.toast-info { background: color-mix(in oklab, var(--ds-info) 6%, var(--surface-popover)); }

@media (prefers-reduced-motion: reduce) {
  .toast-notification, .toast-notification.show, .toast-notification.hiding {
    transition: opacity 1ms;
    animation: none;
    transform: none;
  }
  .toast-notification::before { animation: none; }
}

.toast-body {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
}

.toast-icon {
  flex-shrink: 0;
  font-size: var(--type-size-body-l);
  line-height: 1.3;
}

.toast-success .toast-icon { color: var(--brand-success, var(--color-emerald-500)); }
.toast-error .toast-icon { color: var(--admin-content-danger, var(--color-red-600)); }
.toast-warning .toast-icon { color: var(--brand-warning, var(--color-amber-500)); }
.toast-info .toast-icon { color: var(--admin-content-accent, var(--color-sky-500)); }

.toast-message {
  flex: 1;
  font-size: var(--type-size-caption);
  color: var(--admin-content-text, var(--color-base-900));
  line-height: 1.4;
  min-width: 0;
}

.toast-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--admin-content-text-muted, var(--color-base-600));
  opacity: 0.6;
  transition: opacity 0.2s;
  line-height: 1;
}
.toast-close:hover {
  opacity: 1;
}

.toast-undo {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.2rem 0.4rem;
  font-size: var(--type-size-caption);
  color: var(--admin-content-accent, var(--color-sky-500));
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.toast-undo:hover {
  opacity: 0.85;
}

/* Progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  animation: toast-progress-shrink linear forwards;
}
.toast-progress-paused {
  animation-play-state: paused;
  width: 0 !important;
}
.toast-success .toast-progress { background: var(--brand-success, var(--color-emerald-500)); }
.toast-error .toast-progress { background: var(--admin-content-danger, var(--color-red-600)); }
.toast-warning .toast-progress { background: var(--brand-warning, var(--color-amber-500)); }
.toast-info .toast-progress { background: var(--admin-content-accent, var(--color-sky-500)); }

@keyframes toast-progress-shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Dark mode: same type identity, adjusted surfaces */
:root[data-theme="dark"] .toast-notification,
html[data-bs-theme="dark"] .toast-notification {
  border-color: var(--admin-content-border, rgba(168, 160, 146,0.2));
}
:root[data-theme="dark"] .toast-success,
html[data-bs-theme="dark"] .toast-success {
  background: linear-gradient(to right, rgba(34, 197, 94, 0.12), var(--admin-content-surface, var(--color-base-800)) 120px); /* theme-locked-allow: decorative-gradient */
  border-left-color: var(--brand-success, var(--color-emerald-500));
}
:root[data-theme="dark"] .toast-error,
html[data-bs-theme="dark"] .toast-error {
  background: linear-gradient(to right, rgba(220, 38, 38, 0.12), var(--admin-content-surface, var(--color-base-800)) 120px); /* theme-locked-allow: decorative-gradient */
  border-left-color: var(--admin-content-danger, var(--color-red-600));
}
:root[data-theme="dark"] .toast-warning,
html[data-bs-theme="dark"] .toast-warning {
  background: linear-gradient(to right, rgba(245, 158, 11, 0.12), var(--admin-content-surface, var(--color-base-800)) 120px); /* theme-locked-allow: decorative-gradient */
  border-left-color: var(--brand-warning, var(--color-amber-500));
}
:root[data-theme="dark"] .toast-info,
html[data-bs-theme="dark"] .toast-info {
  background: linear-gradient(to right, rgba(14, 165, 233, 0.1), var(--admin-content-surface, var(--color-base-800)) 120px); /* theme-locked-allow: decorative-gradient */
  border-left-color: var(--admin-content-accent, var(--color-sky-500));
}

:root[data-theme="dark"] .toast-message,
html[data-bs-theme="dark"] .toast-message {
  color: var(--admin-content-text, var(--color-base-100));
}

:root[data-theme="dark"] .toast-close,
html[data-bs-theme="dark"] .toast-close {
  color: var(--admin-content-text-muted, var(--color-base-400));
}

:root[data-theme="dark"] .toast-undo,
html[data-bs-theme="dark"] .toast-undo {
  color: var(--admin-content-accent, var(--color-sky-400));
}

/* Mobile */
@media (max-width: 576px) {
  .toast-container {
    left: 10px;
    right: 10px;
    top: 70px;
  }
  .toast-notification {
    min-width: auto;
    max-width: none;
  }
}

/* --- from templates/components/user_dropdown.html --- */
.user-dropdown-wrapper {
  position: relative;
  /* Keep expanded menus above sticky page chrome (interaction-integrity mandate). */
  z-index: 1075;
  overflow: visible;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--surface-elevated, var(--admin-content-bg));
  color: var(--text-primary);
  border: var(--border-width-hairline, 0.5px) solid var(--hairline, var(--admin-content-border, var(--color-base-200))); /* theme-locked-allow: manual-review */
  border-radius: var(--radius-pill, 999px);
  cursor: pointer;
  transition: background var(--motion-fast, 0.15s), border-color var(--motion-fast, 0.15s),
              box-shadow var(--motion-fast, 0.15s), transform var(--motion-fast, 0.15s);
}

/* Improvements A + B (2026-05-12): AI health micro-dot + unread badge on the avatar.
   AI pulse sits top-right; unread badge sits bottom-right. Mutually exclusive in
   space so the avatar never gets cluttered. */
.user-avatar { position: relative; }
.user-avatar-ai-pulse {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 0 0 2px var(--surface-elevated), 0 0 0 3px rgba(0,0,0,0.04);
  transition: background var(--motion-fast, 150ms);
}
.user-avatar-ai-pulse[data-state="ok"] { background: var(--ds-success); }
.user-avatar-ai-pulse[data-state="degraded"] { background: var(--ds-warning); animation: rmc-ai-pulse 1.8s ease-in-out infinite; }
.user-avatar-ai-pulse[data-state="error"] { background: var(--ds-danger); animation: rmc-ai-pulse 1.2s ease-in-out infinite; }
@keyframes rmc-ai-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .user-avatar-ai-pulse { animation: none; }
}
.user-avatar-unread {
  position: absolute;
  bottom: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--ds-danger);
  color: var(--text-on-brand, #ffffff);
  font-size: var(--type-size-micro);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--surface-elevated);
}

/* v2 Phase D: when embedded in a dark navbar (control plane / admin manager host),
   the trigger uses a glass-on-navy recipe so it reads as elevated, not as a pasted chip. */
.cp-navbar .user-dropdown-trigger,
.admin-cp-navbar-unified .user-dropdown-trigger,
.navbar-dark .user-dropdown-trigger {
  background: rgba(255, 255, 255, 0.06); /* off-token-allow: white-overlay */
  border-color: rgba(255, 255, 255, 0.12); /* off-token-allow: white-overlay */
  color: var(--header-brand-fg, #fdf9f2);
  -webkit-backdrop-filter: var(--material-blur, saturate(180%) blur(20px));
  backdrop-filter: var(--material-blur, saturate(180%) blur(20px));
}
.cp-navbar .user-dropdown-trigger:hover,
.admin-cp-navbar-unified .user-dropdown-trigger:hover,
.navbar-dark .user-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.10); /* off-token-allow: white-overlay */
  border-color: rgba(255, 255, 255, 0.20); /* off-token-allow: white-overlay */
  box-shadow: var(--elev-2);
}
.cp-navbar .user-dropdown-trigger .user-name,
.admin-cp-navbar-unified .user-dropdown-trigger .user-name,
.navbar-dark .user-dropdown-trigger .user-name {
  color: var(--header-brand-fg, #fdf9f2);
  font-weight: 600;
}
.cp-navbar .user-dropdown-trigger .user-role-badge,
.admin-cp-navbar-unified .user-dropdown-trigger .user-role-badge,
.navbar-dark .user-dropdown-trigger .user-role-badge {
  color: rgba(255, 255, 255, 0.72); /* off-token-allow: white-overlay */
}
.cp-navbar .user-dropdown-trigger .dropdown-arrow,
.admin-cp-navbar-unified .user-dropdown-trigger .dropdown-arrow,
.navbar-dark .user-dropdown-trigger .dropdown-arrow {
  color: rgba(255, 255, 255, 0.65); /* off-token-allow: white-overlay */
}
/* Tighten the trigger on small navbars so it doesn't dominate the row */
@media (max-width: 991.98px) {
  .cp-navbar .user-dropdown-trigger,
  .admin-cp-navbar-unified .user-dropdown-trigger,
  .navbar-dark .user-dropdown-trigger {
    padding: 0.35rem 0.5rem;
    gap: 0.4rem;
  }
  .cp-navbar .user-dropdown-trigger .user-info,
  .admin-cp-navbar-unified .user-dropdown-trigger .user-info,
  .navbar-dark .user-dropdown-trigger .user-info { display: none; }
  .cp-navbar .user-dropdown-trigger .dropdown-arrow,
  .admin-cp-navbar-unified .user-dropdown-trigger .dropdown-arrow,
  .navbar-dark .user-dropdown-trigger .dropdown-arrow { display: none; }
}

.user-dropdown-trigger:hover {
  border-color: var(--school-primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.user-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-brand, var(--color-base-0));
  font-weight: 600;
  font-size: var(--type-size-body);
}

.user-status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--school-accent);
  border: 2px solid var(--hairline, var(--color-base-0)); /* theme-locked-allow: manual-review */
  border-radius: 50%;
  animation: pulse-status 2s ease-in-out infinite;
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  text-align: left;
}

.user-name {
  font-weight: 600;
  font-size: var(--type-size-body);
  color: var(--text-primary, var(--color-base-800));
  white-space: nowrap; /* horizontal-overflow-risk-allow: short-controlled-content-by-design */
}

.user-role-badge {
  font-size: var(--type-size-eyebrow);
  color: var(--text-secondary, var(--color-base-500));
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.user-role-badge i {
  font-size: var(--type-size-caption);
}

.dropdown-arrow {
  color: var(--text-tertiary, var(--color-base-400));
  font-size: var(--type-size-caption);
  transition: transform 0.2s ease;
}

.dropdown.show .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  min-width: 320px;
  max-width: min(380px, calc(100vw - 24px));
  /* v3.16 (2026-05-17) — z-index ladder. Bootstrap navbar = 1030, sticky
     toolbars = 1020, fixed page-progress = 1040. Push user menu above all
     of them so it never tucks behind sticky chrome at the next scroll
     position. Logout link in particular must be reachable. */
  z-index: 1080;
  border: var(--border-width-hairline, 0.5px) solid var(--hairline, rgba(0,0,0,0.08));
  border-radius: var(--radius-lg, 16px);
  background: var(--surface-popover, var(--surface-elevated, #ffffff));
  -webkit-backdrop-filter: var(--material-blur, saturate(180%) blur(20px));
  backdrop-filter: var(--material-blur, saturate(180%) blur(20px));
  box-shadow: var(--elev-3, 0 10px 40px rgba(0, 0, 0, 0.15));
  padding: 0.5rem;
  margin-top: 0.5rem !important;
  /* Scrollable when content exceeds viewport (small laptops, mobile landscape).
     Without this, the bottom of the menu (Logout!) becomes unreachable when the
     dropdown's intrinsic height > available viewport room. */
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

/* Mobile: dropdown becomes a bottom sheet on narrow viewports so the menu
   never tries to fit inside a 320px-wide screen. iOS Safari-tested. */
@media (max-width: 575.98px) {
  .user-dropdown-menu.show {
    position: fixed !important;
    inset: auto 8px 8px 8px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: 80vh;
    transform: none !important;
    margin: 0 !important;
    border-radius: var(--radius-lg, 16px) !important;
    animation: rmc-user-menu-rise 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  @keyframes rmc-user-menu-rise {
    from { opacity: 0; transform: translateY(12px) !important; }
    to { opacity: 1; transform: none !important; }
  }
  @media (prefers-reduced-motion: reduce) {
    .user-dropdown-menu.show { animation: none; }
  }
}

/* v2 theme system — Light / Dark / System toggle (Apple-style segmented control).
   Lives inside .user-dropdown-menu as a list item. Uses semantic surface tokens so
   light/dark cascades automatically without per-theme overrides. */
.rmc-theme-toggle-row {
  border-radius: var(--radius-md, 12px);
  background: var(--surface-overlay, transparent);
}
.rmc-theme-toggle-row .text-tertiary {
  color: var(--text-tertiary, var(--admin-content-text-muted));
}
.rmc-theme-toggle-row .btn-group { gap: 0; }
.rmc-theme-toggle-row .rmc-theme-btn {
  flex: 1 1 0;
  padding: 0.45rem 0.5rem;
  font-size: var(--type-size-body);
  border-color: var(--hairline, var(--admin-content-border));
  background: transparent;
  color: var(--text-secondary, var(--admin-content-text));
  transition: background var(--motion-fast, 150ms), color var(--motion-fast, 150ms),
              border-color var(--motion-fast, 150ms), transform var(--motion-fast, 150ms);
  min-height: 36px;  /* touch target floor */
}
.rmc-theme-toggle-row .rmc-theme-btn i { font-size: var(--type-size-body); line-height: 1; }
.rmc-theme-toggle-row .rmc-theme-btn:hover {
  background: var(--surface-overlay, rgba(26, 22, 18,0.04));
  color: var(--text-primary, var(--admin-content-text));
}
.rmc-theme-toggle-row .rmc-theme-btn.active,
.rmc-theme-toggle-row .rmc-theme-btn[aria-pressed="true"] {
  background: var(--school-primary-light, color-mix(in oklab, var(--school-primary) 14%, transparent));
  color: var(--school-primary);
  border-color: color-mix(in oklab, var(--school-primary) 35%, transparent);
  font-weight: 600;
}
.rmc-theme-toggle-row .rmc-theme-btn:active { transform: scale(0.98); }
.rmc-theme-toggle-row .rmc-theme-btn:focus-visible {
  outline: 2px solid var(--focus-ring-color, var(--school-primary));
  outline-offset: 2px;
  z-index: 1;
}

/* v2.47 (2026-05-15): aesthetic-profile picker row + buttons. Same grammar
   as the Appearance row above — uses the platform's semantic surface tokens
   so it tracks the active theme without per-theme overrides. */
.rmc-aesthetic-toggle-row {
  border-radius: var(--radius-md, 12px);
  background: var(--surface-overlay, transparent);
  margin-top: 0.35rem;
}
.rmc-aesthetic-toggle-row .text-tertiary {
  color: var(--text-tertiary, var(--admin-content-text-muted));
}
.rmc-aesthetic-toggle-row .btn-group { gap: 0; }
.rmc-aesthetic-toggle-row .rmc-aesthetic-btn {
  flex: 1 1 0;
  padding: 0.45rem 0.5rem;
  font-size: var(--type-size-body);
  border-color: var(--hairline, var(--admin-content-border));
  background: transparent;
  color: var(--text-secondary, var(--admin-content-text));
  transition: background var(--motion-fast, 150ms), color var(--motion-fast, 150ms),
              border-color var(--motion-fast, 150ms), transform var(--motion-fast, 150ms);
  min-height: 36px;
}
.rmc-aesthetic-toggle-row .rmc-aesthetic-btn i { font-size: var(--type-size-body); line-height: 1; }
.rmc-aesthetic-toggle-row .rmc-aesthetic-btn:hover {
  background: var(--surface-overlay, rgba(26, 22, 18, 0.04));
  color: var(--text-primary, var(--admin-content-text));
}
.rmc-aesthetic-toggle-row .rmc-aesthetic-btn.active,
.rmc-aesthetic-toggle-row .rmc-aesthetic-btn[aria-pressed="true"] {
  background: var(--school-primary-light, color-mix(in oklab, var(--school-primary) 14%, transparent));
  color: var(--school-primary);
  border-color: color-mix(in oklab, var(--school-primary) 35%, transparent);
  font-weight: 600;
}
.rmc-aesthetic-toggle-row .rmc-aesthetic-btn:active { transform: scale(0.98); }
.rmc-aesthetic-toggle-row .rmc-aesthetic-btn:focus-visible {
  outline: 2px solid var(--focus-ring-color, var(--school-primary));
  outline-offset: 2px;
  z-index: 1;
}

.user-stats {
  display: flex;
  padding: 1rem;
  /* Phase J/S: single-accent luminous gradient (tenant-cascading via --brand-gradient) */
  background: var(--brand-gradient, linear-gradient(135deg, var(--school-primary), var(--color-indigo-800, #3730a3)));
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 0.5rem;
}

.stat-item {
  flex: 1;
  text-align: center;
  color: var(--header-brand-fg, var(--color-base-0));
}

.stat-value {
  font-weight: 700;
  font-size: var(--type-size-body-l);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: var(--type-size-micro);
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.3); /* off-token-allow: white-overlay */
  margin: 0 0.5rem;
}

.dropdown-section-header {
  padding: 0.5rem 1rem 0.25rem;
  font-size: var(--type-size-eyebrow);
  font-weight: 600;
  color: var(--admin-content-text-muted, var(--color-base-400));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: var(--type-size-body);
  transition: all 0.2s ease;
  color: var(--admin-content-text);
}

.user-dropdown-menu .dropdown-item:hover {
  background: var(--admin-content-surface, var(--color-base-50));
}

.user-dropdown-menu .dropdown-item i {
  width: 20px;
  text-align: center; /* theme-locked-allow: decorative-tint-mix */
  font-size: var(--type-size-body);
  color: var(--admin-content-text-muted, var(--color-base-500));
}

.user-dropdown-menu .dropdown-item span {
  flex: 1;
}

.user-dropdown-menu .dropdown-item kbd {
  background: var(--admin-content-surface, var(--color-base-100));
  border: 1px solid var(--admin-content-border, var(--color-base-200)); /* theme-locked-allow: manual-review */
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: var(--type-size-micro);
  font-family: monospace;
}

.user-dropdown-menu .dropdown-item.text-danger:hover {
  background: var(--color-danger-light, color-mix(in oklab, var(--color-red-400) 12%, var(--color-base-0)));
}

.user-dropdown-menu .dropdown-item.text-danger i {
  color: var(--admin-content-danger, var(--color-red-500));
}

.user-dropdown-menu .badge {
  font-size: var(--type-size-micro);
  padding: 0.25rem 0.5rem;
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-top: 1px solid var(--hairline, var(--color-base-100)); /* theme-locked-allow: manual-review */
}

@media (max-width: 768px) {
  .user-info {
    display: none;
  }
  
  .dropdown-arrow {
    display: none;
  }
  
  .user-dropdown-trigger {
    padding: 0.5rem;
  }
  
  .user-dropdown-menu {
    right: 0;
    left: auto !important;
  }
}

/* --- from templates/components/weather_marquee.html --- */
.weather-marquee-container {
    background: linear-gradient(90deg, rgba(255, 149, 0, 0.05), rgba(59, 130, 246, 0.05), rgba(255, 149, 0, 0.05)); /* off-token-allow: decorative-gradient */
    border: 1px solid rgba(255, 149, 0, 0.15); /* off-token-allow: brand-orange-overlay */
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
  }

  .weather-marquee-content {
    display: flex;
    align-items: center;
    gap: 24px;
    animation: scroll-marquee 30s linear infinite;
    white-space: nowrap; /* horizontal-overflow-risk-allow: short-controlled-content-by-design */
  }

  .weather-marquee-content:hover {
    animation-play-state: paused;
  }

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

  .weather-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--type-size-caption);
    color: var(--admin-text, var(--color-base-900));
  }

  .weather-icon {
    font-size: var(--type-size-headline-m);
    flex-shrink: 0;
  }

  .weather-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .weather-temp {
    font-weight: 700;
    font-size: var(--type-size-body);
  }

  .weather-desc {
    font-size: var(--type-size-eyebrow);
    opacity: 0.7;
  }

  .weather-divider {
    width: 1px;
    height: 24px;
    background: rgba(26, 22, 18, 0.2); /* off-token-allow: always-dark-warm-bg */
    flex-shrink: 0;
  }

  .daily-quote-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
    color: var(--admin-subtle, var(--color-base-600));
    font-size: var(--type-size-caption);
  }

  :root[data-theme="dark"] .weather-item,
  :root[data-theme="dark"] .daily-quote-item {
    color: var(--admin-text-dark, var(--color-base-200));
  }

  :root[data-theme="dark"] .weather-divider {
    background: rgba(255, 255, 255, 0.15);
  }

/* --- from templates/components/weather_widget.html --- */
.weather-widget-card {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.08), rgba(59, 130, 246, 0.05)); /* off-token-allow: decorative-gradient */
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 149, 0, 0.15); /* off-token-allow: brand-orange-overlay */
  }

  .weather-widget-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
  }

  .weather-widget-card__title {
    margin: 0;
    font-weight: 700;
    color: var(--text-primary, var(--color-base-800));
    font-size: var(--type-size-caption);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .weather-widget-card__date {
    font-size: var(--type-size-body);
    color: var(--text-secondary, var(--color-base-500));
  }

  .weather-widget-card__weather-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
  }

  .weather-widget-card__icon {
    font-size: var(--type-size-headline-l);
    color: var(--text-primary, var(--color-base-800));
  }

  .weather-widget-card__temp {
    font-size: var(--type-size-body-l);
    font-weight: 700;
    color: var(--text-primary, var(--color-base-800));
    line-height: 1.2;
  }

  .weather-widget-card__desc {
    font-size: var(--type-size-eyebrow);
    color: var(--text-secondary, var(--color-base-500));
  }

  .weather-widget-card__message {
    font-style: italic;
    color: var(--text-secondary, var(--color-base-600));
    font-size: var(--type-size-caption);
    line-height: 1.5;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.6); /* off-token-allow: white-overlay */
    border-radius: 8px;
    border-left: 3px solid var(--color-orange-500);
  }

/* --- from templates/partials/language_switcher.html --- */
.language-switcher {
    display: inline-block;
    margin: 0;
}

.language-switcher .dropdown-toggle::after {
    margin-left: 0.35rem; /* theme-locked-allow: decorative-tint-mix */
}

.language-switcher .dropdown-item.active {
    background-color: var(--brand-primary, var(--school-primary));
    color: var(--header-brand-fg, var(--color-base-0));
}

.language-switcher .dropdown-item:hover {
    background-color: color-mix(in srgb, var(--brand-primary, var(--school-primary)) 12%, transparent);
}

.language-switcher .dropdown-item.active:hover {
    background-color: var(--brand-primary, var(--school-primary));
}

/* ========== studio_os/components/loading_empty_states.html ========== */
/* Shared loading skeleton + empty-state polish (used across control plane, studio, and tenant surfaces). */
.studio-os-skeleton-line {
    background: linear-gradient(90deg, /* theme-locked-allow: decorative-gradient */
        var(--color-base-200, var(--color-base-200)) 25%,
        var(--color-base-100, var(--color-base-100)) 50%,
        var(--color-base-200, var(--color-base-200)) 75%);
    background-size: 200% 100%;
    animation: studio-os-skeleton-shine 1.4s ease-in-out infinite;
    border-radius: var(--studio-radius, 6px);
}
@keyframes studio-os-skeleton-shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.studio-os-empty-state p:last-of-type { margin-bottom: 0; }
