/* ── Design tokens ── */
:root {
  --primary: #572572;
  --primary-dark: #43205A;
  --primary-light: #7B3FA0;
  --brand-bg: #F5F0FA;
  --nav-border: #EAD8F7;
  --card-border: #DFC9ED;
  --shadow: 0 4px 20px rgba(87,37,114,.12);
  --shadow-sm: 0 2px 10px rgba(87,37,114,.06);
  --radius: 16px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--brand-bg); color: var(--primary-dark); }
h1,h2,h3,h4,p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
ul,ol { margin: 0; padding: 0; list-style: none; }

/* ── App shell ── */
.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: 256px; min-height: 100vh;
  background: #fff; border-right: 1px solid var(--nav-border);
  padding: 16px; position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; z-index: 30; display: flex; flex-direction: column;
}
.main-wrapper { flex: 1; margin-left: 256px; display: flex; flex-direction: column; min-height: 100vh; }
.mobile-header { display: none; }

@media (max-width: 1023px) {
  .sidebar { display: none; }
  .main-wrapper { margin-left: 0; }
  .mobile-header {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: #fff;
    border-bottom: 1px solid var(--nav-border);
    position: sticky; top: 0; z-index: 20;
  }
}

.page-main { padding: 16px; }
@media (min-width: 1024px) { .page-main { padding: 24px; } }

/* ── Mobile drawer ── */
.drawer-overlay {
  display: none; position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,.4);
}
.drawer-overlay.open { display: block; }
.drawer {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 288px; background: #fff; padding: 16px;
  overflow-y: auto; display: flex; flex-direction: column;
}

/* ── Sidebar internals ── */
.brand-block { background: linear-gradient(135deg,#572572,#7B3FA0); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.brand-inner { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.brand-logo img { width: 40px; height: 40px; object-fit: cover; }
.brand-name { color: #fff; font-weight: 900; font-size: 18px; letter-spacing: .05em; }
.brand-sub  { color: rgba(255,255,255,.7); font-size: 12px; font-weight: 500; }
.nav-section-label { font-size: 11px; font-weight: 700; color: rgba(67,32,90,.4); letter-spacing: .1em; text-transform: uppercase; padding: 0 8px; margin-bottom: 8px; }
.nav-links { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  color: rgba(67,32,90,.7); transition: background .15s, color .15s;
  border: 1px solid transparent;
}
.nav-item:hover { background: rgba(87,37,114,.05); color: var(--primary-dark); }
.nav-item.active { background: rgba(87,37,114,.1); color: var(--primary); border-color: rgba(87,37,114,.2); font-weight: 600; }
.nav-icon { font-size: 16px; line-height: 1; }
.nav-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); margin-left: auto; }
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--nav-border); text-align: center; }
.sidebar-footer p { font-size: 12px; color: rgba(67,32,90,.4); }

/* ── Mobile header ── */
.menu-btn { padding: 8px; border-radius: 8px; background: none; border: none; color: var(--primary-dark); display: flex; align-items: center; justify-content: center; }
.menu-btn:hover { background: rgba(87,37,114,.1); }
.mobile-brand { display: flex; align-items: center; gap: 8px; }
.mobile-logo { width: 28px; height: 28px; border-radius: 8px; overflow: hidden; }
.mobile-logo img { width: 28px; height: 28px; object-fit: cover; }
.mobile-brand-name { color: var(--primary); font-weight: 900; font-size: 14px; letter-spacing: .05em; line-height: 1; }
.mobile-brand-sub  { color: rgba(67,32,90,.5); font-size: 11px; line-height: 1; }

