:root {
  --navy-950: #061b36;
  --navy-900: #08264f;
  --navy-800: #0b3c75;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --slate-950: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --ims-accent: #3b82f6;
  --ims-accent-2: #2563eb;
  --ims-muted: #94a3b8;
  --ims-border: rgba(148, 163, 184, 0.22);
}

* {
  box-sizing: border-box;
}

.ims-auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--slate-950);
  background: #eef3f9;
}

.ims-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #1d4ed8 0%, #0b3c75 48%, #061b36 100%);
  color: #fff;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.ims-splash__inner {
  text-align: center;
}

.ims-splash__logo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.5);
}

.ims-splash__title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  margin: 0;
}

.ims-splash__sub {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.ims-splash__line {
  width: 220px;
  max-width: 70vw;
  height: 4px;
  margin: 22px auto 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.28);
}

.ims-splash__line span {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  animation: ims-progress 1.4s ease-in-out infinite;
}

.ims-splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.ims-splash-skip .ims-splash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes ims-progress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(330%); }
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(430px, 0.92fr);
  background: var(--white);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 34px 58px 30px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 72% 18%, rgba(59, 130, 246, 0.25), transparent 32%),
    radial-gradient(circle at 16% 78%, rgba(37, 99, 235, 0.18), transparent 30%),
    linear-gradient(145deg, #0a4382 0%, #082e60 44%, #061b36 100%);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -230px;
  bottom: -290px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.34), rgba(37, 99, 235, 0) 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 910px);
  display: flex;
  flex: 1;
  flex-direction: column;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 46px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.brand-title {
  font-size: 29px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(3, 29, 66, 0.45);
  border: 1px solid rgba(96, 165, 250, 0.52);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.65px;
  text-transform: uppercase;
}

.hero-title {
  margin: 24px 0 14px;
  max-width: 720px;
  font-size: clamp(40px, 4.5vw, 70px);
  line-height: 1.02;
  letter-spacing: -2.2px;
  font-weight: 800;
}

.hero-title .accent {
  display: block;
  color: #78b6ff;
}

.hero-description {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.65;
}

.feature-list {
  display: grid;
  gap: 16px;
  margin: 28px 0 30px;
  max-width: 760px;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: center;
}

.feature-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #b9d8ff;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.27), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(96, 165, 250, 0.45);
}

.feature-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 3px;
}

.feature-text {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.4;
}

.companies {
  margin-top: auto;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #cbdcf3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.65px;
  text-transform: uppercase;
}

.section-label::before,
.section-label::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.section-label::before {
  width: 28px;
}

.section-label::after {
  flex: 1;
  max-width: 88px;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
}

.company-card {
  min-height: 112px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
  background: rgba(4, 28, 60, 0.40);
}

.company-card.como {
  border-color: rgba(59, 130, 246, 0.62);
  background: linear-gradient(145deg, rgba(10, 65, 128, 0.62), rgba(7, 40, 83, 0.72));
}

.company-card.mar {
  border-color: rgba(190, 69, 96, 0.44);
  background: linear-gradient(145deg, rgba(109, 24, 45, 0.52), rgba(58, 16, 31, 0.62));
}

.company-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.company-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.20);
}

.company-card.mar .company-badge {
  background: linear-gradient(145deg, #8b1f3c, #5c1428);
}

.company-name {
  font-size: 17px;
  font-weight: 800;
}

.company-type {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.66);
}

.company-tagline {
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.hero-footer {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.auth-panel {
  position: relative;
  min-height: 100vh;
  padding: 26px 42px;
  background:
    radial-gradient(circle at 60% 30%, rgba(37, 99, 235, 0.07), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  display: flex;
  flex-direction: column;
}

.trust-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 650;
  min-height: 36px;
}

.trust-row .dot {
  color: var(--blue-600);
}

.auth-center {
  width: 100%;
  max-width: 540px;
  margin: auto;
}

.login-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 22px;
  padding: 38px 38px 34px;
  box-shadow:
    0 25px 60px rgba(15, 23, 42, 0.10),
    0 4px 16px rgba(15, 23, 42, 0.05);
}

.login-title {
  margin: 0;
  color: var(--slate-950);
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -1.2px;
  font-weight: 800;
}

.login-subtitle {
  margin: 9px 0 26px;
  color: var(--slate-500);
  font-size: 15px;
}

.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-800);
  font-size: 13px;
  font-weight: 700;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--slate-500);
  pointer-events: none;
}

.login-card .form-control {
  width: 100%;
  min-height: 54px;
  height: 54px;
  border: 1px solid var(--slate-300);
  border-radius: 12px;
  background: var(--white);
  color: var(--slate-950);
  outline: none;
  padding: 0 48px;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-card .form-control:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: var(--white);
  color: var(--slate-950);
}

.login-card .form-control::placeholder {
  color: var(--slate-400);
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--slate-500);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.password-toggle:hover {
  background: var(--slate-100);
  color: var(--blue-600);
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 8px 0 22px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue-600);
}

.validation-summary,
.validation-message,
.login-card .text-danger,
.login-card .validation-summary-errors {
  color: #b42318;
  font-size: 12px;
  margin-top: 6px;
}

.validation-summary ul {
  margin: 0 0 12px;
  padding-left: 18px;
}

.sign-in-btn {
  width: 100%;
  min-height: 55px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.sign-in-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.28);
  filter: brightness(1.03);
  color: var(--white);
}

.sign-in-btn:active {
  transform: translateY(0);
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--slate-500);
  font-size: 12px;
}

.ims-auth-simple {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.ims-auth-simple-card {
  width: min(480px, 100%);
  text-align: center;
  border-radius: 18px;
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--slate-200);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.ims-auth-simple-card p {
  color: var(--slate-500);
  margin-bottom: 0;
}

@media (max-width: 1180px) {
  .login-page {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .hero-panel {
    padding: 32px 36px 26px;
  }

  .hero-title {
    font-size: clamp(38px, 5vw, 56px);
  }

  .company-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

@media (max-width: 900px) {
  .login-page {
    display: block;
    min-height: 100vh;
    background: linear-gradient(160deg, #082f63 0%, #061b36 35%, #f8fafc 35%, #ffffff 100%);
  }

  .hero-panel {
    min-height: auto;
    padding: 28px 24px 44px;
  }

  .hero-panel .feature-list,
  .companies,
  .hero-footer {
    display: none;
  }

  .brand {
    margin-bottom: 30px;
  }

  .hero-title {
    margin-top: 18px;
    font-size: 42px;
  }

  .auth-panel {
    min-height: auto;
    padding: 0 18px 30px;
    margin-top: -20px;
    background: transparent;
  }

  .trust-row {
    display: none;
  }

  .auth-center {
    max-width: 590px;
    margin: 0 auto;
  }

  .login-card {
    padding: 30px 24px;
    border-radius: 20px;
  }
}

@media (max-width: 560px) {
  .hero-panel {
    padding: 22px 18px 38px;
  }

  .brand-title {
    font-size: 24px;
  }

  .hero-title {
    font-size: 34px;
    letter-spacing: -1.4px;
  }

  .hero-description {
    font-size: 14px;
  }

  .auth-panel {
    padding: 0 12px 22px;
  }

  .login-card {
    padding: 26px 18px 24px;
  }

  .login-title {
    font-size: 31px;
  }
}
