:root {
  --remax-navy: #000E35;
  --remax-navy-deep: #00061a;
  --remax-red: #ED1C24;
  --remax-blue: #0043FF;
  --remax-sand: #F4EDE3;
  --remax-sand-deep: #EBE2D4;
  --remax-ink: #0A1638;
  --remax-muted: #5B6478;
  --remax-line: rgba(0, 14, 53, 0.10);
  --remax-card: rgba(255, 255, 255, 0.86);
  --rb-radius: 1.15rem;
  --rb-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--remax-ink);
  background-color: var(--remax-sand);
  background-image:
    radial-gradient(1200px 560px at 8% -8%, rgba(237, 28, 36, 0.14), transparent 55%),
    radial-gradient(900px 480px at 96% 0%, rgba(0, 67, 255, 0.10), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(0, 14, 53, 0.06), transparent 60%),
    linear-gradient(180deg, #F8F3EC 0%, var(--remax-sand) 42%, var(--remax-sand-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* subtle brand mesh */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(0, 14, 53, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 14, 53, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
}

.min-h-screen,
.rb-shell { position: relative; z-index: 1; }

/* ——— Topbar ——— */
.rb-topbar {
  background: rgba(255, 252, 248, 0.78);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--remax-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.rb-topbar::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--remax-red) 0%, var(--remax-red) 28%, var(--remax-blue) 28%, var(--remax-blue) 52%, var(--remax-navy) 52%);
}

.rb-brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}
.rb-brand-lockup img {
  height: 2.15rem;
  width: auto;
  transition: transform 0.35s var(--rb-ease);
}
.rb-brand-lockup:hover img { transform: scale(1.04); }
.rb-brand-mark {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--remax-red);
  line-height: 1.2;
}
.rb-brand-sub {
  font-size: 0.72rem;
  color: var(--remax-muted);
  font-weight: 500;
  margin-top: 0.1rem;
}

.rb-nav-link {
  padding: 0.42rem 0.72rem;
  border-radius: 0.65rem;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--remax-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--rb-ease), color 0.2s var(--rb-ease), transform 0.2s var(--rb-ease);
}
.rb-nav-link:hover {
  background: rgba(0, 14, 53, 0.06);
  color: var(--remax-navy);
}
.rb-nav-link.is-active {
  background: var(--remax-navy);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 14, 53, 0.18);
}
.rb-nav-cta {
  background: var(--remax-red) !important;
  color: #fff !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 20px rgba(237, 28, 36, 0.28);
}
.rb-nav-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* ——— Board hero ——— */
.rb-board-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--rb-radius) + 0.15rem);
  padding: 1.35rem 1.5rem 1.25rem;
  margin-bottom: 1.1rem;
  color: #fff;
  background:
    radial-gradient(600px 220px at 90% 0%, rgba(237, 28, 36, 0.45), transparent 55%),
    radial-gradient(500px 200px at 10% 100%, rgba(0, 67, 255, 0.35), transparent 50%),
    linear-gradient(135deg, #00061a 0%, #000E35 48%, #001a4d 100%);
  box-shadow:
    0 20px 50px rgba(0, 14, 53, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  animation: rbHeroIn 0.7s var(--rb-ease) both;
}
.rb-board-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 14px,
      rgba(255, 255, 255, 0.015) 14px,
      rgba(255, 255, 255, 0.015) 15px
    );
  pointer-events: none;
}
.rb-board-hero-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}
.rb-board-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #ff6b70;
  margin: 0 0 0.45rem;
}
.rb-board-title {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
.rb-board-title span {
  color: transparent;
  background: linear-gradient(90deg, #fff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.rb-board-meta {
  margin-top: 0.55rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  max-width: 42rem;
}
.rb-board-stat {
  text-align: right;
}
.rb-board-stat strong {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rb-board-stat em {
  display: block;
  margin-top: 0.25rem;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.rb-board-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}
.rb-board-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
}
.rb-board-pill.is-warn {
  background: rgba(237, 28, 36, 0.22);
  border-color: rgba(237, 28, 36, 0.4);
  color: #fecaca;
}

@keyframes rbHeroIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ——— Cards ——— */
.rb-card {
  position: relative;
  background: var(--remax-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--rb-radius);
  padding: 1.15rem 1.3rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 30px rgba(0, 14, 53, 0.06),
    0 1px 2px rgba(0, 14, 53, 0.04);
  transition: transform 0.35s var(--rb-ease), box-shadow 0.35s var(--rb-ease);
}
.rb-card:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 40px rgba(0, 14, 53, 0.09),
    0 2px 4px rgba(0, 14, 53, 0.04);
}

.rb-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--remax-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rb-section-title::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--remax-red);
  box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.15);
  flex-shrink: 0;
}

