:root {
  --ifmt-green: #048c66;
  --ifmt-green-dark: #062e41;
  --ifmt-green-deep: #043a34;
  --ifmt-green-soft: #e8f5f1;
  --ifmt-red: #e3342f;
  --ink: #172c35;
  --muted: #6a7a82;
  --line: #dce5e7;
  --surface: #f7faf9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-shell { display: grid; grid-template-columns: minmax(440px, 44%) 1fr; }

.brand-panel {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(3rem, 6vw, 5.5rem);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(6,46,65,.98), rgba(4,140,102,.93)),
    radial-gradient(circle at 20% 20%, #068b64, #062e41 64%);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .11;
  background-image: linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom right, #000, transparent 75%);
}

.brand-orb { position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.brand-orb-one { width: 450px; height: 450px; right: -190px; top: -140px; }
.brand-orb-two { width: 300px; height: 300px; left: -170px; bottom: -120px; }

.brand-content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; width: 100%; }

.ifmt-brand { display: inline-flex; align-items: center; gap: 1rem; width: fit-content; color: var(--ink); text-decoration: none; }
.ifmt-brand-light { color: #fff; }
.ifmt-symbol { display: grid; grid-template-columns: repeat(3, 10px); gap: 4px; flex: 0 0 auto; }
.ifmt-symbol .dot { width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.ifmt-symbol .red { background: var(--ifmt-red); border-radius: 50%; }
.ifmt-wordmark { display: grid; line-height: 1; }
.ifmt-wordmark strong { font-size: 1.8rem; letter-spacing: -.04em; }
.ifmt-wordmark small { margin-top: .3rem; font-size: .65rem; line-height: 1.15; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }

.brand-copy { max-width: 650px; margin: auto 0; padding: 4rem 0; }
.eyebrow { display: inline-block; margin-bottom: .85rem; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.brand-copy .eyebrow { color: #9ce0ca; }
.brand-copy h1 { margin: 0; font-size: clamp(2.15rem, 3.25vw, 3.7rem); line-height: 1.04; letter-spacing: -.045em; }
.brand-copy p { max-width: 520px; margin: 1.65rem 0 0; color: rgba(255,255,255,.76); font-size: 1.05rem; line-height: 1.7; }

.security-note { display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.72); font-size: .86rem; }
.security-icon { display: grid; place-items: center; width: 25px; height: 25px; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; }

.form-panel { min-height: 100vh; padding: clamp(2rem, 5vw, 5rem); background: #fff; }
.form-wrap { max-width: 500px; }
.form-heading { margin-bottom: 2.5rem; }
.text-brand { color: var(--ifmt-green); }
.form-heading h2, .modal-title { margin: 0; color: var(--ifmt-green-dark); font-size: clamp(2rem, 3vw, 2.7rem); font-weight: 750; letter-spacing: -.045em; }
.form-heading p, .modal-description { margin: .8rem 0 0; color: var(--muted); line-height: 1.6; }

.form-label { margin-bottom: .55rem; color: #29434d; font-size: .9rem; font-weight: 700; }
.input-group-text { width: 52px; justify-content: center; color: #789096; background: #fff; border-right: 0; }
.input-group .form-control { border-left: 0; }
.input-group .form-control:focus { border-color: var(--ifmt-green); box-shadow: none; }
.input-group:focus-within .input-group-text { color: var(--ifmt-green); border-color: var(--ifmt-green); }
.form-control, .form-select, .input-group-text { min-height: 58px; border-color: var(--line); border-radius: 12px; font-size: 1rem; }
.form-select { color: #40555d; background-color: #fff; }
.form-select:focus { border-color: var(--ifmt-green); box-shadow: 0 0 0 .2rem rgba(4,140,102,.12); }
.form-control::placeholder { color: #9caaaf; }
.password-toggle { min-width: 52px; color: #789096; background: #fff; border: 1px solid var(--line); border-left: 0; border-radius: 0 12px 12px 0; }
.password-toggle:hover, .password-toggle:focus { color: var(--ifmt-green); background: #fff; border-color: var(--ifmt-green); }
.input-group:has(.password-toggle) .form-control { border-radius: 0; }

.forgot-link { padding: .75rem 0 0; color: var(--ifmt-green); background: transparent; border: 0; font-size: .9rem; font-weight: 750; }
.forgot-link:hover { color: var(--ifmt-green-deep); text-decoration: underline; }

.btn-brand { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 58px; color: #fff; background: var(--ifmt-green); border-color: var(--ifmt-green); border-radius: 12px; font-size: .98rem; font-weight: 750; box-shadow: 0 12px 28px rgba(4,140,102,.2); }
.btn-brand:hover, .btn-brand:focus { color: #fff; background: #067b5b; border-color: #067b5b; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(4,140,102,.28); }
.btn-outline-brand { min-height: 48px; color: var(--ifmt-green); border: 1px solid var(--ifmt-green); border-radius: 10px; font-weight: 700; }
.btn-outline-brand:hover { color: #fff; background: var(--ifmt-green); }

.alert-success { color: #075b46; background: var(--ifmt-green-soft); border-color: #bee3d7; border-radius: 12px; font-size: .9rem; }

.modal-content { border: 0; border-radius: 20px; box-shadow: 0 24px 80px rgba(6,46,65,.2); }
.modal-header { padding: 2rem 2rem 1rem; }
.modal-body { padding: 0 2rem 2rem; }
.modal-title { font-size: 2rem; }
.recovery-success { text-align: center; padding-top: .5rem; }
.recovery-success > span { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 1.25rem; color: #fff; background: var(--ifmt-green); border-radius: 50%; font-size: 1.5rem; }
.recovery-success h3 { color: var(--ifmt-green-dark); font-size: 1.4rem; }
.recovery-success p { margin: .75rem auto 1.5rem; color: var(--muted); line-height: 1.6; }

.welcome-page {
  min-height: 100vh;
  background:
    linear-gradient(145deg, rgba(6,46,65,.98), rgba(4,140,102,.92)),
    #062e41;
}

.welcome-shell { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.welcome-card { width: min(100%, 560px); padding: clamp(2rem, 6vw, 4rem); background: #fff; border-radius: 24px; box-shadow: 0 28px 90px rgba(0,0,0,.24); }
.welcome-check { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 1.6rem; color: #fff; background: var(--ifmt-green); border-radius: 50%; font-size: 2rem; box-shadow: 0 12px 28px rgba(4,140,102,.25); }
.welcome-card h1 { margin: 0; color: var(--ifmt-green-dark); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 760; letter-spacing: -.05em; }
.welcome-card p { margin: 1rem 0 2rem; color: var(--muted); font-size: 1.04rem; }

@media (max-width: 991.98px) {
  .login-shell { display: block; }
  .form-panel { padding: 2.25rem 1.25rem; background: linear-gradient(180deg, var(--ifmt-green-soft), #fff 28%); }
  .form-wrap { max-width: 480px; }
  .mobile-brand { padding-bottom: 1.5rem; border-bottom: 1px solid rgba(4,140,102,.16); }
}

@media (max-width: 575.98px) {
  .form-panel { align-items: flex-start !important; }
  .form-heading { margin-bottom: 2rem; }
  .modal-header { padding: 1.5rem 1.25rem .75rem; }
  .modal-body { padding: 0 1.25rem 1.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .brand-content, .form-wrap { animation: rise-in .65s ease-out both; }
  .form-wrap { animation-delay: .08s; }
  .btn { transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
  @keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
}
