:root {
  /* Identidade visual oficial do escritório Vieira Lacerda (Fase 6) —
     mesmo bloco usado em Assets/stylepainel.css, para o login e o painel
     nunca ficarem com paletas diferentes. */
  --cor-primaria: #2c3b3d;
  --cor-secundaria: #9f8661;
  --cor-fundo-app: #f4f4f9;
  --cor-fundo-card: #ffffff;
  --cor-bege-marca: #dcd6cd;
  --cor-texto-principal: #333333;
  --cor-texto-secundario: #666666;

  --primary: var(--cor-primaria);
  --primary-dark: #1b2526;
  --accent: var(--cor-secundaria);
  --text: var(--cor-texto-principal);
  --muted: var(--cor-texto-secundario);
  --border: var(--cor-bege-marca);
  --background: var(--cor-fundo-app);
  --surface: var(--cor-fundo-card);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--background);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--cor-secundaria);
  box-shadow: 0 0 0 3px rgba(159, 134, 97, 0.18);
}

body.login-page {
  padding: 0;
  background: var(--surface);
}

.split-layout {
  width: 100%;
  min-height: 100vh;
  display: flex;
}

.img-box {
  flex: 1.2;
  background: #0a0f1c;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset -15px 0 30px rgba(0, 0, 0, 0.2); 
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-image.active {
  opacity: 1;
}

.login-card {
  flex: 0.8;
  min-width: 480px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  border: none; 
  border-radius: 0;
  box-shadow: none;
}

.brand, .login-form, .footer-text {
  width: 100%;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 40px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: var(--primary);
  color: white;
}

.brand h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.login-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cor-fundo-app);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.login-form input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--cor-secundaria);
  box-shadow: 0 0 0 3px rgba(159, 134, 97, 0.18);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 78px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.3s ease;
}

.toggle-password:hover {
  color: var(--primary);
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -4px;
  font-size: 0.85rem;
}

.options a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.options a:hover {
  text-decoration: underline;
}

.options label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  white-space: nowrap;
}

.btn-primary {
  margin-top: 16px;
  padding: 14px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(44, 59, 61, 0.25);
}

.footer-text {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.error-message {
  width: 100%;
  max-width: 380px;
  margin: 16px auto 0;
  padding: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 500;
}

body.dashboard-page {
  min-height: 100vh;
  padding: 24px;
}

.dashboard-shell {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.sidebar h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.sidebar p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar li {
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.sidebar li:hover:not(.active) {
  background: var(--background);
  color: var(--primary);
}

.sidebar li.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.main-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.header-row h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.header-row p {
  margin: 0;
  color: var(--muted);
}

.ghost-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.ghost-link:hover {
  text-decoration: underline;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.nav-row button {
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-row button:hover:not(.active) {
  background: var(--background);
  color: var(--primary);
}

.nav-row button.active {
  background: var(--primary);
  color: white;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--text);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .split-layout {
    flex-direction: column;
  }

  .img-box {
    flex: none;
    min-height: 35vh;
  }

  .logo {
    max-width: 60%;
  }

  .login-card {
    flex: 1;
    min-width: 100%;
    padding: 48px 24px;
  }
}

@media (max-width: 760px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .main-panel {
    padding: 24px 16px;
  }
}

/* ---------------------------------------------------------------------------
   Recuperação de senha (22/09/2026): o painel "Esqueci a senha" dentro da tela
   de login e a página de redefinição aberta pelo link do e-mail.
   --------------------------------------------------------------------------- */

/* A página de redefinição não tem a coluna de imagens do login — é um cartão
   único, centralizado na tela. */
.tela-centralizada {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.card-isolado {
  flex: initial;
  width: 100%;
  max-width: 460px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(44, 59, 61, 0.08);
  padding: 40px 36px;
}

.mensagem-aviso {
  width: 100%;
  max-width: 380px;
  margin: 18px auto 0;
  padding: 14px 16px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  background: var(--cor-fundo-app);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.mensagem-erro {
  border-left-color: #b91c1c;
}

.mensagem-sucesso {
  border-left-color: #15803d;
}

.botao-como-link {
  display: block;
  margin: 20px auto 0;
  max-width: 380px;
  text-align: center;
  text-decoration: none;
}

/* Painel de "Esqueci a senha" na tela de login: aparece no lugar do formulário
   normal, sem trocar de página, para não perder o que já foi digitado. */
.recuperar-painel {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.recuperar-texto {
  margin: 0 0 18px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.link-discreto {
  display: inline-block;
  margin-top: 16px;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.link-discreto:hover {
  color: var(--primary);
}