/* =========================================================
   MIPOWER SECURITY GATEWAY - LOGIN STYLESHEET
   Independent, Encrypted & Zero-Leakage Authentication Styling
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', var(--font-main);
  --font-mono: 'JetBrains Mono', monospace;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.45);
  --bg-dark: #060913;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.14);
}

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

html, body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-overlay-backdrop {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: #060913;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(900px circle at 50% 20%, rgba(37, 99, 235, 0.22), transparent 55%),
    radial-gradient(700px circle at 80% 80%, rgba(99, 102, 241, 0.14), transparent 50%),
    linear-gradient(180deg, #060913 0%, #0a101f 100%);
  background-size: 36px 36px, 36px 36px, 100% 100%, 100% 100%, 100% 100%;
}

.auth-card {
  position: relative;
  max-width: 440px;
  width: 100%;
  background: linear-gradient(165deg, rgba(18, 26, 43, 0.94) 0%, rgba(10, 15, 28, 0.98) 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 38px 34px 28px;
  box-shadow:
    0 30px 80px -15px rgba(0, 0, 0, 0.9),
    0 0 50px -10px rgba(37, 99, 235, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: authCardEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3b82f6 50%, #60a5fa 75%, transparent);
  border-radius: 2px;
}

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

.auth-header {
  margin-bottom: 24px;
}

.auth-icon-wrap {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #4338ca 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  animation: authIconPulse 3s ease-in-out infinite alternate;
}

@keyframes authIconPulse {
  0% { box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.25); }
  100% { box-shadow: 0 14px 32px rgba(37, 99, 235, 0.7), 0 0 20px rgba(59, 130, 246, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.4); }
}

.auth-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  margin-bottom: 10px;
}

.auth-badge-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #FFFFFF;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
  font-weight: 400;
}

.auth-form {
  text-align: left;
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-bottom: 7px;
}

.auth-input-container {
  position: relative;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.auth-input-container:focus-within .auth-input-icon {
  color: #60a5fa;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 42px 12px 38px;
  background: #0d1424;
  border: 1px solid #2d3b55;
  border-radius: 10px;
  color: #f8fafc;
  font-size: 14px;
  font-family: var(--font-main);
  font-weight: 500;
  letter-spacing: 0.2px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.auth-input::placeholder {
  color: #475569;
  font-weight: 400;
}

.auth-input:hover {
  border-color: #3b82f6;
  background: #111a2f;
}

.auth-input:focus {
  border-color: #3b82f6;
  background: #131e36;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), 0 0 18px rgba(59, 130, 246, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-toggle-pass-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.auth-toggle-pass-btn:hover {
  color: #60a5fa;
  background: rgba(255, 255, 255, 0.08);
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #cbd5e1;
  user-select: none;
  font-size: 12.5px;
  font-weight: 500;
}

.auth-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid #475569;
  background: #0d1424;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.15s ease;
  margin: 0;
  position: relative;
}

.auth-checkbox:checked {
  background: #2563eb;
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.auth-checkbox:checked::before {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.auth-submit-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 11px;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.auth-submit-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.05);
}

.auth-submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
  filter: brightness(0.95);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.auth-submit-btn .btn-arrow-icon {
  transition: transform 0.2s ease;
}

.auth-submit-btn:hover .btn-arrow-icon {
  transform: translateX(4px);
}

.auth-alert-danger {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15);
  animation: authCardEnter 0.2s ease forwards;
  text-align: left;
}

.auth-footer-meta {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.auth-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auth-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3b82f6;
}

.auth-meta-sep {
  color: #334155;
}
