/* Cloudpedia Theme - Login Page Slicing */

/* Hide header and footer on login page */
body.primary-bg-color header,
body.primary-bg-color .header-topbar,
body.primary-bg-color footer {
  display: none;
}

/* Main login wrapper - full viewport split layout */
section.cp-login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  background: white;
}

/* Left panel - Dark navy with announcements */
.cp-login-left {
  width: 40%;
  background: linear-gradient(135deg, #0a0e2a 0%, #1a2050 100%);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  color: white;
  position: relative;
  overflow: hidden;
}

/* Dot grid overlay effect on left panel */
.cp-login-left::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 1;
}

.cp-login-left > * {
  position: relative;
  z-index: 2;
}

/* Logo section */
.cp-login-logo {
  text-align: left;
  align-self: flex-start;
  margin-bottom: 0;
}

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

/* Ellipse decorative element */
.cp-login-ellipse {
  position: absolute;
  top: -50px;
  right: -80px;
  width: 400px;
  height: 400px;
  opacity: 0.8;
  z-index: 1;
}

/* Announcements section — card with white border */
.cp-login-announcement {
  text-align: left;
  margin: auto 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #24035c;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  padding: 28px 24px;
}

.cp-login-announcement .announcement-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: white;
}

.cp-login-announcement .announcement-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: #ffc107;
  margin: 0 0 6px 0;
}

.cp-login-announcement .announcement-date {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
}

.cp-login-announcement .announcement-desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.indicator-dots {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.indicator-dots .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background-color 0.2s;
}

.indicator-dots .dot.active {
  background-color: #ffc107;
}

.indicator-dots .dot:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.indicator-dots .dot.active:hover {
  background-color: #ffd54f;
}

/* Server illustration */
.cp-login-server-illustration {
  position: absolute;
  bottom: 0;
  left: 0;
  text-align: left;
}

.cp-login-server-illustration .server-img {
  max-width: 320px;
  height: auto;
  opacity: 0.9;
  display: block;
}

