/* ======================================================
   AVALIS DESIGN SYSTEM
   - FORA (Login/Entrada): Escuro por fora (#0B0E14)
   - DENTRO (Dashboard/Painel): Aceso por dentro (#F8FAFC)
   ====================================================== */

:root {
  /* Tema Escuro (Fora / Login) */
  --bg-dark-noite: #0B0E14;
  --bg-dark-superficie: #10141C;
  --bg-dark-elevada: #161B25;
  --border-dark: #2A323F;
  --tinta-dark: #F5F7FA;
  --farol-dark: #00F0FF;
  --janela-dark: #EAF6FF;

  /* Tema Claro (Dentro / Dashboard) */
  --bg-dash-main: #F8FAFC;
  --bg-dash-card: #FFFFFF;
  --border-dash: #E2E8F0;
  --border-dash-hover: #CBD5E1;
  --tinta-dash: #0F172A;
  --tinta-muted: #64748B;
  --tinta-subtle: #94A3B8;
  --farol-dash: #0284C7;
  --farol-dash-hover: #0369A1;

  /* Semânticas */
  --sucesso: #10B981;
  --sucesso-bg: #ECFDF5;
  --sucesso-border: #A7F3D0;

  --atencao: #D97706;
  --atencao-bg: #FFFBEB;
  --atencao-border: #FDE68A;

  --erro: #EF4444;
  --erro-bg: #FEF2F2;
  --erro-border: #FCA5A5;

  /* Raios */
  --radius-card: 16px;
  --radius-sm: 8px;
  --radius-pilula: 99px;

  /* Motion */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* `<html>` sem cor de fundo própria é branco por padrão do navegador. No
   "elastic bounce" do iOS Safari (esticar ao passar do fim da página),
   isso aparece como uma área branca — a página só fica escura por causa
   do fundo do `.landing-wrapper`, que é um elemento FILHO, não cobre a
   área revelada pelo bounce atrás do próprio body/html. Fundo escuro
   aqui como base (a landing é a entrada padrão do site). */
html {
  background: var(--bg-dark-noite);
}

body {
  font-family: 'Sora', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  line-height: 1.5;
  /* Cor de fundo por tema (classe trocada em auth.js ao entrar/sair do
     painel) — garante que o bounce/overscroll revele a cor certa em
     cada contexto, não só a base escura do html acima. */
  background: var(--bg-dark-noite);
  /* Rede de segurança contra overflow horizontal em geral. A causa
     específica que motivou isso (orbs decorativos do .landing-wrapper
     vazando pra fora da section) já é contida na origem, com
     `overflow: hidden` nos dois eixos ali mesmo — ver comentário em
     landing.css. Manter só overflow-x aqui no body é seguro (não cria
     scrollbar duplicada) porque body já é o dono natural do scroll do
     documento inteiro, não um elemento aninhado. */
  overflow-x: hidden;
}

body.theme-light {
  background: var(--bg-dash-main);
}

.hidden {
  display: none !important;
}

/* ======================================================
   1. LOGIN SCREEN (ESCURO POR FORA)
   ====================================================== */
.login-screen {
  background-color: var(--bg-dark-noite);
  color: var(--tinta-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.bg-halo-login {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, rgba(0, 112, 209, 0.05) 50%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
}

.login-container {
  max-width: 420px;
  width: 100%;
  z-index: 2;
}

.login-logo-box {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-img {
  height: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.4));
}

.login-brand-title {
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: -0.5px;
}

.login-brand-title span {
  font-weight: 600;
  color: var(--farol-dark);
}

.login-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--tinta-dark);
  opacity: 0.6;
  display: block;
  margin-top: 4px;
}

.login-card {
  background: var(--bg-dark-superficie);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--tinta-dark);
  opacity: 0.7;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  background: var(--bg-dark-elevada);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--tinta-dark);
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--farol-dark);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.btn-janela-acesa {
  background: var(--janela-dark);
  color: var(--bg-dark-noite);
  font-weight: 600;
  box-shadow: 0 0 24px rgba(234, 246, 255, 0.3);
}

.btn-janela-acesa:hover {
  background: #FFFFFF;
  box-shadow: 0 0 32px rgba(234, 246, 255, 0.5);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 12px;
  border-radius: var(--radius-pilula);
}

.login-help {
  text-align: center;
  font-size: 0.75rem;
  color: var(--tinta-dark);
  opacity: 0.5;
  margin-top: 18px;
}


/* ======================================================
   2. DASHBOARD & PAINEL INTERNO (ACESO POR DENTRO - TEMA CLARO)
   ====================================================== */
