/* ============================================
   ClickStat — Main Stylesheet
   Landing page + shared global styles
   ============================================ */

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

:root {
  --primary:    #6C63FF;
  --primary-d:  #5A52D5;
  --accent:     #FF6B6B;
  --success:    #34A853;
  --warning:    #FBBC04;
  --danger:     #EA4335;
  --text:       #202124;
  --text-muted: #5F6368;
  --bg:         #F0F4F9;
  --card-bg:    #FFFFFF;
  --border:     #E8EAED;
  --shadow:     0 1px 2px rgba(60,64,67,.1), 0 1px 3px rgba(60,64,67,.08);
  --shadow-md:  0 2px 8px rgba(60,64,67,.1), 0 1px 4px rgba(60,64,67,.06);
  --shadow-lg:  0 8px 28px rgba(60,64,67,.12);
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  16px;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
  letter-spacing: .01em;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); color:#fff; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color:#fff; }

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover { background: #16a34a; border-color: #16a34a; color:#fff; }

.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,.1); }
.form-control::placeholder { color: #9CA3AF; }
select.form-control { cursor: pointer; }

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ---- ALERTS ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: #F0FDF4; border-color: #86EFAC; color: #16A34A; }
.alert-danger   { background: #FEF2F2; border-color: #FECACA; color: #DC2626; }
.alert-warning  { background: #FFFBEB; border-color: #FDE68A; color: #D97706; }
.alert-info     { background: #EFF6FF; border-color: #BFDBFE; color: #2563EB; }

/* ---- BADGE ---- */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: #DCFCE7; color: #15803D; }
.badge-danger  { background: #FEE2E2; color: #B91C1C; }
.badge-warning { background: #FEF3C7; color: #B45309; }
.badge-primary { background: #EDE9FE; color: #6D28D9; }
.badge-gray    { background: #F3F4F6; color: #4B5563; }

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

body.landing { background: #fff; }

/* NAV */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.nav-links a:hover { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  line-height: 1.6;
  text-decoration: none;
  color: var(--text-muted);
  opacity: .6;
  transition: all .15s;
  border: 1.5px solid transparent;
}
.lang-btn:hover { opacity: 1; text-decoration: none; }
.lang-btn.active { opacity: 1; background: var(--primary); color: #fff; border-color: var(--primary); }

.nav-burger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
  margin-left: auto;
}
.nav-mobile {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  gap: 12px;
  background: #fff;
}
.nav-mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}
.nav-mobile .btn { align-self: flex-start; }
.hidden { display: none !important; }

/* HERO */
.hero {
  padding: 96px 0 80px;
  background: linear-gradient(135deg, #F5F3FF 0%, #EFF6FF 50%, #F0FDF4 100%);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EDE9FE;
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 22px; font-weight: 800; color: var(--primary); }
.stat span { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Widget Demo */
.widget-demo {
  display: flex;
  justify-content: center;
  align-items: center;
}
.widget-demo-phone {
  width: 260px;
  height: 480px;
  background: #1A1A2E;
  border-radius: 36px;
  padding: 16px;
  box-shadow: 0 30px 60px rgba(108,99,255,.3);
  position: relative;
}
.widget-demo-screen {
  width: 100%;
  height: 100%;
  background: #F9FAFB;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}
.widget-demo-content { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.demo-line { height: 10px; background: #E5E7EB; border-radius: 4px; }
.demo-line.short { width: 65%; }

.widget-float {
  position: absolute;
  bottom: 20px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.demo-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  animation: floatIn .5s ease backwards;
}
.demo-btn.tg { background: #229ED9; animation-delay: .1s; }
.demo-btn.wa { background: #25D366; animation-delay: .2s; }
.demo-toggle {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(108,99,255,.4);
  cursor: pointer;
}
@keyframes floatIn {
  from { opacity:0; transform: translateY(10px); }
  to   { opacity:1; transform: translateY(0); }
}

/* MESSENGERS BAR */
.messengers-bar {
  padding: 40px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.messengers-bar p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.messenger-logos { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.messenger-logo {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.messenger-logo.tg { background: #229ED9; }
.messenger-logo.wa { background: #25D366; }
.messenger-logo.vb { background: #665CAC; }
.messenger-logo.ig { background: linear-gradient(45deg,#E1306C,#F56040,#FCAF45); }
.messenger-logo.fb { background: #1877F2; }
.messenger-logo.tt { background: #010101; }

/* FEATURES */
.features { padding: 96px 0; background: #fff; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: clamp(26px,3.5vw,40px); font-weight: 800; color: var(--text); margin-bottom: 12px; }
.section-header p { font-size: 17px; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 1.5px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* HOW IT WORKS */
.how-it-works { padding: 80px 0; background: var(--bg); }
.steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}
.step { text-align: center; max-width: 140px; }
.step-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.step p { font-size: 13px; color: var(--text-muted); font-weight: 500; line-height: 1.5; }
.step-arrow { font-size: 20px; color: var(--border); flex-shrink: 0; }

/* PRICING */
.pricing { padding: 96px 0; background: #fff; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: start;
}
.pricing-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: box-shadow .2s;
}
.pricing-card.popular {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 8px 32px rgba(108,99,255,.15);
  transform: scale(1.03);
}
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 4px 18px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.plan-name { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.plan-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.6; }
.plan-price { margin-bottom: 24px; }
.price-amount { font-size: 44px; font-weight: 800; color: var(--primary); }
.price-currency { font-size: 16px; color: var(--text-muted); margin-left: 4px; }
.price-custom { font-size: 24px; font-weight: 700; color: var(--primary); }
.plan-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.plan-features li { font-size: 14px; color: var(--text-muted); }
.pricing-card .btn { width: 100%; }

/* FAQ */
.faq { padding: 80px 0; background: var(--bg); }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  gap: 12px;
}
.faq-q span { font-size: 20px; color: var(--primary); font-weight: 300; flex-shrink: 0; }
.faq-a {
  display: none;
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* CTA SECTION */
.cta-section {
  padding: 96px 0;
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
  text-align: center;
}
.cta-inner h2 { font-size: clamp(26px,3.5vw,40px); font-weight: 800; color: #fff; margin-bottom: 16px; }
.cta-inner p { font-size: 17px; color: rgba(255,255,255,.8); margin-bottom: 32px; }
.cta-section .btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.cta-section .btn-primary:hover { background: #F3F4F6; color: var(--primary-d); }

/* FOOTER */
.footer {
  padding: 32px 0;
  background: var(--text);
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo { font-size: 18px; font-weight: 800; color: #fff; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,.6); }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,.4); }

/* ============================================
   AUTH PAGES — Split layout
   ============================================ */
body.auth-page {
  background: #fff;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
}

/* ---- Split two-panel layout ---- */
.auth-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Left: brand panel */
.auth-panel-left {
  flex: 0 0 420px;
  background: linear-gradient(145deg, #3D35C0 0%, #6C63FF 55%, #9B93FF 100%);
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.auth-panel-left::before {
  content: '';
  position: absolute;
  top: -140px; right: -140px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(255,255,255,.14) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-panel-left::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-brand-logo {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -.3px;
  margin-bottom: 48px;
  display: block;
  position: relative; z-index: 1;
}
.auth-panel-tagline {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 10px;
  position: relative; z-index: 1;
}
.auth-panel-sub {
  font-size: 14px;
  color: rgba(255,255,255,.72);
  line-height: 1.65;
  margin-bottom: 36px;
  position: relative; z-index: 1;
}
.auth-feat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  position: relative; z-index: 1;
}
.auth-feat-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.88);
  line-height: 1.5;
}
.auth-feat-list li svg { flex-shrink: 0; margin-top: 1px; }
.auth-feat-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.2);
  color: #fff;
  padding: 1px 7px;
  border-radius: 8px;
  margin-left: 5px;
  vertical-align: middle;
  letter-spacing: .3px;
}
.auth-panel-stats {
  display: flex;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.18);
  margin-top: 28px;
  position: relative; z-index: 1;
}
.auth-panel-stats-item strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.auth-panel-stats-item span {
  font-size: 12px;
  color: rgba(255,255,255,.55);
}

/* Right: form panel */
.auth-panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: #FAFAFA;
  overflow-y: auto;
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}
.auth-form-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.auth-lang-wrap {
  display: flex;
  gap: 4px;
}
/* lang-btn overrides for dark panel */
.auth-panel-left .lang-btn { color: rgba(255,255,255,.65); border-color: transparent; }
.auth-panel-left .lang-btn:hover { background: rgba(255,255,255,.18); color: #fff; opacity: 1; }
.auth-panel-left .lang-btn.active { background: rgba(255,255,255,.25); color: #fff; border-color: rgba(255,255,255,.3); opacity: 1; }

.auth-title { font-size: 22px; font-weight: 700; color: #202124; margin-bottom: 6px; letter-spacing: -.3px; }
.auth-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.auth-footer-text { font-size: 14px; color: var(--text-muted); text-align: center; margin-top: 22px; }
.auth-footer-text a { color: var(--primary); font-weight: 600; }

.auth-btn { width: 100%; padding: 12px; font-size: 15px; border-radius: 10px; }
.divider { border: none; border-top: 1px solid #E8EAED; margin: 20px 0; }

/* ---- Simple auth page (forgot / reset — centered) ---- */
body.auth-page-simple {
  background: #F5F3FF;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-logo {
  display: block;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 24px;
  letter-spacing: -.3px;
}
.auth-box {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(60,64,67,.12), 0 8px 32px rgba(60,64,67,.08);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .auth-panel-left { display: none; }
  .auth-split { background: #F5F3FF; align-items: flex-start; justify-content: center; padding: 40px 24px; }
  .auth-panel-right { background: transparent; padding: 0; min-height: 100vh; width: 100%; }
}
@media (max-width: 480px) {
  .auth-panel-right { padding: 0; }
  .auth-form-wrap { max-width: 100%; }
  .auth-box { padding: 28px 20px; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-visual { display: none; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-burger { display: block; }
  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }
  .pricing-card.popular { transform: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 64px 0 48px; }
  .pricing-grid { grid-template-columns: 1fr; }
}