/* Right panel - Dark navy form area */
.cp-login-right {
  width: 60%;
  background: white;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cp-login-right-inner {
  width: 100%;
  max-width: 420px;
  background: #1a2050;
  border-radius: 16px;
  padding: 48px 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Flash messages */
.cp-login-right-inner .alert {
  margin-bottom: 24px;
  border-radius: 6px;
  border: 1px solid;
}

.cp-login-right-inner .alert-danger {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.cp-login-right-inner .alert-warning {
  background-color: #fffbeb;
  border-color: #fef3c7;
  color: #d97706;
}

.cp-login-right-inner .alert-success {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

.cp-login-right-inner .alert-info {
  background-color: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7;
}

.providerLinkingFeedback {
  margin-bottom: 24px;
}

/* Form headings */
.cp-login-right-inner h1 {
  font-size: 28px;
  font-weight: 700;
  color: #ffc107;
  margin: 0 0 8px 0;
  text-align: center;
}

.login-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 28px 0;
  line-height: 1.5;
  text-align: center;
}

/* Form styling */
.login-form {
  margin-bottom: 24px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form .form-control {
  width: 100%;
  padding: 18px 20px;
  height: auto;
  background: #1a2060;
  border: 1px solid #ffffff;
  border-radius: 6px;
  font-size: 14px;
  color: white;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  font-family: inherit;
}

.login-form .form-control:focus {
  outline: none;
  border-color: #ffc107;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.login-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Password group */
.password-group {
  margin-bottom: 20px;
}

.password-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.cp-login-right-inner .login-form .login-label {
  color: #ffffff;
  margin: 0 0 8px 0;
  font-weight: 500;
  display: block;
  font-size: 14px;
}

/* Remember me and forgot password */
.login-act {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
}

.remcheck {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cp-login-right-inner .login-act .remcheck .styled-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #7c3aed !important;
}

.cp-login-right-inner .login-act .remcheck label {
  cursor: pointer;
  color: #ffffff;
  margin: 0;
  transition: color 0.2s;
}

.cp-login-right-inner .login-act .remcheck .styled-checkbox:checked + label {
  color: #7c3aed;
}

.fgtlinks {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.cp-login-right-inner .password-header .fgtlinks.text-cp-purple {
  color: #7c3aed;
}

.cp-login-right-inner .password-header .fgtlinks.text-cp-purple:hover {
  color: #8b5cf6;
  text-decoration: underline;
}

/* Submit button */
.login-form .btn-main {
  width: 100%;
  padding: 12px 16px;
  background: #ffc107;
  color: #0a0e2a;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    box-shadow 0.2s,
    background 0.2s;
  margin-bottom: 16px;
}

.login-form .btn-main:hover {
  background: #ffd54f;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.login-form .btn-main:active {
  transform: scale(0.98);
}

/* Captcha styling */
.login-form .captcha-wrapper,
.login-form #recaptcha_element {
  margin-bottom: 16px;
}

/* Register link */
.register-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 12px 0 0 0;
  text-align: center;
}

.register-link a {
  color: #ffc107;
  text-decoration: none;
  font-weight: 500;
}

.register-link a:hover {
  text-decoration: underline;
  color: #ffd54f;
}

/* Linked accounts section */
.cp-login-right-inner {
  margin-top: 24px;
}

.cp-login-right-inner .linkedaccounts {
  margin-top: 20px;
}

.cp-login-right-inner #btnGoogleSignin1 {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Responsive design */
@media (max-width: 992px) {
  section.cp-login-wrapper {
    flex-direction: column;
  }

  .cp-login-left {
    width: 100%;
    padding: 30px;
    min-height: 40vh;
  }

  .cp-login-right {
    width: 100%;
    padding: 30px;
    min-height: 60vh;
  }

  .cp-login-left::before {
    background-size: 15px 15px;
  }
}

@media (max-width: 768px) {
  .cp-login-left {
    padding: 20px;
    min-height: 35vh;
  }

  .cp-login-right {
    padding: 20px;
    min-height: 65vh;
  }

  .cp-login-right-inner {
    max-width: 100%;
    padding: 30px;
  }

  .cp-login-logo h2 {
    font-size: 24px;
  }

  .cp-login-announcement .announcement-title {
    font-size: 18px;
  }

  .cp-login-server-illustration {
    display: none;
  }

  .cp-login-right-inner h1 {
    font-size: 24px;
  }

  .login-act {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .fgtlinks {
    align-self: flex-start;
  }
}

@media (max-width: 576px) {
  section.cp-login-wrapper {
    min-height: auto;
  }

  .cp-login-left {
    padding: 20px;
    min-height: auto;
  }

  .cp-login-right {
    padding: 20px;
    min-height: auto;
  }

  .cp-login-logo h2 {
    font-size: 20px;
  }

  .cp-login-announcement {
    margin: 20px 0;
    padding: 20px 16px;
  }

  .cp-login-right-inner {
    max-width: 100%;
    padding: 20px;
  }

  .cp-login-right-inner h1 {
    font-size: 20px;
  }

  .login-subtitle {
    font-size: 13px;
  }

  .login-form .form-control {
    padding: 14px 16px;
    font-size: 13px;
  }

  .login-form .btn-main {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Password strength bar inside dark panel */
.cp-login-right-inner .pwstrength_viewport_progress {
  margin-top: 8px;
  border-radius: 4px;
  overflow: hidden;
}

/* Register Page Overrides */
.register-wrapper .left-side-register-ac {
  background: linear-gradient(135deg, #0a0e2a 0%, #1a2050 100%) !important;
  color: #fff;
}

.register-wrapper .titlebar h2 {
  color: #ffc107;
}

.register-wrapper .titlebar p {
  color: rgba(255, 255, 255, 0.8);
}

.register-wrapper .titlebar.login-sec-rg-page {
  background-color: #1a2050 !important;
}

.register-wrapper .titlebar.login-sec-rg-page h2 {
  color: #ffc107;
}

.register-wrapper .titlebar.login-sec-rg-page p {
  color: rgba(255, 255, 255, 0.8);
}

.register-wrapper a.reg-login-btn {
  background-color: #ffc107 !important;
  color: #0a0e2a !important;
  border-color: #ffc107 !important;
}

.register-wrapper a.reg-login-btn:hover {
  background-color: #ffd54f !important;
  border-color: #ffd54f !important;
}

.register-wrapper .register-form {
  background-color: #1a2050;
  border-radius: 16px;
  padding: 48px 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.register-wrapper .form-title h2 {
  color: #ffc107;
}

.register-wrapper .form-title h2 span {
  color: rgba(255, 255, 255, 0.6);
}

.register-wrapper .register-form .form-group .form-control {
  background-color: #1a2060 !important;
  border: 1px solid #ffffff !important;
  color: #ffffff !important;
  border-radius: 6px !important;
}

.register-wrapper .register-form .form-group .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

.register-wrapper .register-form .form-group select.form-control {
  background-color: #1a2060 !important;
  border: 1px solid #ffffff !important;
  color: #ffffff !important;
  border-radius: 6px !important;
}

.register-wrapper .register-form .form-group select.form-control option {
  background-color: #1a2060;
  color: #ffffff;
}

.register-wrapper .btn-main {
  background-color: #ffc107 !important;
  color: #0a0e2a !important;
  border-color: #ffc107 !important;
  border-radius: 6px !important;
}

.register-wrapper .btn-main:hover {
  background-color: #ffd54f !important;
  border-color: #ffd54f !important;
}

.register-wrapper .register-form .form-switch label:after {
  background-color: #7c3aed !important;
}

.register-wrapper .register-form .form-switch input:checked + label {
  background-color: rgba(124, 58, 237, 0.2) !important;
}

.register-wrapper .register-form .generate-box .btn {
  background-color: #7c3aed !important;
  color: #fff !important;
  border-color: #7c3aed !important;
}

.register-wrapper .register-form .generate-box .btn:hover {
  background-color: #6d28d9 !important;
  border-color: #6d28d9 !important;
}

.register-wrapper .register-form .generate-box h3 {
  color: #ffc107;
}

.register-wrapper .register-form p label.form-check {
  color: #fff !important;
}

.register-wrapper .register-form p label.form-check a {
  color: #ffc107 !important;
}

.register-wrapper .register-form #passwordStrengthTextLabel,
.register-wrapper .register-form .password-strength-text {
  color: #ffffff !important;
}

.register-wrapper .progress-bar {
  background-color: #ffc107 !important;
}

/* =============================================
   Register Page Redesign - Centered Card Layout
   ============================================= */

/* Wrapper — full page centered */
.cp-register-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 40px 20px;
  background-color: #f1f3fa;
}

/* Card — centered container */
.cp-register-card {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  border-radius: 16px;
  padding: 48px 40px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header */
.cp-register-header {
  text-align: center;
  margin-bottom: 32px;
}
.cp-register-header h2 {
  color: #1a2050;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cp-register-header p {
  color: #666666;
  font-size: 15px;
}

/* Divider — "or sign up with email" */
.cp-register-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: #999999;
  font-size: 14px;
}
.cp-register-divider::before,
.cp-register-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}
.cp-register-divider span {
  padding: 0 16px;
}

/* Form labels */
.cp-register-card .form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #333333;
}
.cp-register-card .form-label .text-danger {
  margin-left: 2px;
  color: #dc3545;
}

/* Form group spacing */
.cp-register-card .form-group {
  margin-bottom: 20px;
}

/* Form inputs */
.cp-register-card .form-control {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  color: #333333;
  border-radius: 6px;
  padding: 10px 14px;
}
.cp-register-card .form-control:focus {
  border-color: #ffc107;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.15);
  background-color: #ffffff;
  color: #333333;
}
.cp-register-card .form-control::placeholder {
  color: #999999;
}
.cp-register-card select.form-control option {
  background-color: #ffffff;
  color: #333333;
}

/* Submit button */
.cp-register-card .btn-main {
  width: 100%;
  background-color: #ffc107;
  color: #0a0e2a;
  border-color: #ffc107;
  border-radius: 6px;
  padding: 12px;
  font-weight: 600;
  font-size: 16px;
  margin-top: 16px;
}
.cp-register-card .btn-main:hover {
  background-color: #ffd54f;
  border-color: #ffd54f;
}

/* "Already registered?" link */
.cp-register-login-link {
  text-align: center;
  margin-top: 24px;
  color: #666666;
  font-size: 14px;
}
.cp-register-login-link a {
  color: #ffc107;
  text-decoration: none;
  font-weight: 500;
}
.cp-register-login-link a:hover {
  text-decoration: underline;
}

/* ToS left-aligned */
.cp-register-tos {
  text-align: left;
  color: #333333;
}
.cp-register-tos label.form-check {
  color: #333333;
}
.cp-register-tos label.form-check a {
  color: #ffc107;
  text-decoration: none;
}
.cp-register-tos label.form-check a:hover {
  text-decoration: underline;
}

/* Generate password button */
.cp-register-card .generate-box .btn {
  background-color: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}
.cp-register-card .generate-box .btn:hover {
  background-color: #6d28d9;
  border-color: #6d28d9;
}

/* Password strength */
.cp-register-card #passwordStrengthTextLabel,
.cp-register-card .password-strength-text {
  color: #666666;
}
.cp-register-card .progress-bar {
  background-color: #ffc107;
}

/* Marketing toggle */
.cp-register-card .form-switch label {
  color: #333333;
}
.cp-register-card .form-switch label:after {
  background-color: #7c3aed;
}
.cp-register-card .form-switch input:checked + label {
  background-color: rgba(124, 58, 237, 0.2);
}

/* Phone dial code color fix */
.cp-register-card .iti__selected-dial-code,
.cp-register-card .iti__country-name,
.cp-register-card .iti__dial-code {
  color: #333333;
}

/* Responsive */
@media (max-width: 768px) {
  .cp-register-wrapper {
    padding: 20px 10px;
  }
  .cp-register-card {
    padding: 32px 20px;
  }
}

@media (max-width: 576px) {
  .cp-register-card {
    padding: 24px 16px;
    border-radius: 12px;
  }
  .cp-register-header h2 {
    font-size: 22px;
  }
}

/* 2FA challenge form - style the WHMCS-injected challenge input */
#frmTwoFactorChallenge .form-control {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
}

/* Phone input dial code color fix */
.iti__selected-dial-code,
.iti .iti__selected-dial-code,
.selected-dial-code,
.iti .selected-dial-code,
.intl-tel-input .selected-dial-code {
  color: #ffffff !important;
}

#frmTwoFactorChallenge .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Style the WHMCS-injected submit button inside challenge */
#frmTwoFactorChallenge .btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

#frmTwoFactorChallenge .btn:hover {
  background: linear-gradient(135deg, #6d28d9, #5b21b6);
}