.dashboard-wrapper {
  background-color: var(--bg-dash-main);
  color: var(--tinta-dash);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Dashboard */
.dash-header {
  background: var(--bg-dash-card);
  border-bottom: 1px solid var(--border-dash);
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.dash-header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.dash-logo-img {
  height: 34px;
}

.dash-title {
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.2;
}

.dash-title span {
  font-weight: 600;
  color: var(--farol-dash);
}

.dash-subtitle {
  font-size: 0.75rem;
  color: var(--tinta-muted);
  display: block;
}

.dash-user-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.engine-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--sucesso);
  background: var(--sucesso-bg);
  border: 1px solid var(--sucesso-border);
  padding: 4px 12px;
  border-radius: var(--radius-pilula);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--sucesso);
  border-radius: 50%;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--tinta-dash);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border-dash);
  color: var(--tinta-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-logout:hover {
  border-color: var(--erro);
  color: var(--erro);
  background: var(--erro-bg);
}

/* Dashboard Body */
.dash-main {
  max-width: 1200px;
  width: 100%;
  margin: 28px auto;
  padding: 0 24px;
  flex: 1;
}

/* Banner */
.dash-banner {
  background: linear-gradient(135deg, #0F172A, #1E293B);
  color: white;
  border-radius: var(--radius-card);
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.banner-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: #38BDF8;
  display: block;
  margin-bottom: 6px;
}

.banner-text h3 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 4px;
}

.banner-text p {
  color: #94A3B8;
  font-size: 0.9rem;
  max-width: 600px;
}

.btn-dash-primary {
  background: var(--farol-dash);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-pilula);
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-dash-primary:hover:not(:disabled) {
  background: var(--farol-dash-hover);
  transform: translateY(-1px);
}

.btn-dash-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-banner { flex-direction: column; align-items: flex-start; gap: 20px; }
}

.metric-card {
  background: var(--bg-dash-card);
  border: 1px solid var(--border-dash);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.icon-blue { background: #E0F2FE; color: #0284C7; }
.icon-cyan { background: #E0F2FE; color: #0891B2; }
.icon-emerald { background: #D1FAE5; color: #059669; }
.icon-amber { background: #FEF3C7; color: #D97706; }

.metric-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--tinta-muted);
  display: block;
}

.metric-info h4 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--tinta-dash);
}

/* Section Table Card */
.dash-section-card {
  background: var(--bg-dash-card);
  border: 1px solid var(--border-dash);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dash-card-header h4 {
  font-size: 1.15rem;
  font-weight: 500;
}

.dash-card-header p {
  font-size: 0.82rem;
  color: var(--tinta-muted);
}

.search-box {
  position: relative;
  width: 300px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tinta-subtle);
  font-size: 0.85rem;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border-dash);
  border-radius: var(--radius-pilula);
  font-size: 0.85rem;
  outline: none;
  font-family: 'Sora', sans-serif;
}

.search-box input:focus {
  border-color: var(--farol-dash);
}

/* Table */
.table-container {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
}

.dash-table th, .dash-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-dash);
  font-size: 0.88rem;
}

.dash-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--tinta-muted);
  font-weight: 500;
  background: #F8FAFC;
}

.table-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: var(--radius-pilula);
  text-transform: uppercase;
}

.badge-ia { background: #E0F2FE; color: #0284C7; }
.badge-finalizado { background: var(--sucesso-bg); color: var(--sucesso); }

/* ======================================================
   2.1 NAVEGAÇÃO POR ABAS DO DASHBOARD & GAMIFICAÇÃO
   ====================================================== */
.dash-nav-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: #F1F5F9;
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dash);
  overflow-x: auto;
}

.tab-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--tinta-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-nav-btn:hover {
  color: var(--tinta-dash);
  background: rgba(255, 255, 255, 0.6);
}

.tab-nav-btn.active {
  background: #FFFFFF;
  color: var(--farol-dash);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tab-nav-btn .tab-badge {
  background: #E0F2FE;
  color: #0284C7;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

/* Telas das Abas */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======================================================
   SISTEMA DE GAMIFICAÇÃO DE PONTOS & RANKING
   ====================================================== */
.gamification-hero {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4338CA 100%);
  color: #FFFFFF;
  border-radius: var(--radius-card);
  padding: 28px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  box-shadow: 0 10px 25px -5px rgba(67, 56, 202, 0.3);
  position: relative;
  overflow: hidden;
}

.gamification-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.avatar-rank-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00F0FF, #7000FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #FFFFFF;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.rank-details h3 {
  font-size: 1.4rem;
  margin: 0 0 4px 0;
  font-weight: 700;
}

