/* ============================================================
   REFORCE CHIPS — Login Page Styles
   ============================================================ */

/* ── Body ── */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0C1117 0%, #0F2544 40%, #0693E3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  font-family: var(--font-family);
}

/* ============================================================
   BACKGROUND DECORATIVE ELEMENTS
   ============================================================ */

.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Repeating dot texture */
.login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Large glowing circle — top-right */
.login-bg-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 147, 227, 0.25) 0%, transparent 70%);
  animation: floatBg 12s ease-in-out infinite;
}

.login-bg-circle-1 {
  width: 700px;
  height: 700px;
  top: -200px;
  right: -150px;
  animation-duration: 14s;
  animation-delay: 0s;
}

.login-bg-circle-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(229, 105, 29, 0.12) 0%, transparent 70%);
  animation-duration: 18s;
  animation-delay: -4s;
  animation-direction: alternate-reverse;
}

.login-bg-circle-3 {
  width: 300px;
  height: 300px;
  top: 40%;
  left: 30%;
  background: radial-gradient(circle, rgba(6, 147, 227, 0.15) 0%, transparent 70%);
  animation-duration: 10s;
  animation-delay: -7s;
}

@keyframes floatBg {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(20px, -30px) scale(1.05); }
  66%  { transform: translate(-15px, 20px) scale(0.97); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ============================================================
   CONTAINER & CARD
   ============================================================ */

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 40px 40px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: cardEntry 0.5s var(--transition-spring);
}

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

/* ============================================================
   LOGO AREA
   ============================================================ */

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.login-logo img {
  height: 48px;
  max-width: 200px;
  object-fit: contain;
}

.logo-fallback {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
}

/* ============================================================
   HEADER TEXT
   ============================================================ */

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

.login-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
  line-height: 1.5;
}

/* ============================================================
   ERROR ALERT
   ============================================================ */

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--color-error);
  border-radius: var(--border-radius);
  color: #991b1b;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: 20px;
  animation: shakeError 0.4s ease;
}

.login-error svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-error);
}

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

/* ============================================================
   FORM
   ============================================================ */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form .form-group {
  gap: 6px;
}

.login-form .form-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-gray-700);
}

/* ── Input with icon wrapper ── */
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-gray-400);
  pointer-events: none;
  flex-shrink: 0;
  transition: color var(--transition-fast);
  z-index: 1;
}

.input-with-icon {
  padding-left: 40px;
  padding-right: 42px;
  height: 46px;
  font-size: var(--font-size-sm);
  border: 1.5px solid var(--color-gray-300);
  border-radius: var(--border-radius);
  width: 100%;
  background: white;
  color: var(--color-gray-900);
  outline: none;
  font-family: var(--font-family);
  transition: all var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.input-with-icon:hover:not(:focus) {
  border-color: var(--color-gray-400);
}

.input-with-icon:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(6, 147, 227, 0.1);
}

.input-with-icon:focus + .input-icon,
.input-icon-wrapper:focus-within .input-icon {
  color: var(--color-primary);
}

.input-with-icon::placeholder {
  color: var(--color-gray-400);
}

/* ── Toggle password visibility ── */
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gray-400);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color var(--transition-fast), background var(--transition-fast);
  font-family: var(--font-family);
  z-index: 2;
}

.toggle-password:hover {
  color: var(--color-primary);
  background: var(--color-gray-100);
}

.toggle-password svg {
  width: 16px;
  height: 16px;
}

/* ── Remember me row ── */
.login-form-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -6px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.login-remember input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.login-remember-label {
  font-size: var(--font-size-xs);
  color: var(--color-gray-600);
  cursor: pointer;
}

.login-forgot {
  font-size: var(--font-size-xs);
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  line-height: inherit;
}

.login-forgot:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(6, 147, 227, 0.4);
  letter-spacing: 0.01em;
}

/* Shimmer effect on hover */
.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.15) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-login:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.btn-login:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  box-shadow: 0 6px 20px rgba(6, 147, 227, 0.55);
  transform: translateY(-1px);
}

.btn-login:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(6, 147, 227, 0.35);
}

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

/* ============================================================
   LOADING SPINNER
   ============================================================ */

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ============================================================
   DIVIDER
   ============================================================ */

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-gray-200);
}

.login-divider-text {
  font-size: var(--font-size-xs);
  color: var(--color-gray-400);
  white-space: nowrap;
}

/* ============================================================
   FOOTER
   ============================================================ */

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-gray-100);
  font-size: var(--font-size-xs);
  color: var(--color-gray-400);
}

.login-version {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--color-gray-100);
  border-radius: var(--border-radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-gray-500);
}

.login-divider-dot {
  width: 3px;
  height: 3px;
  background: var(--color-gray-300);
  border-radius: 50%;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px 28px;
    border-radius: 16px;
  }

  .login-title {
    font-size: var(--font-size-xl);
  }

  .login-subtitle {
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 380px) {
  .login-card {
    padding: 28px 20px 24px;
  }

  .login-logo img {
    height: 40px;
  }

  .logo-fallback {
    font-size: 1.75rem;
  }
}
