:root {
  --login-bg: #070b13;                              /* Fundo geral escuro */
  --card-bg: rgba(18, 27, 43, 0.55);                /* Fundo translúcido do Card */
  --card-border: rgba(255, 255, 255, 0.08);          /* Borda fina translúcida */
  --badge-bg: #091322;                              /* Fundo do círculo do cadeado */
  --input-bg: #131d2b;                              /* Fundo escuro do campo input */
  --input-icon-bg: #08101d;                         /* Fundo escuro da caixa de ícone */
  --input-border: rgba(255, 255, 255, 0.06);        /* Borda do input */
  --text-primary: #ffffff;
  --text-muted: #a0aec0;
  --cyber-green: #00ff88;                           /* Cor verde neon para o badge do sistema */
}

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

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0a111f 0%, #030712 50%, #1c2738 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.login-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 25%, rgba(13, 27, 56, 0.6) 0%, transparent 60%),
    radial-gradient(circle at 85% 15%, rgba(47, 60, 82, 0.4) 0%, transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(9, 19, 34, 0.8) 0%, transparent 70%),
    radial-gradient(circle at 25% 75%, rgba(15, 23, 42, 0.6) 0%, transparent 50%);
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 20px;
}

.login-card-custom {
  position: relative;
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 60px 28px 38px 28px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.brand-wrapper {
  margin-bottom: 4px;
  display: flex;
}

.card-brand {
  font-family: 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyber-green);
  text-transform: uppercase;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.22);
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  user-select: none;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Indicador luminoso pulsante */
.brand-dot {
  width: 6px;
  height: 6px;
  background-color: var(--cyber-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyber-green);
  display: inline-block;
  animation: pulse-dot 1.5s infinite alternate;
}

@keyframes pulse-dot {
  from { opacity: 0.45; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.1); }
}

.badge-container {
  position: absolute;
  top: -42px;
  left: 50%;
  transform: translateX(-50%);
}

.badge-circle {
  width: 84px;
  height: 84px;
  background-color: var(--badge-bg);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.05);
}

.badge-icon {
  width: 32px;
  height: 32px;
  color: var(--text-primary);
  stroke-width: 1.5;
}

/* Input Styles */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
  background: #1a2638;
}

.input-icon-box {
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--input-icon-bg);
  border-right: 1px solid var(--input-border);
  border-top-left-radius: 11px;
  border-bottom-left-radius: 11px;
  flex-shrink: 0;
}

.input-icon-box svg {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  transition: fill 0.2s ease;
}

.input-group:focus-within .input-icon-box svg {
  fill: var(--text-primary);
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

.input-group input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Password Toggle Button */
.toggle-pwd {
  background: transparent;
  border: none;
  outline: none;
  padding: 0 14px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.toggle-pwd:hover {
  color: var(--text-primary);
}

.toggle-pwd svg {
  width: 18px;
  height: 18px;
}

/* Auto-fill Styling */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #131d2b inset !important;
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000000s ease-in-out 0s;
}

.input-group:focus-within input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #1a2638 inset !important;
}

/* Options & Checkbox */
.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 30px;
  user-select: none;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.remember-me:hover {
  color: var(--text-primary);
}

.remember-me input {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: #3b82f6;
  border-radius: 4px;
}

/* Submit Button */
.btn-submit {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 56px);
  height: 44px;
  background: linear-gradient(135deg, rgba(82, 120, 169, 0.75), rgba(43, 76, 117, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.btn-submit:hover {
  background: linear-gradient(135deg, rgba(98, 140, 194, 0.85), rgba(53, 90, 137, 0.85));
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
  transform: translate(-50%, -2px);
}

.btn-submit:active {
  transform: translate(-50%, 0);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Error Message Alert */
.error-message {
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.8rem;
  text-align: center;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.error-message svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
