/* ============ PAGELAB V2 — DESIGN SYSTEM ============ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Colors */
  --dark: #0a0a12;
  --surface: #111120;
  --card: #16162a;
  --accent: #ff3d00;
  --accent2: #ff6b35;
  --green: #00c896;
  --blue: #4f8dff;
  --yellow: #f5b316;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --border: rgba(255,255,255,.07);
  --border2: rgba(255,255,255,.12);
  --muted: rgba(255,255,255,.35);
  --text: rgba(255,255,255,.85);

  /* Fonts */
  --ft: 'Syne', sans-serif;
  --fb: 'DM Sans', sans-serif;
  --fn: 'Space Grotesk', sans-serif;

  /* Radius */
  --r: 12px;
  --rl: 16px;
  --rxl: 24px;

  /* Shadows */
  --shadow: 0 4px 24px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.4);
  --glow: 0 0 40px rgba(255,61,0,.15);
}

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

html { scroll-behavior: smooth }

body {
  font-family: var(--fb);
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4 { font-family: var(--ft); letter-spacing: -.03em; line-height: 1.1 }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fb); font-weight: 500; font-size: 14px;
  padding: 12px 24px; border-radius: var(--r);
  border: none; cursor: pointer; text-decoration: none;
  transition: all .2s; white-space: nowrap; position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: var(--glow) }
.btn-ghost {
  background: rgba(255,255,255,.06); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--border2) }
.btn-sm { padding: 8px 16px; font-size: 13px }
.btn-lg { padding: 16px 32px; font-size: 16px }
.btn.loading .btn-text { opacity: 0 }
.btn.loading .spinner { display: block !important }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important }

.spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite;
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
}
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg) } }

/* ===== CARDS ===== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 24px;
}
.card-title { font-family: var(--ft); font-weight: 700; font-size: 16px; color: #fff; margin-bottom: 4px }
.card-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; font-weight: 300 }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px }
.form-label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 8px;
}
.form-label span { text-transform: none; font-weight: 400; color: rgba(255,255,255,.2) }
.form-input {
  width: 100%; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 12px 14px; color: #fff; font-family: var(--fb);
  font-size: 14px; font-weight: 300; outline: none;
  transition: border-color .2s;
}
.form-input:focus { border-color: rgba(255,61,0,.4) }
.form-input::placeholder { color: rgba(255,255,255,.2) }
.form-textarea { min-height: 100px; resize: vertical }
.form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px }
@media(max-width:600px){ .form-row2 { grid-template-columns: 1fr } }

/* ===== TAGS ===== */
.tags { display: flex; flex-wrap: wrap; gap: 8px }
.tag {
  padding: 6px 14px; border-radius: 99px; font-size: 12px; font-weight: 500;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; transition: all .2s;
}
.tag.active { background: rgba(255,61,0,.1); border-color: rgba(255,61,0,.3); color: var(--accent) }
.tag:hover { border-color: var(--border2); color: var(--text) }

/* ===== OUTPUT BOX ===== */
.output-box {
  display: none; margin-top: 20px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: var(--rl); overflow: hidden;
}
.output-box.show { display: block }
.output-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.output-label { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em }
.output-text { padding: 20px; font-size: 14px; color: var(--text); line-height: 1.8; font-weight: 300; white-space: pre-wrap }

/* ===== APP LAYOUT ===== */
.app-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh }
@media(max-width:900px){ .app-layout { grid-template-columns: 1fr } }

/* ===== SIDEBAR ===== */
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sb-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px; text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.sb-logo img { width: 28px; height: 28px; border-radius: 8px; object-fit: contain }
.sb-logo-text { font-family: var(--ft); font-weight: 800; font-size: 17px; color: #fff }
.sb-logo-text span { color: var(--accent) }
.sb-section {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.2);
  padding: 20px 20px 6px;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; font-size: 13px; font-weight: 400;
  color: var(--muted); text-decoration: none; transition: all .15s;
  border-radius: 0; position: relative;
}
.sb-item:hover { color: var(--text); background: rgba(255,255,255,.03) }
.sb-item.active { color: #fff; background: rgba(255,61,0,.08) }
.sb-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.sb-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0 }
.sb-bottom { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--border) }
.user-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px }
.user-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fn); font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: #fff }
.user-plan { font-size: 11px; color: var(--muted) }
.logout-btn {
  width: 100%; background: none; border: none; color: var(--muted);
  font-family: var(--fb); font-size: 12px; cursor: pointer;
  text-align: left; padding: 6px 0; transition: color .2s;
  display: flex; align-items: center; gap: 6px;
}
.logout-btn:hover { color: #fff }

/* ===== MAIN CONTENT ===== */
.main-content { padding: 32px 40px; overflow-y: auto }
@media(max-width:900px){ .main-content { padding: 20px 16px 80px } }

/* ===== MOBILE NAV ===== */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 8px 0; z-index: 200;
}
@media(max-width:900px){ .mobile-nav { display: flex } }
.mobile-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; font-size: 10px; color: var(--muted); text-decoration: none;
}
.mobile-nav a.active { color: var(--accent) }
.mobile-nav a span:first-child { font-size: 20px }

