/**
 * YTGrow — app.css v3.0
 * Author: Muhammad Jahangir | zonicode.com
 * Redesigned: Modern dark-hero, web vitals optimized, clean card system
 */

/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  --red:        #dc2626;
  --red-dark:   #b91c1c;
  --red-light:  #fef2f2;
  --red-mid:    #fee2e2;
  --dark:       #0f172a;
  --dark-2:     #1e293b;
  --dark-3:     #334155;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-500:   #64748b;
  --gray-700:   #374151;
  --gray-900:   #111827;
  --border:     #e2e8f0;
  --shadow:     0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07),0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 25px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);
  --radius:     12px;
  --radius-sm:  8px;
  --sidebar-w:  240px;
  --font:       'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--gray-900); background: #fff; -webkit-font-smoothing: antialiased; }
img  { max-width: 100%; height: auto; }

/* ── Utilities ─────────────────────────────────────────────────────────── */
.text-red    { color: var(--red) !important; }
.bg-red      { background: var(--red) !important; }
.bg-red-light{ background: var(--red-light) !important; }
.fw-600      { font-weight: 600 !important; }
.fw-700      { font-weight: 700 !important; }
.fw-800      { font-weight: 800 !important; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn-red {
  background: var(--red); color: #fff; border: none; font-weight: 600;
  border-radius: var(--radius-sm); transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 1px 3px rgba(220,38,38,.3);
}
.btn-red:hover, .btn-red:focus {
  background: var(--red-dark); color: #fff;
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(220,38,38,.35);
}
.btn-red:active { transform: translateY(0); }
.btn-outline-red { border: 2px solid var(--red); color: var(--red); font-weight: 600; background: transparent; border-radius: var(--radius-sm); }
.btn-outline-red:hover { background: var(--red); color: #fff; }
.btn-xs { padding: 3px 10px; font-size: 12px; }
.progress-bar.bg-red { background: var(--red) !important; }

/* ── Public Layout ─────────────────────────────────────────────────────── */
.public-body { background: #fff; }

/* NAVBAR */
.ytg-navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  position: sticky; top: 0; z-index: 1000;
}
.ytg-navbar .navbar-brand {
  color: var(--red); font-weight: 800; font-size: 22px; padding: 14px 0;
  display: flex; align-items: center; gap: 4px;
}
.ytg-navbar .navbar-brand:hover { color: var(--red-dark); }
.ytg-navbar .brand-icon { color: var(--red); }
.ytg-navbar .nav-link {
  color: var(--gray-700); font-weight: 500; padding: 18px 14px !important;
  font-size: 14px; transition: color .15s; border-bottom: 2px solid transparent;
}
.ytg-navbar .nav-link:hover { color: var(--red); border-bottom-color: var(--red); }
.ytg-navbar .btn-outline-secondary { border-color: var(--border); color: var(--gray-700); font-weight: 600; }
.ytg-navbar .btn-outline-secondary:hover { background: var(--gray-100); color: var(--gray-900); }
.ytg-navbar .btn.btn-outline-light { border: 1.5px solid var(--gray-300) !important; color: var(--gray-700) !important; background: transparent; font-weight: 600; }
.ytg-navbar .btn.btn-outline-light:hover { background: var(--gray-100) !important; color: var(--gray-900) !important; }
.ytg-navbar .btn.btn-dark, .ytg-navbar .btn-red { background: var(--gray-900); color: #fff; border: none; font-weight: 700; }
.ytg-navbar .btn.btn-dark:hover { background: var(--gray-700); }
.ytg-navbar .navbar-toggler { border: none; padding: 4px 8px; }
.ytg-navbar .navbar-toggler:focus { box-shadow: none; }

/* ADS STRIP */
.ads-strip {
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  text-align: center;
  min-height: 50px;
}
.ads-strip-footer {
  background: var(--gray-50);
  border-top: 1px solid var(--border);
  padding: 10px 0;
  text-align: center;
  min-height: 50px;
}

/* HERO */
.hero-section {
  background: linear-gradient(135deg, var(--dark) 0%, #1e1b4b 50%, var(--dark-2) 100%);
  padding: 90px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(220,38,38,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(220,38,38,.15);
  border: 1px solid rgba(220,38,38,.3);
  color: #fca5a5; font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 999px; margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(32px,5.5vw,58px); font-weight: 800; line-height: 1.15;
  color: #fff; margin-bottom: 18px; letter-spacing: -.02em;
}
.hero-title .accent { color: var(--red); }
.hero-sub {
  font-size: 17px; color: rgba(255,255,255,.75); max-width: 560px;
  margin: 0 auto 32px; line-height: 1.7;
}
.hero-stats {
  display: flex; justify-content: center; gap: 0; flex-wrap: wrap;
  margin-top: 56px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 40px;
}
.stat-item {
  flex: 1; min-width: 120px; padding: 0 24px; text-align: center;
  border-right: 1px solid rgba(255,255,255,.1);
}
.stat-item:last-child { border-right: none; }
.stat-num  { font-size: 32px; font-weight: 800; color: #fff; line-height: 1; }
.stat-label{ font-size: 13px; color: rgba(255,255,255,.5); margin-top: 4px; font-weight: 500; }
.hero-cta-wrap .btn { padding: 14px 36px; font-size: 16px; border-radius: 10px; }
.hero-cta-wrap .btn-outline-light { border: 2px solid rgba(255,255,255,.3); color: #fff; font-weight: 600; }
.hero-cta-wrap .btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }

/* TRUST STRIP */
.trust-strip {
  background: var(--gray-50); border-bottom: 1px solid var(--border);
  padding: 16px 0; text-align: center;
}
.trust-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--gray-500);
  margin: 4px 16px;
}
.trust-item i { color: var(--red); font-size: 15px; }

/* SECTIONS */
.section-pad { padding: 80px 0; }
.section-title {
  font-size: clamp(24px, 3.5vw, 38px); font-weight: 800;
  color: var(--gray-900); letter-spacing: -.02em; line-height: 1.2;
}
.section-label {
  display: inline-block; background: var(--red-light); color: var(--red);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.section-sub { font-size: 16px; color: var(--gray-500); max-width: 520px; margin: 0 auto; line-height: 1.7; }

/* HOW IT WORKS */
.hiw-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; height: 100%; transition: border-color .2s, box-shadow .2s;
  box-shadow: var(--shadow);
}
.hiw-card:hover { border-color: var(--red); box-shadow: var(--shadow-md); }
.hiw-card .card-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: var(--red-light); display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--red); margin-bottom: 20px;
}
.steps-list { display: flex; flex-direction: column; gap: 14px; }
.step {
  display: flex; align-items: flex-start; gap: 12px;
}
.step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}

/* FEATURES */
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; height: 100%; box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.feature-card:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--red-light); display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--red); margin-bottom: 16px;
}

