/* ==========================================================================
   RC Network / RCLicense — Enterprise Auth Portal Design System
   Shared by /login and /register (supports dynamic --brand-primary override)
   ========================================================================== */

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

:root {
  --brand-primary: #006852;
  --brand-primary-hover: #005240;
  --brand-accent: #10b981;
  --brand-mint: #34d399;
  --brand-surface-tint: #ecfdf5;
  --obsidian-950: #030e0b;
  --obsidian-900: #061b15;
  --obsidian-800: #0a2920;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --line-200: #e2e8f0;
  --line-300: #cbd5e1;
  --surface-0: #ffffff;
  --surface-50: #f8fafc;
  --surface-100: #f1f5f9;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 16px;
}

html, body {
  min-height: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink-700);
  background: var(--surface-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, button, select, textarea {
  font-family: inherit;
}

/* Full-Viewport Asymmetric Split Layout */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 46%) 1fr;
  width: 100%;
}

/* ==========================================================================
   LEFT PANE: Authentication Workspace
   ========================================================================== */
.auth-workspace {
  background: var(--surface-0);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 44px 26px;
  position: relative;
  z-index: 2;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.auth-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink-900);
}

.auth-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #05382c 100%);
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.03em;
  box-shadow: 0 4px 12px rgba(0, 104, 82, 0.25);
  flex-shrink: 0;
}

.auth-brand-logo-img {
  max-height: 36px;
  max-width: 155px;
  width: auto;
  object-fit: contain;
  display: block;
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
}

.auth-brand-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.auth-brand-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-500);
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-500);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-200);
  background: var(--surface-50);
  transition: all 0.16s ease;
}

.auth-back-link:hover {
  color: var(--ink-900);
  border-color: var(--line-300);
  background: var(--surface-100);
}

.auth-form-container {
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 8px 0 16px;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-primary);
  background: var(--brand-surface-tint);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.auth-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 8px;
}

.auth-subheading {
  font-size: 13.5px;
  color: var(--ink-500);
  line-height: 1.55;
  margin-bottom: 22px;
}

/* Segmented Mode Switcher */
.auth-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--surface-100);
  border: 1px solid var(--line-200);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.auth-seg-btn {
  border: none;
  background: transparent;
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.16s ease;
}

.auth-seg-btn:hover {
  color: var(--ink-900);
}

.auth-seg-btn.active {
  background: var(--surface-0);
  color: var(--ink-900);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.auth-seg-btn.active i {
  color: var(--brand-primary);
}

/* Alerts & Lockdown Banner */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  margin-bottom: 18px;
}

.auth-alert-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.auth-alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.auth-alert-lockdown {
  background: #450a0a;
  border: 1px solid #ef4444;
  color: #fef2f2;
}

.countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(252, 165, 165, 0.4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

/* Form Controls */
.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-field {
  margin-bottom: 15px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.auth-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-900);
}

.auth-label-opt {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-400);
}

.auth-link-sm {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
}

.auth-link-sm:hover {
  text-decoration: underline;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface-50);
  border: 1.5px solid var(--line-200);
  border-radius: var(--radius-md);
  padding: 0 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.auth-input-wrap:hover {
  border-color: var(--line-300);
}

.auth-input-wrap:focus-within {
  background: var(--surface-0);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3.5px rgba(0, 104, 82, 0.12);
}

.auth-input-icon {
  color: var(--ink-400);
  font-size: 14px;
  width: 18px;
  margin-right: 10px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.16s ease;
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--brand-primary);
}

.auth-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
  outline: none;
}

.auth-input::placeholder {
  color: var(--ink-400);
}

.auth-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-input-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.auth-eye-btn {
  border: none;
  background: transparent;
  color: var(--ink-400);
  cursor: pointer;
  padding: 6px;
  margin-right: -4px;
  font-size: 14px;
  transition: color 0.15s ease;
}