.rb-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--remax-muted);
  margin-bottom: 0.3rem;
}

.rb-input {
  height: 2.55rem;
  width: 100%;
  border: 1px solid var(--remax-line);
  border-radius: 0.8rem;
  padding: 0 0.85rem;
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.875rem;
  color: var(--remax-ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rb-input:focus {
  outline: none;
  border-color: var(--remax-blue);
  box-shadow: 0 0 0 3px rgba(0, 67, 255, 0.14);
}

.rb-btn-primary {
  background: linear-gradient(180deg, #ff2a32 0%, var(--remax-red) 100%);
  color: #fff;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(237, 28, 36, 0.28);
  transition: transform 0.2s var(--rb-ease), filter 0.2s;
}
.rb-btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.rb-btn-ghost {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--remax-line);
  font-weight: 600;
  color: var(--remax-navy);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.rb-btn-ghost:hover {
  background: #fff;
  border-color: rgba(0, 14, 53, 0.22);
}

.rb-filters { padding-bottom: 1rem; }

.rb-filters-bar {
  padding: 0.9rem 1.15rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.rb-password-wrap { position: relative; }
.rb-password-wrap .rb-input { padding-right: 5.5rem; }
.rb-password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  height: 2rem;
  padding: 0 0.7rem;
  border: none;
  border-radius: 0.55rem;
  background: rgba(0, 14, 53, 0.06);
  color: var(--remax-navy);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.rb-password-toggle:hover { background: rgba(0, 14, 53, 0.1); }
.rb-password-toggle[aria-pressed="true"] {
  background: rgba(237, 28, 36, 0.1);
  color: var(--remax-red);
}

.rb-chips-block {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(0, 14, 53, 0.12);
}
.rb-chips-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.55rem;
}
.rb-chips-title {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--remax-navy);
}
.rb-chips-hint {
  font-size: 0.72rem;
  color: var(--remax-muted);
}
.rb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.55rem 0.32rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 14, 53, 0.05);
  color: var(--remax-navy);
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid rgba(0, 14, 53, 0.1);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.rb-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(237, 28, 36, 0.12);
  color: var(--remax-red);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}
.rb-chip:hover {
  background: rgba(237, 28, 36, 0.08);
  border-color: rgba(237, 28, 36, 0.28);
}
.rb-chip:hover .rb-chip-x { background: var(--remax-red); color: #fff; }

/* Kanban */
.rb-kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.rb-kanban-col {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--remax-line);
  border-radius: 1rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.rb-kanban-col-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--remax-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.rb-kanban-col-head h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--remax-muted);
}
.rb-kanban-col-head strong {
  font-variant-numeric: tabular-nums;
  color: var(--remax-navy);
}
.rb-kanban-body {
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.rb-kanban-card {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(0, 14, 53, 0.08);
  text-decoration: none;
  color: var(--remax-navy);
  transition: transform 0.2s, box-shadow 0.2s;
}
.rb-kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 14, 53, 0.1);
}
.rb-kanban-card strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
}
.rb-kanban-card span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: var(--remax-muted);
}

.rb-drill-table { width: 100%; font-size: 0.85rem; border-collapse: collapse; }
.rb-drill-table th {
  text-align: left;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--remax-muted);
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid var(--remax-line);
}
.rb-drill-table td {
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid rgba(0, 14, 53, 0.06);
  color: var(--remax-navy);
}
.rb-drill-table a {
  color: var(--remax-navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(0, 14, 53, 0.25);
}
.rb-drill-table a:hover { color: var(--remax-red); }

.rb-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.rb-subnav a {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--remax-muted);
  text-decoration: none;
  border: 1px solid transparent;
}
.rb-subnav a:hover { background: rgba(0, 14, 53, 0.05); color: var(--remax-navy); }
.rb-subnav a.is-active {
  background: var(--remax-navy);
  color: #fff;
}

.rb-banner-warn {
  border: 1px solid rgba(202, 138, 4, 0.35);
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #78350f;
  border-radius: 0.9rem;
  padding: 0.8rem 1.05rem;
  font-size: 0.82rem;
  line-height: 1.45;
  box-shadow: 0 4px 14px rgba(180, 120, 20, 0.08);
}

