/* ============================================================
   CJP LOGIN PAGE — Orange / Gold Theme
   ============================================================ */

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

:root {
  --orange:      #FF6500;
  --orange-dark: #CC5200;
  --orange-deep: #E65000;
  --gold:        #FFB300;
  --gold-light:  #FFD54F;
  --bg-dark:     #111827;
  --bg-panel:    #1C2331;
  --text-light:  #F9FAFB;
  --text-muted:  #9CA3AF;
  --form-bg:     #FFFFFF;
  --input-border:#E5E7EB;
  --input-focus: #FF6500;
  --danger:      #EF4444;
  --success:     #10B981;
  --shadow-card: 0 25px 60px rgba(0,0,0,.18);
  --radius:      16px;
  --radius-sm:   10px;
  --transition:  .25s ease;
}

html, body {
  height: 100%;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-dark);
  overflow-x: hidden;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.cjp-login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── LEFT BRANDING PANEL ────────────────────────────────── */
.cjp-brand-panel {
  position: relative;
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 48px;
  background: linear-gradient(145deg, #0F1923 0%, #1C2331 45%, #1A1200 100%);
  overflow: hidden;
  z-index: 0;
}

/* animated gradient orbs */
.cjp-brand-panel::before {
  content: '';
  position: absolute;
  top: -120px; left: -120px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,101,0,.35) 0%, transparent 70%);
  animation: floatOrb 8s ease-in-out infinite;
  z-index: -1;
}
.cjp-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,179,0,.28) 0%, transparent 70%);
  animation: floatOrb 10s ease-in-out infinite reverse;
  z-index: -1;
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(30px, 20px) scale(1.08); }
}

/* floating geo shapes */
.geo-shape {
  position: absolute;
  opacity: .07;
  animation: spinSlow 20s linear infinite;
}
.geo-shape.hex {
  width: 160px; height: 160px;
  top: 12%; right: 8%;
  background: conic-gradient(var(--orange), var(--gold), var(--orange));
  clip-path: polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%);
  animation-duration: 25s;
}
.geo-shape.tri {
  width: 100px; height: 100px;
  bottom: 18%; left: 6%;
  background: var(--gold);
  clip-path: polygon(50% 0%,100% 100%,0% 100%);
  animation-direction: reverse;
  animation-duration: 18s;
}
.geo-shape.ring {
  width: 200px; height: 200px;
  bottom: 8%; right: 12%;
  border: 18px solid var(--orange);
  border-radius: 50%;
  background: transparent;
  opacity: .06;
  animation-duration: 30s;
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Grid dots overlay */
.cjp-brand-panel .grid-dots {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,101,0,.18) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: -1;
}

/* brand content */
.brand-content { position: relative; z-index: 1; text-align: center; }

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px; height: 96px;
  background: rgba(255,255,255,.06);
  border-radius: 24px;
  border: 1px solid rgba(255,101,0,.3);
  box-shadow: 0 0 40px rgba(255,101,0,.2);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  transition: box-shadow var(--transition);
}
.brand-logo-wrap:hover {
  box-shadow: 0 0 60px rgba(255,179,0,.4);
}
.brand-logo-wrap img {
  width: 62px; height: 62px;
  object-fit: contain;
}

.brand-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-light);
  letter-spacing: -.5px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.brand-title span {
  background: linear-gradient(90deg, var(--orange), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-subtitle {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto 36px;
}

/* feature pills */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  width: 100%;
  max-width: 320px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,101,0,.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .88rem;
  color: var(--text-light);
  backdrop-filter: blur(4px);
  transition: background var(--transition), border-color var(--transition);
}
.feature-list li:hover {
  background: rgba(255,101,0,.12);
  border-color: rgba(255,101,0,.4);
}
.feature-list li .fi-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .85rem;
  color: #fff;
}

/* ── RIGHT FORM PANEL ───────────────────────────────────── */
.cjp-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #F8F9FB;
  position: relative;
}

/* subtle top accent */
.cjp-form-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--gold), var(--orange));
  background-size: 200% 100%;
  animation: gradientSlide 3s linear infinite;
}
@keyframes gradientSlide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.login-card {
  background: var(--form-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 52px 48px;
  width: 100%;
  max-width: 460px;
}

/* heading */
.login-card .card-eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.login-card h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -.5px;
  margin-bottom: 6px;
}
.login-card .card-tagline {
  font-size: .9rem;
  color: #6B7280;
  margin-bottom: 36px;
}

/* divider */
.form-divider {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.form-divider span { font-size: .8rem; color: #9CA3AF; white-space: nowrap; }
.form-divider::before, .form-divider::after {
  content: ''; flex: 1;
  height: 1px; background: #E5E7EB;
}

/* ── INPUTS ─────────────────────────────────────────────── */
.form-group {
  position: relative;
  margin-bottom: 22px;
}
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .input-icon {
  position: absolute;
  left: 16px;
  font-size: 1rem;
  color: #9CA3AF;
  pointer-events: none;
  transition: color var(--transition);
}
.input-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 46px;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  color: #111827;
  background: #FAFAFA;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
}
.input-wrap input::placeholder { color: #C0C6D0; }
.input-wrap input:focus {
  border-color: var(--input-focus);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,101,0,.12);
}
.input-wrap input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--orange);
}
/* password toggle button */
.btn-eye {
  position: absolute;
  right: 14px;
  background: none; border: none; cursor: pointer;
  color: #9CA3AF;
  font-size: .95rem;
  padding: 4px;
  display: flex; align-items: center;
  transition: color var(--transition);
}
.btn-eye:hover { color: var(--orange); }

