:root{
  --brand: #96a3b0;
  --brand-hover:#808b97;
  --white: #fff;
  --btn-fs:2vh;
  --btn-py:.9vh;
  --btn-px:1.8vh;
  --btn-radius:.5vh;
  --btn-shadow:inset 0 -0.3vh 0.6vh rgba(0,0,0,.2);
}

html, body {
    margin: 0; padding: 0; height: 100%;
    font-family: "Roboto", sans-serif !important;
  }

  button {
    font-family: "TekTur", sans-serif !important;
  }

body {
  background-color: var(--white);
  margin: 0;
  padding: 0;
  min-height: 100%;
  position: relative;
  z-index: 0;
}

/* overlay the repeating icon at low opacity and fixed size */
/* Disabled site-wide — uncomment to bring back the repeating logo wallpaper.
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background-image: url('../img/black_icon_transparent.png');
  background-repeat: repeat;
  background-size: 50px 50px;
  opacity: 0.10;
}
*/

/* ── Portal wallpaper ──────────────────────────────────────────────
   Scoped to `.portal-page` (set by portal/base.html) so only the
   authenticated portal pages get the color-shifting background. Login,
   spray pages, and anything else that shares master.css without extending
   portal/base.html keep their own treatment.

   Three radial "spots" fade to transparent over a warm top-to-bottom wash;
   a fixed ::after layer adds a slow-drifting glow on top of the icon
   pattern for the color-shifting feel. */
body.portal-page {
  /* Blue-green wash that matches the portal's teal/cyan button and accent
     palette (see the gradients in reports.css: #0891b2, #0e7490, #06b6d4).
     Alphas are kept low so the wallpaper reads as a hint of color rather
     than a colored page — content still lands on an essentially white canvas. */
  background:
    radial-gradient(1000px 700px at 12% 8%,  rgba(167, 243, 208, 0.28) 0%, transparent 62%),  /* mint */
    radial-gradient(1100px 720px at 88% 18%, rgba(165, 243, 252, 0.30) 0%, transparent 58%),  /* cyan */
    radial-gradient(900px  640px at 50% 95%, rgba(186, 230, 253, 0.20) 0%, transparent 60%),  /* sky */
    linear-gradient(180deg, #f8fdfc 0%, #ffffff 45%, #f8fbfe 100%);
  background-attachment: fixed;
}

body.portal-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.055), transparent 45%),  /* cyan-500 */
    radial-gradient(circle at 82% 62%, rgba(14, 165, 233, 0.055), transparent 50%),  /* sky-500 */
    radial-gradient(circle at 50% 92%, rgba(16, 185, 129, 0.04),  transparent 45%);  /* emerald-500 */
  opacity: 0.7;
  animation: portal-bg-drift 28s ease-in-out infinite alternate;
}

@keyframes portal-bg-drift {
  0%   { transform: translate3d(0, 0, 0)        scale(1);    }
  50%  { transform: translate3d(-2%, 1.5%, 0)   scale(1.04); }
  100% { transform: translate3d(1.8%, -1.8%, 0) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  body.portal-page::after { animation: none; }
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
  
#site-content {
  display: block;      /* previously flex column with 92vh; free it up */
  min-height: 100vh;
}
  
  /* make header only 8% of viewport height */
  #header {
    position: relative;    /* creates a stacking context */
    z-index: 1000;         /* higher than any scrolling panels */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 8vh;
    background: rgb(53, 53, 53);
    box-shadow: 0 0.3vh 0.6vh var(--brand);
    padding: 0 2vw;
    box-sizing: border-box;
  }

  
  /* inner wrapper */
  #header .container {
    display: flex;
    align-items: center;
    width: 100%;
  }
  
  #logo-link {
    display: inline-block;    /* makes the <a> only as big as its contents */
  }

  #logo {
    width: 14vw;               /* or whatever % you had before */
    height: auto;
    max-height: 100%;
    object-fit: contain;
  }

  /* title flexes up to nav */
  .site-title {
    flex: 1;
    margin: 0;
    font-size: 2.5vh;
    color: var(--brand);
    text-align:center;
  }
  
  /* nav styling */
  .site-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .site-nav li {
    margin-left: 2vw;
  }
  .site-nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 2vh;
    padding: 0.5vh 0;
    font-family: "TekTur", sans-serif !important;
  }
  .site-nav a:hover {
    color: var(--brand);
  }

.universal-button {
  margin: 2vh 0;
  padding: 1vh 2vh;
  font-size: 2vh;
  cursor: pointer;
  /* base color fallback */
  background-color: var(--brand);
  /* white highlight at top-left, deeper brand at bottom-right */
  background-image:
    radial-gradient(circle at top left,
                    rgba(255,255,255,0.8) 0%,
                    rgba(255,255,255,0) 70%),
    linear-gradient(to bottom right,
                    var(--brand) 0%,
                    var(--brand-hover) 100%);
  border: none;
  border-radius: 0.5vh;
  /* inner shadow at bottom edge + slight outer shadow */
  box-shadow:
    inset 0 -0.3vh 0.6vh rgba(0,0,0,0.2),
    0 0.3vh 0.6vh rgba(0,0,0,0.15);
  color: var(--white);
}

.universal-button:hover {
    background: var(--brand-hover);
}

h1 {
  font-family: "TekTur", sans-serif !important;
}

