/* Sign-in screens (login and OTP), same look as the ICS v3 login. */
:root {
  --ics-navy: #14284d;
  --ics-navy-dark: #0d1d3a;
  --ics-navy-soft: rgba(20, 40, 77, 0.08);
  --ics-gold: #c99a3c;
  --ics-gold-soft: rgba(201, 154, 60, 0.14);
  --ics-bg: #f5f7fa;
  --ics-text: #1d2939;
  --ics-muted: #667085;
  --ics-border: #e4e8ef;
  --ics-field: #d7dde7;
  --ics-danger: #b42318;
  --ics-danger-bg: #fef3f2;
  --ics-danger-border: #fecdca;
  --ics-success: #067647;
  --ics-success-bg: #ecfdf3;
  --ics-success-border: #abefc6;
}

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

html, body { min-height: 100%; margin: 0; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--ics-bg);
  color: var(--ics-text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ics-navy); }

/* ---------- Page ---------- */
.login-page {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 56px 24px 72px;
  background:
    radial-gradient(circle at 85% 20%, rgba(201, 154, 60, 0.13), transparent 30%),
    radial-gradient(circle at 5% 90%, rgba(20, 40, 77, 0.06), transparent 35%),
    linear-gradient(135deg, #f8fafc 0%, #f3f6fa 55%, #eef2f7 100%);
}

.login-container {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
  gap: 70px;
  align-items: center;
}

/* ---------- Intro (left) ---------- */
.intro { max-width: 650px; }

.ics-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--ics-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ics-eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--ics-gold);
}

.intro h1 {
  margin: 0 0 20px;
  color: var(--ics-navy);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.intro h1 span { color: var(--ics-gold); }

.intro > p {
  max-width: 590px;
  margin: 0;
  color: var(--ics-muted);
  font-size: 17px;
  line-height: 1.8;
}

.points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 38px;
}

.point {
  padding: 18px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--ics-navy-soft);
  border-radius: 12px;
}

.point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--ics-gold-soft);
  color: var(--ics-gold);
}

.point-icon svg { width: 20px; height: 20px; }

.point strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ics-navy);
  font-size: 13px;
}

.point span {
  display: block;
  color: #7c8798;
  font-size: 12px;
  line-height: 1.55;
}

/* ---------- Card (right) ---------- */
.card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ics-border);
  border-radius: 18px;
  box-shadow:
    0 30px 70px rgba(20, 40, 77, 0.12),
    0 4px 16px rgba(20, 40, 77, 0.04);
}

.card::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--ics-navy), var(--ics-gold));
}

.card-inner { padding: 40px 40px 34px; }

.card-logo {
  display: block;
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 8px 22px rgba(13, 29, 58, 0.25);
}

.card-head {
  margin-bottom: 26px;
  text-align: center;
}

.card-head .version {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--ics-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-head h2 {
  margin: 0;
  color: var(--ics-navy);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
}

.card-head p {
  margin: 9px 0 0;
  color: var(--ics-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* Alerts */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-error {
  background: var(--ics-danger-bg);
  border-color: var(--ics-danger-border);
  color: var(--ics-danger);
}

.alert-success {
  background: var(--ics-success-bg);
  border-color: var(--ics-success-border);
  color: var(--ics-success);
}

/* Form */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 12.5px;
  font-weight: 700;
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #98a2b3;
  pointer-events: none;
}

.input-wrap input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 15px 12px 44px;
  border: 1px solid var(--ics-field);
  border-radius: 10px;
  background: #fff;
  color: var(--ics-text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-wrap input::placeholder { color: #a1a9b7; }

.input-wrap input:focus {
  outline: none;
  border-color: var(--ics-navy);
  box-shadow: 0 0 0 3px rgba(20, 40, 77, 0.1);
}

.input-wrap input:focus + .input-icon,
.input-wrap:focus-within .input-icon { color: var(--ics-navy); }

.input-wrap.has-toggle input { padding-right: 50px; }

.toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8993a3;
  cursor: pointer;
}

.toggle-password:hover { color: var(--ics-navy); background: var(--ics-navy-soft); }

.toggle-password:focus-visible {
  outline: 2px solid var(--ics-navy);
  outline-offset: 1px;
}

.toggle-password svg { width: 19px; height: 19px; }
.toggle-password .icon-hide { display: none; }
.toggle-password[aria-pressed="true"] .icon-show { display: none; }
.toggle-password[aria-pressed="true"] .icon-hide { display: block; }

.forgot {
  margin: -6px 0 18px;
  text-align: right;
}

.forgot a,
.card-links a {
  color: var(--ics-navy);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.forgot a:hover,
.card-links a:hover { color: var(--ics-gold); }

.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--ics-navy);
  color: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.submit svg { width: 18px; height: 18px; }

.submit:hover {
  background: var(--ics-navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(20, 40, 77, 0.2);
}

.submit:focus-visible {
  outline: 3px solid var(--ics-gold);
  outline-offset: 2px;
}

.submit[disabled] {
  cursor: wait;
  opacity: 0.85;
  transform: none;
  box-shadow: none;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.submit.is-loading .spinner { display: inline-block; }
.submit.is-loading .submit-arrow { display: none; }

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

.otp-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--ics-muted);
  font-size: 12px;
}

.otp-note svg { width: 15px; height: 15px; color: var(--ics-gold); flex-shrink: 0; }

.card-help {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #edf0f4;
  color: #8a94a4;
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 20px 24px;
  background: var(--ics-navy-dark);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.site-footer strong { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .login-page { padding: 44px 24px 56px; }

  .login-container {
    grid-template-columns: 1fr;
    max-width: 560px;
    gap: 36px;
  }

  .intro { margin: 0 auto; text-align: center; }
  .ics-eyebrow { justify-content: center; }
  .intro > p { margin-left: auto; margin-right: auto; }
  .points { text-align: left; }

  /* Put the sign-in card first on tablets and phones */
  .card { order: -1; }
}

@media (max-width: 600px) {
  .login-page { padding: 24px 16px 40px; }
  .intro h1 { font-size: 34px; }
  .intro > p { font-size: 15.5px; }
  .points { grid-template-columns: 1fr; gap: 12px; }
  .card-inner { padding: 30px 22px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0s !important; }
}

/* ---------- OTP page ---------- */
.login-container.single {
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
}

.otp-input {
  letter-spacing: 0.5em;
  font-size: 20px !important;
  font-weight: 700;
  text-align: center;
  padding-left: 15px !important;
}

.card-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ics-navy);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.link-button:hover { color: var(--ics-gold); }
