@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --login-ink: #0f172a;
  --login-muted: #64748b;
  --login-border: #e2e8f0;
  --login-primary: #6366f1;
  --login-primary-dark: #4f46e5;
  --login-violet: #8b5cf6;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--login-ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: #f8fafc;
}

/* ── Same structure: centered shell ── */
.codetrex-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 18px 56px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, #eef2ff 0%, #f8fafc 35%, #f0f9ff 70%, #f8fafc 100%);
}

.codetrex-login-shell::before,
.codetrex-login-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.codetrex-login-shell::before {
  width: 480px;
  height: 480px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 68%);
}

.codetrex-login-shell::after {
  width: 400px;
  height: 400px;
  bottom: -100px;
  right: -80px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 68%);
}

.codetrex-login-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  text-align: center;
}

.codetrex-login-logo {
  width: 200px;
  height: auto;
  object-fit: contain;
  margin-bottom: 28px;
}

.codetrex-login-card {
  padding: 36px 32px 32px;
  border: 1px solid var(--login-border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.07);
  text-align: left;
}

.codetrex-login-card h1 {
  margin: 0 0 8px;
  color: var(--login-ink);
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
}

.codetrex-login-card .login-subtitle {
  margin: 0 0 24px;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.codetrex-login-card .form-label {
  margin-bottom: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.codetrex-input-wrap {
  position: relative;
}

.codetrex-input {
  min-height: 44px;
  padding-left: 42px;
  padding-right: 42px;
  border: 1px solid var(--login-border);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--login-ink);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.codetrex-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.codetrex-input:focus {
  border-color: var(--login-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  outline: none;
}

.codetrex-field-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 2;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.codetrex-password-eye {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  transform: translateY(-50%);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.codetrex-password-eye:hover {
  color: var(--login-primary);
  background: #eef2ff;
}

.codetrex-login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 18px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

.codetrex-login-row a {
  color: var(--login-primary);
  font-weight: 600;
  text-decoration: none;
}

.codetrex-login-row a:hover {
  color: var(--login-primary-dark);
  text-decoration: underline;
}

.codetrex-login-btn {
  min-height: 44px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(118deg, #6366f1 0%, #8b5cf6 50%, #0ea5e9 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.codetrex-login-btn:hover,
.codetrex-login-btn:focus {
  opacity: 0.95;
  transform: translateY(-1px);
  color: #fff;
}

.codetrex-error {
  display: block;
  min-height: 20px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.codetrex-error-box {
  display: block;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.validation-summary-valid.codetrex-error-box {
  display: none;
}

#global-loader {
  background: transparent !important;
  backdrop-filter: none;
}

@media (max-width: 575.98px) {
  .codetrex-login-card {
    padding: 28px 20px 24px;
  }

  .codetrex-login-row {
    flex-direction: row;
    gap: 10px;
  }
}
