:root {
  color-scheme: light;
  --rru-green-900: #123d25;
  --rru-green-800: #14532d;
  --rru-green-700: #176b3a;
  --rru-green-100: #e6f2e9;
  --rru-yellow: #f2c94c;
  --rru-yellow-soft: #fff7d6;
  --navy: var(--rru-green-900);
  --blue: var(--rru-green-700);
  --yellow: var(--rru-yellow);
  --ink: #183225;
  --muted: #647369;
  --line: #d6e4da;
  --bg: #f4f8f5;
  --fg: #16251c;
  --surface: #ffffff;
  --accent: var(--rru-green-700);
  --accent-ink: #ffffff;
  --accent-soft: var(--rru-green-100);
  --s1: #2e7d4f;
  --s2: #c29b00;
}

html,
body {
  color-scheme: light;
}

.login-visual {
  background: linear-gradient(135deg, var(--rru-green-900), var(--rru-green-800) 68%, var(--rru-green-700));
}
.login-visual .eyebrow { color: #ffe071; }
.login-icon { background: var(--rru-green-100); color: var(--rru-green-700); }
.eyebrow { color: #6b5700; }
/* Two-tier top navigation — reset legacy .adminbar/.systembar flex clustering */
.topnav.adminbar.systembar,
.topnav {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--rru-green-900);
  color: #f4faf6;
  border-bottom: 2px solid var(--rru-yellow);
  margin: 0;
  padding: 0;
  min-height: 0;
  gap: 0;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
}
.topnav-utility,
.topnav-main {
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.topnav-utility {
  background: #0e2d1c;
  border-bottom: 1px solid #ffffff14;
}
.topnav-utility .topnav-inner {
  min-height: 34px;
  padding-block: 5px;
  justify-content: space-between;
}
.topnav-utility-left {
  margin: 0;
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 600;
  color: #c5ddce;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.topnav-main {
  background: var(--rru-green-900);
}
.topnav-main .topnav-inner {
  min-height: 48px;
  justify-content: flex-start;
}
.topnav-inner {
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  min-height: 48px;
  padding: 0 clamp(16px, 2.5vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  box-sizing: border-box;
}
/* Escape page side-padding on manage/dashboard body */
body > .topnav {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.topnav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
  line-height: 1.1;
  padding: 10px 0;
}
.topnav-brand strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
}
.topnav-brand em {
  color: var(--rru-yellow);
  font-style: normal;
}
.topnav-context {
  font-size: 11px;
  font-weight: 600;
  color: #c5ddce;
  padding-left: 8px;
  border-left: 1px solid #ffffff2e;
  white-space: nowrap;
}
.topnav-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0;
}
.topnav-nav::-webkit-scrollbar { display: none; }
.topnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #e7f3eb;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}
.topnav-link:hover {
  background: #ffffff14;
  color: #fff;
}
.topnav-link.is-active {
  background: var(--rru-yellow);
  border-color: var(--rru-yellow);
  color: #1a2f20;
  box-shadow: none;
}
.topnav-link.tone-soft {
  color: #d5e8db;
  font-weight: 600;
  font-size: 12px;
}
.topnav-link.tone-soft.is-active {
  background: var(--rru-yellow);
  color: #1a2f20;
}
.topnav-link.tone-cta {
  background: var(--rru-yellow);
  color: #1a2f20;
  font-weight: 800;
}
.topnav-link.tone-cta:hover {
  background: #ffd76a;
  color: #132419;
}
.topnav-link.tone-flood {
  position: relative;
  gap: 7px;
  background: linear-gradient(115deg, #0a6f96 0%, #0d7a88 48%, #0b8a6a 100%);
  background-size: 180% 100%;
  color: #fff;
  border-color: #7ec8e6;
  font-weight: 800;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.42);
  animation: flood-nav-pulse 2.4s ease-out infinite, flood-nav-shine 4.5s ease-in-out infinite;
}
.topnav-link.tone-flood:hover {
  color: #fff;
  background: linear-gradient(115deg, #0b7eaa 0%, #0e8a98 48%, #0c9a78 100%);
  background-size: 180% 100%;
  filter: brightness(1.06);
}
.tone-flood-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7df0ff;
  box-shadow: 0 0 0 0 rgba(125, 240, 255, 0.7);
  animation: flood-dot-blink 1.6s ease-out infinite;
  flex: 0 0 auto;
}
@keyframes flood-nav-pulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}
@keyframes flood-nav-shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes flood-dot-blink {
  0% { box-shadow: 0 0 0 0 rgba(125, 240, 255, 0.75); opacity: 1; }
  70% { box-shadow: 0 0 0 8px rgba(125, 240, 255, 0); opacity: 0.85; }
  100% { box-shadow: 0 0 0 0 rgba(125, 240, 255, 0); opacity: 1; }
}
.flood-banner {
  --flood-1: #074f6e;
  --flood-2: #0a7a86;
  --flood-3: #0b8f6a;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: #f4fbff;
  border: 1px solid #7ec8e6;
  background: linear-gradient(120deg, var(--flood-1), var(--flood-2) 46%, var(--flood-3));
  background-size: 220% 100%;
  box-shadow: 0 10px 28px rgba(7, 79, 110, 0.22);
  animation: flood-banner-shine 5s ease-in-out infinite;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.flood-banner::before {
  content: "";
  position: absolute;
  inset: auto -20% -55% -20%;
  height: 90%;
  background: radial-gradient(ellipse at center, rgba(125, 240, 255, 0.28), transparent 68%);
  animation: flood-banner-wave 3.8s ease-in-out infinite;
  pointer-events: none;
}
.flood-banner:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 32px rgba(7, 79, 110, 0.28);
  color: #fff;
}
.flood-banner-live {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.flood-banner-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7df0ff;
  box-shadow: 0 0 0 0 rgba(125, 240, 255, 0.7);
  animation: flood-dot-blink 1.6s ease-out infinite;
}
.flood-banner-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 220px;
}
.flood-banner-copy strong {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}
.flood-banner-copy span {
  font-size: 13px;
  opacity: 0.92;
  line-height: 1.4;
}
.flood-banner-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffd76a;
  color: #132419;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 2px 0 rgba(19, 36, 25, 0.12);
  transition: transform 0.16s ease, background 0.16s ease;
}
.flood-banner:hover .flood-banner-cta {
  transform: translateX(3px);
  background: #ffe08a;
}
.login-visual .flood-banner {
  position: relative;
  z-index: 1;
  margin: 22px 0 0;
  max-width: 560px;
  box-shadow: 0 16px 40px rgba(2, 24, 48, 0.35);
  animation: flood-banner-shine 5s ease-in-out infinite, flood-login-pulse 2.6s ease-out infinite;
}
@keyframes flood-banner-shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes flood-banner-wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes flood-login-pulse {
  0% { box-shadow: 0 16px 40px rgba(2, 24, 48, 0.35), 0 0 0 0 rgba(125, 240, 255, 0.35); }
  70% { box-shadow: 0 16px 40px rgba(2, 24, 48, 0.35), 0 0 0 14px rgba(125, 240, 255, 0); }
  100% { box-shadow: 0 16px 40px rgba(2, 24, 48, 0.35), 0 0 0 0 rgba(125, 240, 255, 0); }
}
@media (max-width: 640px) {
  .flood-banner { padding: 12px 14px; }
  .flood-banner-cta { width: 100%; justify-content: center; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .topnav-link.tone-flood,
  .tone-flood-dot,
  .flood-banner,
  .flood-banner::before,
  .flood-banner-live::before {
    animation: none;
  }
}
.topnav-aside {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  justify-content: flex-end;
}
.topnav-userchip {
  display: grid;
  gap: 0;
  text-align: right;
  line-height: 1.15;
  max-width: 180px;
}
.topnav-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topnav-role {
  font-size: 10px;
  font-weight: 600;
  color: #b7cfc0;
}
.topnav-logout,
.topnav form button {
  appearance: none;
  border: 1px solid #ffffff44;
  background: transparent;
  color: #fff;
  border-radius: 999px;
  min-height: 28px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.topnav-logout:hover,
.topnav form button:hover {
  background: #ffffff18;
}
.topnav form { margin: 0; }
.topnav--public .topnav-utility-left { color: #d9ebdf; }

/* Shared content shell — align with topnav-inner */
.wrap {
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 28px clamp(16px, 2.5vw, 24px) 72px;
  box-sizing: border-box;
}
.admin-content {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}
.primary, .action-button { background: var(--rru-green-700); }
.secondary-button { background: var(--rru-green-100); color: var(--rru-green-900); }
.table-card th { background: #edf4ef; }
.badge { background: var(--rru-green-100); color: var(--rru-green-700); }
.summary-grid > div { border-top-color: var(--rru-green-700); }
.be-datepicker { position: relative; display: flex; width: 100%; min-width: 0; }
.dash-tools .be-datepicker { width: 190px; }
.be-datepicker input { width: 100%; flex: 1 1 auto; padding-right: 38px !important; cursor: pointer; background: var(--surface); }
.exitrow .be-datepicker { width: 118px; flex: 0 0 auto; }
.exitrow .be-datepicker input { min-height: 30px !important; padding: 4px 30px 4px 8px !important; font-size: 13px; }
.exitrow .be-picker-button { width: 28px; font-size: 12px; }
@media (max-width: 900px) {
  .exitrow .be-datepicker { width: 100%; flex: 1 1 100%; }
}
.be-picker-button { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 34px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--accent); cursor: pointer; font-size: 15px; }
.be-calendar { position: fixed; z-index: 100; width: 294px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); box-shadow: 0 14px 36px rgba(18,61,37,.18); }
.be-calendar-head { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 6px; margin-bottom: 8px; text-align: center; }
.be-calendar-head button,.be-today { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--fg); cursor: pointer; padding: 5px 8px; }
.be-weekdays,.be-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; text-align: center; }
.be-weekdays { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.be-days > span,.be-days > button { min-height: 34px; }
.be-days > button { border: 0; border-radius: 7px; background: transparent; color: var(--fg); cursor: pointer; }
.be-days > button:hover { background: var(--accent-soft); }
.be-days > button.today { box-shadow: inset 0 0 0 1px var(--accent); }
.be-days > button.selected { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.be-today { display: block; margin: 9px auto 0; color: var(--accent); }

.rru-oidc-wrap { margin-bottom: 18px; }
.rru-oidc-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-inline: 16px;
}
.rru-oidc-emblem {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  flex: 0 0 auto;
  padding: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.rru-oidc-blocked {
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
}
.login-or,
.login-note {
  font-size: 13px;
  text-align: center;
}
.login-or { margin: 0 0 14px; }
.login-dashboard-link { text-align: center; margin-top: 18px; }

.to-top {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  z-index: 80;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.38);
  color: var(--rru-green-900);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: 0 8px 22px rgba(18, 61, 37, 0.12);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top:hover {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 26px rgba(18, 61, 37, 0.16);
}
.to-top:focus-visible {
  outline: 2px solid var(--rru-green-700);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .to-top {
    transition: none;
  }
}
