/* =====================================================
   Jongly Login Page
   ===================================================== */

/* ---- Page wrapper ---- */
.jl-page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #eef1f9 0%, #e2e8f5 50%, #d8e0f0 100%);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  z-index: 9999;
  overflow-y: auto;
}

/* subtle dot grid overlay */
.jl-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(120,140,200,.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Header ---- */
.jl-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 16px;
  position: relative;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(80,100,160,.07);
  max-width: 880px;
  width: calc(100% - 80px);
  margin: 20px auto 0;
}

.jl-header-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.jl-header-logo {
  max-height: 36px;
  width: auto;
  display: block;
}
.jl-header-name {
  font-size: 18px;
  font-weight: 800;
  color: #1a1f36;
  letter-spacing: -0.4px;
}

.jl-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---- Custom dropdowns ---- */
.jl-dropdown { position: relative; }

.jl-drop-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(200,210,230,.7);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #4b5563;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.jl-drop-btn:hover { background: rgba(255,255,255,.95); border-color: #c0cde0; }
.jl-drop-caret { font-size: 9px; color: #aaa; transition: transform .2s; }
.jl-dropdown.open .jl-drop-caret { transform: rotate(180deg); }

.jl-drop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid rgba(200,210,230,.8);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(80,100,160,.18);
  overflow-y: auto;
  max-height: 320px;
  z-index: 100;
}
.jl-dropdown.open .jl-drop-panel { display: block; }

