/* ============================================================
   Saneg Energy — Inquiry Register
   THEME: Apple-Cinematic Dark (apple.com Pro style)
   Dark · frosted glass · animated gradients · spring hovers
   macOS system colors · entrance stagger · scroll parallax
   ============================================================ */

:root {
  /* macOS system colors (Apple HIG, dark mode) */
  --apple-blue:   #0a84ff;
  --apple-purple: #bf5af2;
  --apple-cyan:   #64d2ff;
  --apple-green:  #30d158;
  --apple-orange: #ff9f0a;
  --apple-red:    #ff453a;
  --apple-pink:   #ff375f;
  --apple-yellow: #ffd60a;
  --apple-indigo: #5e5ce6;

  /* Saneg brand */
  --se-green:     #30d158;   /* aligned with Apple green */
  --se-green-2:   #7FD63A;
  --se-navy:      #0F2D5C;

  /* Surfaces — Apple dark */
  --bg-0:        #000000;
  --bg-1:        #0A0A0C;
  --bg-2:        #111114;
  --tile-bg:     rgba(255, 255, 255, 0.045);
  --tile-bg-2:   rgba(255, 255, 255, 0.06);
  --tile-bg-hi:  rgba(255, 255, 255, 0.08);
  --tile-border: rgba(255, 255, 255, 0.08);
  --tile-border-hi: rgba(255, 255, 255, 0.16);

  --text:        rgba(255, 255, 255, 0.92);
  --text-2:      rgba(255, 255, 255, 0.72);
  --text-muted:  rgba(255, 255, 255, 0.52);
  --text-faint:  rgba(255, 255, 255, 0.32);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius:    12px;
  --radius-sm: 8px;

  /* Apple-style spring */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft:   cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body {
  margin: 0; padding: 0;
  font-family: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont,
               'Inter', 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--bg-0);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================
   ANIMATED CINEMATIC BACKGROUND
   Slow rotating mesh with multiple color orbs
   ============================================================ */
.bg-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.bg-canvas::before,
.bg-canvas::after {
  content: ''; position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  will-change: transform;
}
.bg-canvas::before {
  width: 720px; height: 720px;
  top: -240px; left: -180px;
  background: radial-gradient(circle, var(--apple-blue) 0%, transparent 70%);
  animation: orbDriftA 28s ease-in-out infinite alternate;
}
.bg-canvas::after {
  width: 640px; height: 640px;
  top: 30%; right: -160px;
  background: radial-gradient(circle, var(--apple-purple) 0%, transparent 70%);
  animation: orbDriftB 32s ease-in-out infinite alternate;
}
.bg-orb-3, .bg-orb-4 {
  position: absolute; border-radius: 50%; filter: blur(140px); opacity: 0.5;
  will-change: transform;
}
.bg-orb-3 {
  width: 560px; height: 560px;
  bottom: -180px; left: 25%;
  background: radial-gradient(circle, var(--apple-green) 0%, transparent 70%);
  animation: orbDriftC 36s ease-in-out infinite alternate;
}
.bg-orb-4 {
  width: 480px; height: 480px;
  top: 55%; left: -120px;
  background: radial-gradient(circle, var(--apple-cyan) 0%, transparent 70%);
  animation: orbDriftD 30s ease-in-out infinite alternate;
}

@keyframes orbDriftA { from { transform: translate(0,0) scale(1); } to { transform: translate(80px, 60px) scale(1.15); } }
@keyframes orbDriftB { from { transform: translate(0,0) scale(1); } to { transform: translate(-60px, 100px) scale(1.1); } }
@keyframes orbDriftC { from { transform: translate(0,0) scale(1); } to { transform: translate(120px, -80px) scale(1.2); } }
@keyframes orbDriftD { from { transform: translate(0,0) scale(1); } to { transform: translate(60px, -60px) scale(1.1); } }

/* Subtle grain noise — Apple-style depth */
.bg-canvas .grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5; mix-blend-mode: overlay;
}

.hidden { display: none !important; }

/* ============================================================
   ENTRANCE ANIMATIONS — fade up with stagger
   ============================================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-spring), transform .8s var(--ease-spring);
}
[data-animate].in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  position: relative; z-index: 2;
}
.login-card {
  width: 100%; max-width: 480px;
  background: var(--tile-bg);
  -webkit-backdrop-filter: saturate(180%) blur(40px);
  backdrop-filter: saturate(180%) blur(40px);
  border: 1px solid var(--tile-border);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.08);
  animation: fadeUp .8s var(--ease-spring) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brand-block {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
}
.brand-block h1, .brand-block .brand-sub { display: none; }
.login-logo {
  width: 320px; max-width: 100%; height: auto;
  /* White silhouette + soft glow */
  filter:
    brightness(0) invert(1)
    drop-shadow(0 0 18px rgba(255,255,255,0.35))
    drop-shadow(0 0 32px rgba(127,214,58,0.25));
}