.rank-details p {
  color: #C7D2FE;
  font-size: 0.85rem;
  margin: 0 0 12px 0;
}

.xp-bar-container {
  width: 100%;
  max-width: 450px;
}

.xp-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #E0E7FF;
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.xp-bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00F0FF, #38BDF8);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rank-score-box {
  text-align: right;
}

.rank-score-box .score-number {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #00F0FF;
  line-height: 1;
}

.rank-score-box .score-label {
  font-size: 0.72rem;
  color: #C7D2FE;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Grade de Conquistas */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.achievement-card {
  background: #FFFFFF;
  border: 1px solid var(--border-dash);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.achievement-card.locked {
  opacity: 0.55;
  filter: grayscale(0.8);
  background: #F8FAFC;
}

.achievement-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.icon-gold { background: #FEF3C7; color: #D97706; }
.icon-purple { background: #EDE9FE; color: #7C3AED; }
.icon-cyan { background: #E0F2FE; color: #0284C7; }
.icon-emerald { background: #D1FAE5; color: #059669; }

.achievement-info h5 {
  font-size: 0.88rem;
  margin: 0 0 2px 0;
  color: var(--tinta-dash);
}

.achievement-info p {
  font-size: 0.75rem;
  color: var(--tinta-muted);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.achievement-xp {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--farol-dash);
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Checkbox Toggle de Avarias */
.checkbox-toggle-wrapper {
  background: #FEF2F2;
  border: 1px solid #FECDD3;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.checkbox-toggle-wrapper label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tinta-dash);
}

.checkbox-toggle-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--farol-dash);
}


/* ======================================================
   3. MODAL DE CRIAÇÃO (TEMA CLARO DENTRO DO PAINEL)
   ====================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-dash-card);
  border-radius: var(--radius-card);
  max-width: 840px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-dash);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-dash);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--tinta-muted);
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .modal-grid { grid-template-columns: 1fr; }
}

.media-box-light {
  background: #F8FAFC;
  border: 1px solid var(--border-dash);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.box-title-light {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--tinta-dash);
  font-weight: 600;
  margin-bottom: 4px;
}

.box-desc-light {
  font-size: 0.8rem;
  color: var(--tinta-muted);
  margin-bottom: 14px;
}

.audio-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-record-light {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #DC2626;
  padding: 8px 16px;
  border-radius: var(--radius-pilula);
  font-size: 0.82rem;
  cursor: pointer;
}

.btn-upload-audio-light {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: var(--tinta-dash);
  padding: 8px 16px;
  border-radius: var(--radius-pilula);
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dropzone-light {
  border: 1.5px dashed #CBD5E1;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
  cursor: pointer;
  background: #FFFFFF;
  transition: all 0.2s ease;
}

.dropzone-light:hover {
  border-color: var(--farol-dash);
  background: #F0FDFA;
}

.drop-icon-light {
  font-size: 1.3rem;
  color: var(--farol-dash);
  margin-bottom: 2px;
}

.drop-primary-light {
  font-size: 0.78rem;
  color: var(--tinta-dash);
  margin-bottom: 2px;
}

.drop-primary-light span {
  color: var(--farol-dash);
  font-weight: 600;
  text-decoration: underline;
}

.drop-secondary-light {
  font-size: 0.68rem;
  color: var(--tinta-subtle);
}

/* Lista Compacta de Fotos (Sem Estourar a Tela) */
.photos-preview-container {
  margin-top: 10px;
}

.photos-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #F1F5F9;
  border-radius: 6px 6px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--tinta-dash);
  border: 1px solid var(--border-dash);
  border-bottom: none;
}

.btn-clear-all-photos {
  background: none;
  border: none;
  color: var(--erro);
  font-size: 0.7rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-clear-all-photos:hover {
  text-decoration: underline;
}

.photos-compact-list {
  max-height: 140px;
  overflow-y: auto;
  border: 1px solid var(--border-dash);
  border-radius: 0 0 6px 6px;
  background: #FFFFFF;
}

.photo-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.78rem;
  gap: 8px;
  transition: background 0.15s ease;
}

.photo-compact-row:last-child {
  border-bottom: none;
}

.photo-compact-row:hover {
  background: #F8FAFC;
}

.photo-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  flex: 1;
}

.photo-mini-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #E2E8F0;
}

.photo-file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tinta-dash);
  font-size: 0.78rem;
  font-weight: 500;
}

.photo-file-size {
  font-size: 0.68rem;
  color: var(--tinta-muted);
  flex-shrink: 0;
}