/* ── EXTRAS ROW ─────────────────────────────────────────── */
.form-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}
.remember-me {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: #4B5563; cursor: pointer;
}
.remember-me input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--orange);
  cursor: pointer;
}
.forgot-link {
  font-size: .85rem;
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--transition);
}
.forgot-link:hover { color: var(--orange-dark); text-decoration: underline; }

/* ── SUBMIT BUTTON ──────────────────────────────────────── */
.btn-login {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--orange) 0%, var(--gold) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 6px 24px rgba(255,101,0,.35);
}
.btn-login::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
  opacity: 0;
  transition: opacity .3s ease;
}
.btn-login:hover::before { opacity: 1; }
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(255,101,0,.45);
}
.btn-login:active { transform: translateY(0); }
.btn-login .btn-text { position: relative; z-index: 1; }
.btn-login .btn-spinner {
  position: absolute; inset: 0; z-index: 2;
  display: none; align-items: center; justify-content: center;
}
.btn-login.loading .btn-text { visibility: hidden; }
.btn-login.loading .btn-spinner { display: flex; }
.spinner-ring {
  width: 22px; height: 22px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ALERTS ─────────────────────────────────────────────── */
.cjp-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: .87rem;
  margin-bottom: 22px;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.cjp-alert.alert-error {
  background: #FEF2F2; border: 1px solid #FECACA; color: #DC2626;
}
.cjp-alert.alert-success {
  background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46;
}
.cjp-alert .alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ── FOOTER NOTE ────────────────────────────────────────── */
.login-footer-note {
  text-align: center;
  margin-top: 28px;
  font-size: .82rem;
  color: #9CA3AF;
}
.login-footer-note a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
}
.login-footer-note a:hover { text-decoration: underline; }

/* ── FIELD ERROR ────────────────────────────────────────── */
.field-error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--danger);
  margin-top: 6px;
  padding: 0 4px;
  animation: shakeIn .25s ease;
}
.field-error.visible { display: flex; }
@keyframes shakeIn {
  0%   { opacity:0; transform:translateX(-4px); }
  60%  { transform:translateX(3px); }
  100% { opacity:1; transform:translateX(0); }
}
.input-wrap.has-error input {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
  background: #FFF5F5 !important;
}
.input-wrap.has-error .input-icon { color: var(--danger) !important; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .cjp-brand-panel { flex: 0 0 40%; padding: 40px 28px; }
  .login-card { padding: 40px 32px; }
}

/* Tablet — keep brand but shrink */
@media (max-width: 700px) and (min-width: 601px) {
  .cjp-login-wrapper { flex-direction: column; }
  .cjp-brand-panel {
    flex: none; width: 100%; padding: 32px 24px;
    min-height: auto;
  }
  .geo-shape.ring, .geo-shape.tri { display: none; }
  .feature-list { flex-direction: row; flex-wrap: wrap; }
  .feature-list li { flex: 1 1 calc(50% - 7px); min-width: 140px; }
  .cjp-form-panel { padding: 28px 16px 48px; }
  .login-card { box-shadow: none; padding: 24px 0 0; max-width: 100%; border-radius: 0; }
  .cjp-form-panel::before { display: none; }
}

/* Mobile — form on top, brand panel compact below */
@media (max-width: 600px) {
  .cjp-login-wrapper {
    flex-direction: column;
    min-height: 100vh;
    background: #F8F9FB;
  }

  /* Form panel first */
  .cjp-form-panel {
    order: 1;
    flex: none;
    padding: 36px 20px 32px;
    background: #F8F9FB;
    align-items: stretch;
  }
  .cjp-form-panel::before { height: 3px; }
  .login-card {
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.10);
    padding: 32px 24px 36px;
    max-width: 100%;
  }
  .form-extras { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Brand panel below — compact strip */
  .cjp-brand-panel {
    order: 2;
    flex: none;
    width: 100%;
    min-height: auto;
    padding: 28px 20px 36px;
    background: linear-gradient(160deg, #0F1923 0%, #1C2331 60%, #1A1200 100%);
  }
  .cjp-brand-panel::before {
    width: 220px; height: 220px;
    top: -60px; left: -60px;
  }
  .cjp-brand-panel::after {
    width: 160px; height: 160px;
    bottom: -40px; right: -40px;
  }

  /* Hide decorative shapes on mobile */
  .geo-shape { display: none; }

  /* Horizontal layout inside brand content */
  .brand-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .brand-logo-wrap {
    width: 56px; height: 56px;
    border-radius: 14px;
    margin-bottom: 0;
  }
  .brand-logo-wrap img { width: 38px; height: 38px; }
  .brand-title { font-size: 1.4rem; margin-bottom: 4px; }
  .brand-subtitle { font-size: .84rem; margin-bottom: 0; max-width: 100%; }
  .feature-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
  }
  .feature-list li {
    flex: 1 1 calc(50% - 4px);
    min-width: 130px;
    padding: 8px 12px;
    font-size: .78rem;
    gap: 8px;
  }
  .feature-list li .fi-icon {
    width: 26px; height: 26px;
    border-radius: 6px;
    font-size: .75rem;
  }
}
