/* ============================================================
   AUTH PAGE STYLES — TaskPaisa
   Add to: assets/css/style.css  (or enqueue as auth.css)
   ============================================================ */

/* ---- Layout ---- */
.tp-auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ---- Left aside panel ---- */
.tp-auth-aside {
  position: relative;
  background: linear-gradient(145deg, var(--tp-primary-dark) 0%, var(--tp-primary) 55%, #3b82f6 100%);
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.tp-auth-aside-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: var(--tp-space-12) var(--tp-space-10);
  gap: var(--tp-space-10);
  width: 100%;
}

.tp-auth-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.tp-auth-logo .tp-logo-text {
  font-family: var(--tp-font-display);
  font-size: var(--tp-text-2xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.tp-auth-logo .tp-logo-text span {
  color: var(--tp-accent);
}

/* Custom logo override on aside */
.tp-auth-aside .custom-logo {
  filter: brightness(0) invert(1);
  max-width: 140px;
}

.tp-auth-aside-content {
  flex: 1;
}

.tp-auth-aside-headline {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: var(--tp-space-4);
  letter-spacing: -0.03em;
}

.tp-auth-aside-sub {
  font-size: var(--tp-text-base);
  color: rgba(255 255 255 / 0.75);
  line-height: 1.65;
  max-width: 340px;
  margin-bottom: var(--tp-space-8);
}

/* Benefits list */
.tp-auth-benefits {
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-4);
}

.tp-auth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: var(--tp-space-3);
  font-size: var(--tp-text-sm);
  color: rgba(255 255 255 / 0.9);
  line-height: 1.5;
}

.tp-auth-benefit-icon {
  font-size: 1.2em;
  flex-shrink: 0;
  margin-top: -1px;
}

/* Social proof */
.tp-auth-social-proof {
  display: flex;
  align-items: center;
  gap: var(--tp-space-3);
  margin-top: var(--tp-space-8);
  padding-top: var(--tp-space-6);
  border-top: 1px solid rgba(255 255 255 / 0.2);
}

.tp-auth-avatars {
  display: flex;
}

.tp-auth-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tp-accent);
  color: var(--tp-gray-900);
  font-size: var(--tp-text-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--tp-primary);
  margin-left: -8px;
}

.tp-auth-avatar:first-child {
  margin-left: 0;
}

.tp-auth-social-proof p {
  font-size: var(--tp-text-sm);
  color: rgba(255 255 255 / 0.85);
  line-height: 1.4;
}

/* Decorative floating coins */
.tp-auth-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.tp-auth-coin {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(245, 166, 35, 0.15);
  border: 2px solid rgba(245, 166, 35, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(245, 166, 35, 0.5);
  font-weight: 700;
  animation: tp-float 6s ease-in-out infinite;
}

.tp-auth-coin--1 { width: 100px; height: 100px; font-size: 2.5rem; bottom: 15%; right: 8%; animation-delay: 0s; }
.tp-auth-coin--2 { width: 60px;  height: 60px;  font-size: 1.5rem; bottom: 35%; right: 20%; animation-delay: 2s; }
.tp-auth-coin--3 { width: 44px;  height: 44px;  font-size: 1.1rem; top: 20%; right: 12%; animation-delay: 4s; }

@keyframes tp-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-16px) rotate(8deg); }
}

/* ---- Right main panel ---- */
.tp-auth-main {
  background: var(--tp-gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--tp-space-10) var(--tp-space-8);
  overflow-y: auto;
}

.tp-auth-form-wrap {
  width: 100%;
  max-width: 440px;
}

/* Mobile logo (only shown on small screens) */
.tp-auth-logo--mobile {
  display: none;
  margin-bottom: var(--tp-space-6);
}

/* ---- Tabs ---- */
.tp-auth-tabs {
  display: flex;
  background: var(--tp-gray-200);
  border-radius: var(--tp-radius-lg);
  padding: 4px;
  margin-bottom: var(--tp-space-8);
}

.tp-auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--tp-radius-lg) - 4px);
  font-size: var(--tp-text-sm);
  font-weight: 600;
  color: var(--tp-gray-600);
  text-decoration: none;
  transition: all var(--tp-transition);
}

.tp-auth-tab.is-active {
  background: #fff;
  color: var(--tp-gray-900);
  box-shadow: var(--tp-shadow-sm);
}

/* ---- Panel ---- */
.tp-auth-panel {
  display: none;
}

.tp-auth-panel.is-active {
  display: block;
}

.tp-auth-panel-header {
  margin-bottom: var(--tp-space-6);
}

.tp-auth-title {
  font-size: var(--tp-text-2xl);
  color: var(--tp-gray-900);
  margin-bottom: var(--tp-space-1);
}

.tp-auth-subtitle {
  font-size: var(--tp-text-sm);
  color: var(--tp-gray-500);
  line-height: 1.6;
}

/* ---- Alert messages ---- */
.tp-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--tp-space-3);
  padding: var(--tp-space-3) var(--tp-space-4);
  border-radius: var(--tp-radius-md);
  font-size: var(--tp-text-sm);
  font-weight: 500;
  margin-bottom: var(--tp-space-5);
  line-height: 1.5;
}

