/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE — White Force Secure Access Gateway
   Dark card design matching dev.whiteforce.pro/login
   ═══════════════════════════════════════════════════════════════ */

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

body {
  min-height: 100vh;
  background: #12151a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* ═══ BACKGROUND EFFECTS ═══ */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: rgba(232, 96, 76, 0.04);
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

/* ═══ LOGIN CARD ═══ */
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  position: relative;
  z-index: 10;
  animation: cardFadeIn 0.5s ease-out;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Top gradient bar */
.card-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, #e8604c, transparent);
  opacity: 0.6;
  border-radius: 12px 12px 0 0;
}

/* ═══ CARD HEADER ═══ */
.card-header {
  text-align: center;
  padding: 40px 32px 8px;
}

.login-logo {
  height: 80px;
  width: auto;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 15px rgba(232, 96, 76, 0.3));
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.login-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ═══ FORM ═══ */
.login-form {
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

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

.input-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-wrapper:focus-within .input-icon {
  color: #e8604c;
}

.input-wrapper input {
  width: 100%;
  height: 42px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0 12px 0 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 1px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.15);
  font-size: 12px;
}

.input-wrapper input:focus {
  border-color: rgba(232, 96, 76, 0.4);
  box-shadow: 0 0 0 2px rgba(232, 96, 76, 0.08);
}

/* Password toggle */
.toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s ease;
}

.toggle-password:hover svg {
  color: #e8604c;
}

/* Password field extra padding for toggle button */
#password {
  padding-right: 40px;
}

/* ═══ ERROR MESSAGE ═══ */
.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  animation: errorShake 0.3s ease;
}

.login-error svg {
  width: 16px;
  height: 16px;
  color: #ef4444;
  flex-shrink: 0;
}

.login-error span {
  font-size: 12px;
  color: #ef4444;
  font-weight: 500;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

/* ═══ AUTHENTICATE BUTTON ═══ */
.auth-btn {
  width: 100%;
  height: 48px;
  background: rgba(232, 96, 76, 0.85);
  border: 1px solid rgba(232, 96, 76, 0.3);
  border-radius: 6px;
  color: #000000;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px rgba(232, 96, 76, 0.15);
  margin-top: 4px;
}

.auth-btn:hover {
  background: rgba(232, 96, 76, 1);
  box-shadow: 0 0 30px rgba(232, 96, 76, 0.3);
  transform: translateY(-1px);
}

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

.auth-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-btn-text {
  font-family: 'Inter', sans-serif;
}

.auth-btn-chevron {
  width: 16px;
  height: 16px;
  color: #000000;
}

.auth-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ═══ CARD FOOTER ═══ */
.card-footer {
  padding: 0 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.restricted-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.15);
  text-align: center;
  line-height: 1.6;
  letter-spacing: 0.5px;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.server-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.server-dot.online {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.server-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(34, 197, 94, 0.7);
  letter-spacing: 1px;
}

/* ═══ SELECTION ═══ */
::selection {
  background: rgba(232, 96, 76, 0.3);
  color: #ffffff;
}