/* ===== AGENT CARD (dashboard) ===== */
.agent-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--rxl); padding: 24px; cursor: pointer;
  transition: all .25s; text-decoration: none; display: block;
  position: relative; overflow: hidden;
}
.agent-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow-lg) }
.agent-card.active-card { border-color: rgba(0,200,150,.2) }
.agent-avatar {
  width: 72px; height: 72px; border-radius: 20px;
  margin-bottom: 16px; object-fit: cover;
  font-size: 36px; display: flex; align-items: center; justify-content: center;
}
.agent-name { font-family: var(--ft); font-weight: 700; font-size: 17px; color: #fff; margin-bottom: 4px }
.agent-role { font-size: 12px; color: var(--muted); margin-bottom: 14px; font-weight: 300 }
.agent-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; padding: 4px 12px;
  border-radius: 99px;
}
.status-active { background: rgba(0,200,150,.1); color: var(--green); border: 1px solid rgba(0,200,150,.2) }
.status-inactive { background: rgba(255,255,255,.04); color: var(--muted); border: 1px solid var(--border) }
.status-warning { background: rgba(245,179,22,.1); color: var(--yellow); border: 1px solid rgba(245,179,22,.2) }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor }

/* ===== ACTIVATE BLOCK ===== */
.activate-block {
  background: linear-gradient(135deg, rgba(255,61,0,.08), rgba(255,107,53,.05));
  border: 1px solid rgba(255,61,0,.15); border-radius: var(--rxl);
  padding: 28px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 24px;
}
.act-title { font-family: var(--ft); font-weight: 700; font-size: 18px; color: #fff; margin-bottom: 6px }
.act-desc { font-size: 13px; color: var(--muted); font-weight: 300; line-height: 1.6 }
.act-price { font-family: var(--fn); font-weight: 700; font-size: 32px; color: var(--accent) }
.act-price span { font-size: 14px; color: var(--muted); font-family: var(--fb); font-weight: 400 }

/* ===== TUTORIAL ===== */
.tutorial-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.8); backdrop-filter: blur(8px);
  z-index: 1000; align-items: center; justify-content: center; padding: 24px;
}
.tutorial-overlay.open { display: flex }
.tutorial-modal {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--rxl); width: 100%; max-width: 500px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.tutorial-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border) }
.tutorial-steps { display: flex; gap: 6px }
.tutorial-step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border2); transition: all .3s }
.tutorial-step-dot.active { background: var(--accent); width: 24px; border-radius: 4px }
.tutorial-close { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; transition: color .2s; font-family: var(--fb) }
.tutorial-close:hover { color: #fff }
.tutorial-content { padding: 32px 24px }
.tutorial-slide { text-align: center }
.tutorial-icon { font-size: 48px; margin-bottom: 16px }
.tutorial-title { font-family: var(--ft); font-weight: 700; font-size: 20px; color: #fff; margin-bottom: 12px }
.tutorial-desc { font-size: 14px; color: var(--muted); font-weight: 300; line-height: 1.7 }
.tutorial-preview { margin-top: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; text-align: left }
.tutorial-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--border) }
.tutorial-counter { font-size: 12px; color: var(--muted) }