.login-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 8px 0 8px;
  letter-spacing: -0.02em;
}
.login-tagline {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 36px;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.login-error {
  color: var(--apple-red);
  font-size: 13px;
  margin-top: 18px;
  padding: 12px 16px;
  background: rgba(255, 69, 58, 0.08);
  border: 1px solid rgba(255, 69, 58, 0.22);
  border-radius: var(--radius-sm);
}
.login-footer {
  color: var(--text-faint);
  font-size: 12px;
  margin-top: 32px;
}

/* ============================================================
   BUTTONS — Apple style pill
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform .2s var(--ease-spring),
              background .2s var(--ease-soft),
              border-color .2s var(--ease-soft),
              box-shadow .2s var(--ease-soft);
  white-space: nowrap;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: linear-gradient(180deg, var(--apple-blue) 0%, #0066d6 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 8px 24px rgba(10,132,255,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 12px 32px rgba(10,132,255,0.5);
}

.btn-ghost {
  background: var(--tile-bg-2);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-color: var(--tile-border);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--tile-bg-hi);
  border-color: var(--tile-border-hi);
}

.btn-danger {
  background: rgba(255, 69, 58, 0.12);
  color: var(--apple-red);
  border-color: rgba(255, 69, 58, 0.32);
}
.btn-danger:hover {
  background: var(--apple-red);
  color: #fff;
}

.btn-icon {
  padding: 8px;
  border-radius: 10px;
  color: var(--text-muted);
}
.btn-icon:hover {
  color: var(--text);
  background: var(--tile-bg-2);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 15px;
  width: 100%;
  border-radius: 14px;
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 2; }

.topbar {
  background: rgba(10, 10, 12, 0.65);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border-bottom: 1px solid var(--tile-border);
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-logo {
  height: 40px; width: auto; display: block;
  /* White silhouette */
  filter: brightness(0) invert(1) drop-shadow(0 0 5px rgba(255,255,255,0.25));
}
.topbar-divider { width: 1px; height: 28px; background: var(--tile-border); }
.topbar-title { font-weight: 600; color: var(--text); font-size: 14px; line-height: 1.2; letter-spacing: -0.01em; }
.topbar-sub { font-size: 11.5px; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 4px 4px;
  border: 1px solid var(--tile-border);
  border-radius: 999px;
  background: var(--tile-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--apple-blue) 0%, var(--apple-green) 130%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.user-email { font-size: 10.5px; color: var(--text-muted); }

.main {
  flex: 1;
  padding: 48px 40px 80px;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}

/* Section header — Apple Pro page style */
.section-head {
  margin: 0 0 28px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
}
.section-head h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-head .eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head .meta {
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================================
   TILES (KPI) — Apple Pro grid tiles
   Larger 22px headings, 14px icons, hover spring + radial glow
   ============================================================ */
.tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-bottom: 56px;
}

.tile {
  position: relative;
  background: var(--tile-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--tile-border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
  overflow: hidden;
  cursor: default;
  transition:
    transform .45s var(--ease-spring),
    border-color .35s var(--ease-soft),
    background .35s var(--ease-soft);
  isolation: isolate;
}

/* Colored radial glow per tile — appears on hover */
.tile::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--glow, var(--apple-blue)) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .5s var(--ease-soft);
  z-index: -1;
  filter: blur(20px);
}
.tile:hover {
  transform: translateY(-6px);
  border-color: var(--tile-border-hi);
  background: var(--tile-bg-2);
}
.tile:hover::before { opacity: 0.18; }

/* Tile color variants */
.tile.t-blue   { --glow: var(--apple-blue); }
.tile.t-orange { --glow: var(--apple-orange); }
.tile.t-green  { --glow: var(--apple-green); }
.tile.t-red    { --glow: var(--apple-red); }
.tile.t-purple { --glow: var(--apple-purple); }
.tile.t-cyan   { --glow: var(--apple-cyan); }

.tile-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--glow) 18%, transparent);
  color: var(--glow);
  margin-bottom: 18px;
}
.tile-icon svg { width: 18px; height: 18px; }

.tile-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.tile-value {
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1;
}
.tile-delta {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 12px;
  display: flex; align-items: center; gap: 6px;
}

/* Arrow icon — slides on tile hover */
.tile-arrow {
  position: absolute;
  top: 22px; right: 22px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  transition: transform .35s var(--ease-spring), color .35s var(--ease-soft);
}
.tile-arrow svg { width: 14px; height: 14px; }
.tile:hover .tile-arrow {
  transform: translate(4px, -4px);
  color: var(--glow);
}

/* ============================================================
   PANELS (charts, table) — frosted dark
   ============================================================ */
.panel {
  background: var(--tile-bg);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border: 1px solid var(--tile-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 24px;
}
.panel-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--tile-border);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}
.panel-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.chart-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-bottom: 24px;
}
.chart-panel canvas { padding: 24px 28px; }

