/* gsk-login.css — Modern clean login design */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --accent: #06b6d4;
  --bg-dark: #0f172a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-bg-focus: rgba(255, 255, 255, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --success: #10b981;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.15);
}

html, body { height: 100%; }

body.login-body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Hide PWA install button */
#butInstall { display: none !important; }

/* ========== Background ========== */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: -1; }
.aurora__layer {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  filter: blur(80px);
}
.a1 { width: 600px; height: 600px; left: -150px; top: -100px; background: #4f46e5; animation: drift1 20s ease-in-out infinite; }
.a2 { width: 500px; height: 500px; right: -100px; top: -50px; background: #06b6d4; animation: drift2 24s ease-in-out infinite; }
.a3 { width: 550px; height: 550px; left: 20%; bottom: -200px; background: #8b5cf6; animation: drift3 22s ease-in-out infinite; }
.a4 { width: 450px; height: 450px; right: -100px; bottom: -150px; background: #0ea5e9; animation: drift1 26s ease-in-out infinite reverse; }
@keyframes drift1 { 50% { transform: translate(80px, 40px); } }
@keyframes drift2 { 50% { transform: translate(-60px, 30px); } }
@keyframes drift3 { 50% { transform: translate(50px, -40px); } }

/* ========== Layout ========== */
.login-container.container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.login-container > .row {
  width: 420px;
  max-width: 92vw;
  margin: 0;
  padding: 24px 16px;
}

.login-container .col-md-6,
.login-container .col-md-offset-3,
.login-container .col-lg-4,
.login-container .col-lg-offset-4 {
  float: none;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  padding: 0;
}

/* ========== Brand ========== */
.brand {
  margin-bottom: 32px;
}
.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transition: transform 0.3s ease;
}
.brand-logo:hover {
  transform: scale(1.05);
}

/* Typewriter tagline */
.tagline {
  color: var(--text-secondary);
  min-height: 22px;
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-right: 2px solid var(--accent);
  white-space: nowrap;
  overflow: hidden;
}

/* ========== Card / Panel ========== */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

.panel-heading {
  padding: 28px 32px 0 !important;
  background: transparent !important;
  border: none !important;
}

.panel-title {
  color: var(--text-primary) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  margin: 0;
}

.panel-body--spaced {
  padding: 24px 32px 28px !important;
  background: transparent !important;
  backdrop-filter: none !important;
}

/* ========== Form ========== */
.form-group--spaced {
  margin-bottom: 16px;
  position: relative;
}

.form-group--spaced .form-control {
  height: 50px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px 12px 44px;
  transition: all 0.2s ease;
  box-shadow: none;
}

.form-group--spaced .form-control::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.form-group--spaced .form-control:focus {
  background: var(--input-bg-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  outline: none;
}

/* Input icons */
.form-group--spaced::before {
  font-family: 'FontAwesome';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  z-index: 2;
  pointer-events: none;
  transition: color 0.2s ease;
}
.form-group--spaced:first-child::before { content: '\f007'; }
.form-group--spaced:nth-child(2)::before { content: '\f023'; }

.form-group--spaced:focus-within::before {
  color: var(--primary-light);
}

/* ========== Alert ========== */
.login-alert {
  margin: 12px 0 16px !important;
  padding: 12px 16px !important;
  border-radius: var(--radius-md) !important;
  background: var(--danger-bg) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-align: center !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.login-alert:before {
  content: "\f071  " !important;
  font-family: 'FontAwesome' !important;
  margin-right: 6px;
}

/* ========== Submit Button ========== */
.btn.shiny {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 50px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn.shiny:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}
.btn.shiny:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}
.btn.shiny::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  animation: shine 4s infinite;
}
@keyframes shine { 0% { left: -100%; } 100% { left: 160%; } }

.btn.shiny i { margin-right: 6px; }

.is-loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

.success-pulse { animation: successPulse 0.6s ease; }
@keyframes successPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  100% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
}

/* ========== Ripple ========== */
.ripple { position: relative; overflow: hidden; }
.ripple .ripple-circle {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
  opacity: 0.5;
  background: rgba(255, 255, 255, 0.4);
  animation: rippleAnim 600ms ease-out;
}
@keyframes rippleAnim {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  to { transform: translate(-50%, -50%) scale(20); opacity: 0; }
}

/* ========== Shake ========== */
.shake { animation: shakeX 0.5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shakeX {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* ========== Links ========== */
.ghost-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.ghost-link:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Register section */
.register-section {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
}
.register-section p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.btn-register {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff !important;
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  transition: all 0.25s ease;
  text-align: center;
}
.btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
  color: #fff !important;
  text-decoration: none;
}

/* ========== Footer ========== */
.copy {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 32px;
  line-height: 1.6;
}
.copy a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.copy a:hover {
  color: var(--accent);
}

/* ========== Gooey Cursor ========== */
#gooey-cursor { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
#gooey-cursor .dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-light);
  transform: translate(-50%, -50%);
  opacity: 0.6;
}
#gooey-cursor .tail { width: 7px; height: 7px; opacity: 0.35; }
@media (max-width: 992px) {
  #gooey-cursor { display: none; }
}

/* ========== Loading Animation ========== */
.loader-wrapper {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader-wrapper.fade-out {
  opacity: 0;
  visibility: hidden;
}
.loader-brand {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.gsk-loader {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
  color: var(--text-muted);
  margin-top: 20px;
  font-size: 14px;
  font-weight: 500;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
  .login-container { padding: 16px 12px; }
  .brand { margin-bottom: 24px; }
  .brand-logo { width: 56px; height: 56px; border-radius: 14px; }
  .panel-heading { padding: 20px 20px 0 !important; }
  .panel-body--spaced { padding: 20px 20px 24px !important; }
  .panel-title { font-size: 18px !important; }
  .copy { margin-top: 24px; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .login-container .col-md-6 { max-width: 400px; }
}