.rb-skeleton {
  background: linear-gradient(90deg, #e8e2d8 25%, #f5f0e8 37%, #e8e2d8 63%);
  background-size: 400% 100%;
  animation: rbShimmer 1.2s ease infinite;
  border-radius: 0.75rem;
  min-height: 1rem;
}
@keyframes rbShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ——— Stock bars ——— */
.rb-stock-row {
  padding: 0.55rem 0.35rem;
  border-radius: 0.75rem;
  transition: background 0.2s;
  border: none;
  background: transparent;
  cursor: pointer;
}
.rb-stock-row:hover { background: rgba(0, 14, 53, 0.03); }

.rb-bar-track {
  position: relative;
  height: 0.72rem;
  background: rgba(0, 14, 53, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.rb-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.7s var(--rb-ease);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}
.rb-bar-meta {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--remax-navy);
  opacity: 0.55;
  border-radius: 1px;
}

/* ——— KPIs ——— */
.rb-kpi {
  position: relative;
  overflow: hidden;
  border-radius: var(--rb-radius);
  color: #fff;
  padding: 1rem 1.05rem;
  min-height: 7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 14px 32px rgba(0, 14, 53, 0.18);
  transition: transform 0.35s var(--rb-ease), box-shadow 0.35s var(--rb-ease);
  isolation: isolate;
}
.rb-kpi::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 42%, rgba(0, 0, 0, 0.12) 100%);
  pointer-events: none;
  z-index: 0;
}
.rb-kpi::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  right: -40px;
  top: -50px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}
.rb-kpi > * { position: relative; z-index: 1; }
.rb-kpi:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 22px 44px rgba(0, 14, 53, 0.26);
}
.rb-kpi-label {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.88;
}
.rb-kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.rb-kpi-tip {
  font-size: 0.65rem;
  opacity: 0.78;
  margin-top: 0.3rem;
  line-height: 1.3;
}
.rb-kpi-formula { cursor: pointer; }
.rb-kpi-formula:focus {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

/* Funnel bands */
.rb-funnel-band {
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 14, 53, 0.16);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.01em;
}
.rb-funnel-band:hover {
  transform: scale(1.02);
  filter: brightness(1.08);
}

/* SLA */
.rb-sla-chip {
  flex: 1 1 120px;
  border-radius: 0.95rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--remax-line);
  background: linear-gradient(160deg, #fff 0%, #f7f8fc 100%);
  transition: transform 0.25s var(--rb-ease);
}
.rb-sla-chip:hover { transform: translateY(-2px); }
.rb-sla-chip.is-late {
  border-color: rgba(237, 28, 36, 0.4);
  background: linear-gradient(160deg, #fff5f5, #ffe4e6);
}
.rb-sla-chip.is-ok {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(160deg, #f0fdf4, #ecfdf5);
}
.rb-sla-chip.is-neutral { border-color: var(--remax-line); }

.rb-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #cbd5e1;
  display: inline-block;
  transition: transform 0.2s, background 0.2s;
}
.rb-dot.is-active {
  background: var(--remax-red);
  transform: scale(1.35);
  box-shadow: 0 0 0 4px rgba(237, 28, 36, 0.15);
}

.dashboard-fade-in {
  animation: fadeInUp 0.55s var(--rb-ease) both;
}
.dashboard-fade-in:nth-child(1) { animation-delay: 0.04s; }
.dashboard-fade-in:nth-child(2) { animation-delay: 0.1s; }
.dashboard-fade-in:nth-child(3) { animation-delay: 0.16s; }
.dashboard-fade-in:nth-child(4) { animation-delay: 0.22s; }
.dashboard-fade-in:nth-child(5) { animation-delay: 0.28s; }
.dashboard-fade-in:nth-child(6) { animation-delay: 0.34s; }
.dashboard-fade-in:nth-child(7) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-fade-in,
  .rb-skeleton,
  .rb-board-hero,
  .rb-kpi,
  .rb-funnel-band,
  .rb-drawer { animation: none !important; transition: none !important; }
}

