/**
 * 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, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: white;
    font-size: 24px;
    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(15, 23, 42, 0.85);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.18);
    white-space: nowrap;
    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 #6366f1;
    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 {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .ai-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }

  .ai-copilot-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
    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, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    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: #111827;
    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, #0d6efd 0%, #0a58ca 100%);
  }

  .user-message .ai-message-content {
    background: #e3f2fd;
    color: #0f172a;
  }

  .ai-quick-actions {
    border-top: 1px solid #e9ecef;
    padding: 12px 0;
  }

  .ai-quick-btn {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
  }

  .ai-copilot-footer {
    border-top: 1px solid #e9ecef;
    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 #e9ecef;
    transition: border-color 0.2s ease;
  }

  .ai-input:focus {
    border-color: #6366f1;
    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, #6366f1 0%, #8b5cf6 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: #6366f1;
    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: 22px;
    }
  }

/* --- 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(13, 110, 253, 0.08), rgba(13, 110, 253, 0.04));
    border-left-color: #0d6efd;
    color: #0d5bc7;
  }

  .announcement-banner.success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.08), rgba(25, 135, 84, 0.04));
    border-left-color: #198754;
    color: #0f5132;
  }

  .announcement-banner.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.08), rgba(255, 193, 7, 0.04));
    border-left-color: #ffc107;
    color: #664d03;
  }

  .announcement-banner.danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08), rgba(220, 53, 69, 0.04));
    border-left-color: #dc3545;
    color: #842029;
  }

  .announcement-content {
    flex: 1;
  }

  .announcement-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }

  .announcement-message {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
  }

  .announcement-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    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;
    }
  }

/* --- from templates/components/back_to_top.html --- */
.back-to-top-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1040;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    background: var(--portal-bg, #fff);
    color: var(--portal-text, #111827);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  }
  .back-to-top-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  .back-to-top-btn[hidden] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  /* Admin / dark contexts */
  [data-theme="dark"] .back-to-top-btn,
  .portal-backend-dark .back-to-top-btn {
    background: var(--admin-content-surface, #334155);
    color: var(--admin-content-text, #f1f5f9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

/* --- 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, #cbd5e1);
    padding-top: 0.4rem;
  }
  .backend-dtw__line {
    line-height: 1.25;
  }
  .backend-dtw__month-year {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-text, #0f172a);
  }
  .backend-dtw__time {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-text, #0f172a);
  }
  .backend-dtw__weather {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
  }
  .backend-dtw__weather-icon {
    font-size: 1.1rem;
    color: var(--admin-text, #0f172a);
  }
  .backend-dtw__temp {
    font-weight: 700;
    color: var(--admin-text, #0f172a);
  }
  .backend-dtw__location {
    font-size: 0.78rem;
    color: var(--admin-muted, #64748b);
  }

/* --- 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: 0.58rem;
    color: var(--admin-muted, #64748b);
    font-weight: 600;
  }
  .backend-dtw-and-calendar .backend-cal-cell {
    text-align: center;
    font-size: 0.62rem;
    min-width: 1.1rem;
    color: var(--admin-text, #0f172a);
  }
  .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: #fff;
  }

/* --- 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: 0.6rem;
    color: var(--bs-secondary, #6c757d);
    font-weight: 600;
  }
  .backend-cal-cell {
    text-align: center;
    font-size: 0.65rem;
    min-width: 1.15rem;
  }
  .backend-cal-empty { opacity: 0.3; }
  .backend-cal-today { border-radius: 3px; background: var(--bs-primary); color: #fff; }

/* --- from templates/components/breadcrumb.html --- */
.breadcrumb-nav {
  background: var(--admin-content-bg);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  margin: 0;
}

.breadcrumb {
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  font-size: 0.85rem;
}

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

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: #cbd5e1;
  padding: 0 0.5rem;
  font-size: 1.1rem;
}

.breadcrumb-item a {
  color: #64748b;
  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: #0d6efd;
  background: #f8f9fa;
}

.breadcrumb-item a i {
  font-size: 1rem;
}

.breadcrumb-item.active {
  color: #1e293b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.breadcrumb-item.active i {
  color: #0d6efd;
}

@media (max-width: 768px) {
  .breadcrumb-nav {
    padding: 0.5rem 1rem;
  }
  
  .breadcrumb {
    font-size: 0.8rem;
  }
  
  .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, #475569);
}

.dashboard-empty-icon {
  font-size: 3.5rem;
  color: var(--admin-content-text-muted, #94a3b8);
  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, #0f172a);
  margin-bottom: var(--token-space-sm, 0.5rem);
}

.dashboard-empty-message {
  font-size: 0.9375rem;
  color: var(--admin-content-text-muted, #64748b);
  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, #94a3b8);
}

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

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

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

/* --- 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: 0.82rem;
  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);
  border: 1px solid rgba(148, 163, 184, 0.18);
  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(148, 163, 184, 0.35);
}
.brand-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1rem;
}
.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));
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 0.06rem;
  font-size: 0.78rem;
}
.brand-micro {
  grid-column: span 2;
  margin: 0.04rem 0 0;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.78);
}
.help-card {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  justify-content: center;
}
.help-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.82);
}
.help-hours {
  font-weight: 600;
  font-size: 0.8rem;
}
.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);
  background: rgba(34, 197, 94, 0.15);
  color: #10b981;
  font-weight: 700;
  font-size: 0.8rem;
  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: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.65);
  margin-bottom: 0.22rem;
}
.segment-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.segment-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}
.segment-links a:hover {
  color: #a5b4fc;
}
.muted-link {
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.78rem;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.35);
  font-weight: 700;
  font-size: 0.78rem;
  margin-top: 0.18rem;
}
.footer-status-row {
  display: flex;
  gap: 0.28rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 0.28rem;
}
.status-pill {
  padding: 0.18rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.7rem;
}
.status-pill.secure {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.status-pill.compliant {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.38);
  color: #93c5fd;
}
.footer-meta.small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.7);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 0.24rem;
}
.meta-powered strong {
  color: #a5b4fc;
  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(148, 163, 184, 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: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.9);
    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 #f0f0f0;
}

.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 #e0e0e0;
  border-radius: 8px;
  text-align: center;
}

.table-skeleton {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

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

.skeleton-table-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.skeleton-table-row {
  border-bottom: 1px solid #f0f0f0;
}

.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: #2d3748;
  }

  .skeleton-table-row {
    border-bottom-color: #4a5568;
  }

  .skeleton-card {
    border-color: #4a5568;
  }
}

[data-theme="dark"] .skeleton-table-header {
  background: #2d3748;
}

[data-theme="dark"] .skeleton-table-row {
  border-bottom-color: #4a5568;
}

[data-theme="dark"] .skeleton-card {
  border-color: #4a5568;
}

/* --- 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, #f8f9fa);
  border: 1px solid var(--admin-content-border, #e9ecef);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--admin-content-text-muted, #64748b);
}

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

.search-trigger i {
  font-size: 1.1rem;
}

.search-hint {
  flex: 1;
  text-align: left;
  font-size: 0.9rem;
}

.search-hint kbd {
  float: right;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-content-border, #dee2e6);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  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, #f1f5f9);
  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: #94a3b8;
  font-size: 1.1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 3rem;
  border: 1px solid var(--admin-content-border, #e9ecef);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: #0d6efd;
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.search-clear:hover {
  background: var(--admin-content-surface, #f1f5f9);
  color: var(--admin-content-text-muted, #64748b);
}

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

.search-close kbd {
  background: var(--admin-content-surface, #f1f5f9);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  border: 1px solid var(--admin-content-border, #e9ecef);
}

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

.search-section {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.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: 0.85rem;
  font-weight: 600;
  color: var(--admin-content-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-clear-history {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.btn-clear-history:hover {
  background: var(--admin-content-surface, #f1f5f9);
  color: var(--admin-content-text-muted, #64748b);
}

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

.search-item-story {
  flex-direction: column;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.06), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(13, 110, 253, 0.12);
}
.search-item-story .search-story-rows {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--admin-content-text-muted, #64748b);
}
.search-item-story .search-story-rows span strong {
  color: var(--admin-content-text, #334155);
  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: #f8f9fa;
}

.search-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.search-item-icon i {
  font-size: 1.1rem;
}

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

.search-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--admin-content-text, #1e293b);
  margin-bottom: 0.125rem;
}

.search-item-desc {
  font-size: 0.85rem;
  color: var(--admin-content-text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.search-item-badge {
  padding: 0.125rem 0.5rem;
  background: #f1f5f9;
  border-radius: 999px;
  font-weight: 500;
}

.search-loading,
.search-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: #94a3b8;
}

.search-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.search-modal-footer {
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-top: 1px solid #f1f5f9;
  border-radius: 0 0 16px 16px;
}

.search-tips {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--admin-content-text-muted, #64748b);
}

.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, #e9ecef);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

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

.search-modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

.search-error {
  text-align: center;
  padding: 1.5rem 1rem;
}
.search-error i { font-size: 2rem; }
.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-strip {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 40px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.14);
    color: var(--header-brand-fg, rgba(255, 255, 255, 0.95));
    overflow: hidden;
  }

  .header-context-segment {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-context-segment + .header-context-segment {
    border-left: 1px solid rgba(255, 255, 255, 0.28);
  }

  .header-context-segment--datetime {
    font-weight: 600;
    flex: 0 0 auto;
  }

  .header-context-segment--weather {
    flex: 0 0 auto;
  }

  .header-context-segment--quote {
    flex: 1 1 52%;
    min-width: 220px;
    font-style: italic;
    opacity: 0.9;
  }

  .header-context-icon {
    line-height: 1;
    font-size: 12px;
    opacity: 0.95;
    flex: 0 0 auto;
  }

  .header-context-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  @media (max-width: 1399px) {
    .header-context-segment {
      font-size: 11px;
      padding: 0 6px;
    }
    .header-context-segment--quote {
      min-width: 170px;
    }
  }

  @media (max-width: 1279px) {
    .header-context-segment {
      font-size: 11px;
      padding: 0 6px;
    }
    .header-context-segment--quote {
      display: none;
    }
  }

  @media (max-width: 991px) {
    .header-context-strip {
      border-radius: 10px;
    }
  }

  @media (max-width: 767px) {
    .header-context-strip {
      min-height: 30px;
      padding: 1px 8px;
    }
    .header-context-segment {
      font-size: 11px;
      padding: 0 6px;
    }
  }

/* --- 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: #0d6efd;
    cursor: pointer;
  }

  .admin-settings-card .badge {
    font-size: 12px;
    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, #64748b);
}

.notification-bell:hover {
  background: var(--admin-accent-light, rgba(13, 110, 253, 0.1));
  color: var(--focus-ring-color, var(--school-primary, #0d6efd));
}

.notification-bell i {
  font-size: 1.25rem;
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, var(--admin-content-danger, #dc3545), var(--color-danger, #c82333));
  color: var(--header-brand-fg, #fff);
  font-size: 0.65rem;
  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, #0d6efd, #6366f1);
  color: #fff;
  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);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.notification-actions .btn-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.notification-tabs {
  display: flex;
  background: var(--admin-content-surface, #f8f9fa);
  border-bottom: 1px solid var(--admin-content-border, #e9ecef);
}

.notification-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.notification-tab:hover {
  background: rgba(13, 110, 253, 0.05);
  color: #0d6efd;
}

.notification-tab.active {
  color: #0d6efd;
  background: var(--admin-content-bg);
}

.notification-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #0d6efd;
}

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

.notification-loading {
  padding: 2rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.notification-item {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.notification-item:hover {
  background: #f8f9fa;
}

.notification-item.unread {
  background: rgba(13, 110, 253, 0.05);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #0d6efd;
}

.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(13, 110, 253, 0.1);
  color: #0d6efd;
}

.notification-icon.task {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

.notification-icon.alert {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.notification-icon.success {
  background: rgba(25, 135, 84, 0.1);
  color: #198754;
}

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

.notification-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.notification-message {
  font-size: 0.85rem;
  color: #64748b;
  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: 0.75rem;
  color: #94a3b8;
}

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

.notification-category {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background: #f1f5f9;
  border-radius: 999px;
  font-weight: 500;
}

.notification-footer {
  padding: 0.75rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.notification-footer-link {
  color: #0d6efd;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.notification-footer-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.notification-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: #94a3b8;
}

.notification-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

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

.notification-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.notification-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.notification-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 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: 0.9rem;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.notification-toast-message {
  font-size: 0.85rem;
  color: #64748b;
}

/* --- 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(13,110,253,0.08), rgba(25,135,84,0.05)); }
.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(13,110,253,0.14); color: var(--bs-primary); font-size: 0.72rem; 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: 0.7rem; 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); text-decoration: none; color: inherit; }
.contextual-action-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--bs-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.contextual-action-copy { display: grid; gap: 0.1rem; min-width: 0; }
.contextual-action-title { font-size: 0.9rem; font-weight: 600; }
.contextual-action-reason { color: var(--bs-secondary-color); }
.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1px; background: #e2e8f0; }
.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: #f8fafc; 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: 20px; color: white; flex-shrink: 0; }
.quick-action-content { flex: 1; min-width: 0; }
.quick-action-title { font-weight: 600; font-size: 0.9rem; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-action-desc { font-size: 0.75rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@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: 18px; } .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 #e2e8f0;
  transition: background 0.2s ease;
}

.activity-item:hover {
  background: #f8fafc;
}

.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: 18px;
}

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

.activity-header {
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.activity-action {
  color: #64748b;
  margin: 0 4px;
}

.activity-model {
  background: #e0e7ff;
  color: #4c51bf;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.activity-object {
  color: #1e293b;
  font-size: 0.875rem;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-time {
  font-size: 0.75rem;
  color: #94a3b8;
}

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

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

.activity-list::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.activity-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --- from templates/components/skeleton_loader.html --- */
.skeleton {
  background: linear-gradient(90deg,
    var(--skeleton-bg, #f0f0f0) 25%,
    var(--skeleton-highlight, #e0e0e0) 50%,
    var(--skeleton-bg, #f0f0f0) 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 #e0e0e0;
  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: #374151;
    --skeleton-highlight: #4b5563;
  }
}

[data-theme="dark"] .skeleton {
  --skeleton-bg: #374151;
  --skeleton-highlight: #4b5563;
}

/* --- 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);
  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);
}

/* 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 --- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-height: calc(100vh - 120px);
  overflow: hidden;
}

.toast-notification {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 400px;
  padding: 1rem 1rem 0.875rem;
  border-radius: var(--dashboard-card-radius, 12px);
  border: 1px solid var(--admin-content-border, rgba(15,23,42,0.12));
  border-left-width: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateX(400px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  overflow: hidden;
}

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

/* Type identity: left border + subtle background tint */
.toast-success {
  background: linear-gradient(to right, rgba(34, 197, 94, 0.07), var(--admin-content-bg, #fff) 120px);
  border-left-color: var(--brand-success, #22c55e);
}
.toast-error {
  background: linear-gradient(to right, rgba(220, 38, 38, 0.07), var(--admin-content-bg, #fff) 120px);
  border-left-color: var(--admin-content-danger, #dc2626);
}
.toast-warning {
  background: linear-gradient(to right, rgba(245, 158, 11, 0.08), var(--admin-content-bg, #fff) 120px);
  border-left-color: var(--brand-warning, #f59e0b);
}
.toast-info {
  background: linear-gradient(to right, rgba(14, 165, 233, 0.06), var(--admin-content-bg, #fff) 120px);
  border-left-color: var(--admin-content-accent, #0ea5e9);
}

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

.toast-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.toast-success .toast-icon { color: var(--brand-success, #22c55e); }
.toast-error .toast-icon { color: var(--admin-content-danger, #dc2626); }
.toast-warning .toast-icon { color: var(--brand-warning, #f59e0b); }
.toast-info .toast-icon { color: var(--admin-content-accent, #0ea5e9); }

.toast-message {
  flex: 1;
  font-size: 0.875rem;
  color: var(--admin-content-text, #0f172a);
  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, #475569);
  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: 0.8125rem;
  color: var(--admin-content-accent, #0ea5e9);
  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, #22c55e); }
.toast-error .toast-progress { background: var(--admin-content-danger, #dc2626); }
.toast-warning .toast-progress { background: var(--brand-warning, #f59e0b); }
.toast-info .toast-progress { background: var(--admin-content-accent, #0ea5e9); }

@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(148,163,184,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, #1e293b) 120px);
  border-left-color: var(--brand-success, #22c55e);
}
: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, #1e293b) 120px);
  border-left-color: var(--admin-content-danger, #dc2626);
}
: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, #1e293b) 120px);
  border-left-color: var(--brand-warning, #f59e0b);
}
: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, #1e293b) 120px);
  border-left-color: var(--admin-content-accent, #0ea5e9);
}

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

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

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

/* 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;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--admin-content-bg);
  border: 1px solid var(--admin-content-border, #e9ecef);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-dropdown-trigger:hover {
  border-color: #0d6efd;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 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: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #198754;
  border: 2px solid #fff;
  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: 0.9rem;
  color: #1e293b;
  white-space: nowrap;
}

.user-role-badge {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.user-role-badge i {
  font-size: 0.85rem;
}

.dropdown-arrow {
  color: #94a3b8;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

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

.user-dropdown-menu {
  min-width: 320px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  margin-top: 0.5rem !important;
}

.user-stats {
  display: flex;
  padding: 1rem;
  background: linear-gradient(135deg, var(--school-primary, #0d6efd) 0%, var(--school-accent, #198754) 100%);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

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

.stat-value {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.7rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 0.5rem;
}

.dropdown-section-header {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--admin-content-text-muted, #94a3b8);
  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: 0.9rem;
  transition: all 0.2s ease;
  color: var(--admin-content-text);
}

.user-dropdown-menu .dropdown-item:hover {
  background: var(--admin-content-surface, #f8f9fa);
}

.user-dropdown-menu .dropdown-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  color: var(--admin-content-text-muted, #64748b);
}

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

.user-dropdown-menu .dropdown-item kbd {
  background: var(--admin-content-surface, #f1f5f9);
  border: 1px solid var(--admin-content-border, #e9ecef);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: monospace;
}

.user-dropdown-menu .dropdown-item.text-danger:hover {
  background: var(--color-danger-light, #fef2f2);
}

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

.user-dropdown-menu .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-top: 1px solid #f1f5f9;
}

@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));
    border: 1px solid rgba(255, 149, 0, 0.15);
    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;
  }

  .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: 14px;
    color: var(--admin-text, #0f172a);
  }

  .weather-icon {
    font-size: 24px;
    flex-shrink: 0;
  }

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

  .weather-temp {
    font-weight: 700;
    font-size: 16px;
  }

  .weather-desc {
    font-size: 12px;
    opacity: 0.7;
  }

  .weather-divider {
    width: 1px;
    height: 24px;
    background: rgba(15, 23, 42, 0.2);
    flex-shrink: 0;
  }

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

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

  :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));
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 149, 0, 0.15);
  }

  .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: #1e293b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .weather-widget-card__date {
    font-size: 0.9rem;
    color: #64748b;
  }

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

  .weather-widget-card__icon {
    font-size: 1.75rem;
    color: #1e293b;
  }

  .weather-widget-card__temp {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
  }

  .weather-widget-card__desc {
    font-size: 0.75rem;
    color: #64748b;
  }

  .weather-widget-card__message {
    font-style: italic;
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border-left: 3px solid #ff9500;
  }

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

.language-switcher .dropdown-toggle::after {
    margin-left: 0.35rem;
}

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

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

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