/**
 * SetCon — página de login (layout standalone, brand kit)
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-900: #0A2E6E;
  --blue-800: #0C3D8F;
  --blue-700: #1045AF;
  --blue-600: #1A56DB;
  --blue-500: #2B6FF5;
  --blue-400: #5B90F8;
  --blue-300: #93B9FB;
  --blue-200: #C5D9FD;
  --blue-100: #E3EDFE;
  --ink-900: #080E1A;
  --ink-800: #0D1525;
  --ink-700: #1A2540;
  --ink-600: #2C3A5A;
  --ink-500: #3D5080;
  --ink-400: #6B7FA8;
  --ink-300: #9AAAC8;
  --ink-200: #C5CFDF;
  --ink-100: #E2E7F0;
  --ink-50: #F4F6FA;
  --font: 'DM Sans', -apple-system, sans-serif;
  --radius-md: 10px;
  --radius-xl: 24px;
}

html {
  min-height: 100%;
  background: var(--ink-100);
}

body {
  font-family: var(--font);
  background: var(--ink-100);
  color: var(--ink-900);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}

/* Glow suave em toda a página (mesma base que .screen-wrap do brand kit) */
body::before {
  content: '';
  position: fixed;
  width: min(400px, 90vw);
  height: min(400px, 90vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.12) 0%, transparent 70%);
  top: -80px;
  right: -80px;
  pointer-events: none;
  z-index: 0;
}

/* Container central: fundo igual ao da página (sem “caixa” de outra cor) */
.login-screen-wrap {
  background: transparent;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 800px;
  max-width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(8, 14, 26, 0.16), 0 8px 24px rgba(8, 14, 26, 0.10);
}

/* Lado esquerdo — branding */
.login-brand {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ink-800);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 3rem;
}

.login-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--blue-500);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 8px 9px;
}

.login-logo-icon span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: white;
}

.login-logo-icon span:nth-child(1) { width: 18px; }
.login-logo-icon span:nth-child(2) { width: 12px; opacity: .7; }
.login-logo-icon span:nth-child(3) { width: 8px; opacity: .4; }

.login-logo-text {
  font-size: 18px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.02em;
}

.login-logo-text em {
  font-weight: 300;
  font-style: normal;
  color: var(--blue-400);
}

.login-headline {
  font-size: 24px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.login-desc {
  font-size: 13px;
  color: var(--ink-400);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-300);
}

.login-feature-icon {
  width: 20px;
  height: 20px;
  background: rgba(43, 111, 245, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Lado direito — formulário */
.login-form-panel {
  padding: 3rem;
  background: var(--ink-900);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.login-form-sub {
  font-size: 13px;
  color: var(--ink-400);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-400);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--ink-800);
  border: 1.5px solid var(--ink-600);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  color: white;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(43, 111, 245, 0.15);
}

.form-input::placeholder {
  color: var(--ink-400);
}

.form-input.is-invalid {
  border-color: #DC2626;
}

.form-row-between {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.5rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-400);
  cursor: pointer;
}

.form-check input[type=checkbox] {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ink-400);
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  background: transparent;
  position: relative;
}

.form-check input[type=checkbox]:checked {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.form-check input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 2px;
  width: 5px;
  height: 8px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--blue-500);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(43, 111, 245, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

a.btn-login {
  text-decoration: none;
}

.btn-login:hover {
  background: var(--blue-600);
  box-shadow: 0 6px 20px rgba(43, 111, 245, 0.4);
}

.btn-login:active {
  transform: scale(0.99);
}

.alert-error {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 1.25rem;
}

.invalid-feedback {
  display: block;
  font-size: 12px;
  color: #FCA5A5;
  margin-top: 6px;
}

.toggle-password {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400);
  cursor: pointer;
  background: none;
  border: none;
  padding: 12px;
  font-size: 14px;
}

.toggle-password:hover {
  color: var(--ink-300);
}

.password-wrap {
  position: relative;
}

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

/* Responsivo — mobile: brand compacto acima do formulário (desktop inalterado acima de 768px) */
@media (max-width: 768px) {
  .login-screen-wrap {
    padding: 1rem;
    min-height: 0;
  }
  .login-wrapper {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 2rem 1.5rem 1.25rem;
    justify-content: flex-start;
  }
  .login-logo {
    margin-bottom: 1.25rem;
  }
  .login-headline {
    font-size: 1.125rem;
    margin-bottom: 0.65rem;
  }
  .login-desc {
    margin-bottom: 0;
    font-size: 12px;
  }
  .login-features {
    display: none;
  }
  .login-form-panel {
    padding: 1.5rem 1.5rem 2rem;
    border-top: 1px solid var(--ink-700);
    border-radius: 0;
  }
}
