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

:root {
  --navy:        #1a3c6e;
  --navy-dark:   #122d54;
  --navy-mid:    #1e4580;
  --blue:        #3b6fd4;
  --blue-light:  #2a5298;
  --accent:      #f5a623;
  --white:       #ffffff;
  --bg:          #f0f2f5;
  --surface:     #ffffff;
  --border:      #e2e6ea;
  --border-focus:#3b6fd4;
  --text-1:      #1a2332;
  --text-2:      #5a6474;
  --text-3:      #8a94a0;
  --success-bg:  #e6f4ea;
  --success-text:#1e7e34;
  --success-bdr: #a8d5b0;
  --error-bg:    #fef2f2;
  --error-text:  #dc2626;
  --error-bdr:   #fca5a5;
  --transition:  150ms ease;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────────── */
.page {
  display: flex;
  min-height: 100vh;
}

/* ── Left Panel ──────────────────────────────── */
.left {
  width: 420px;
  flex-shrink: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  padding: 52px 48px;
  position: relative;
  overflow: hidden;
}

/* Decorative orbs */
.left::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(59,111,212,0.16);
  pointer-events: none;
}
.left::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -50px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.orb-mid {
  position: absolute;
  bottom: 180px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(59,111,212,0.10);
  pointer-events: none;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  z-index: 1;
  margin-bottom: auto;
}
.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

/* Hero copy */
.hero {
  position: relative;
  z-index: 1;
  margin-bottom: 40px;
}
.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 16px;
  height: 1px;
  background: rgba(59,111,212,0.8);
}
.hero h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  letter-spacing: -0.6px;
  margin-bottom: 14px;
}
.hero p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 300px;
  font-weight: 300;
}

/* Module list */
.modules {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}
.module-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition);
}
.module-item:last-child { border-bottom: none; }
.module-item:hover { background: rgba(255,255,255,0.04); }
.module-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}
.module-name {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.2px;
}
.module-status {
  margin-left: auto;
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  color: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  gap: 5px;
}
.module-status::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(30,126,52,0.9);
  box-shadow: 0 0 4px rgba(30,200,70,0.5);
}

/* ── Right Panel ─────────────────────────────── */
.right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 40px;
  background: var(--white);
  position: relative;
}

.right-inner {
  width: 100%;
  max-width: 380px;
}

/* Form header */
.form-header {
  margin-bottom: 36px;
}
.form-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.5px;
  margin-bottom: 5px;
}
.form-header p {
  font-size: 13.5px;
  color: var(--text-2);
}

/* Alert banner */
.alert {
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  display: none;
}
.alert.show { display: flex; }
.alert-error {
  background: var(--error-bg);
  border: 1px solid var(--error-bdr);
  color: var(--error-text);
}
.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-bdr);
  color: var(--success-text);
}
.alert-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* Fields */
.field {
  margin-bottom: 18px;
}
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.field-label label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.field-label .field-hint {
  font-size: 12px;
  color: var(--blue);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition);
}
.field-label .field-hint:hover { color: var(--navy); }

.input-wrap {
  position: relative;
}
.input-wrap input {
  width: 100%;
  height: 43px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 14px 0 40px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-1);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.input-wrap input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59,111,212,0.11);
}
.input-wrap input::placeholder { color: var(--text-3); }
.input-wrap input.error {
  border-color: var(--error-text);
}
.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.input-toggle:hover { color: var(--text-1); }
.field-error {
  font-size: 12px;
  color: var(--error-text);
  margin-top: 5px;
  display: none;
}
.field-error.show { display: block; }

/* Row */
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--navy);
  cursor: pointer;
}

/* Sign in button */
.btn-primary {
  width: 100%;
  height: 44px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background var(--transition), transform 80ms;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover { background: var(--navy-dark); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.btn-primary .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-primary.loading .btn-text { display: none; }
.btn-primary.loading .spinner { display: block; }

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

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider-text {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.5px;
}

/* SSO button */
.btn-sso {
  width: 100%;
  height: 43px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-1);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background var(--transition), border-color var(--transition);
}
.btn-sso:hover {
  background: #f7f9fc;
  border-color: #c4cdd6;
}

/* Footer */
.form-footer {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.form-footer-text {
  font-size: 12px;
  color: var(--text-3);
}
.form-footer-text a {
  color: var(--blue);
  text-decoration: none;
}
.form-footer-text a:hover { color: var(--navy); text-decoration: underline; }

.copyright {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .page { flex-direction: column; }
  .left {
    width: 100%;
    padding: 36px 32px;
    min-height: auto;
  }
  .logo { margin-bottom: 32px; }
  .hero { margin-bottom: 28px; }
  .hero h2 { font-size: 22px; }
  .modules { display: none; }
  .right { padding: 48px 28px 60px; }
  .orb-mid, .left::before, .left::after { display: none; }
}
