/* login-blueprint.css — Estetica Industrial Blueprint Martin Tools */
:root {
  --bp-bg-deep: #050e1a;
  --bp-bg-grid: #08172c;
  --bp-line-subtle: rgba(56, 189, 248, 0.08);
  --bp-line-major: rgba(56, 189, 248, 0.18);
  --bp-cyan: #38bdf8;
  --bp-cyan-glow: rgba(56, 189, 248, 0.35);
  --bp-blue-brand: #0284c7;
  --bp-card-bg: rgba(8, 24, 46, 0.78);
  --bp-card-border: rgba(56, 189, 248, 0.28);
  --bp-card-highlight: rgba(56, 189, 248, 0.5);
  --bp-text-main: #f0f6fc;
  --bp-text-muted: #8ba2be;
  --bp-text-dim: #4d6b8f;
  --bp-success: #10b981;
  --bp-danger: #ef4444;
  --bp-font-code: 'JetBrains Mono', monospace;
  --bp-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --bp-font-heading: 'Oswald', sans-serif;
}

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

body.bp-login-body {
  min-height: 100vh;
  background-color: var(--bp-bg-deep);
  background-image: 
    linear-gradient(var(--bp-line-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-line-subtle) 1px, transparent 1px),
    linear-gradient(var(--bp-line-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-line-major) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 30%, rgba(14, 165, 233, 0.12) 0%, rgba(5, 14, 26, 0.95) 75%);
  background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px, 100% 100%;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px, 0 0;
  font-family: var(--bp-font-sans);
  color: var(--bp-text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 24px 16px;
}

/* Moldura CAD de Prancha Técnica */
.bp-blueprint-frame {
  position: fixed;
  inset: 12px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  pointer-events: none;
  z-index: 1;
}

.bp-frame-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--bp-cyan);
  border-style: solid;
}
.bp-corner-tl { top: -1px; left: -1px; border-width: 3px 0 0 3px; }
.bp-corner-tr { top: -1px; right: -1px; border-width: 3px 3px 0 0; }
.bp-corner-bl { bottom: -1px; left: -1px; border-width: 0 0 3px 3px; }
.bp-corner-br { bottom: -1px; right: -1px; border-width: 0 3px 3px 0; }

.bp-frame-mark {
  position: absolute;
  font-family: var(--bp-font-code);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--bp-text-dim);
  text-transform: uppercase;
}
.bp-mark-top { top: 8px; left: 50%; transform: translateX(-50%); }
.bp-mark-left { left: 8px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.bp-mark-right { right: 8px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.bp-mark-bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }

/* Watermark de Fundo: Desenho Técnico Vetorial */
.bp-watermark-svg {
  position: fixed;
  right: -5vw;
  bottom: -5vh;
  width: 55vw;
  max-width: 720px;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  stroke: var(--bp-cyan);
}

/* Container do Cartão de Login */
.bp-login-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
  margin: auto;
}

/* Card Estilo Painel de Controle Glassmorphism */
.bp-login-panel {
  background: var(--bp-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bp-card-border);
  border-radius: 6px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 30px rgba(14, 165, 233, 0.12);
  padding: 36px 32px 30px;
  position: relative;
  overflow: hidden;
}

/* Linha Superior Iluminada Ciano */
.bp-login-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--bp-cyan), transparent);
}

/* Cabecalho do Painel */
.bp-panel-header {
  text-align: center;
  margin-bottom: 28px;
}

.bp-brand-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--bp-font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  line-height: 1;
}

.bp-brand-badge {
  color: var(--bp-cyan);
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.bp-brand-sub {
  font-family: var(--bp-font-code);
  font-size: 11px;
  color: var(--bp-cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.9;
}

.bp-security-notice {
  font-size: 12px;
  color: var(--bp-text-muted);
  line-height: 1.5;
  margin-top: 10px;
}

/* Formulário e Grupos de Entrada */
.bp-form-group {
  margin-bottom: 20px;
  position: relative;
}

.bp-form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--bp-font-code);
  font-size: 11px;
  color: var(--bp-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.bp-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.bp-input-icon {
  position: absolute;
  left: 14px;
  color: var(--bp-text-dim);
  font-size: 14px;
  transition: color 0.2s;
  pointer-events: none;
}

.bp-input {
  width: 100%;
  background: rgba(4, 13, 26, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  padding: 12px 14px 12px 40px;
  font-family: var(--bp-font-code);
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: all 0.2s ease;
}

.bp-input:focus {
  border-color: var(--bp-cyan);
  background: rgba(4, 13, 26, 0.9);
  box-shadow: 
    0 0 0 1px var(--bp-cyan),
    0 0 16px rgba(56, 189, 248, 0.25);
}

.bp-input:focus + .bp-input-icon,
.bp-input-wrapper:focus-within .bp-input-icon {
  color: var(--bp-cyan);
}

.bp-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--bp-text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.bp-toggle-pwd:hover { color: var(--bp-cyan); }

/* Ações Secundárias (Esqueci Senha) */
.bp-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
  margin-bottom: 22px;
}

.bp-link-btn {
  background: transparent;
  border: none;
  font-family: var(--bp-font-code);
  font-size: 11px;
  color: var(--bp-cyan);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.85;
  transition: opacity 0.2s, text-shadow 0.2s;
}
.bp-link-btn:hover {
  opacity: 1;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

/* Botão de Submissão Industrial */
.bp-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 4px;
  padding: 13px 20px;
  font-family: var(--bp-font-heading);
  font-size: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 14px rgba(2, 132, 199, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transition: all 0.2s ease;
}

.bp-btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 
    0 6px 20px rgba(14, 165, 233, 0.5),
    0 0 15px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.bp-btn-submit:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.bp-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Alertas de Mensagem */
.bp-msg-box {
  display: none;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 18px;
  font-family: var(--bp-font-code);
  animation: bpFadeIn 0.25s ease-out;
}

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

.bp-msg-box.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.bp-msg-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* Painel Alternativo de Reset de Senha & Nova Senha */
.bp-view-reset,
.bp-view-new-password {
  display: none;
}

.bp-view-reset.active,
.bp-view-new-password.active {
  display: block;
}

.bp-view-login.hidden {
  display: none;
}

/* Carimbo Técnico de Engenharia no Rodapé */
.bp-footer-stamp {
  margin-top: 24px;
  text-align: center;
  font-family: var(--bp-font-code);
  font-size: 10px;
  color: var(--bp-text-dim);
  letter-spacing: 0.5px;
  line-height: 1.6;
}

.bp-footer-stamp span {
  color: var(--bp-text-muted);
}

/* Seletor de Idioma CAD Blueprint no Canto Superior */
.bp-lang-bar {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 24, 46, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 4px;
  padding: 5px 10px;
  backdrop-filter: blur(8px);
  font-family: var(--bp-font-code);
  font-size: 11px;
  color: var(--bp-text-muted);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bp-lang-globe {
  color: var(--bp-cyan);
  font-size: 12px;
  margin-right: 2px;
}

.bp-lang-sep {
  color: var(--bp-line-major);
  font-size: 10px;
  user-select: none;
}

.bp-lang-flag {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--bp-text-muted);
  transition: all 0.2s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
  user-select: none;
}

.bp-lang-flag:hover {
  color: var(--bp-cyan);
  background: rgba(56, 189, 248, 0.1);
}

.bp-lang-flag.active {
  color: #ffffff;
  background: var(--bp-blue-brand);
  font-weight: 700;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}
