/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #f0f2f5;
  color: #1a1a2e;
  min-height: 100vh;
  padding: 32px 24px 80px;
}

/* =============================================
   Layout
   ============================================= */
.page-wrapper {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* =============================================
   Screens
   ============================================= */
.screen {
  display: none;
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* =============================================
   Cabeçalho
   ============================================= */
.page-header {
  margin-bottom: 4px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

/* =============================================
   Seletor de Tipo de Ativo
   ============================================= */
.asset-type-selector {
  display: flex;
  gap: 8px;
}

.asset-type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
}

.asset-type-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.asset-type-btn.active {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

/* =============================================
   Logo da Empresa
   ============================================= */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 80px;
}

.company-logo {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
}



/* =============================================
   Card base
   ============================================= */
.card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* =============================================
   Barra de ações
   ============================================= */
.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  flex-wrap: wrap;
}

.search-wrapper {
  flex: 1;
  min-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #334155;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: #fff;
}

.action-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* =============================================
   Botões
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  white-space: nowrap;
  line-height: 1;
}

.btn:active {
  transform: scale(0.97);
}

.btn-outline {
  background: #fff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
}

.btn-outline:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-primary {
  background: #16a34a;
  color: #fff;
  border: 1.5px solid transparent;
}

.btn-primary:hover {
  background: #16a34a;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-back:hover {
  background: #f1f5f9;
}

/* =============================================
   Painel de Filtros
   ============================================= */
.filter-panel {
  padding: 20px 24px;
}

.filter-grid {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select {
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #334155;
  background: #f8fafc;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:focus {
  border-color: #16a34a;
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-left: auto;
}

/* =============================================
   Contador de resultados
   ============================================= */
.result-count {
  font-size: 13.5px;
  color: #64748b;
  padding-left: 2px;
}

/* =============================================
   Tabela
   ============================================= */
.table-card {
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead tr {
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
}

.data-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
  cursor: pointer;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table td {
  padding: 16px 20px;
  color: #334155;
  vertical-align: middle;
}

.data-table td:first-child {
  font-weight: 600;
  color: #1e293b;
}

/* =============================================
   Badges de Status
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-em-uso {
  background: #dcfce7;
  color: #15803d;
}

.badge-manutencao {
  background: #fef9c3;
  color: #a16207;
}

.badge-estoque {
  background: #ede9fe;
  color: #16a34a;
}

/* =============================================
   Barra de Nota
   ============================================= */
.nota-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
}

.nota-value {
  font-weight: 600;
  color: #1e293b;
  min-width: 28px;
  font-size: 14px;
}

.nota-bar-bg {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.nota-bar-fill {
  height: 100%;
  background: #16a34a;
  border-radius: 4px;
  transition: width 0.4s ease, background 0.3s ease;
}

.nota-bar-fill.red {
  background: #dc2626;
}

.nota-bar-fill.yellow {
  background: #eab308;
}

.nota-bar-fill.green {
  background: #16a34a;
}

/* =============================================
   Formulário
   ============================================= */
.form-container {
  padding: 0;
  border-radius: 14px;
}

.form-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.form-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

/* =============================================
   Abas
   ============================================= */
.tabs-container {
  padding: 24px 28px;
}

.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  position: relative;
  bottom: -2px;
}

.tab-btn:hover {
  color: #334155;
}

.tab-btn.active {
  color: #16a34a;
  border-bottom-color: #16a34a;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* =============================================
   Formulário - Grid e Grupos
   ============================================= */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.form-full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.form-input {
  padding: 10px 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #334155;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  font-family: inherit;
}

.form-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: #fff;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* =============================================
   Checkboxes
   ============================================= */
.form-checkbox-group {
  gap: 12px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #16a34a;
}

.form-checkbox span {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
}

/* =============================================
   Slider
   ============================================= */
.slider-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.form-slider {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #16a34a;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
  transition: box-shadow 0.2s;
}

.form-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

.form-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #16a34a;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
  transition: box-shadow 0.2s;
}

.form-slider::-moz-range-thumb:hover {
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

.slider-value {
  min-width: 60px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: #2563eb;
  font-size: 14px;
}

/* =============================================
   Rodapé do Formulário
   ============================================= */
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 28px 22px;
  border-top: 1px solid #e2e8f0;
}

/* =============================================
   Botão de Ajuda Flutuante
   ============================================= */
.help-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e293b;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  z-index: 100;
}

.help-btn:hover {
  background: #0f172a;
  transform: scale(1.07);
}

/* =============================================
   Tela de Visualização
   ============================================= */
