@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --cp-brand: #1554f6; /* Kandari Royal Blue */
  --cp-brand-dark: #0c3bbd;
  --cp-accent: #f37021; /* Accent Orange */
  --cp-accent-hover: #e05e10;
  --cp-teal: #00c2a8;
  --cp-navy: #090f1d;
  --cp-navy-card: #0f172a;
  --cp-navy-input: #1e293b;
  --cp-ink: #0f172a;
  --cp-muted: #94a3b8;
  --cp-line: rgba(255, 255, 255, 0.1);
  --cp-soft: #f8fafc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }

body {
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
  color: #f8fafc;
  background: #090f1d;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

a { color: inherit; text-decoration: none; }

.login-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

/* Brand side */
.login-brand {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(21, 84, 246, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(243, 112, 33, 0.3), transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 194, 168, 0.15), transparent 60%),
    linear-gradient(145deg, #050b14 0%, #0b1528 45%, #00224f 100%);
}

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

.brand-top, .brand-mid, .brand-bottom { position: relative; z-index: 1; }

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-mark {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--cp-brand), var(--cp-teal));
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 10px 25px rgba(21, 84, 246, 0.45);
}

.brand-logo img {
  height: 48px;
  width: auto;
  background: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
}

.brand-logo span {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .9;
  font-weight: 700;
  color: #f8fafc;
}

.brand-mid h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.12;
  max-width: 14ch;
  margin: 0 0 18px;
}

.brand-mid h1 em {
  font-style: italic;
  color: #93c5fd;
}

.brand-mid p {
  max-width: 42ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(255,255,255,.78);
}

.brand-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.brand-stats div strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.brand-stats div span {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.brand-bottom {
  font-size: 12.5px;
  color: rgba(255,255,255,.5);
}

/* Form side */
.login-panel {
  background: var(--cp-navy-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 36px;
  border-left: 1px solid rgba(255,255,255,0.08);
}

.login-card {
  width: 100%;
  max-width: 420px;
  animation: rise .45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.login-card .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cp-accent);
  margin-bottom: 12px;
}

.login-card .eyebrow i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(243, 112, 33, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.login-card h2 {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: #f8fafc;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-card .sub {
  color: var(--cp-muted);
  font-size: 14.5px;
  margin-bottom: 28px;
  line-height: 1.5;
}

.alert-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 22px;
  font-size: 13.5px;
  line-height: 1.45;
}

.alert-success {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 22px;
  font-size: 13.5px;
  line-height: 1.45;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > i.leading {
  position: absolute;
  left: 16px;
  color: #64748b;
  font-size: 15px;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 44px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 11px;
  background: var(--cp-navy-input);
  color: #f8fafc;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: all .2s;
}

.input-wrap input:focus {
  background: #243047;
  border-color: var(--cp-brand);
  box-shadow: 0 0 0 4px rgba(21, 84, 246, 0.25);
}

.input-wrap .toggle-pass {
  position: absolute;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.input-wrap .toggle-pass:hover { color: #f8fafc; }

.form-links {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 16px;
}

.form-links a {
  font-size: 13px;
  font-weight: 500;
  color: #93c5fd;
  transition: color 0.2s;
}

.form-links a:hover { color: #ffffff; text-decoration: underline; }

.captcha-box {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 10px;
  align-items: center;
}

.captcha-box img {
  width: 130px;
  height: 48px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #020617;
  object-fit: cover;
}

.captcha-box .input-wrap input { padding-left: 14px; padding-right: 14px; }

.captcha-refresh {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 11px;
  background: var(--cp-navy-input);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}

.captcha-refresh:hover {
  background: #243047;
  border-color: var(--cp-brand);
  color: #f8fafc;
}

.btn-login {
  width: 100%;
  height: 50px;
  margin-top: 10px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(105deg, var(--cp-accent) 0%, var(--cp-brand) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(21, 84, 246, 0.35);
  transition: transform .2s, filter .2s, box-shadow .2s;
}

.btn-login:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(21, 84, 246, 0.45);
}

.login-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--cp-muted);
}

.login-foot a {
  color: #93c5fd;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-foot a:hover { color: #ffffff; }

@media (max-width: 920px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: auto; padding: 36px 28px; }
  .login-panel { padding: 40px 24px; border-left: none; }
}
