/* ==========================================================================
   United QA Studio — Pixel-Perfect Keycloak Dark Glassmorphism Theme
   ========================================================================== */

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

:root {
  --bg-dark: #0b0f19;
  --bg-card: rgba(30, 41, 59, 0.7);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #d946ef;
  --cyan: #06b6d4;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --error: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
}

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

html, body {
  min-height: 100vh;
  width: 100%;
  background-color: #07090e;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.20), transparent 60%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(at 15% 15%, rgba(6, 182, 212, 0.12) 0px, transparent 55%),
    radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 28px 28px;
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

/* Center Wrapper — ensures card NEVER jumps left */
.login-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Main Glassmorphic Card — exact 480px clone of login.html */
.login-card {
  width: 100%;
  max-width: 480px;
  padding: 2.5rem 2.25rem;
  border-radius: 20px;
  background: rgba(13, 19, 36, 0.82);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 
    0 30px 70px -15px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Top Neon Gradient Border */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #d946ef, #06b6d4);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
}

/* Logo Badge */
.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
}

.login-logo:hover {
  transform: scale(1.05) rotate(-2deg);
}

.login-logo img {
  width: 56px;
  height: 40px;
  object-fit: contain;
}

/* Title & Subtitle */
.login-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 0.35rem;
}

/* Wordmark per brand pack: one word, flat violet "Buster" (no gradient). */
.login-title .brand-buster {
  color: #7C3AED;
}

.gradient-text {
  background: linear-gradient(135deg, #a78bfa, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-pill {
  font-family: 'Fira Code', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.35);
  letter-spacing: 0.04em;
  margin-left: 4px;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.45;
}

/* Reset Password & Sub-Headers */
.reset-password-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.form-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Error / Success Alerts */
.error-alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid var(--error);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

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

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--warning);
  color: #fcd34d;
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-label i {
  color: var(--primary);
  font-size: 0.8rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}

.form-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.85);
}

.forgot-password-link {
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

/* Remember Me Checkbox */
.form-options-row {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* Submit & Stack Actions */
.form-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
}

.sso-submit-btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #7c3aed 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 11px;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.42);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.sso-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.6);
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6d28d9 100%);
}

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

.btn-link-action {
  margin-top: 1.25rem;
}

.back-to-login-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-to-login-link:hover {
  color: #ffffff;
  transform: translateX(-2px);
}

/* Feature Pills */
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

/* Logout Confirm Box */
.logout-confirm-box,
.info-message-box,
.error-page-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.logout-icon-wrapper,
.error-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fca5a5;
  font-size: 1.5rem;
  margin: 0 auto;
}

.info-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  font-size: 1.5rem;
  margin: 0 auto;
}

.logout-title,
.info-title,
.error-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
}

.logout-desc,
.error-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.btn-secondary-link {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.btn-secondary-link:hover {
  color: #ffffff;
}