/* PLAN CARDS */
.plan-card {
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 28px; height: 100%; transition: border-color .2s, box-shadow .2s; box-shadow: var(--shadow);
}
.plan-card:hover { border-color: var(--red); box-shadow: var(--shadow-md); }
.plan-card.plan-popular { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.plan-popular-badge {
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; display: inline-block; margin-bottom: 12px;
  letter-spacing: .05em; text-transform: uppercase;
}
.plan-price { font-size: 36px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.plan-currency { font-size: 18px; vertical-align: super; font-weight: 700; color: var(--gray-500); }
.plan-period { font-size: 14px; color: var(--gray-500); font-weight: 500; }
.plan-pkr { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.plan-features { list-style: none; padding: 0; margin: 20px 0; }
.plan-features li { padding: 6px 0; font-size: 14px; color: var(--gray-700); display: flex; align-items: center; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--red); font-weight: 700; flex-shrink: 0; }

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--dark) 0%, #3b0764 100%);
  padding: 80px 0; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(220,38,38,.2), transparent 60%);
  pointer-events: none; z-index: 0;
}
.cta-section .container { position: relative; z-index: 2; }
.cta-section a, .cta-section button { position: relative; z-index: 3; }

/* FOOTER */
.ytg-footer {
  background: var(--dark); color: rgba(255,255,255,.55);
  padding: 48px 0 28px; border-top: 1px solid rgba(255,255,255,.06);
}
.ytg-footer a { color: rgba(255,255,255,.55); transition: color .15s; }
.ytg-footer a:hover { color: #fff; }
.ytg-footer .footer-brand { color: #fff; font-weight: 800; font-size: 20px; }
.ytg-footer .footer-divider { border-color: rgba(255,255,255,.08); }

/* AUTH */
.auth-body   { background: var(--gray-100); min-height: 100vh; display: flex; flex-direction: column; }
.auth-wrap   { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
/* .auth-page = wrapper div inside public layout for login/register */
.auth-page   { display: flex; justify-content: center; padding: 48px 16px; min-height: calc(100vh - 200px); align-items: center; }
.auth-card   { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 440px; }
.auth-title  { font-size: 24px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.auth-sub    { color: var(--gray-500); margin-bottom: 24px; font-size: 14px; }
.auth-logo   { text-align: center; margin-bottom: 28px; font-size: 22px; font-weight: 800; color: var(--red); }

/* FLASH */
.flash-container { position: fixed; top: 72px; right: 20px; z-index: 9999; max-width: 380px; }

/* ── Dashboard Layout ──────────────────────────────────────────────────── */
.dash-body     { background: var(--gray-100); min-height: 100vh; }
.dash-wrapper  { display: flex; min-height: 100vh; }

.dash-sidebar {
  width: var(--sidebar-w); background: var(--dark); color: rgba(255,255,255,.7);
  flex-shrink: 0; position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; z-index: 200; transition: transform .25s;
  display: flex; flex-direction: column;
}
.admin-sidebar { background: #0c0e1a; }

.sidebar-brand { padding: 20px 20px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand a { color: #fff; font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 6px; }
.admin-tag {
  background: var(--red); color: #fff; font-size: 9px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; letter-spacing: .05em; text-transform: uppercase;
}

.sidebar-nav { padding: 12px 12px 0; flex: 1; }
.nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.3); padding: 16px 8px 4px; margin-top: 8px;
}
.nav-label:first-child { margin-top: 0; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.65); font-size: 13.5px; font-weight: 500;
  padding: 9px 10px; border-radius: var(--radius-sm); margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.sidebar-nav .nav-link i { font-size: 16px; flex-shrink: 0; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--red); color: #fff; }

.sidebar-user {
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.07); margin-top: auto;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sidebar-uname { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; }
.sidebar-email { font-size: 11px; color: rgba(255,255,255,.4); }

.dash-main     { flex: 1; margin-left: var(--sidebar-w); padding: 28px; min-width: 0; }
.page-header   { margin-bottom: 24px; }
.page-title    { font-size: 22px; font-weight: 800; color: var(--gray-900); margin: 0; line-height: 1.3; }

/* MOBILE BAR */
.dash-mobile-bar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 10px 16px; display: none; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 150; box-shadow: var(--shadow);
}
.sidebar-toggle { background: none; border: none; color: var(--gray-900); padding: 0; cursor: pointer; }
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 199;
}
.sidebar-overlay.open { display: block; }

/* CARDS */
.card-header-ytg {
  background: var(--gray-50); border-bottom: 1px solid var(--border);
  padding: 14px 20px; border-radius: var(--radius) var(--radius) 0 0;
}

/* INFO ROWS */
.info-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100); gap: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-row > span:first-child { color: var(--gray-500); font-size: 14px; white-space: nowrap; }

/* STAT CARDS (dashboard) */
.stat-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
  padding: 22px; box-shadow: var(--shadow); transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; margin-bottom: 14px;
}
.stat-card .val  { font-size: 26px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-card .lbl  { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.stat-card .chg  { font-size: 12px; margin-top: 6px; }

/* VIDEO CARDS */
.video-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.video-card .card-body { padding: 14px; }

/* PROGRESS BARS */
.progress { border-radius: 999px; background: var(--gray-100); }
.progress-bar { border-radius: 999px; }

/* PAYMENT METHODS */
.pm-header { font-weight: 700; font-size: 15px; display: flex; align-items: center; }
.payment-method-block { background: var(--gray-50); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }

/* ICON CIRCLE */
.icon-circle {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* TABLES */
.table thead th { background: var(--gray-50); border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-500); padding: 10px 16px; }
.table tbody td { padding: 12px 16px; border-color: var(--gray-100); vertical-align: middle; font-size: 14px; }
.table tbody tr:hover { background: var(--gray-50); }

/* FORMS */
.form-control, .form-select { border-color: var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.form-control:focus, .form-select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.form-label { font-size: 14px; font-weight: 600; margin-bottom: 6px; }

/* BADGES */
.badge { font-weight: 600; }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
.fade-up { animation: fadeUp .4s ease forwards; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .dash-main { margin-left: 0; padding: 16px; }
  .dash-mobile-bar { display: flex; }
  .dash-sidebar { transform: translateX(-100%); }
  .dash-sidebar.open { transform: translateX(0); }
  .hero-section { padding: 64px 0 56px; }
  .hero-stats { gap: 0; }
  .stat-item { padding: 16px; }
}
@media (max-width: 768px) {
  .section-pad { padding: 56px 0; }
  .stat-num { font-size: 26px; }
  .plan-card { padding: 22px; }
  .auth-card { padding: 28px 22px; }
  .dash-main { padding: 12px; }
}
@media (max-width: 576px) {
  .hero-title { font-size: 28px; }
  .hero-stats { flex-direction: column; align-items: center; gap: 0; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); width: 100%; padding: 14px 0; }
  .stat-item:last-child { border-bottom: none; }
}