.btn-remove-photo-row {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-remove-photo-row:hover {
  color: var(--erro);
  background: #FEE2E2;
}

.notes-box-light {
  margin-bottom: 20px;
}

.notes-box-light label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--tinta-muted);
  margin-bottom: 6px;
}

.notes-box-light textarea {
  width: 100%;
  border: 1px solid var(--border-dash);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.88rem;
  font-family: 'Sora', sans-serif;
  outline: none;
  min-height: 70px;
}

.notes-box-light textarea:focus {
  border-color: var(--farol-dash);
}

/* Modal Processing Steps */
.progress-steps-light {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
}

.step-item-light {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #F8FAFC;
  border: 1px solid var(--border-dash);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: left;
}

.step-item-light.active {
  border-color: var(--farol-dash);
  background: #F0F9FF;
}

.step-item-light.completed {
  border-color: var(--sucesso);
  background: var(--sucesso-bg);
}

.step-status {
  margin-left: auto;
}

.btn-dash-outline {
  background: transparent;
  border: 1px solid var(--border-dash);
  color: var(--tinta-dash);
  padding: 8px 18px;
  border-radius: var(--radius-pilula);
  cursor: pointer;
  transition: var(--transition);
}

.btn-dash-outline:hover {
  background: #F1F5F9;
}

/* Botões de Ação na Tabela e Listas */
.btn-action-view {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  color: #0284C7;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-action-view:hover {
  background: #E0F2FE;
  border-color: #7DD3FC;
  color: #0369A1;
}

.btn-action-delete {
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #E11D48;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-action-delete:hover {
  background: #FFE4E6;
  border-color: #FDA4AF;
  color: #BE123C;
}

/* Lista de Vistorias Recentes na Visão Geral */
.overview-recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.recent-vistoria-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #F8FAFC;
  border: 1px solid var(--border-dash);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.recent-vistoria-item:hover {
  border-color: var(--border-dash-hover);
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.recent-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.recent-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tinta-dash);
}

.recent-item-meta {
  font-size: 0.76rem;
  color: var(--tinta-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recent-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ======================================================
   FOLHA DE LAUDO OFICIAL (DOCUMENT SHEET PREVIEW)
   Idêntico à formatação do PDF Oficial Avalis
   ====================================================== */
.document-sheet-container {
  background: #E2E8F0;
  padding: 24px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
}

.document-sheet {
  background: #FFFFFF;
  width: 100%;
  max-width: 820px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
  border-radius: 4px;
  overflow: hidden;
  font-family: 'Sora', sans-serif;
  color: #1E293B;
}

.sheet-header-banner {
  background: #0F172A;
  border-bottom: 3px solid #00F0FF;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-brand-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.sheet-imobiliaria-title {
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.sheet-imobiliaria-sub {
  color: #94A3B8;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
}

.sheet-body {
  padding: 24px 28px;
}

.sheet-laudo-title-box {
  text-align: center;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 2px solid #E2E8F0;
}

.sheet-laudo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: 0.03em;
}

.sheet-laudo-type-badge {
  display: inline-block;
  background: #0284C7;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  margin-top: 6px;
  letter-spacing: 0.08em;
}

.sheet-cadastre-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.82rem;
  border: 1px solid #CBD5E1;
}

.sheet-cadastre-table td {
  padding: 8px 12px;
  border: 1px solid #CBD5E1;
}

.sheet-cadastre-table .cadastre-label {
  background: #F1F5F9;
  font-weight: 600;
  color: #475569;
  width: 28%;
}

.sheet-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  margin: 20px 0 10px 0;
  padding-bottom: 4px;
  border-bottom: 1.5px solid #0284C7;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-room-card {
  margin-bottom: 20px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  overflow: hidden;
}

.sheet-room-header {
  background: #0F172A;
  color: #FFFFFF;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
}

.sheet-room-state-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.sheet-signatures-block {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 2px solid #E2E8F0;
}

.signatures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  text-align: center;
}

.sig-line {
  border-top: 1px solid #0F172A;
  padding-top: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0F172A;
}

.sig-role {
  font-size: 0.68rem;
  color: #64748B;
}

/* Botão de Download em Word (.docx) */
.btn-word {
  background: #1D4ED8;
  color: #FFFFFF;
  border: 1px solid #1E40AF;
  padding: 8px 16px;
  border-radius: var(--radius-pilula);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-word:hover {
  background: #1E40AF;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

/* Passos Didáticos Numerados (UX Simplificada) */
.step-header-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.step-number-badge {
  width: 28px;
  height: 28px;
  background: #0284C7;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.step-title-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0F172A;
}