.auth-eye-btn:hover {
  color: var(--ink-900);
}

/* Password Strength Meter */
.pw-strength-wrap {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pw-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  flex: 1;
}

.pw-bar {
  height: 4px;
  border-radius: 99px;
  background: var(--line-200);
  transition: background 0.2s ease;
}

.pw-strength-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-500);
  min-width: 48px;
  text-align: right;
}

/* Captcha Card */
.auth-captcha-card {
  background: var(--surface-50);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.auth-captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.auth-captcha-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-captcha-title i {
  color: var(--brand-primary);
}

.auth-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.auth-captcha-svg {
  background: #ffffff;
  border: 1px solid var(--line-200);
  border-radius: 8px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  flex: 1;
}

.auth-captcha-refresh {
  border: 1px solid var(--line-300);
  background: #ffffff;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.auth-captcha-refresh:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Primary Submit Button */
.auth-submit-btn {
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-primary) 0%, #008266 100%);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 6px 18px rgba(0, 104, 82, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  margin-top: 4px;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 104, 82, 0.32);
  filter: brightness(1.04);
}

.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-switch-prompt {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-500);
}

.auth-switch-prompt a {
  color: var(--brand-primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch-prompt a:hover {
  text-decoration: underline;
}

.auth-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line-200);
  font-size: 11.5px;
  color: var(--ink-500);
}

.auth-bottombar-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-bottombar-links a {
  color: var(--ink-500);
  text-decoration: none;
  font-weight: 600;
}

.auth-bottombar-links a:hover {
  color: var(--ink-900);
}

/* ==========================================================================
   RIGHT PANE: Obsidian Infrastructure Showcase
   ========================================================================== */
.auth-showcase {
  background: radial-gradient(circle at 85% 12%, rgba(16, 185, 129, 0.18) 0%, transparent 48%),
              radial-gradient(circle at 12% 88%, rgba(0, 104, 82, 0.24) 0%, transparent 45%),
              linear-gradient(160deg, #061b15 0%, #04120e 55%, #020a08 100%);
  color: #f8fafc;
  padding: 36px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.showcase-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: auto 0;
}

.showcase-telemetry-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #94a3b8;
}

.status-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34d399;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #34d399;
  animation: auth-pulse 2.2s infinite ease-in-out;
}

@keyframes auth-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.showcase-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.showcase-title span {
  color: #34d399;
}

.showcase-lead {
  font-size: 14.5px;
  color: #cbd5e1;
  line-height: 1.65;
  margin-bottom: 26px;
  max-width: 540px;
}

/* Signature Terminal Provisioning Card */
.terminal-card {
  background: rgba(2, 12, 9, 0.82);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
}

.terminal-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #10b981; }

.terminal-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #64748b;
}

.terminal-body {
  padding: 16px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.75;
  color: #e2e8f0;
}

.t-cmd { color: #34d399; }
.t-dim { color: #64748b; }
.t-ok  { color: #10b981; font-weight: 700; }
.t-val { color: #fde68a; }

/* Bento Metric Strip */
.showcase-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.showcase-metric-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 14px 15px;
}

.showcase-metric-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.showcase-metric-lbl {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 3px;
}

/* Onboarding Steps Card (for Register Showcase) */
.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.onboarding-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.step-num-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #34d399;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 3px;
}

.step-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

/* Ecosystem Pills Footer */
.showcase-ecosystem {
  position: relative;
  z-index: 1;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ecosystem-caption {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  margin-bottom: 10px;
}

.ecosystem-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.eco-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 11px;
  border-radius: 999px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-workspace {
    padding: 24px 24px 28px;
  }
  .auth-showcase {
    padding: 32px 24px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .showcase-inner {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .auth-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .showcase-metrics {
    grid-template-columns: 1fr;
  }
  .auth-heading {
    font-size: 24px;
  }
  .auth-input {
    font-size: 16px; /* Prevents iOS zoom */
  }
}
