/* ===== AUTH PAGES EXTRA STYLES ===== */

/* Left panel features list */
.auth-features {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}
.feat-check {
  width: 22px; height: 22px;
  background: var(--lime);
  color: var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Auth divider */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 18px 0;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--gray-200);
}
.auth-divider span {
  position: relative;
  background: #fff;
  padding: 0 12px;
  font-size: 12px;
  color: var(--text2);
}

/* Contact/Phone login button */
.btn-contact-id {
  width: 100%;
  padding: 14px;
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all .2s;
  color: var(--black);
}
.btn-contact-id:hover { border-color: var(--black); background: var(--gray-50); }
.contact-icon { font-size: 18px; }

/* Tab toggle */
.tab-toggle {
  display: flex;
  background: var(--gray-100);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}
.tab-btn {
  flex: 1;
  padding: 8px;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.tab-btn.active {
  background: #fff;
  color: var(--black);
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

/* Field groups */
.field-group {
  margin-bottom: 14px;
}
.field-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 6px;
}

/* Auth inputs */
.auth-input {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  color: var(--black);
  background: #fff;
}
.auth-input:focus { border-color: var(--purple); }

/* Password wrap */
.input-pw-wrap { position: relative; }
.input-pw-wrap .auth-input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.5;
}
.pw-toggle:hover { opacity: 1; }
.pw-strength { margin-top: 6px; min-height: 18px; }

/* Phone input */
.phone-input-wrap { display: flex; gap: 8px; }
.country-code-select {
  padding: 13px 10px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: var(--black);
  cursor: pointer;
  transition: border-color .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.country-code-select:focus { border-color: var(--purple); }
.phone-number { flex: 1; }

/* Submit button */
.btn-auth-submit {
  width: 100%;
  padding: 14px;
  background: var(--black);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  margin-top: 8px;
}
.btn-auth-submit:hover { background: var(--gray-800); transform: translateY(-1px); box-shadow: var(--shadow-lg); }

/* Back button */
.btn-back {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  padding: 0;
  margin-bottom: 20px;
  display: inline-block;
  transition: color .2s;
}
.btn-back:hover { color: var(--black); }

/* OTP */
.otp-info {
  text-align: center;
  margin-bottom: 24px;
}
.otp-icon { font-size: 36px; margin-bottom: 10px; }
.otp-info p { font-size: 14px; color: var(--text2); line-height: 1.6; }
.otp-boxes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.otp-box {
  width: 44px; height: 52px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
  color: var(--black);
  outline: none;
  transition: border-color .2s;
}
.otp-box:focus { border-color: var(--purple); }
.resend-otp {
  text-align: center;
  font-size: 13px;
  color: var(--text2);
  margin-top: 14px;
}
.resend-otp a { color: var(--purple); text-decoration: none; font-weight: 600; }

/* Switch link */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text2);
  margin-top: 20px;
}
.auth-switch a { color: var(--purple); text-decoration: none; font-weight: 600; }

/* Success icon */
.success-icon-wrap {
  text-align: center;
  margin-bottom: 16px;
}
.success-icon {
  font-size: 48px;
  display: inline-block;
  background: var(--gray-50);
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

/* Instagram connect page upgrade */
.ig-connect-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--gray-50);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text2);
}
.ig-connect-step-num {
  width: 24px; height: 24px;
  background: var(--black);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Dashboard user info */
.dash-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .2s;
}
.dash-user-header:hover { background: var(--gray-100); }
.dash-user-avatar {
  width: 32px; height: 32px;
  background: var(--purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.dash-user-name { font-size: 13px; font-weight: 700; color: var(--black); }
.dash-user-email { font-size: 11px; color: var(--text2); }

/* Connected IG account badge */
.ig-connected-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(34,197,94,0.07);
  border: 1.5px solid #22c55e;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 16px;
}
.ig-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; flex-shrink: 0; }


