:root {
  color-scheme: dark;
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080B11;
  background-image: radial-gradient(at 0% 0%, hsla(242, 60%, 15%, 0.5) 0px, transparent 50%),
                    radial-gradient(at 100% 0%, hsla(295, 60%, 15%, 0.3) 0px, transparent 50%);
  color: #F3F4F6;
  min-height: 100vh;
}

body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.auth-shell,
.portal-shell {
  display: grid;
  min-height: 100vh;
}

.auth-shell {
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 20px;
}

.auth-hero {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 48px 28px;
}

.auth-hero h1 {
  font-size: 46px;
  line-height: 1.02;
  max-width: 12ch;
}

.auth-hero p {
  max-width: 54ch;
  color: #C7D2FE;
  line-height: 1.5;
  margin: 0;
}

.auth-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

.auth-hero-metrics div {
  background: rgba(16, 22, 37, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
}

.auth-hero-metrics strong,
.portal-token strong {
  display: block;
  color: #F9FAFB;
  font-size: 14px;
}

.auth-hero-metrics span,
.portal-token span {
  display: block;
  margin-top: 4px;
  color: #9CA3AF;
  font-size: 12px;
}

.auth-panel-flagship {
  align-self: center;
  margin: 0;
  max-width: none;
  width: 100%;
}

.auth-stack {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-label {
  display: block;
  margin-bottom: 6px;
  color: #D1D5DB;
  font-size: 13px;
  font-weight: 600;
}

.auth-control {
  width: 100%;
  box-sizing: border-box;
}

.portal-shell {
  grid-template-columns: 280px minmax(0, 1fr);
}

.portal-sidebar {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 28px 20px;
  background: rgba(10, 14, 24, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-brand {
  display: grid;
  gap: 6px;
}

.portal-brand strong {
  font-size: 20px;
  color: #F9FAFB;
}

.portal-brand-copy {
  color: #9CA3AF;
  font-size: 13px;
}

.portal-nav {
  display: grid;
  gap: 8px;
}

.portal-nav-link {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #F9FAFB;
  text-decoration: none;
  background: rgba(17, 24, 39, 0.35);
}

.portal-nav-link.active,
.portal-nav-link:hover,
.portal-nav-link:focus {
  border-color: rgba(110, 231, 183, 0.35);
  background: rgba(15, 23, 42, 0.72);
  outline: none;
}

.portal-nav-title {
  font-weight: 700;
}

.portal-nav-meta {
  color: #9CA3AF;
  font-size: 12px;
}

.portal-sidebar-footer {
  display: grid;
  gap: 10px;
}

.portal-token {
  padding: 12px 14px;
  background: rgba(17, 24, 39, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.portal-main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.portal-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding: 28px 28px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 11, 17, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.portal-topbar h1 {
  font-size: 30px;
  color: #F9FAFB;
  -webkit-text-fill-color: initial;
  background: none;
}

.portal-subtitle {
  margin: 8px 0 0;
  color: #9CA3AF;
}

.portal-session {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: end;
  align-items: center;
}

.portal-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: #E0E7FF;
  font-size: 12px;
  font-weight: 600;
}

.portal-pill-soft {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.28);
  color: #D1FAE5;
}

.portal-content {
  display: grid;
  gap: 18px;
  padding: 24px 28px 36px;
}

.workspace-hero,
.workspace-grid {
  display: grid;
  gap: 18px;
}

.workspace-hero {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
}

.workspace-summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.78), rgba(13, 19, 31, 0.92));
}

.workspace-summary-copy h2 {
  margin: 6px 0 8px;
  font-size: 28px;
}

.workspace-summary-copy p {
  margin: 0;
  color: #C7D2FE;
}

.workspace-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.workspace-summary-metrics div {
  min-width: 104px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.workspace-summary-metrics strong {
  display: block;
  font-size: 24px;
  color: #F9FAFB;
}

.workspace-summary-metrics span {
  display: block;
  margin-top: 4px;
  color: #9CA3AF;
  font-size: 12px;
}

.workspace-alert {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(16, 22, 37, 0.6);
}

.workspace-section,
.workspace-panel {
  display: grid;
  gap: 18px;
}

.workspace-panel {
  padding: 22px;
  border-radius: 12px;
  background: rgba(16, 22, 37, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.section-header h3 {
  margin: 0;
  font-size: 18px;
}

.section-header p {
  margin: 6px 0 0;
  color: #9CA3AF;
  font-size: 13px;
}

.workspace-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-form,
.workspace-mini-form {
  display: grid;
  gap: 14px;
}

.workspace-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-mini-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-check {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #D1D5DB;
  font-size: 13px;
}

.workspace-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.workspace-policy-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: #E5E7EB;
}

.workspace-record-stack {
  display: grid;
  gap: 14px;
}

.workspace-list-head,
.workspace-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: 14px;
  align-items: center;
}

.workspace-row {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.workspace-row-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.workspace-row-actions {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
}

.workspace-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-note,
.workspace-empty {
  color: #9CA3AF;
  font-size: 13px;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.branding {
  display: flex;
  flex-direction: column;
}

.eyebrow {
  margin: 0 0 4px;
  color: #6366F1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 11px;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(to right, #FFFFFF, #9CA3AF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.session {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.session-badge {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #A5B4FC;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 500;
}

input, select, button {
  border-radius: 8px;
  font: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input, select {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 24, 39, 0.5);
  color: white;
  min-height: 40px;
  padding: 0 14px;
}

textarea {
  min-height: 92px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.5);
  color: white;
  padding: 12px 14px;
  font: inherit;
}

input:focus, select:focus {
  outline: none;
  border-color: #93C5FD;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28), 0 0 0 4px rgba(8, 11, 17, 0.9);
  background: rgba(17, 24, 39, 0.58);
  color: #F9FAFB;
  caret-color: #F9FAFB;
}

button {
  min-height: 40px;
  padding: 0 18px;
  background: linear-gradient(135deg, #4F46E5, #3B82F6);
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

button.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #E5E7EB;
  box-shadow: none;
}

button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button.danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

button.danger:hover {
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.45);
}

/* Panels (Glassmorphism) */
.auth-panel, .panel {
  background: rgba(16, 22, 37, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.auth-panel {
  max-width: 440px;
  margin: 80px auto 0;
}

.auth-panel h2 {
  margin-top: 0;
  font-weight: 700;
  font-size: 24px;
}

.auth-panel form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  font-size: 13px;
}

.auth-actions a {
  color: #93C5FD;
  text-decoration: none;
}

.auth-actions a:hover {
  color: #BFDBFE;
  text-decoration: underline;
}

.notice {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.notice.success {
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  color: #A7F3D0;
}

.notice.error {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #FCA5A5;
}

.muted, .meta {
  color: #9CA3AF;
  font-size: 13px;
}

.platform-menu {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.platform-menu-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.45);
  color: #F9FAFB;
  text-decoration: none;
}

.platform-menu-link:hover,
.platform-menu-link:focus {
  border-color: rgba(147, 197, 253, 0.55);
  background: rgba(30, 41, 59, 0.7);
  outline: none;
}

.menu-title {
  font-weight: 700;
}

.menu-meta {
  color: #9CA3AF;
  font-size: 13px;
}

/* Composer Form */
.composer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 24px;
}

.event-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.schema-details {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 14px 0;
}

.event-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.event-fields label {
  display: grid;
  gap: 7px;
  color: #D1D5DB;
  font-size: 13px;
  font-weight: 600;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.product-recon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.empty-state {
  color: #9CA3AF;
}

dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

dt {
  color: #9CA3AF;
  font-size: 12px;
}

dd {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.banner {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-left: 4px solid #EF4444;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: #FCA5A5;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Tasks Grid & Card */
.tasks, .pending {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #6B7280; /* default slate */
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* State Colors */
.card.state-submitted::before { background: #F59E0B; }
.card.state-running::before { background: #3B82F6; }
.card.state-completed::before { background: #10B981; }
.card.state-failed::before { background: #EF4444; }
.card.state-cancelled::before { background: #4B5563; }

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 8px;
}

.status-badge.submitted { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-badge.running { 
  background: rgba(59, 130, 246, 0.15); 
  color: #60A5FA; 
  border: 1px solid rgba(59, 130, 246, 0.3);
  animation: pulse-border 1.5s infinite;
}
.status-badge.completed { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-badge.failed { background: rgba(239, 68, 68, 0.15); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-badge.cancelled { background: rgba(75, 85, 99, 0.15); color: #9CA3AF; border: 1px solid rgba(75, 85, 99, 0.3); }

/* Confirmed Projection Pulse Animation */
.card.projected {
  animation: confirm-pulse 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Shimmering Loading State for Pending Card */
.card.pending-card {
  border-style: dashed;
  border-color: rgba(99, 102, 241, 0.4);
  color: #9CA3AF;
  background: linear-gradient(90deg, 
    rgba(16, 22, 37, 0.45) 0%, 
    rgba(99, 102, 241, 0.08) 50%, 
    rgba(16, 22, 37, 0.45) 100%);
  background-size: 200% 100%;
  animation: shimmer-bg 2s infinite linear;
}

.card.pending-card::before {
  background: linear-gradient(180deg, #6366F1, #3B82F6);
}

.title {
  font-weight: 700;
  font-size: 16px;
  color: #F9FAFB;
}

.payload-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 6px;
  word-break: break-all;
  color: #CBD5E1;
}

.error-text {
  color: #F87171;
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

/* Timeline/Command History */
.timeline {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline h2 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.timeline-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.timeline-item {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.timeline-item .time {
  color: #6B7280;
  font-family: 'JetBrains Mono', monospace;
  min-width: 70px;
}

.timeline-item .status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  min-width: 100px;
}

.timeline-item .status-indicator.accepted { color: #60A5FA; }
.timeline-item .status-indicator.projected { color: #34D399; }
.timeline-item .status-indicator.rejected { color: #F87171; }

.timeline-item .msg {
  color: #D1D5DB;
  flex: 1;
}

/* Spinner and Loaders */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99, 102, 241, 0.1);
  border-top-color: #6366F1;
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.loader-text {
  margin-top: 16px;
  color: #9CA3AF;
  font-weight: 500;
  font-size: 14px;
}

/* Animations */
@keyframes shimmer-bg {
  0% { background-position: 100% 0%; }
  100% { background-position: -100% 0%; }
}

@keyframes confirm-pulse {
  0% { 
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); 
    border-color: rgba(99, 102, 241, 0.8);
    transform: scale(1.01);
  }
  100% { 
    box-shadow: 0 0 0 16px rgba(99, 102, 241, 0); 
    border-color: rgba(255, 255, 255, 0.05);
    transform: scale(1);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(59, 130, 246, 0.3); }
  50% { border-color: rgba(59, 130, 246, 0.8); }
}

@media (max-width: 768px) {
  .auth-shell,
  .portal-shell,
  .workspace-grid,
  .workspace-hero,
  .workspace-form,
  .workspace-mini-form,
  .workspace-list-head,
  .workspace-row,
  .workspace-row-actions,
  .workspace-summary {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    padding: 20px 14px 32px;
  }

  .auth-hero {
    padding: 20px 8px 0;
  }

  .auth-hero h1 {
    font-size: 34px;
  }

  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .portal-topbar {
    position: static;
    padding: 22px 18px 16px;
    flex-direction: column;
  }

  .portal-content {
    padding: 18px;
  }

  .workspace-summary-metrics {
    grid-template-columns: 1fr;
  }

  .workspace-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-summary-copy h2 {
    font-size: 24px;
  }

  .workspace-summary-metrics div {
    min-width: 0;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .card {
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: flex-start;
  }
}

/* Tenant portal style-guide alignment. Keep this after legacy task-console styles. */
:root {
  color-scheme: light;
  --rl-surface: #f7f9fb;
  --rl-surface-lowest: #ffffff;
  --rl-surface-low: #f2f4f6;
  --rl-surface-container: #eceef0;
  --rl-text: #191c1e;
  --rl-text-muted: #434653;
  --rl-outline-soft: #c3c6d5;
  --rl-primary: #003c90;
  --rl-primary-soft: #d9e2ff;
  --rl-success: #137333;
  --rl-warning: #8a4b00;
  --rl-error: #ba1a1a;
  --rl-radius: 4px;
  --rl-radius-lg: 8px;
  background: var(--rl-surface);
  background-image: none;
  color: var(--rl-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  background: var(--rl-surface);
  color: var(--rl-text);
}

.auth-shell {
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.75fr);
  gap: 24px;
}

.auth-hero {
  color: var(--rl-text);
}

.auth-hero h1,
.portal-topbar h1,
h1 {
  background: none;
  color: var(--rl-text);
  -webkit-text-fill-color: initial;
  letter-spacing: 0;
}

.auth-hero h1 {
  max-width: 16ch;
  font-size: 44px;
  line-height: 52px;
}

.auth-hero p,
.workspace-summary-copy p,
.portal-subtitle,
.section-header p,
.muted,
.meta,
.workspace-note,
.workspace-empty {
  color: var(--rl-text-muted);
}

.auth-hero-metrics div,
.portal-token,
.portal-nav-link,
.workspace-alert,
.workspace-summary-metrics div,
.platform-menu-link,
.card {
  background: var(--rl-surface-lowest);
  border: 1px solid var(--rl-outline-soft);
  border-radius: var(--rl-radius-lg);
  box-shadow: none;
}

.auth-hero-metrics strong,
.portal-token strong,
.workspace-summary-metrics strong,
.title {
  color: var(--rl-text);
}

.auth-hero-metrics span,
.portal-token span,
.workspace-summary-metrics span,
.portal-brand-copy,
.portal-nav-meta,
.menu-meta {
  color: var(--rl-text-muted);
}

.auth-panel,
.panel,
.workspace-panel,
.workspace-summary,
.workspace-section {
  background: var(--rl-surface-lowest);
  border: 1px solid var(--rl-outline-soft);
  border-radius: var(--rl-radius-lg);
  box-shadow: 0 12px 30px rgba(25, 28, 30, 0.08);
}

.auth-panel-flagship {
  border-top: 4px solid var(--rl-primary);
}

.portal-sidebar,
.portal-topbar {
  background: var(--rl-surface-low);
  border-color: var(--rl-outline-soft);
  backdrop-filter: none;
}

.portal-brand strong,
.portal-nav-link,
.portal-nav-title,
.section-header h3,
.workspace-summary-copy h2 {
  color: var(--rl-text);
}

.portal-nav-link.active,
.portal-nav-link:hover,
.portal-nav-link:focus,
.platform-menu-link:hover,
.platform-menu-link:focus {
  background: var(--rl-primary-soft);
  border-color: var(--rl-primary);
  color: var(--rl-primary);
}

.portal-pill,
.portal-pill-soft,
.session-badge {
  background: var(--rl-primary-soft);
  border: 1px solid var(--rl-outline-soft);
  border-radius: 999px;
  color: var(--rl-primary);
}

input,
select,
textarea,
.auth-control,
.rl-control {
  background: var(--rl-surface-lowest);
  border: 1px solid var(--rl-outline-soft);
  border-radius: var(--rl-radius);
  color: var(--rl-text);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
.auth-control:focus,
.rl-control:focus {
  border-color: #93C5FD;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28), 0 0 0 4px rgba(8, 11, 17, 0.9);
  outline: none;
  background-color: rgba(17, 24, 39, 0.58);
  color: #F9FAFB;
  caret-color: #F9FAFB;
}

button {
  background: var(--rl-primary);
  border: 1px solid var(--rl-primary);
  border-radius: var(--rl-radius);
  box-shadow: none;
  color: #ffffff;
}

button:hover {
  filter: none;
  transform: none;
  box-shadow: none;
}

button.secondary {
  background: var(--rl-surface-lowest);
  border: 1px solid var(--rl-outline-soft);
  color: var(--rl-primary);
}

.auth-label,
.workspace-check,
.event-fields label {
  color: var(--rl-text);
}

.auth-actions a {
  color: var(--rl-primary);
}

.notice.error {
  background: #ffdad6;
  border-color: var(--rl-error);
  color: var(--rl-error);
}

.notice.success {
  background: #dcf8e7;
  border-color: var(--rl-success);
  color: var(--rl-success);
}

.workspace-policy-list {
  color: var(--rl-text);
}

.workspace-row {
  border-top: 1px solid var(--rl-outline-soft);
}

.eyebrow {
  color: var(--rl-primary);
  letter-spacing: 0;
}

@media (max-width: 768px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    border-bottom: 1px solid var(--rl-outline-soft);
  }
}
