:root {
  --ink: #15202b;
  --muted: #697586;
  --line: #d9e2ec;
  --panel: #ffffff;
  --soft: #f4f7fb;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --blue: #1d4ed8;
  --brand-blue: #25388f;
  --brand-gold: #d6b629;
  --danger: #b42318;
  --success: #087443;
  --shadow: 0 24px 70px rgba(21, 32, 43, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--soft);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(460px, 1.08fr) minmax(380px, 0.92fr);
}

.brand-panel {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 54px;
  color: #ffffff;
}

.brand-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 31, 43, 0.88), rgba(6, 31, 43, 0.62) 45%, rgba(6, 31, 43, 0.3)),
    linear-gradient(0deg, rgba(6, 31, 43, 0.88), rgba(6, 31, 43, 0.1) 58%);
}

.brand-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  text-align: center;
}

.company-logo {
  display: block;
  width: min(360px, 78vw);
  max-height: 112px;
  object-fit: contain;
  margin: 0 auto 28px;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
}

.brand-content h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.brand-copy {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.login-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 249, 253, 0.97) 42%, rgba(239, 244, 251, 0.98) 100%);
}

.login-panel::before,
.login-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-panel::before {
  z-index: -2;
  background:
    linear-gradient(124deg, transparent 0 16%, rgba(214, 182, 41, 0.20) 16% 17.2%, transparent 17.2% 100%),
    linear-gradient(124deg, transparent 0 69%, rgba(37, 56, 143, 0.16) 69% 70.3%, transparent 70.3% 100%),
    linear-gradient(145deg, rgba(37, 56, 143, 0.08) 0%, transparent 34%),
    linear-gradient(25deg, rgba(214, 182, 41, 0.10) 0%, transparent 38%);
}

.login-panel::after {
  z-index: -1;
  left: auto;
  width: 58%;
  background:
    linear-gradient(145deg, rgba(37, 56, 143, 0.18), transparent 54%),
    linear-gradient(180deg, rgba(214, 182, 41, 0.16), transparent 44%);
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
}

.login-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: min(100%, 448px);
  padding: 34px;
  border: 1px solid rgba(37, 56, 143, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.92));
  box-shadow:
    0 28px 74px rgba(37, 56, 143, 0.16),
    0 18px 42px rgba(214, 182, 41, 0.10);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-blue));
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.mobile-brand img {
  width: 124px;
  height: auto;
  border-radius: 6px;
}

.mobile-brand strong {
  font-size: 16px;
}

.card-heading {
  margin-bottom: 28px;
}

.card-heading h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: 0;
}

form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus {
  border-color: rgba(37, 56, 143, 0.72);
  box-shadow: 0 0 0 4px rgba(37, 56, 143, 0.12);
}

.field.has-error input {
  border-color: rgba(180, 35, 24, 0.8);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.icon-button {
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  transition: background 160ms ease, color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--brand-blue);
  background: rgba(37, 56, 143, 0.09);
  outline: none;
}

svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand-blue);
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--brand-blue);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.link-button:hover,
.link-button:focus-visible {
  color: #172765;
  text-decoration: underline;
  outline: none;
}

.message {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.primary-button {
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-blue), var(--blue));
  box-shadow:
    0 18px 34px rgba(37, 56, 143, 0.26),
    inset 0 -2px 0 rgba(214, 182, 41, 0.82);
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    0 22px 38px rgba(37, 56, 143, 0.30),
    inset 0 -2px 0 rgba(214, 182, 41, 0.9);
  outline: none;
}

.primary-button:disabled {
  cursor: wait;
  filter: saturate(0.8);
  opacity: 0.82;
  transform: none;
}

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
    background: url("assets/login-warehouse.png") center / cover no-repeat;
  }

  .brand-panel {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 24px;
    background: rgba(244, 247, 251, 0.84);
    backdrop-filter: blur(8px);
  }

  .login-card {
    padding: 26px;
  }

  .mobile-brand {
    display: flex;
  }
}

@media (max-width: 520px) {
  .login-panel {
    padding: 16px;
  }

  .login-card {
    padding: 22px;
  }

  .card-heading h2 {
    font-size: 27px;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }
}