.view-section {
  margin-bottom: 24px;
}

.view-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #4f46e5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e7ff;
}

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

.view-row.full {
  grid-template-columns: 1fr;
}

.view-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.view-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.view-value {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
  padding: 8px 0;
}

.view-value.empty {
  color: #94a3b8;
  font-style: italic;
}

.view-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.view-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.view-photo {
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  aspect-ratio: 1;
}

.view-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =============================================
   Resumo de Avaliação
   ============================================= */
.evaluation-summary {
  background: linear-gradient(135deg, #f0f9ff 0%, #f3e8ff 100%);
  border: 1.5px solid #e0e7ff;
  border-radius: 10px;
  padding: 18px 20px;
}

.summary-title {
  font-size: 13px;
  font-weight: 700;
  color: #4f46e5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(224, 231, 255, 0.6);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.summary-value {
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  padding: 4px 10px;
  background: #dbeafe;
  border-radius: 6px;
}

.summary-value.atencao {
  color: #dc2626;
  background: #fee2e2;
}

.summary-value.bom {
  color: #2563eb;
  background: #dbeafe;
}

.summary-value.excelente {
  color: #059669;
  background: #d1fae5;
}

/* =============================================
   Upload de Fotos
   ============================================= */
.photo-upload {
  position: relative;
}

.photo-input {
  display: none;
}

.photo-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.photo-label:hover {
  border-color: #3b82f6;
  background: #f1f5f9;
}

.photo-label svg {
  color: #94a3b8;
  transition: color 0.2s;
}

.photo-label:hover svg {
  color: #3b82f6;
}

.photo-label span {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.photo-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}

.photo-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.photo-remove:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* =============================================
   Ações na Tabela
   ============================================= */
.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  background: #f1f5f9;
  color: #64748b;
}

.btn-action:hover {
  background: #e2e8f0;
}

.btn-action.delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.btn-action:active {
  transform: scale(0.95);
}

/* =============================================
   Modal de Confirmação
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 24px;
}

.modal-header {
  margin-bottom: 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.modal-body {
  margin-bottom: 24px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* =============================================
   Lightbox (Visualizador de Fotos)
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.lightbox-prev,
.lightbox-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.lightbox-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: 6px;
}

/* =============================================
   Fotos Clicáveis
   ============================================= */
