/* === LOGIN PAGE — Stripe-style Auth === */
:root {
  --login-primary: #0f172a;
  --login-accent: #f59e0b;
  --login-bg: linear-gradient(165deg, #070E24 0%, #0B133A 35%, #0F1E45 65%, #0A1535 100%);
}

[data-theme="dark"] {
  --login-primary: #0F1835;
  --login-accent: #f59e0b;
  --login-bg: linear-gradient(165deg, #050814 0%, #080E24 35%, #0B1335 65%, #070E24 100%);
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(rgba(8, 17, 47, 0.85), rgba(8, 17, 47, 0.85)), url('../../img/login.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  -webkit-font-smoothing: antialiased;
}

/* === SKIP LINK === */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 99999;
  padding: 12px 24px;
  background: var(--login-accent);
  color: var(--login-primary);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(243, 172, 16, 0.3);
  font-family: 'Inter', sans-serif;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
  box-shadow: 0 8px 24px rgba(243, 172, 16, 0.4);
}

/* === LOGIN CARD === */
.login-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 44px;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: loginFadeIn 0.5s ease-out;
  position: relative;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header img {
  width: 100px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.login-header h2 {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
}

.login-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin: 8px 0 0;
}

/* === LOGIN THEME TOGGLE === */
.login-theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.login-theme-toggle:hover {
  background: rgba(243, 172, 16, 0.2);
  border-color: var(--login-accent);
  color: var(--login-accent);
}

.login-theme-toggle:focus-visible {
  outline: 2px solid var(--login-accent);
  outline-offset: 2px;
}

/* === BACK TO HOME === */
.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 20px;
  transition: all 0.2s ease;
  padding: 6px 0;
}

.btn-back-home:hover {
  color: var(--login-accent);
  gap: 12px;
}

.btn-back-home i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.btn-back-home:hover i {
  transform: translateX(-3px);
}

/* === FORM === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus {
  border-color: var(--login-accent);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(243, 172, 16, 0.1);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-group input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px rgba(8, 17, 47, 0.9) inset !important;
  -webkit-text-fill-color: white !important;
  border-color: rgba(243, 172, 16, 0.4);
}

/* === BUTTON === */
.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--login-accent);
  border: none;
  border-radius: 12px;
  color: var(--login-primary);
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-login:hover {
  background: #e29f0e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(243, 172, 16, 0.25);
}

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

.btn-login:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.btn-login.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* === ERROR MESSAGE === */
.error-msg {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  display: none;
  text-align: center;
  border: 1px solid rgba(239, 68, 68, 0.2);
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.error-msg.visible {
  display: flex;
}

/* === FOOTER === */
.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.login-footer a {
  color: var(--login-accent);
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
  .login-card {
    margin: 16px;
    padding: 32px 24px;
    border-radius: 16px;
  }

  .login-header h2 {
    font-size: 1.3rem;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .login-card {
    animation: none;
  }
}
