@import "tailwindcss";

@layer base {
  body {
    background-color: #030712;
    color: #f8fafc;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
  }
}

/* Modal de Autenticação HoraNexa — Padrão UX Enterprise */
.hn-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background-color: #030712;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  opacity: 1;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hn-auth-overlay.hn-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hn-auth-container {
  width: 100%;
  max-width: 960px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: hnAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .hn-auth-container {
    flex-direction: row;
    min-height: 580px;
  }
}

@keyframes hnAppear {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Painel Esquerdo: Identidade Visual e Explicação */
.hn-auth-info-panel {
  flex: 1.1;
  background: linear-gradient(145deg, #1e1b4b, #0f172a 70%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

@media (min-width: 768px) {
  .hn-auth-info-panel {
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 3rem 2.5rem;
  }
}

/* Painel Direito: Formulário de Login */
.hn-auth-form-panel {
  flex: 1;
  background: #0f172a;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .hn-auth-form-panel {
    padding: 3rem 2.5rem;
  }
}

.hn-auth-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.375rem;
}

.hn-auth-input {
  width: 100%;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.hn-auth-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: #090d16;
}

.hn-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #10b981 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.hn-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.55);
}

.hn-auth-submit:active {
  transform: translateY(0);
}

.hn-quick-tag {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.hn-quick-tag:hover {
  background: #312e81;
  border-color: #6366f1;
  color: #ffffff;
}

/* Botão de Logout e Limpar Dados no Topo */
.hn-top-btn-clean {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s;
}

.hn-top-btn-clean:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #ffffff;
}

.hn-top-btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  cursor: pointer;
  transition: all 0.2s;
}

.hn-top-btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
}

/* Legibilidade do OCR sobre papéis claros / fotos */
.hn-ocr-badge {
  position: absolute;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
  pointer-events: auto !important;
  z-index: 20 !important;
  letter-spacing: -0.02em !important;
}

.hn-ocr-badge-success {
  background: #022c22 !important;
  color: #34d399 !important;
  border: 1.5px solid #10b981 !important;
}

.hn-ocr-badge-warning {
  background: #451a03 !important;
  color: #fbbf24 !important;
  border: 1.5px solid #f59e0b !important;
}

/* Banner de resumo financeiro ao lado da tabela */
.hn-financial-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4);
}