.tp-auth-alert--error {
  background: var(--tp-danger-light);
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.tp-auth-alert--success {
  background: var(--tp-success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* ---- Google button ---- */
.tp-btn-google {
  width: 100%;
  background: #fff;
  color: var(--tp-gray-800);
  border-color: var(--tp-gray-300);
  font-size: var(--tp-text-base);
  font-weight: 600;
  box-shadow: var(--tp-shadow-xs);
  gap: var(--tp-space-3);
  padding: 0.75rem 1.5rem;
  border-radius: var(--tp-radius-md);
  transition: all var(--tp-transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--tp-gray-300);
  cursor: pointer;
  margin-bottom: var(--tp-space-5);
}

.tp-btn-google:hover {
  background: var(--tp-gray-50);
  border-color: var(--tp-gray-400);
  box-shadow: var(--tp-shadow-md);
  color: var(--tp-gray-900);
}

.tp-btn-google.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.tp-btn-full {
  width: 100%;
}

/* ---- Divider ---- */
.tp-auth-divider {
  position: relative;
  text-align: center;
  margin-block: var(--tp-space-5);
  color: var(--tp-gray-400);
  font-size: var(--tp-text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tp-auth-divider::before,
.tp-auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 70px);
  height: 1px;
  background: var(--tp-gray-200);
}

.tp-auth-divider::before { left: 0; }
.tp-auth-divider::after  { right: 0; }

/* ---- Form helpers ---- */
.tp-auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--tp-space-2);
}

.tp-auth-label-row .tp-label {
  margin-bottom: 0;
}

.tp-auth-forgot {
  font-size: var(--tp-text-sm);
  color: var(--tp-primary);
  font-weight: 500;
}

.tp-auth-forgot:hover {
  color: var(--tp-primary-dark);
}

/* Password toggle button */
.tp-input-wrap {
  position: relative;
}

.tp-input-wrap .tp-input {
  padding-right: 2.75rem;
}

.tp-input-toggle-pw {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tp-gray-400);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color var(--tp-transition);
}

.tp-input-toggle-pw:hover {
  color: var(--tp-gray-700);
}

/* Password strength */
.tp-pw-strength {
  display: flex;
  align-items: center;
  gap: var(--tp-space-3);
  margin-top: var(--tp-space-2);
}

.tp-pw-strength-bar {
  flex: 1;
  height: 4px;
  background: var(--tp-gray-200);
  border-radius: var(--tp-radius-full);
  overflow: hidden;
}

.tp-pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--tp-radius-full);
  background: var(--tp-danger);
  transition: width 0.3s ease, background 0.3s ease;
}

.tp-pw-strength-fill[data-strength="1"] { width: 25%; background: var(--tp-danger); }
.tp-pw-strength-fill[data-strength="2"] { width: 50%; background: var(--tp-accent); }
.tp-pw-strength-fill[data-strength="3"] { width: 75%; background: #84cc16; }
.tp-pw-strength-fill[data-strength="4"] { width: 100%; background: var(--tp-success); }

.tp-pw-strength-label {
  font-size: var(--tp-text-xs);
  font-weight: 600;
  color: var(--tp-gray-500);
  white-space: nowrap;
}

/* ---- Name row (2-col on register) ---- */
.tp-auth-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--tp-space-4);
}

/* ---- Custom checkbox ---- */
.tp-auth-check-label {
  display: flex;
  align-items: flex-start;
  gap: var(--tp-space-3);
  cursor: pointer;
  font-size: var(--tp-text-sm);
  color: var(--tp-gray-700);
  line-height: 1.5;
  user-select: none;
}

.tp-auth-check-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tp-auth-checkmark {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--tp-gray-300);
  border-radius: 4px;
  background: #fff;
  margin-top: 1px;
  transition: all var(--tp-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-auth-check-label input[type="checkbox"]:checked + .tp-auth-checkmark {
  background: var(--tp-primary);
  border-color: var(--tp-primary);
}

.tp-auth-check-label input[type="checkbox"]:checked + .tp-auth-checkmark::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

.tp-auth-remember {
  margin-bottom: var(--tp-space-5);
}

/* ---- Referral badge ---- */
.tp-auth-referral-badge {
  display: flex;
  align-items: center;
  gap: var(--tp-space-2);
  background: var(--tp-coin-bg);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: var(--tp-radius-md);
  padding: var(--tp-space-3) var(--tp-space-4);
  font-size: var(--tp-text-sm);
  color: var(--tp-coin-dark);
  margin-bottom: var(--tp-space-5);
}

/* ---- Switch link ---- */
.tp-auth-switch {
  text-align: center;
  font-size: var(--tp-text-sm);
  color: var(--tp-gray-500);
  margin-top: var(--tp-space-6);
}

.tp-auth-switch a {
  color: var(--tp-primary);
  font-weight: 600;
}

/* ---- Plugin notice ---- */
.tp-auth-plugin-notice {
  font-size: var(--tp-text-xs);
  color: var(--tp-gray-500);
  text-align: center;
  margin-top: calc(-1 * var(--tp-space-3));
  margin-bottom: var(--tp-space-4);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .tp-auth-page {
    grid-template-columns: 1fr;
  }

  .tp-auth-aside {
    display: none;
  }

  .tp-auth-main {
    padding: var(--tp-space-8) var(--tp-space-5);
    align-items: flex-start;
    padding-top: var(--tp-space-10);
  }

  .tp-auth-logo--mobile {
    display: inline-flex;
  }

  .tp-auth-form-wrap {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .tp-auth-name-row {
    grid-template-columns: 1fr;
  }

  .tp-auth-divider::before,
  .tp-auth-divider::after {
    width: calc(50% - 60px);
  }
}