/* ===== ALERTS ===== */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--r); margin-bottom: 20px; font-size: 13px;
}
.alert.warning { background: rgba(245,179,22,.08); border: 1px solid rgba(245,179,22,.2); color: var(--text) }
.alert.danger { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: var(--text) }
.alert.info { background: rgba(79,141,255,.06); border: 1px solid rgba(79,141,255,.15); color: var(--text) }
.alert.success { background: rgba(0,200,150,.06); border: 1px solid rgba(0,200,150,.15); color: var(--text) }
.alert p { font-weight: 300; line-height: 1.6 }
.alert p strong { font-weight: 600; color: #fff }

/* ===== ACTIVITY FEED ===== */
.activity-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.04);
}
.activity-item:last-child { border-bottom: none }
.activity-avatar {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; background: var(--card);
}
.activity-text { font-size: 13px; color: var(--text); font-weight: 300; line-height: 1.5 }
.activity-text strong { font-weight: 600; color: #fff }
.activity-time { font-size: 11px; color: var(--muted); margin-top: 3px }

/* ===== LANDING NAV ===== */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 64px;
  transition: all .3s;
}
.landing-nav.scrolled {
  background: rgba(10,10,18,.95); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); padding: 12px 64px;
}
@media(max-width:768px){ .landing-nav, .landing-nav.scrolled { padding: 12px 20px } }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none }
.nav-logo img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain }
.nav-logo-text { font-family: var(--ft); font-weight: 800; font-size: 18px; color: #fff }
.nav-logo-text span { color: var(--accent) }
.nav-links { display: flex; gap: 32px; list-style: none }
.nav-links a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s }
.nav-links a:hover { color: #fff }
.nav-actions { display: flex; gap: 10px; align-items: center }
@media(max-width:768px){ .nav-links { display: none } }

/* ===== SECTIONS ===== */
.section { padding: 100px 64px }
@media(max-width:768px){ .section { padding: 60px 20px } }
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 16px;
}
.section-label::before { content: ''; width: 24px; height: 1.5px; background: var(--accent); display: block }
.section-title {
  font-family: var(--ft); font-weight: 800;
  font-size: clamp(32px,4vw,52px); color: #fff;
  letter-spacing: -.04em; margin-bottom: 20px;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal, .reveal-l, .reveal-r { opacity: 0; transition: all .7s cubic-bezier(.16,1,.3,1) }
.reveal { transform: translateY(30px) }
.reveal-l { transform: translateX(-40px) }
.reveal-r { transform: translateX(40px) }
.reveal.visible, .reveal-l.visible, .reveal-r.visible { opacity: 1; transform: none }

/* ===== FOOTER ===== */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 60px 64px 32px }
@media(max-width:768px){ .footer { padding: 40px 20px 24px } }
.footer-top { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 48px; margin-bottom: 48px }
@media(max-width:768px){ .footer-top { grid-template-columns: 1fr 1fr; gap: 32px } }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px }
.footer-logo img { width: 26px; height: 26px; border-radius: 6px; object-fit: contain }
.footer-logo-text { font-family: var(--ft); font-weight: 800; font-size: 16px; color: #fff }
.footer-logo-text span { color: var(--accent) }
.footer-desc { font-size: 13px; color: var(--muted); font-weight: 300; line-height: 1.7; max-width: 240px }
.footer-col-title { font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; font-weight: 300; transition: color .2s }
.footer-links a:hover { color: #fff }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 24px; flex-wrap: wrap; gap: 12px }
.footer-copy { font-size: 12px; color: rgba(255,255,255,.2) }
.footer-legal { display: flex; gap: 20px }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,.2); text-decoration: none; transition: color .2s }
.footer-legal a:hover { color: var(--muted) }

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--rl); padding: 16px 20px;
  display: flex; align-items: center; gap: 16px; z-index: 1000;
  box-shadow: var(--shadow-lg); max-width: 560px; width: calc(100% - 32px);
}
.cookie-banner.hidden { display: none }
.cookie-text { font-size: 13px; color: var(--muted); font-weight: 300; flex: 1 }
.cookie-text a { color: var(--accent) }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0 }

/* ===== PRICING CARDS ===== */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px }
@media(max-width:768px){ .pricing-grid { grid-template-columns: 1fr } }
.p-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--rxl); padding: 32px; position: relative;
  transition: all .2s;
}
.p-card.featured {
  background: var(--accent); border-color: var(--accent);
  transform: scale(1.03);
}
.p-card:hover:not(.featured) { border-color: var(--border2); transform: translateY(-4px) }
.p-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #fff; color: var(--accent); font-size: 10px; font-weight: 700;
  padding: 4px 14px; border-radius: 99px; letter-spacing: .08em;
}
.p-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.5); margin-bottom: 16px }
.p-card.featured .p-name { color: rgba(255,255,255,.7) }
.p-price { font-family: var(--fn); font-weight: 700; font-size: 48px; color: #fff; line-height: 1; margin-bottom: 4px }
.p-period { font-size: 13px; color: rgba(255,255,255,.4); margin-bottom: 28px }
.p-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px }
.p-features li { font-size: 13px; color: rgba(255,255,255,.7); font-weight: 300; display: flex; align-items: center; gap: 8px }
.p-features li::before { content: '→'; color: currentColor; font-size: 11px; flex-shrink: 0 }
.p-card.featured .p-features li { color: rgba(255,255,255,.9) }
.p-btn {
  width: 100%; padding: 14px; background: #fff; color: var(--accent);
  border: none; border-radius: var(--r); font-family: var(--fb);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.p-card:not(.featured) .p-btn { background: var(--accent); color: #fff }
.p-btn:hover { opacity: .9; transform: translateY(-1px) }

/* ===== TIMELINE ===== */
.timeline { display: flex; flex-direction: column; gap: 0 }
.tl-item { display: flex; gap: 16px; padding-bottom: 20px; position: relative }
.tl-item:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 32px; bottom: 0; width: 1px; background: var(--border) }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--fn) }
.tl-day { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 4px }
.tl-desc { font-size: 13px; color: var(--muted); font-weight: 300; line-height: 1.6; font-style: italic }

/* ===== AGENT PAGE ===== */
.agent-page-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 32px }
.agent-page-icon {
  width: 72px; height: 72px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  flex-shrink: 0; background: var(--card); border: 1px solid var(--border);
}

/* ===== SCREEN TABS (dashboard) ===== */
.screen-tabs { display: flex; gap: 2px; background: var(--card); border-radius: var(--r); padding: 4px; margin-bottom: 28px; width: fit-content }
.screen-tab {
  padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer; transition: all .2s; border: none;
  background: none; font-family: var(--fb);
}
.screen-tab.active { background: var(--surface); color: #fff; box-shadow: var(--shadow) }

/* ===== PAGE ANIMATIONS ===== */
.page-in { animation: pageIn .4s ease }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