/* ── Hero card ── */
.hero-card { background: linear-gradient(135deg,#572572 0%,#7B3FA0 100%); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 16px; }
.hero-card h1 { color: #fff; font-size: clamp(22px,4vw,30px); font-weight: 900; line-height: 1.2; margin-bottom: 8px; }
.hero-card .hero-sub { color: rgba(255,255,255,.9); font-size: 15px; line-height: 1.6; margin-bottom: 0; }
.hero-badge { display: inline-block; background: rgba(255,255,255,.15); color: rgba(255,255,255,.9); font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; margin-top: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.hero-trust  { display: inline-block; background: rgba(255,255,255,.15); color: rgba(255,255,255,.9); font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; margin-top: 12px; }

/* ── Section card ── */
.section-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--nav-border); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 12px; }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-icon { width: 36px; height: 36px; border-radius: 12px; background: rgba(87,37,114,.1); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.card-header h2 { font-size: 15px; font-weight: 800; color: var(--primary-dark); }

/* ── Check list ── */
.check-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; }
.check-dot { margin-top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 9px; color: #fff; font-weight: 700; }
.check-list li > span:last-child { font-size: 14px; color: rgba(67,32,90,.75); line-height: 1.5; }

/* ── CTA card ── */
.cta-card { background: linear-gradient(135deg,#572572 0%,#7B3FA0 100%); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin: 4px 0 12px; }
.cta-card h2 { color: #fff; font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.cta-card p  { color: rgba(255,255,255,.9); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Buttons ── */
.btn-white   { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--primary-dark); font-weight: 700; font-size: 14px; padding: 10px 20px; border-radius: 12px; border: none; transition: background .15s; }
.btn-white:hover { background: rgba(255,255,255,.9); }
.btn-outline { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; font-weight: 600; font-size: 14px; padding: 10px 20px; border-radius: 12px; transition: background .15s; }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 24px; border-radius: 12px; border: none; transition: background .15s; }
.btn-primary:hover { background: var(--primary-light); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-dark    { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-dark); color: #fff; font-weight: 700; font-size: 12px; padding: 8px 16px; border-radius: 8px; border: none; transition: background .15s; }
.btn-dark:hover { background: var(--primary); }
.btn-nav     { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--primary-dark); font-weight: 700; font-size: 14px; padding: 10px 20px; border-radius: 12px; border: none; }
.btn-nav:hover { background: rgba(255,255,255,.9); }

/* ── Page footer ── */
.page-footer { background: rgba(255,255,255,.7); border-radius: var(--radius); border: 1px solid var(--nav-border); padding: 20px; margin-top: 8px; }
.footer-quick-label { font-size: 14px; font-weight: 700; color: var(--primary-dark); margin-bottom: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.footer-link { font-size: 12px; font-weight: 500; background: #fff; border: 1px solid var(--card-border); color: rgba(67,32,90,.75); padding: 6px 12px; border-radius: 8px; transition: color .15s, border-color .15s; }
.footer-link:hover { color: var(--primary); border-color: rgba(87,37,114,.3); }
.footer-divider { border: none; border-top: 1px solid var(--nav-border); margin: 12px 0; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer-play { display: flex; align-items: center; gap: 6px; }
.footer-play-text { font-size: 12px; font-weight: 600; color: rgba(67,32,90,.75); }
.footer-play-sub  { font-size: 12px; color: rgba(67,32,90,.45); }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.footer-email { font-size: 12px; color: rgba(67,32,90,.55); }
.footer-copy  { font-size: 12px; color: rgba(67,32,90,.35); }

/* ── Info grid (home page 3-col) ── */
.info-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
@media (min-width: 640px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
.info-item { background: #fff; border-radius: var(--radius); border: 1px solid var(--nav-border); box-shadow: var(--shadow-sm); padding: 16px; display: flex; align-items: center; gap: 12px; }
.info-icon  { width: 40px; height: 40px; border-radius: 12px; background: rgba(87,37,114,.1); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.info-title { font-size: 14px; font-weight: 700; color: var(--primary-dark); }
.info-desc  { font-size: 12px; color: rgba(67,32,90,.6); line-height: 1.4; }

/* ── Feature grid ── */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.feature-item { background: var(--brand-bg); border-radius: 12px; border: 1px solid var(--nav-border); padding: 16px; }
.fi-icon  { font-size: 20px; margin-bottom: 8px; }
.fi-title { font-size: 14px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.fi-desc  { font-size: 12px; color: rgba(67,32,90,.65); line-height: 1.5; }

/* ── Screenshot gallery ── */
.gallery { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.gallery-item { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.gallery-frame { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.gallery-frame img { width: 180px; height: 360px; object-fit: cover; display: block; }
.gallery-label { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--primary-dark); }

/* ── Forms ── */
.split-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 12px; }
@media (min-width: 1024px) { .split-grid { grid-template-columns: 320px 1fr; } }
.info-card, .form-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--nav-border); box-shadow: var(--shadow-sm); padding: 20px; }
.panel-title { font-size: 14px; font-weight: 800; color: var(--primary-dark); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panel-title-bar { width: 4px; height: 20px; background: var(--primary); border-radius: 99px; flex-shrink: 0; }
.form-card-title { font-size: 15px; font-weight: 800; color: var(--primary-dark); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.contact-option { display: flex; align-items: center; gap: 12px; background: var(--brand-bg); border-radius: 12px; border: 1px solid var(--nav-border); padding: 12px; margin-bottom: 8px; }
.co-icon { width: 36px; height: 36px; border-radius: 12px; background: rgba(87,37,114,.1); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.co-title { font-size: 14px; font-weight: 700; color: var(--primary-dark); }
.co-desc  { font-size: 12px; color: rgba(67,32,90,.6); }
.cat-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: 1fr 1fr; } }
.cat-item { display: flex; align-items: flex-start; gap: 10px; background: var(--brand-bg); border: 1px solid var(--nav-border); border-radius: 12px; padding: 12px; }
.cat-icon  { font-size: 16px; margin-top: 2px; }
.cat-title { font-size: 14px; font-weight: 700; color: var(--primary-dark); }
.cat-desc  { font-size: 12px; color: rgba(67,32,90,.6); line-height: 1.4; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: rgba(67,32,90,.8); margin-bottom: 4px; }
.form-input, .form-textarea {
  width: 100%; border: 1px solid var(--card-border); border-radius: 12px;
  padding: 10px 16px; font-size: 14px; color: var(--primary-dark);
  background: var(--brand-bg); font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(87,37,114,.1); }
.form-textarea { resize: none; }
.form-error { font-size: 14px; color: #dc2626; background: #fef2f2; border: 1px solid #fca5a5; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; display: none; }
.form-error.visible { display: block; }
.form-success { display: none; align-items: center; gap: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 16px; }
.form-success.visible { display: flex; }
.success-title { font-weight: 700; color: #166534; }
.success-msg   { font-size: 14px; color: #15803d; }

/* ── Documentation ── */
.doc-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.doc-btn { border: 1px solid var(--nav-border); background: #fff; color: var(--primary-dark); font-size: 12px; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.doc-btn:hover  { background: rgba(87,37,114,.1); }
.doc-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.doc-section { scroll-margin-top: 80px; }
.doc-detail { margin-bottom: 16px; }
.doc-detail h3 { font-size: 14px; font-weight: 600; color: var(--primary-dark); margin-bottom: 6px; }
.doc-detail p  { font-size: 14px; color: rgba(67,32,90,.75); line-height: 1.6; }
.doc-examples-list { list-style: none; }
.doc-examples-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: rgba(67,32,90,.75); margin-bottom: 4px; }
.doc-examples-list li::before { content: "•"; color: var(--primary); }
.doc-summary-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .doc-summary-grid { grid-template-columns: repeat(3, 1fr); } }
.doc-summary-item { background: var(--brand-bg); border: 1px solid var(--nav-border); border-radius: var(--radius); padding: 16px; }
.doc-summary-title { font-size: 14px; font-weight: 600; color: var(--primary-dark); margin-bottom: 8px; }
.doc-summary-text  { font-size: 14px; color: rgba(67,32,90,.75); line-height: 1.6; }

/* ── Help center ── */
.search-bar { background: #fff; border-radius: var(--radius); border: 1px solid var(--nav-border); box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 12px; }
.search-wrap { position: relative; margin-bottom: 12px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search-input { width: 100%; border: 1px solid var(--card-border); border-radius: 12px; padding: 10px 36px 10px 36px; font-size: 14px; color: var(--primary-dark); background: var(--brand-bg); outline: none; font-family: inherit; transition: border-color .15s; }
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(87,37,114,.1); }
.search-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: rgba(67,32,90,.4); font-size: 12px; padding: 2px; display: none; }
.search-clear.visible { display: block; }
.search-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.search-chip { font-size: 12px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--nav-border); background: #fff; color: rgba(67,32,90,.7); cursor: pointer; transition: background .1s, color .1s; }
.search-chip:hover { background: var(--brand-bg); color: var(--primary); }
.filter-bar { background: #fff; border-radius: 12px; border: 1px solid var(--nav-border); padding: 12px; margin-bottom: 12px; overflow-x: auto; }
.filter-btns { display: flex; gap: 8px; }
.filter-btn { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; background: var(--brand-bg); color: rgba(67,32,90,.65); white-space: nowrap; transition: background .1s, color .1s; }
.filter-btn:hover  { background: rgba(87,37,114,.1); }
.filter-btn.active { background: var(--primary); color: #fff; }
.help-category { background: #fff; border-radius: var(--radius); border: 1px solid var(--nav-border); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 12px; }
.help-cat-title { font-size: 14px; font-weight: 800; color: var(--primary-dark); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.help-cat-icon  { width: 32px; height: 32px; border-radius: 12px; background: rgba(87,37,114,.1); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.accordion { border: 1px solid var(--nav-border); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.accordion-btn  { width: 100%; text-align: left; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: none; border: none; cursor: pointer; transition: background .1s; }
.accordion-btn:hover { background: var(--brand-bg); }
.accordion-title { font-size: 14px; font-weight: 700; color: var(--primary-dark); }
.accordion-arrow { font-size: 12px; color: rgba(87,37,114,.6); flex-shrink: 0; transition: transform .2s; }
.accordion-btn[aria-expanded="true"] .accordion-arrow { transform: rotate(180deg); }
.accordion-body { display: none; padding: 12px 16px 16px; border-top: 1px solid var(--nav-border); background: rgba(245,240,250,.4); }
.accordion-body.open { display: block; }
.acc-section-title { font-size: 12px; font-weight: 700; color: var(--primary-dark); margin: 12px 0 6px; }
.acc-text { font-size: 14px; color: rgba(67,32,90,.75); line-height: 1.6; white-space: pre-line; }
.acc-list { display: flex; flex-direction: column; gap: 4px; }
.acc-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: rgba(67,32,90,.75); line-height: 1.5; }
.acc-tick { color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.acc-ol { display: flex; flex-direction: column; gap: 4px; }
.acc-ol li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: rgba(67,32,90,.75); }
.acc-num  { font-weight: 700; color: var(--primary); flex-shrink: 0; }
.acc-important { background: rgba(87,37,114,.08); border: 1px solid rgba(87,37,114,.2); border-radius: 12px; padding: 12px; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--primary-dark); line-height: 1.5; }
.no-results { background: #fff; border-radius: var(--radius); border: 1px solid var(--nav-border); padding: 40px; text-align: center; }
.no-results-icon  { font-size: 36px; margin-bottom: 8px; }
.no-results-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.no-results-msg   { font-size: 14px; color: rgba(67,32,90,.6); }

/* ── 404 ── */
.not-found-wrap { max-width: 600px; margin: 0 auto; padding: 16px; }
.not-found-card { background: #fff; border-radius: 24px; border: 1px solid var(--nav-border); box-shadow: var(--shadow-sm); padding: 48px 32px; text-align: center; }
.not-found-code  { font-size: 56px; font-weight: 900; color: var(--primary); margin-bottom: 16px; }
.not-found-title { font-size: 24px; font-weight: 800; color: var(--primary-dark); margin-bottom: 8px; }
.not-found-msg   { font-size: 14px; color: rgba(67,32,90,.65); margin-bottom: 24px; }

/* ── Utilities ── */
.text-body { font-size: 14px; color: rgba(67,32,90,.75); line-height: 1.6; margin-bottom: 8px; }
.text-body a { color: var(--primary); text-decoration: underline; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── FAB ── */
.app-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px; border-radius: 14px;
  background: transparent;
  box-shadow: 0 4px 16px rgba(87,37,114,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; transition: transform .2s, box-shadow .2s;
  text-decoration: none; overflow: hidden;
}
.app-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(87,37,114,.55); }
.app-fab img { width: 60px; height: 60px; display: block; border-radius: 14px; }
.app-fab-label {
  position: absolute; right: 68px; bottom: 50%;
  transform: translateY(50%);
  background: var(--primary-dark); color: #fff;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 6px 10px; border-radius: 8px;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.app-fab:hover .app-fab-label { opacity: 1; }
@media (max-width: 767px) {
  .app-fab { bottom: 16px; right: 16px; width: 52px; height: 52px; }
  .app-fab img { width: 28px; height: 28px; }
}
