/* ============================================================
   Taxbridge - Login Page
   Página de autenticação com layout de duas colunas
   Compatível com Bootstrap 5 + Font Awesome
   ============================================================ */

/* ============ VARIÁVEIS DA MARCA ============ */
:root {
  --tb-primary: #1B2A4E;
  --tb-primary-hover: #243557;
  --tb-accent: #C9A961;
  --tb-accent-hover: #B89651;
  --tb-bg-page: #E8E4D8;
  --tb-bg-form: #F5F1E8;
  --tb-bg-card: #FFFFFF;
  --tb-text-primary: #1B2A4E;
  --tb-text-secondary: #6B6B6B;
  --tb-text-muted: #888888;
  --tb-text-on-dark: #F5F1E8;
  --tb-border: #D8D2C2;
  --tb-error: #C1121F;
}

/* ============ PÁGINA ============ */
.login-page {
  min-height: 100vh;
  background: var(--tb-bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--tb-text-primary);
}

.login-container {
  width: 100%;
  max-width: 1400px;
  min-height: 640px;
  max-height: calc(100vh - 40px);
  background: var(--tb-bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(27, 42, 78, 0.18);
  border: 0.5px solid rgba(27, 42, 78, 0.08);
}

/* ============ COLUNA ESQUERDA: BRANDING ============ */
.branding-column {
  background: linear-gradient(135deg, #1B2A4E 0%, #243557 50%, #1B2A4E 100%);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.branding-decor-1 {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.branding-decor-2 {
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ----- LOGO ----- */
.logo-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-image {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* ----- FRASE DE IMPACTO + AUTORIA ----- */
.quote-block {
  position: relative;
  z-index: 2;
  max-width: 460px;
}

.quote-divider {
  width: 40px;
  height: 2px;
  background: var(--tb-accent);
  margin-bottom: 16px;
}

.quote-text {
  font-size: 17px;
  color: var(--tb-text-on-dark);
  font-weight: 400;
  line-height: 1.5;
  font-style: italic;
  letter-spacing: 0.2px;
  margin: 0;
  padding: 0;
  border: 0;
}

.authors {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.author-name {
  font-size: 12px;
  color: var(--tb-text-on-dark);
  font-weight: 500;
}

.author-role {
  font-size: 10px;
  color: rgba(245, 241, 232, 0.65);
}

/* ----- INDICADORES ----- */
.stats-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.stat-item {
  min-width: 0;
}

.stat-value {
  font-size: 18px;
  color: var(--tb-accent);
  font-weight: 500;
  line-height: 1.1;
}

.stat-value-sm {
  font-size: 16px;
}

.stat-label {
  font-size: 9px;
  color: rgba(245, 241, 232, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  line-height: 1.3;
}

/* ============ COLUNA DIREITA: FORMULÁRIO ============ */
.form-column {
  background: var(--tb-bg-form);
  padding: 36px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-inner {
  max-width: 340px;
  width: 100%;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 22px;
}

.form-overline {
  font-size: 10px;
  color: var(--tb-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.form-title {
  font-size: 22px;
  color: var(--tb-text-primary);
  font-weight: 500;
  margin-bottom: 4px;
}

.form-subtitle {
  font-size: 11px;
  color: var(--tb-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ----- CAMPOS ----- */
.field-group {
  margin-bottom: 12px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.field-label {
  font-size: 10px;
  color: var(--tb-text-primary);
  font-weight: 500;
  margin: 0;
}

.forgot-link {
  font-size: 9px;
  color: var(--tb-accent);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--tb-accent-hover);
  text-decoration: underline;
}

.input-field {
  background: var(--tb-bg-card);
  border: 0.5px solid var(--tb-border);
  border-radius: 6px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus-within {
  border-color: var(--tb-accent);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.12);
}

.input-field.is-invalid {
  border-color: var(--tb-error);
}

.input-icon {
  flex-shrink: 0;
  color: var(--tb-accent);
  font-size: 12px;
}

.form-control-custom {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 11px;
  color: var(--tb-text-primary);
  font-family: inherit;
  padding: 0;
  margin: 0;
}

.form-control-custom::placeholder {
  color: var(--tb-text-muted);
}

.show-password-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 9px;
  color: var(--tb-text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
}

.show-password-btn:hover {
  color: var(--tb-text-primary);
}

.field-error {
  font-size: 10px;
  color: var(--tb-error);
  margin-top: 4px;
}

/* ----- CHECKBOX ----- */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  margin-top: 12px;
  padding-left: 0;
}

.checkbox-row .checkbox-custom-input {
  width: 13px;
  height: 13px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--tb-primary);
}

.checkbox-row .checkbox-custom-input:checked {
  background-color: var(--tb-primary);
  border-color: var(--tb-primary);
}

.checkbox-label {
  font-size: 10px;
  color: #3C3C3C;
  cursor: pointer;
  margin: 0;
}

/* ----- BOTÕES ----- */
.btn-primary-tb {
  background: var(--tb-primary);
  color: var(--tb-accent);
  font-size: 12px;
  padding: 11px;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  margin-bottom: 14px;
  cursor: pointer;
  letter-spacing: 0.3px;
  border: none;
  width: 100%;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary-tb:hover {
  background: var(--tb-primary-hover);
  color: var(--tb-accent);
}

.btn-primary-tb:active {
  transform: translateY(1px);
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.divider-line {
  flex: 1;
  height: 0.5px;
  background: var(--tb-border);
}

.divider-text {
  font-size: 9px;
  color: var(--tb-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-google {
  background: var(--tb-bg-card);
  border: 0.5px solid var(--tb-border);
  padding: 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 18px;
  width: 100%;
  font-family: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.btn-google:hover {
  border-color: var(--tb-accent);
  background: #FFFCF6;
}

.btn-google span {
  font-size: 11px;
  color: var(--tb-text-primary);
  font-weight: 500;
}

/* ----- CADASTRE-SE ----- */
.signup-box {
  text-align: center;
  padding: 10px;
  background: rgba(201, 169, 97, 0.08);
  border: 0.5px dashed var(--tb-accent);
  border-radius: 6px;
}

.signup-text {
  font-size: 10px;
  color: var(--tb-text-secondary);
}

.signup-link {
  color: var(--tb-accent);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.signup-link:hover {
  color: var(--tb-accent-hover);
  text-decoration: underline;
}

.signup-link i {
  font-size: 9px;
  margin-left: 2px;
}

/* ----- LINKS LEGAIS ----- */
.legal-links {
  margin-top: 18px;
  text-align: center;
  font-size: 9px;
  color: var(--tb-text-muted);
}

.legal-links a {
  color: var(--tb-accent);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-links a:hover {
  color: var(--tb-accent-hover);
  text-decoration: underline;
}

/* ============ ALERTS DJANGO ============ */
.login-page .alert {
  font-size: 11px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

/* ============ RESPONSIVO ============ */
@media (max-width: 991.98px) {
  .login-container {
    height: auto;
    max-width: 480px;
    flex-direction: column;
  }

  .branding-column {
    padding: 32px 28px;
    gap: 24px;
  }

  .form-column {
    padding: 32px 28px;
  }

  .stats-grid {
    gap: 16px;
  }
}

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

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

  .form-column {
    padding: 28px 20px;
  }

  .branding-column {
    padding: 28px 20px;
  }

  .form-inner {
    max-width: none;
  }

  .quote-text {
    font-size: 15px;
  }

  .stat-value {
    font-size: 16px;
  }

  .stat-value-sm {
    font-size: 14px;
  }
}