/* ——— Login theater ——— */
.rb-login-bg {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 12% 10%, rgba(237, 28, 36, 0.38), transparent 55%),
    radial-gradient(800px 480px at 88% 20%, rgba(0, 67, 255, 0.28), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(237, 28, 36, 0.12), transparent 55%),
    linear-gradient(155deg, #00040c 0%, #000E35 45%, #001433 100%);
}
.rb-login-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent);
  pointer-events: none;
}
.rb-login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  pointer-events: none;
  animation: rbOrb 12s ease-in-out infinite alternate;
}
.rb-login-orb-a {
  width: 320px; height: 320px;
  background: var(--remax-red);
  top: -80px; left: -60px;
}
.rb-login-orb-b {
  width: 280px; height: 280px;
  background: var(--remax-blue);
  bottom: 10%; right: -40px;
  animation-delay: -4s;
}
@keyframes rbOrb {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(30px, 20px) scale(1.08); }
}

.rb-login-card {
  position: relative;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
  animation: rbHeroIn 0.65s var(--rb-ease) both;
}
.rb-login-brand {
  border-radius: 1.1rem;
  background:
    radial-gradient(300px 120px at 80% 0%, rgba(237, 28, 36, 0.5), transparent),
    linear-gradient(135deg, #00061a, #000E35 60%, #001a4d);
  padding: 1.6rem 1.2rem;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 14, 53, 0.35);
}
.rb-login-brand img { height: 2.6rem; width: auto; }
.rb-login-brand p {
  margin: 0.75rem 0 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #ff6b70;
}

.ts-wrapper { min-width: 160px; }
.ts-wrapper .ts-control {
  border-radius: 0.8rem !important;
  border-color: var(--remax-line) !important;
  min-height: 2.55rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.95) !important;
}
.ts-dropdown { z-index: 70; border-radius: 0.75rem !important; }

@media (max-width: 640px) {
  .rb-kpi-value { font-size: 1.35rem; }
  .rb-board-stat { text-align: left; width: 100%; }
  .rb-board-hero { padding: 1.15rem 1.15rem; }
}

/* Drawer */
.rb-drawer-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 6, 26, 0.52);
  backdrop-filter: blur(4px);
}
.rb-drawer {
  position: fixed; top: 0; right: 0; z-index: 60;
  width: min(460px, 100vw);
  height: 100vh;
  background: linear-gradient(180deg, #FFFCFA 0%, #F7F1E8 100%);
  border-left: 1px solid var(--remax-line);
  box-shadow: -18px 0 50px rgba(0, 14, 53, 0.22);
  display: flex; flex-direction: column;
  animation: rbDrawerIn 0.28s var(--rb-ease);
}
@keyframes rbDrawerIn {
  from { transform: translateX(24px); opacity: 0.5; }
  to { transform: none; opacity: 1; }
}
.rb-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--remax-line);
  background: rgba(255, 255, 255, 0.7);
}
.rb-drawer-body {
  flex: 1; overflow: auto; padding: 1.1rem 1.2rem 7rem;
}
.rb-drawer-foot {
  position: sticky; bottom: 0;
  display: flex; gap: 0.5rem;
  padding: 0.9rem 0 0;
  margin-top: 1rem;
  background: linear-gradient(180deg, transparent, #F7F1E8 28%);
}
body.rb-drawer-open { overflow: hidden; }

.rb-pill-warn {
  display: inline-flex;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid #fdba74;
}
.rb-asof {
  font-size: 0.7rem;
  color: var(--remax-muted);
  font-variant-numeric: tabular-nums;
}

.rb-loading {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(244, 237, 227, 0.78);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.rb-loading-panel {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: var(--rb-radius);
  padding: 1.4rem;
  border: 1px solid var(--remax-line);
  box-shadow: 0 28px 60px rgba(0, 14, 53, 0.18);
}

.rb-formula-pop {
  position: fixed; z-index: 80;
  width: min(300px, calc(100vw - 24px));
  background: linear-gradient(160deg, #000E35, #001a4d);
  color: #fff;
  border-radius: 1rem;
  padding: 0.95rem 1.05rem;
  box-shadow: 0 20px 48px rgba(0, 14, 53, 0.4);
  font-size: 0.78rem;
  line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInUp 0.25s var(--rb-ease);
}
.rb-formula-title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff8a8e;
  margin-bottom: 0.4rem;
}
.rb-formula-body { opacity: 0.92; }
.rb-formula-close {
  margin-top: 0.7rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93c5fd;
  background: none; border: none; cursor: pointer; padding: 0;
}

/* Footer */
.rb-footer {
  border-top: 1px solid var(--remax-line);
  padding: 1.1rem 1rem;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--remax-muted);
  background: rgba(255, 255, 255, 0.35);
}