.view-photo,
.photo-item img {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.view-photo:hover,
.photo-item:hover img {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =============================================
   Estado vazio
   ============================================= */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
  font-size: 15px;
}

/* =============================================
   Responsividade
   ============================================= */
@media (max-width: 1024px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   Fotos Clicáveis
   ============================================= */
.view-photo,
.photo-item img {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.view-photo:hover,
.photo-item:hover img {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  body {
    padding: 20px 12px 80px;
  }

  .page-title {
    font-size: 22px;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-container {
    width: 100%;
    justify-content: flex-start;
  }

  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons {
    justify-content: flex-end;
  }

  .tabs-nav {
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    padding: 10px 12px;
    font-size: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .data-table th,
  .data-table td {
    padding: 12px 14px;
    font-size: 12px;
  }

  .nota-wrapper {
    min-width: 100px;
  }

  .form-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .slider-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  body {
    padding: 16px 8px 80px;
  }

  .page-title {
    font-size: 18px;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-container {
    width: 100%;
    justify-content: flex-start;
    min-width: 100px;
    height: 60px;
  }

  .company-logo {
    max-width: 100px;
    max-height: 60px;
  }

  .logo-upload-label {
    width: 100px;
    height: 60px;
    font-size: 10px;
  }

  .lightbox-image {
    max-width: 95vw;
    max-height: 80vh;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .action-buttons {
    width: 100%;
    justify-content: stretch;
  }

  .action-buttons .btn {
    flex: 1;
    justify-content: center;
  }

  .tabs-nav {
    margin-bottom: 20px;
  }

  .tab-btn {
    padding: 8px 10px;
    font-size: 11px;
  }

  .form-container {
    border-radius: 8px;
  }

  .form-header {
    padding: 16px 16px 12px;
  }

  .tabs-container {
    padding: 16px;
  }

  .form-footer {
    padding: 12px 16px 16px;
  }
}

/* =============================================
   HubOn – Variáveis de marca
   ============================================= */
:root {
  --hubon-green:       #1adc5a;
  --hubon-green-dark:  #13b348;
  --hubon-green-glow:  rgba(26, 220, 90, 0.35);
  --hubon-navy:        #0d1b2e;
  --hubon-navy-mid:    #122338;
}

/* =============================================
   Login – página base
   ============================================= */
body.login-page {
  background: var(--hubon-navy);
  padding: 0;
  overflow: hidden;
  font-family: 'Sora', 'Segoe UI', sans-serif;
}

/* Background full-screen */
.login-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Dark overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(8, 15, 26, 0.58);
}

/* Linha divisória vertical */
.login-divider {
  position: fixed;
  left: 36%;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.09);
  z-index: 2;
}

/* =============================================
   Login – Painel esquerdo
   ============================================= */
.login-panel {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 36%;
  min-width: 320px;
  z-index: 3;
  background: rgba(8, 15, 26, 0.52);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 52px;
}

/* =============================================
   Login – Logo
   ============================================= */
.login-logo-wrap {
  margin-bottom: 44px;
}

.login-logo-img {
  height: 36px;
  object-fit: contain;
  object-position: left;
}

.login-tagline {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--hubon-green);
  margin-top: 10px;
}

/* =============================================
   Login – Títulos
   ============================================= */
.login-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 36px;
}

/* =============================================
   Login – Mensagem de erro
   ============================================= */
.login-error {
  display: none;
  background: rgba(255, 70, 70, 0.1);
  border: 1px solid rgba(255, 70, 70, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #ff7a7a;
  margin-bottom: 14px;
  animation: loginFadeIn 0.3s ease;
}

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

/* =============================================
   Login – Campos do formulário
   ============================================= */
.login-form-group {
  margin-bottom: 16px;
}

.login-form-group label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 8px;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 13px 44px 13px 16px;
  font-family: 'Sora', 'Segoe UI', sans-serif;
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.login-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.login-input-wrap input:focus {
  border-color: rgba(26, 220, 90, 0.55);
  background: rgba(26, 220, 90, 0.04);
  box-shadow: 0 0 0 3px rgba(26, 220, 90, 0.09);
}

.login-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  transition: color 0.2s;
}

.login-icon:hover {
  color: var(--hubon-green);
}

/* =============================================
   Login – Botão entrar
   ============================================= */
.login-btn {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  background: var(--hubon-green);
  border: none;
  border-radius: 9px;
  font-family: 'Sora', 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--hubon-navy);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.login-btn:hover {
  background: #22f066;
  box-shadow: 0 5px 22px var(--hubon-green-glow);
  transform: translateY(-1px);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.login-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0);
  animation: loginRipple 0.55s linear;
  pointer-events: none;
}

@keyframes loginRipple {
  to { transform: scale(4); opacity: 0; }
}

.login-btn .login-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(13, 27, 46, 0.25);
  border-top-color: var(--hubon-navy);
  border-radius: 50%;
  animation: loginSpin 0.7s linear infinite;
  margin: 0 auto;
}

@keyframes loginSpin { to { transform: rotate(360deg); } }

.login-btn.loading .login-btn-text { display: none; }
.login-btn.loading .login-spinner   { display: block; }

/* =============================================
   Login – Esqueceu a senha / rodapé
   ============================================= */
.login-forgot {
  text-align: center;
  margin-top: 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
}

.login-forgot a {
  color: var(--hubon-green);
  text-decoration: none;
  font-weight: 500;
}

.login-forgot a:hover { text-decoration: underline; }

.login-footer-note {
  position: absolute;
  bottom: 24px;
  left: 52px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.5px;
}

/* =============================================
   Login – Animações de entrada
   ============================================= */
.login-panel > * {
  opacity: 0;
  transform: translateY(14px);
  animation: loginSlideUp 0.5s ease forwards;
}

.login-logo-wrap              { animation-delay: 0.05s; }
.login-title                  { animation-delay: 0.14s; }
.login-subtitle               { animation-delay: 0.20s; }
.login-error                  { animation-delay: 0s; }
.login-form-group:nth-child(4){ animation-delay: 0.28s; }
.login-form-group:nth-child(5){ animation-delay: 0.35s; }
.login-btn                    { animation-delay: 0.43s; }
.login-forgot                 { animation-delay: 0.49s; }

@keyframes loginSlideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Login – Responsivo
   ============================================= */
@media (max-width: 640px) {
  .login-panel {
    width: 100%;
    min-width: unset;
    padding: 40px 28px;
  }
  .login-divider { display: none; }
}

/* =============================================
   App – Barra de usuário logado no topo
   ============================================= */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 0 0;
  margin-bottom: -8px;
}

.app-topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

.app-topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hubon-navy);
  color: var(--hubon-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-logout:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}