/* ============================================================
   TABLE — dark refined
   ============================================================ */
.table-header { gap: 12px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.input {
  height: 36px;
  border: 1px solid var(--tile-border);
  border-radius: 999px;
  padding: 0 16px;
  font-size: 13px;
  background: var(--tile-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: all .2s var(--ease-soft);
  min-width: 160px;
}
.input::placeholder { color: var(--text-faint); }
.input:focus {
  background: var(--tile-bg-hi);
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 4px rgba(10,132,255,0.18);
}
#filter-search { min-width: 280px; }

.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 14px 22px;
  border-bottom: 1px solid var(--tile-border);
  white-space: nowrap;
}
.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: sticky; top: 0; z-index: 1;
}
.data-table th:hover { color: var(--text); }
.data-table th .sort-ind { font-size: 9px; margin-left: 5px; opacity: .5; }

.data-table tbody tr {
  cursor: pointer;
  transition: background .15s var(--ease-soft);
}
.data-table tbody tr:hover { background: var(--tile-bg-2); }
.data-table td {
  color: var(--text-2);
}
.data-table td.empty {
  text-align: center;
  padding: 56px;
  color: var(--text-faint);
  cursor: default;
}
.data-table td.empty:hover { background: transparent; }

/* Status pills */
.status-pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.005em;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
}
.status-pill.open      { background: rgba(255,159,10,0.14);  color: var(--apple-orange); border-color: rgba(255,159,10,0.32); }
.status-pill.quoted    { background: rgba(10,132,255,0.14);  color: var(--apple-blue);   border-color: rgba(10,132,255,0.32); }
.status-pill.won       { background: rgba(48,209,88,0.14);   color: var(--apple-green);  border-color: rgba(48,209,88,0.32); }
.status-pill.lost      { background: rgba(255,69,58,0.14);   color: var(--apple-red);    border-color: rgba(255,69,58,0.32); }
.status-pill.withdrawn { background: rgba(255,255,255,0.06); color: var(--text-muted);   border-color: rgba(255,255,255,0.14); }
.status-pill.hold      { background: rgba(191,90,242,0.14);  color: var(--apple-purple); border-color: rgba(191,90,242,0.32); }

.table-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--tile-border);
  font-size: 12.5px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 32px;
  animation: fadeBg .3s var(--ease-soft);
}
@keyframes fadeBg { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: rgba(20,20,24,0.88);
  -webkit-backdrop-filter: saturate(180%) blur(40px);
  backdrop-filter: saturate(180%) blur(40px);
  border: 1px solid var(--tile-border);
  width: 100%; max-width: 760px;
  border-radius: var(--radius-xl);
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
  max-height: 90vh; display: flex; flex-direction: column;
  animation: modalIn .4s var(--ease-spring);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--tile-border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}

.modal-body {
  padding: 26px 28px;
  overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.modal-body .full { grid-column: 1 / -1; }
.modal-body label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal-body input,
.modal-body select,
.modal-body textarea {
  height: 40px;
  border: 1px solid var(--tile-border);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--tile-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  outline: none;
  transition: all .2s var(--ease-soft);
}
.modal-body textarea { height: 96px; padding: 12px 14px; resize: vertical; }
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  background: var(--tile-bg-hi);
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 4px rgba(10,132,255,0.18);
}

.modal-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--tile-border);
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.02);
}
.modal-footer .spacer { flex: 1; }

/* ============================================================
   FOOTER — translucent, centered, with link
   ============================================================ */
.footer {
  padding: 32px 40px 40px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--tile-border);
  background: rgba(0,0,0,0.35);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  position: relative; z-index: 2;
}
.footer a {
  color: var(--apple-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s var(--ease-soft);
}
.footer a:hover { color: var(--apple-cyan); }
.footer .footer-line { margin-bottom: 6px; }
.footer .footer-line:last-child { margin-bottom: 0; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 32px; right: 32px;
  background: rgba(20,20,24,0.92);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  color: var(--text);
  padding: 16px 22px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  z-index: 200;
  max-width: 400px;
  border: 1px solid var(--tile-border-hi);
  animation: toastIn .4s var(--ease-spring);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast.error   { border-color: rgba(255,69,58,0.5); }
.toast.success { border-color: rgba(48,209,88,0.5); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .section-head h1 { font-size: 32px; }
}
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
  .main { padding: 32px 24px 60px; }
}
@media (max-width: 600px) {
  .tiles { grid-template-columns: 1fr; }
  .topbar { padding: 12px 20px; flex-wrap: wrap; gap: 10px; }
  .modal-body { grid-template-columns: 1fr; }
  .user-meta { display: none; }
  .section-head h1 { font-size: 28px; }
  .login-card { padding: 40px 28px; }
  .login-logo { width: 240px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .bg-canvas::before, .bg-canvas::after, .bg-orb-3, .bg-orb-4 { animation: none !important; }
}
