:root {
  --bg:#10141A;
  --surface:#181F27;
  --surface-2:#1F2830;
  --surface-3:#242E38;
  --border:#2B3642;
  --border-soft:#232C36;
  --text:#EBF0F4;
  --text-muted:#8A97A3;
  --text-faint:#5C6A76;
  --marc:#DC9448;
  --marc-soft:#3A2A18;
  --refrig:#3FBFD6;
  --refrig-soft:#123138;
  --atraso:#E5586C;
  --atraso-soft:#3A1E22;
  --antecip:#4FC088;
  --antecip-soft:#173327;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-lg: 0 24px 60px -16px rgba(0,0,0,0.55);
  --shadow-md: 0 14px 32px -14px rgba(0,0,0,0.5);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 32px 20px;
}

.login-page::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1080px, 100%);
  min-height: 600px;
  grid-template-columns: 1.12fr 0.88fr;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px;
  overflow: hidden;
  background: var(--surface-2);
  border-right: 1px solid var(--border-soft);
  color: var(--text);
}

.login-brand-panel::after {
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  border: 1px solid var(--border);
  border-radius: 50%;
  content: "";
}

.login-logo {
  position: relative;
  z-index: 1;
  width: min(240px, 74%);
  height: auto;
}

.login-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin-top: 32px;
}

.login-brand-copy small {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--marc);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-brand-copy h1 {
  margin: 0;
  font-family: 'Barlow Condensed', Inter, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  line-height: 1.02;
  color: var(--text);
}

.login-brand-copy h1 span {
  color: var(--refrig);
}

.login-brand-copy p {
  max-width: 420px;
  margin: 22px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.login-security {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.84rem;
}

.login-security-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--antecip);
  box-shadow: 0 0 0 5px var(--antecip-soft);
}

.login-form-panel {
  display: flex;
  align-items: center;
  padding: 54px;
  background: var(--surface);
}

.login-form-wrapper {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
}

.login-form-header {
  margin-bottom: 30px;
}

.login-form-header .eyebrow {
  margin: 0 0 10px;
  color: var(--marc);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-form-header h2 {
  margin: 0;
  font-family: 'Barlow Condensed', Inter, sans-serif;
  text-transform: uppercase;
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.login-form-header p {
  margin: 12px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 20px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--surface-2);
  padding: 0 15px;
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-field input::placeholder {
  color: var(--text-faint);
}

.form-field input:focus {
  border-color: var(--marc);
  box-shadow: 0 0 0 4px rgba(220, 148, 72, 0.15);
}

.password-field {
  position: relative;
}

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

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: var(--surface-3);
  color: var(--text);
}

.login-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--marc);
  box-shadow: var(--shadow-md);
  color: #1a1206;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.auth-message {
  margin: 0;
  border-radius: var(--radius-md);
  padding: 13px 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-message-error {
  border: 1px solid var(--atraso);
  background: var(--atraso-soft);
  color: var(--atraso);
}

.auth-message-success {
  border: 1px solid var(--antecip);
  background: var(--antecip-soft);
  color: var(--antecip);
}

.login-help {
  margin: 22px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.login-help strong {
  color: var(--text);
}

.login-footer {
  margin-top: 30px;
  border-top: 1px solid var(--border-soft);
  padding-top: 20px;
  color: var(--text-faint);
  font-size: 0.75rem;
  text-align: center;
}

@media (max-width: 860px) {
  .login-page {
    padding: 20px 14px;
  }

  .login-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: 220px;
    padding: 32px;
  }

  .login-brand-copy p {
    display: none;
  }

  .login-security {
    margin-top: 36px;
  }

  .login-form-panel {
    padding: 38px 28px;
  }
}

@media (max-width: 520px) {
  .login-page {
    display: block;
    padding: 0;
  }

  .login-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-brand-panel {
    min-height: 190px;
    padding: 26px 22px;
  }

  .login-brand-copy {
    margin-top: 20px;
  }

  .login-security {
    display: none;
  }

  .login-form-panel {
    align-items: flex-start;
    padding: 32px 22px 40px;
  }

  .login-form-header {
    margin-bottom: 24px;
  }
}