.jl-drop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.jl-drop-item:hover { background: #f4f6fb; color: #1a1f36; }
.jl-drop-item.active { color: #4a8a28; font-weight: 600; background: rgba(74,138,40,.06); }

.jl-header-register {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: linear-gradient(135deg, #5aad30 0%, #3d7d1e 100%);
  color: #fff;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(58,125,30,.28);
  white-space: nowrap;
}
.jl-header-register:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(58,125,30,.32);
  color: #fff;
}

/* ---- Scene (mascot + card) ---- */
.jl-scene {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  position: relative;
  z-index: 1;
}

.jl-scene-inner {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
}

/* ---- Mascot ---- */
.jl-mascot-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  z-index: 2;
}
.jl-mascot-img {
  height: 460px;
  width: auto;
  display: block;
  filter: drop-shadow(0 16px 32px rgba(0,0,0,.18));
}

/* ---- Card ---- */
.jl-card {
  width: 420px;
  flex-shrink: 0;
  background: rgba(255,255,255,.97);
  border-radius: 28px;
  padding: 32px 40px 28px;
  box-shadow:
    0 2px 0 rgba(255,255,255,.8) inset,
    0 20px 60px rgba(80,100,160,.14),
    0 4px 16px rgba(80,100,160,.08);
  z-index: 1;
  position: relative;
  align-self: center;
  border: 1px solid rgba(255,255,255,.9);
}

/* ---- Logo ---- */
.jl-logo {
  text-align: center;
  margin-bottom: 12px;
}
.jl-logo-img {
  max-height: 76px;
  max-width: 260px;
  height: auto;
  width: auto;
}
.jl-logo-text {
  font-size: 32px;
  font-weight: 900;
  color: #2d7a1f;
  letter-spacing: -0.5px;
}

/* ---- Headings ---- */
.jl-title {
  font-size: 22px;
  font-weight: 800;
  color: #1a1f36;
  margin: 0 0 5px;
  text-align: center;
  letter-spacing: -0.3px;
}
.jl-sub {
  font-size: 13px;
  color: #8a94a6;
  margin: 0 0 10px;
  text-align: center;
}

/* ---- Fields ---- */
.jl-field { margin-bottom: 7px; }

.jl-input-wrap { position: relative; }
.jl-icon {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  color: #c0c8d8; font-size: 13px; pointer-events: none;
}
.jl-input {
  width: 100%; height: 38px;
  padding: 0 46px 0 42px;
  border: 1.5px solid #e6eaf2;
  border-radius: 12px;
  font-size: 14px; font-family: inherit;
  color: #1a1f36; background: #f4f6fb;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  box-sizing: border-box;
}
.jl-input:focus {
  border-color: #4a8a28;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,138,40,.10);
}
.jl-input::placeholder { color: #c8cfe0; }

.jl-eye {
  position: absolute; right: 0; top: 0;
  height: 100%; width: 46px;
  background: none; border: none;
  color: #c0c8d8; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: color .15s;
}
.jl-eye:hover { color: #4a8a28; }

/* ---- Remember / Forgot row ---- */
.jl-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.jl-check-label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13px; color: #6b7280;
  user-select: none;
}
.jl-check-input { display: none !important; }
.jl-check-box {
  width: 18px; height: 18px;
  border: 2px solid #c8d0e0;
  border-radius: 5px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.jl-check-label:hover .jl-check-box {
  border-color: #4a8a28;
  background: rgba(74,138,40,.04);
}
.jl-check-input:checked + .jl-check-box {
  background: #4a8a28 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M1 4.5l3 3L11 1'/%3E%3C/svg%3E") center/11px no-repeat;
  border-color: #4a8a28;
  box-shadow: 0 1px 4px rgba(74,138,40,.3);
}
.jl-forgot { font-size: 13px; color: #8a94a6; text-decoration: none; transition: color .15s; }
.jl-forgot:hover { color: #4a8a28; }

/* ---- Submit ---- */
.jl-submit {
  display: block;
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #5aad30 0%, #3d7d1e 100%);
  color: #fff;
  border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; letter-spacing: 0.3px;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(58,125,30,.35), 0 1px 0 rgba(255,255,255,.2) inset;
}
.jl-submit:hover  { opacity: .92; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(58,125,30,.38); }
.jl-submit:active { transform: translateY(0); opacity: 1; }

/* ---- Divider ---- */
.jl-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: #c8d0e0;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.jl-divider::before,
.jl-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #dde3ef, transparent);
}

/* ---- Google button ---- */
.jl-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  background: #fff;
  border: 1.5px solid #e6eaf2;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
  box-sizing: border-box;
}
.jl-google-btn:hover {
  background: #fafbff;
  border-color: #c8d0e0;
  box-shadow: 0 4px 12px rgba(0,0,0,.07);
  transform: translateY(-1px);
  color: #111;
}

/* ---- Register link ---- */
.jl-register-inline {
  margin-top: 6px;
  font-size: 12px;
  color: #8a94a6;
  text-align: center;
}
.jl-register-inline a { color: #4a8a28; font-weight: 700; text-decoration: none; }
.jl-register-inline a:hover { text-decoration: underline; }

/* ---- Flash alert ---- */
.jl-card .alert {
  border-radius: 10px; font-size: 13px;
  padding: 10px 14px; margin-bottom: 16px;
}

/* ---- FOOTER ---- */
.jl-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  padding: 0 40px 20px;
}
.jl-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 16px;
  padding: 12px 24px;
  max-width: 880px;
  margin: 0 auto;
  box-shadow: 0 2px 12px rgba(80,100,160,.07);
}
.jl-footer-copy {
  font-size: 12.5px;
  color: #8a94a6;
  margin: 0;
  white-space: nowrap;
}
.jl-footer-copy strong { color: #6b7280; font-weight: 600; }
.jl-footer-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.jl-footer-links a {
  font-size: 12.5px;
  color: #8a94a6;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.jl-footer-links a:hover { color: #4a8a28; background: rgba(74,138,40,.07); }

/* =====================================================
   Register Page — overrides
   ===================================================== */

/* Warm background */
.jl-page--register {
  background: #f0ece3;
}
.jl-page--register::before {
  background-image: radial-gradient(circle, rgba(160,140,100,.10) 1px, transparent 1px);
}

/* Register header — inset pill matching footer */
.jl-page--register .jl-header {
  border-radius: 16px;
  max-width: 1240px;
  width: calc(100% - 64px);
  margin: 16px auto 0;
  height: 60px;
  padding: 0 28px;
  background: #fff;
  border: 1px solid #ece8df;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* Footer matches header */
.jl-page--register .jl-footer {
  padding: 0 0 16px;
}
.jl-page--register .jl-footer-inner {
  background: #fff;
  border: 1px solid #ece8df;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  max-width: 1240px;
  width: calc(100% - 64px);
  margin: 0 auto;
  padding: 12px 28px;
}

/* =====================================================
   Register Page
   ===================================================== */
.jl-scene--register {
  align-items: stretch;
  padding: 10px 48px 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.jl-scene-inner--register {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  height: 100%;
}

/* Left column */
.jl-reg-left {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}
.jl-reg-headline {
  font-size: 46px;
  font-weight: 900;
  color: #1a1f36;
  line-height: 1.12;
  letter-spacing: -1.5px;
  margin: 0 0 14px;
}
.jl-reg-headline-green { color: #4a8a28; }
.jl-reg-tagline {
  font-size: 15px;
  color: #8a94a6;
  margin: 0 0 28px;
}
.jl-reg-perks {
  list-style: none;
  padding: 0; margin: 0 0 0;
  display: flex; flex-direction: column; gap: 12px;
}
.jl-reg-perks li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; color: #374151; font-weight: 500;
}
.jl-reg-perks li i { color: #4a8a28; font-size: 16px; }

.jl-reg-features-row {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-top: 24px;
}

.jl-reg-mascot {
  height: 240px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.16));
}

/* Register card */
.jl-reg-card {
  background: #fff;
  border-radius: 20px;
  padding: 10px 28px 12px;
  box-shadow: 0 4px 32px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  border: 1px solid #ede9e0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #dde3ef transparent;
}
.jl-reg-card::-webkit-scrollbar { width: 4px; }
.jl-reg-card::-webkit-scrollbar-track { background: transparent; }
.jl-reg-card::-webkit-scrollbar-thumb { background: #dde3ef; border-radius: 4px; }

/* Groups */
.jl-reg-group {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f2f8;
}
.jl-reg-group:last-of-type { border-bottom: none; padding-bottom: 0; }
.jl-reg-group-label {
  font-size: 11px;
  font-weight: 700;
  color: #8a94a6;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.jl-reg-group-label i { color: #4a8a28; font-size: 12px; }
.jl-reg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 7px;
}
.jl-reg-row .jl-field { margin-bottom: 0; }

.jl-reg-card-title {
  font-size: 18px; font-weight: 800; color: #1a1f36;
  margin: 0 0 10px; letter-spacing: -0.3px;
}
.jl-reg-card .jl-submit { margin-top: 6px !important; }

/* 2-col grid */
.jl-reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.jl-reg-grid .jl-field { margin-bottom: 0; }
.jl-field--full { grid-column: 1 / -1; }

/* Select input */
.jl-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* Generate password button */
.jl-gen-pw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f4f6fb;
  border: 1.5px solid #e6eaf2;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: #4b5563;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.jl-gen-pw:hover { background: #eef1f9; border-color: #c8d0e0; color: #1a1f36; }
.jl-gen-pw i { color: #4a8a28; }

/* Password strength */
.jl-pw-strength-wrap { flex: 1; }
.jl-pw-strength-bar {
  height: 5px;
  background: #e6eaf2;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}
.jl-pw-strength-bar .progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease;
}
.jl-pw-strength-label { font-size: 10px; color: #8a94a6; }
.jl-reg-card [style*="margin-top:4px"] { margin-top: 2px !important; }

/* Mailing opt-in */
.jl-mailing-opt {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.35;
}
.jl-mailing-opt .jl-check-label { align-items: flex-start; gap: 6px; }
.jl-mailing-opt span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* TOS line */
.jl-tos-line {
  font-size: 12px;
  color: #6b7280;
  margin: 8px 0 6px;
}
.jl-link { color: #4a8a28; font-weight: 600; }

/* Field label */
.jl-reg-field-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; display: block; }
.jl-reg-field-help  { font-size: 11px; color: #8a94a6; margin-top: 3px; display: block; }

/* =====================================================
   intl-tel-input (phone flag picker) — register page
   WHMCS wraps <input type="tel"> with .intl-tel-input
   ===================================================== */

/* Make the iti wrapper fill the jl-input-wrap */
.jl-input-wrap .intl-tel-input {
  display: block;
  width: 100%;
}

/* Hide our custom phone icon when iti is present — flag replaces it */
.jl-input-wrap:has(.intl-tel-input) > .jl-icon {
  display: none;
}

/* Style the iti wrapper like our jl-input */
.jl-input-wrap .intl-tel-input .form-control.jl-input {
  padding-left: 90px; /* room for flag + dial code */
  border-radius: 12px;
}

/* Flag container position */
.jl-input-wrap .intl-tel-input .flag-container {
  left: 0;
  top: 0;
  bottom: 0;
  height: 100%;
}

/* Selected flag button */
.jl-input-wrap .intl-tel-input .selected-flag {
  background: transparent;
  border-right: 1px solid #e6eaf2;
  padding: 0 8px;
  border-radius: 12px 0 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 78px;
}
.jl-input-wrap .intl-tel-input .selected-flag:hover,
.jl-input-wrap .intl-tel-input .selected-flag:focus {
  background: rgba(74,138,40,.05);
}

/* Dial code text */
.jl-input-wrap .intl-tel-input .selected-dial-code {
  font-size: 12px;
  color: #6b7280;
  font-family: inherit;
}

/* Country dropdown list */
.intl-tel-input .country-list {
  border-radius: 12px;
  border: 1px solid #e6eaf2;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  font-family: inherit;
  font-size: 13px;
  z-index: 9999;
}
.intl-tel-input .country-list .country.highlight {
  background: rgba(74,138,40,.07);
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .jl-scene { padding: 24px 20px 0; }
  .jl-scene-inner { flex-direction: column; align-items: center; gap: 0; }
  .jl-mascot-img { height: 200px; margin-bottom: -20px; }
  .jl-card { width: 100%; max-width: 420px; border-radius: 20px; padding: 32px 24px 28px; }
  .jl-footer { padding: 0 16px 16px; }
  .jl-footer-inner { flex-direction: column; gap: 8px; text-align: center; border-radius: 12px; }
}
