/* ==========================================================================
   v19-perf.css — ABSOLUTE LAST stylesheet.
   1) Removes every animation / transition in the portal for snappy response,
      EXCEPT the mouse-movement locator ring (.v16-ring / .v16-dot) and the
      floating educational doodles.
   2) Puts the rising & falling doodles ABOVE the content (purely decorative,
      never intercepting clicks, never affecting layout/flow).
   3) Full mobile responsiveness pass for every page of the site.
   ========================================================================== */

/* ---------------- 1. Kill all motion (perf) ---------------- */
*:not(.edu-doodle):not(.edu-bubble):not(.v16-ring):not(.v16-dot),
*::before, *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
.v16-ring::after, .v16-dot::after { animation: none !important; }

/* Anything that was hidden waiting for a reveal animation must be visible */
.nv-reveal, .nv-in, .reveal, .v10-page-fade, .stagger-row,
.content, .content > *, .card, .glass-card, .chart-card, .stat, .stat-card,
.sidebar .brand, .sidebar .user-card, .sidebar nav a, .sidebar nav h4,
.footer, .alert, .flash, .topfix .header {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  visibility: visible !important;
  animation-delay: 0s !important;
  transition-delay: 0s !important;
}

html.v10-loading, html.v10-loading body { opacity: 1 !important; visibility: visible !important; overflow: auto !important; }
#v10-loader, .v10-loader, .v10-loader-wrap { display: none !important; }

/* No hover lifts / scales (they force repaints on every pointer move) */
.lift:hover, .hover-lift:hover, .hover-scale:hover,
.card:hover, .glass-card:hover, .chart-card:hover,
.stat:hover, .stat-card:hover, tbody tr:hover, .btn:active {
  transform: none !important;
}

/* Marquees / tickers stop scrolling */
.bday-bar .track, .ann-ticker .track, marquee { animation: none !important; transform: none !important; }
.bday-bar .track, .ann-ticker .track { white-space: normal; }

/* ---------------- 2. Mouse locator ring stays alive ---------------- */
.v16-ring, .v16-dot {
  transition: width .18s ease, height .18s ease, margin .18s ease,
              border-color .18s ease, opacity .18s ease !important;
  z-index: 2147483000 !important;
  pointer-events: none !important;
}
/* the second (duplicate) cursor is retired for performance */
#nvCursor, #nvCursorDot { display: none !important; }

/* ---------------- 3. Doodles float ABOVE the content ---------------- */
.edu-doodles {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147482000 !important;   /* above content, below the cursor ring */
  pointer-events: none !important;
  overflow: hidden !important;
  contain: strict;
}
.edu-doodles * { pointer-events: none !important; }
.edu-doodle, .edu-bubble {
  animation-name: eduRise !important;
  animation-timing-function: linear !important;
  animation-iteration-count: 1 !important;
  animation-fill-mode: both !important;
  will-change: transform, opacity;
}
.edu-doodle.falling, .edu-bubble.falling { animation-name: eduFall !important; }
.edu-doodle { opacity: .28 }
.edu-bubble { opacity: .22 }
/* keep the doodle animation running even though everything else is static */
.edu-doodles .edu-doodle, .edu-doodles .edu-bubble { animation-play-state: running !important; }

/* content no longer needs to fight the decoration for stacking order */
.app, .sidebar, .main, .header, .content, .footer, .bday-bar { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) { .edu-doodles { display: none !important } }

/* ---------------- 4. Site-wide mobile responsiveness ---------------- */
html { -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas, iframe, embed, object { max-width: 100%; height: auto; }
pre, code { white-space: pre-wrap; word-break: break-word; }
* { min-width: 0; }

@media (max-width: 1024px) {
  .content { padding: 16px !important; }
  .stat-grid, .quick-tiles, .card-grid, .grid-2, .grid-3, .grid-4 {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 900px) {
  .app { display: block !important; grid-template-columns: 1fr !important; }
  .main { width: 100% !important; margin-left: 0 !important; }
  .header { flex-wrap: wrap !important; gap: 8px !important; }
}

@media (max-width: 768px) {
  .content { padding: 12px !important; }
  h1 { font-size: clamp(1.25rem, 5vw, 1.7rem) !important; }
  h2 { font-size: clamp(1.1rem, 4.4vw, 1.4rem) !important; }
  h3 { font-size: clamp(1rem, 4vw, 1.2rem) !important; }
  .card, .glass-card, .chart-card { padding: 14px !important; border-radius: 14px !important; }

  /* forms & filters stack */
  form .row, .form-row, .filter-row, .toolbar, .actions, .btn-row {
    display: flex !important; flex-wrap: wrap !important; gap: 8px !important;
  }
  form .row > *, .form-row > *, .filter-row > * { flex: 1 1 100% !important; }
  input, select, textarea, .btn { font-size: 16px !important; } /* stops iOS zoom */
  input, select, textarea { width: 100% !important; max-width: 100% !important; }
  .btn { padding: 10px 14px !important; }

  /* tables scroll horizontally instead of breaking the layout */
  .table-wrap { width: 100% !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .table-wrap > table { min-width: 560px; }

  /* modals / popups fit the viewport */
  .modal, .popup, .dialog, .sheet {
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow: auto !important;
  }
}

@media (max-width: 560px) {
  .stat-grid, .quick-tiles, .card-grid, .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr 1fr !important;
  }
  .content { padding: 10px !important; }
  .footer { text-align: center; font-size: .82rem; }
  .edu-doodle { font-size: 15px !important; }
}

@media (max-width: 400px) {
  .stat-grid, .quick-tiles, .card-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
}

/* Printing: no decoration at all */
@media print { .edu-doodles, .v16-ring, .v16-dot { display: none !important; } }