textarea {
  resize: none;
}

/* ===== Overlay drawer + backdrop ===== */
:root {
  --drawer-w: 300px;
  --ink: #1e293b;
  --panel: #fff;
  --drawer-teal:     #0e7490;
  --drawer-teal-m:   #0891b2;
  --drawer-teal-l:   #06b6d4;
  --drawer-ink:      #1e293b;
  --drawer-ink-mid:  #64748b;
  --drawer-border:   rgba(14,116,144,0.12);
}

#menu-btn {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  border: none;
  width: 52px;
  height: 64px;
  /* Flush to the top-left corner: only the inner (bottom-right) corner
     is rounded so the button reads as a ribbon attached to the edge
     rather than a floating pill. */
  border-radius: 0 0 16px 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(155deg, #0891b2 0%, #0e7490 100%);
  box-shadow: 0 4px 14px rgba(14,116,144,0.40);
  transition: .18s box-shadow, .18s filter;
}
#menu-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(14,116,144,0.52);
}
.menu-btn-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  opacity: 0.90;
  line-height: 1;
  pointer-events: none;
}

/* prevent background scroll when nav open */
body.nav-open { overflow: hidden; }

#site-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--drawer-w);
  height: 100vh;
  background: #fff;
  color: var(--drawer-ink);
  transform: translateX(-100%);
  transition: transform 220ms cubic-bezier(.4,0,.2,1);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  /* teal left-edge accent */
  border-right: 1px solid var(--drawer-border);
}

#site-drawer.open { transform: translateX(0); }

#drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14,116,144,0.18);
  opacity: 0;
  transition: opacity 200ms ease;
  z-index: 1100;
}

#drawer-backdrop.show { opacity: 1; }

/* Drawer header */
#site-drawer .drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 14px;
  border-bottom: 1px solid var(--drawer-border);
  /* teal gradient top stripe */
  position: relative;
}
#site-drawer .drawer-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0e7490 0%, #06b6d4 60%, #0ea5e9 100%);
  border-radius: 0;
}
#site-drawer .drawer-logo img {
  height: 36px;
  width: auto;
  display: block;
}
#drawer-close {
  border: 1px solid var(--drawer-border);
  background: transparent;
  color: var(--drawer-ink-mid);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 150ms, color 150ms, border-color 150ms;
}
#drawer-close:hover {
  background: rgba(14,116,144,0.08);
  color: var(--drawer-teal);
  border-color: rgba(14,116,144,0.3);
}

/* Drawer nav */
#site-drawer .drawer-nav {
  flex: 1 1 0;
  overflow-y: auto;
  padding: 10px 10px 8px;
}
#site-drawer .drawer-nav ul {
  list-style: none;
  margin: 0; padding: 0;
}
#site-drawer .drawer-nav li { margin: 2px 0; }
#site-drawer .drawer-nav a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--drawer-ink);
  text-decoration: none;
  font-family: "Tektur", sans-serif !important;
  font-size: 14.5px;
  font-weight: 500;
  transition: background 150ms, color 150ms;
}
#site-drawer .drawer-nav a:hover {
  background: rgba(14,116,144,0.07);
  color: var(--drawer-teal);
}

/* ===== Remove old horizontal header footprint if present ===== */
#header { display: none; }
/* Active nav item */
#site-drawer .drawer-nav a.active {
  color: var(--drawer-teal);
  background: rgba(14,116,144,0.10);
  border-left: 3px solid var(--drawer-teal);
  padding-left: 11px;
  font-weight: 600;
}

/* Drawer footer — users/account & logout */
#site-drawer .drawer-footer {
  flex-shrink: 0;
  padding: 8px 10px 18px;
  border-top: 1px solid var(--drawer-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#site-drawer .drawer-footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--drawer-ink-mid);
  text-decoration: none;
  font-family: "Tektur", sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  transition: background 150ms, color 150ms;
}
#site-drawer .drawer-footer-link:hover {
  background: rgba(14,116,144,0.07);
  color: var(--drawer-teal);
}
#site-drawer .drawer-footer-link.active {
  color: var(--drawer-teal);
  background: rgba(14,116,144,0.10);
  border-left: 3px solid var(--drawer-teal);
  padding-left: 11px;
  font-weight: 600;
}
#site-drawer .drawer-footer-logout {
  color: #94a3b8;
}
#site-drawer .drawer-footer-logout:hover {
  background: rgba(239,68,68,0.07);
  color: #dc2626;
}

#drawer-backdrop { z-index: 5000; }   /* was ~1100 */
#site-drawer     { z-index: 5100; }   /* ensure above backdrop */
/* shared backdrop */
.dim-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 2500;            /* below panels, above everything else */
}
.dim-backdrop.show{
  opacity: 1;
  pointer-events: auto;
}

/* optional: freeze scroll when any overlay/panel is open */
body.nav-open{ overflow: hidden; }
/* Hide shadow when closed */
#site-drawer {
  box-shadow: none;
  transition: transform 220ms cubic-bezier(.4,0,.2,1), box-shadow 150ms ease;
}

/* Teal shadow when open */
#site-drawer.open {
  box-shadow: 4px 0 32px rgba(14,116,144,0.18);
}

/* Belt-and-suspenders nudge to prevent subpixel bleed */
#site-drawer:not(.open) {
  transform: translateX(calc(-100% - 2px));
}