/* ===== MOBILE AUTH & DASHBOARD ===== */
@media (max-width: 768px) {
  /* AUTH pages */
  .auth-page { grid-template-columns: 1fr; min-height: 100vh; }
  .auth-left { display: none; }
  .auth-right { padding: 32px 20px 40px; align-items: flex-start; min-height: 100vh; }
  .auth-form { width: 100%; max-width: 100%; padding: 0; }
  .auth-form h1 { font-size: 26px; }
  .auth-input { font-size: 16px; } /* prevent iOS zoom */
  .btn-google { font-size: 15px; padding: 14px; }
  .btn-auth-submit { font-size: 15px; padding: 14px; }
  .phone-input-wrap { flex-direction: row; }
  .country-code-select { min-width: 90px; }

  /* OTP boxes */
  .otp-boxes { gap: 8px; }
  .otp-box { width: 42px; height: 48px; font-size: 20px; }

  /* DASHBOARD */
  .dashboard { display: block; }
  .sidebar {
    display: flex !important;
    position: fixed;
    top: 0; left: -280px;
    width: 260px;
    height: 100vh;
    z-index: 1000;
    transition: left .3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  }
  .sidebar.mob-open { left: 0; }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
  }
  .sidebar-overlay.show { display: block; }

  /* Mobile top bar for dashboard */
  .dash-mobile-topbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .dash-mobile-logo {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #0A0A0F;
    text-decoration: none;
  }
  .dash-mobile-logo span { color: #7C3AED; }
  .dash-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
  }
  .dash-hamburger span { width: 20px; height: 2px; background: var(--black); border-radius: 2px; display: block; }

  .dash-main { margin-left: 0; min-height: 100vh; }
  .dash-content { padding: 16px; }
  .dash-topbar { font-size: 13px; padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .dash-topbar-text { font-size: 12px; }

  /* Stats row on mobile */
  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .stat-card { padding: 14px; }
  .stat-card-val { font-size: 24px; }

  /* Quick start grid */
  .quick-start-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }

  /* Connect page mobile */
  .connect-page { padding: 20px 16px 48px; }
  .connect-logo-wrap { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
  .connect-box { padding: 22px 16px; border-radius: 16px; }
  .connect-box h1 { font-size: 20px; line-height: 1.3; }
  .connect-box p { font-size: 13px; }
  .ig-input { font-size: 16px; } /* prevent iOS zoom */
  .btn-connect { font-size: 15px; padding: 14px; }
  .cs-line { width: 24px; }

  /* Onboarding mobile */
  .onboard-page { padding: 20px 16px 48px; }
  .onboard-box { padding: 24px 16px; }
  .onboard-box h1 { font-size: 22px; }
  .onboard-options { flex-wrap: wrap; gap: 8px; }
  .onboard-option { font-size: 13px; padding: 8px 14px; }
  .country-select { font-size: 16px; }
  .btn-onboard { font-size: 15px; padding: 14px; }

  /* Platform select mobile */
  .ps-wrap { padding: 24px 16px 48px; }
  .ps-head h1 { font-size: 22px; }
  .ps-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ps-card { padding: 16px 12px; border-radius: 14px; }
  .ps-card-icon { font-size: 28px; margin-bottom: 8px; }
  .ps-card-name { font-size: 13px; }
  .ps-card-desc { font-size: 11px; }
  .ps-badge { font-size: 9px; padding: 2px 6px; }
}

@media (max-width: 380px) {
  .otp-box { width: 36px; height: 44px; font-size: 18px; }
  .ps-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
}

/* ===== EXTRA MOBILE POLISH ===== */
@media (max-width: 768px) {
  /* Dashboard content full width */
  .dash-main { width: 100%; }
  .dash-content { padding: 16px !important; }

  /* Stat cards tighter */
  .stat-card-label { font-size: 12px; }
  .stat-card-val { font-size: 22px !important; }
  .stat-card-change { font-size: 11px; }

  /* IG account card stacks on mobile */
  #igAccountCard > div:last-of-type {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  #igAccountCard .ig-stats-row {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    width: 100%;
  }

  /* Quick start 2 cols on mobile */
  .dash-content [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: repeat(2,1fr) !important;
  }

  /* Welcome modal full screen */
  .dash-welcome-modal-overlay { padding: 0; }
  .dash-welcome-modal {
    border-radius: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
  }
  .modal-templates { grid-template-columns: 1fr !important; }

  /* Connect page inputs */
  .ig-input { font-size: 16px !important; padding: 13px 14px 13px 36px !important; }
  .btn-connect { padding: 15px !important; font-size: 15px !important; }

  /* Auth form spacing */
  .auth-right { padding: 24px 18px 32px !important; }
  .auth-form { padding: 0 !important; }

  /* Topbar trial bar mobile */
  .dash-topbar { display: none !important; }

  /* Footer bottom stack */
  .footer-bottom {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: center !important;
    text-align: center;
    padding-top: 16px;
  }
  .footer-bottom span { font-size: 12px; }
}
