/* VRAISE WIN theme - colours come from the product artwork and logo.
   --vw-primary / --vw-secondary / --vw-dark / --vw-accent are set by the admin (see layouts). */
:root {
  --vw-cream: #FFF8EC;
  --vw-cream-2: #FFEFD2;
  --vw-green: #2E7D32;
  --vw-radius: 16px;
  --vw-shadow: 0 10px 30px rgba(59, 70, 86, .10);
}
body { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--vw-dark); background: #fff; }
a { color: var(--vw-secondary); }
.text-primary-vw { color: var(--vw-primary) !important; }
.text-accent { color: var(--vw-accent) !important; }
.text-teal { color: var(--vw-secondary) !important; }
.bg-cream { background: var(--vw-cream); }
.bg-primary-vw { background: var(--vw-primary) !important; }
.bg-teal { background: var(--vw-secondary) !important; }

.btn-vw { background: linear-gradient(135deg, var(--vw-primary), #F9A43A); color: #fff; border: 0; border-radius: 50px; padding: .6rem 1.6rem; font-weight: 600; box-shadow: 0 6px 18px rgba(240, 124, 27, .35); }
.btn-vw:hover, .btn-vw:focus { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
.btn-teal { background: var(--vw-secondary); color: #fff; border-radius: 50px; padding: .6rem 1.6rem; font-weight: 600; border: 0; }
.btn-teal:hover { color: #fff; filter: brightness(1.1); }
.btn-outline-vw { border: 2px solid var(--vw-primary); color: var(--vw-primary); border-radius: 50px; padding: .5rem 1.4rem; font-weight: 600; }
.btn-outline-vw:hover { background: var(--vw-primary); color: #fff; }

/* Top bar & header */
.topbar { background: var(--vw-dark); color: #e9eef3; font-size: .85rem; }
.topbar a { color: #e9eef3; text-decoration: none; }
.site-header { background: #fff; box-shadow: 0 2px 16px rgba(0,0,0,.06); }
.site-header .navbar-brand img { height: 54px; }
.site-header .nav-link { font-weight: 500; color: var(--vw-dark); padding: .5rem 1rem !important; }
.site-header .nav-link.active, .site-header .nav-link:hover { color: var(--vw-primary); }

/* News ticker */
.ticker { background: linear-gradient(90deg, var(--vw-accent), #C9302C); color: #fff; overflow: hidden; white-space: nowrap; }
.ticker .label { background: var(--vw-green); padding: .45rem 1rem; font-weight: 600; position: relative; z-index: 2; }
.ticker .track { display: inline-block; padding-left: 100%; animation: ticker 35s linear infinite; }
.ticker .track span { margin-right: 3rem; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* Hero slider */
.hero .swiper-slide { background: radial-gradient(circle at 80% 30%, #FFE3B3 0, var(--vw-cream) 45%, #FFF3DC 100%); min-height: 520px; }
.hero .slide-inner { min-height: 520px; }
.hero h1 { font-weight: 800; color: var(--vw-accent); font-size: clamp(1.9rem, 4vw, 3.3rem); line-height: 1.15; }
.hero p.lead { color: var(--vw-dark); }
.hero .slide-img { max-height: 440px; width: auto; max-width: 100%; border-radius: 22px; box-shadow: var(--vw-shadow); object-fit: contain; background: #fff; }
.hero .swiper-pagination-bullet-active { background: var(--vw-primary); }
.hero .swiper-button-next, .hero .swiper-button-prev { color: var(--vw-primary); }
.leaf-deco { position: absolute; width: 180px; opacity: .18; pointer-events: none; }

/* Sections */
.section { padding: 80px 0; }
.section-title { font-weight: 800; color: var(--vw-dark); }
.section-title span { color: var(--vw-primary); }
.section-badge { display: inline-block; background: var(--vw-cream-2); color: var(--vw-accent); border-radius: 50px; padding: .3rem 1rem; font-weight: 600; font-size: .85rem; margin-bottom: .75rem; }
.pill-green { background: var(--vw-green); color: #fff; border-radius: 50px; padding: .4rem 1.2rem; display: inline-block; font-weight: 600; }

.feature-card { background: #fff; border-radius: var(--vw-radius); padding: 1.4rem; box-shadow: var(--vw-shadow); height: 100%; border: 1px solid #f3e6cf; transition: transform .2s; }
.feature-card:hover { transform: translateY(-4px); }
.feature-card .icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, var(--vw-primary), var(--vw-accent)); margin-bottom: 1rem; }

.product-card { background: #fff; border-radius: var(--vw-radius); overflow: hidden; box-shadow: var(--vw-shadow); height: 100%; border: 1px solid #f3e6cf; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(59,70,86,.16); }
.product-card .img-wrap { background: var(--vw-cream); aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; }
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.price { color: var(--vw-accent); font-weight: 700; font-size: 1.2rem; }
.mrp { color: #999; text-decoration: line-through; font-size: .9rem; }
.badge-pv { background: var(--vw-secondary); color: #fff; border-radius: 50px; padding: .25rem .7rem; font-size: .75rem; }

.package-card { border-radius: var(--vw-radius); background: #fff; box-shadow: var(--vw-shadow); padding: 2rem 1.5rem; text-align: center; border-top: 5px solid var(--vw-primary); height: 100%; }
.package-card .pv { font-size: 2.6rem; font-weight: 800; color: var(--vw-primary); }
.package-card.featured { border-top-color: var(--vw-accent); transform: scale(1.03); }

.plan-step { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border-radius: var(--vw-radius); padding: 1.1rem 1.2rem; box-shadow: var(--vw-shadow); height: 100%; }
.plan-step .num { flex: 0 0 42px; height: 42px; border-radius: 50%; background: var(--vw-secondary); color: #fff; display: grid; place-items: center; font-weight: 700; }

.testimonial { background: #fff; border-radius: var(--vw-radius); padding: 1.6rem; box-shadow: var(--vw-shadow); height: 100%; }
.testimonial .stars { color: #F5B301; }
.testimonial img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }

.cta { background: linear-gradient(120deg, var(--vw-secondary), #125866); color: #fff; border-radius: 24px; }

.site-footer { background: var(--vw-dark); color: #cfd6de; }
.site-footer a { color: #cfd6de; text-decoration: none; }
.site-footer a:hover { color: var(--vw-primary); }
.site-footer h5 { color: #fff; font-weight: 700; }
.footer-bottom { background: rgba(0,0,0,.18); }

.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; font-size: 1.8rem; z-index: 1030; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.wa-float:hover { color: #fff; transform: scale(1.06); }

.page-hero { background: linear-gradient(120deg, var(--vw-cream), var(--vw-cream-2)); padding: 50px 0; }
.page-hero h1 { font-weight: 800; color: var(--vw-accent); }

/* Auth pages */
.auth-wrap { min-height: 100vh; background: radial-gradient(circle at 10% 10%, #FFE3B3 0, var(--vw-cream) 40%, #fff 100%); }
.auth-card { border: 0; border-radius: 22px; box-shadow: var(--vw-shadow); }
.auth-card .logo { height: 70px; }
.form-control, .form-select { border-radius: 10px; padding: .6rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--vw-primary); box-shadow: 0 0 0 .2rem rgba(240,124,27,.18); }
.side-toggle .btn-check:checked + .btn { background: var(--vw-primary); color: #fff; border-color: var(--vw-primary); }

/* Panels (member + admin) */
.panel-body { background: #F6F7FB; min-height: 100vh; }
.sidebar { width: 260px; position: fixed; top: 0; bottom: 0; left: 0; background: var(--vw-dark); color: #cfd6de; overflow-y: auto; z-index: 1040; transition: transform .25s; }
.sidebar .brand { background: #fff; padding: .8rem 1rem; display: block; }
.sidebar .brand img { height: 46px; }
.sidebar .nav-link { color: #cfd6de; padding: .6rem 1.2rem; display: flex; gap: .7rem; align-items: center; border-left: 3px solid transparent; font-size: .93rem; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.07); border-left-color: var(--vw-primary); }
.sidebar .nav-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8b97a6; padding: 1rem 1.2rem .3rem; }
.panel-main { margin-left: 260px; }
.panel-top { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.05); position: sticky; top: 0; z-index: 1020; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: none; }
  .panel-main { margin-left: 0; }
}
.card { border: 0; border-radius: 14px; box-shadow: 0 4px 18px rgba(59,70,86,.07); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 600; border-radius: 14px 14px 0 0 !important; }
.panel-main { font-size: .9rem; }
.panel-top h5 { font-size: 1.05rem; }
.panel-main .card-header { font-size: .95rem; }
.panel-main .table { font-size: .85rem; }
.panel-main .table thead th { font-size: .8rem; }
.stat-card { border-radius: 14px; padding: 1rem 1.1rem; color: #fff; position: relative; overflow: hidden; height: 100%; min-width: 0; }
.stat-card .bi { position: absolute; right: 10px; bottom: -6px; font-size: 2.8rem; opacity: .2; }
/* Long amounts wrap inside the box instead of running out of it. */
.stat-card .value { font-size: 1.2rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; position: relative; }
.stat-card .label { opacity: .92; font-size: .78rem; line-height: 1.35; padding-right: 2.4rem; overflow-wrap: anywhere; position: relative; }
@media (max-width: 575.98px) {
  .stat-card { padding: .8rem .85rem; }
  .stat-card .value { font-size: 1.05rem; }
  .stat-card .label { font-size: .74rem; padding-right: 1.6rem; }
  .stat-card .bi { font-size: 2.2rem; }
}
a.stat-card { display: block; color: #fff; text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.stat-card:hover, a.stat-card:focus { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.impersonation-bar { background: #A61C1C; color: #fff; font-size: .9rem; }
.impersonation-bar .btn { --bs-btn-color: #fff; --bs-btn-border-color: #fff; --bs-btn-hover-bg: #fff; --bs-btn-hover-color: #A61C1C; }
.g-orange { background: linear-gradient(135deg, #F07C1B, #F9A43A); }
.g-teal { background: linear-gradient(135deg, #1B7A8C, #26A3B8); }
.g-red { background: linear-gradient(135deg, #A61C1C, #D9453B); }
.g-green { background: linear-gradient(135deg, #2E7D32, #4CAF50); }
.g-slate { background: linear-gradient(135deg, #3B4656, #5B6B80); }
.g-purple { background: linear-gradient(135deg, #5B3F9A, #8B6CD1); }
.table > :not(caption) > * > * { vertical-align: middle; }
.table thead th { background: #F6F7FB; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.thumb { width: 60px; height: 45px; object-fit: cover; border-radius: 6px; }

/* Genealogy tree */
.tree-wrap { overflow-x: auto; padding-bottom: 1rem; }
.tree { display: block; width: max-content; min-width: 100%; }
.tree > ul { width: max-content; margin: 0 auto; }
.tree ul { padding-top: 20px; position: relative; display: flex; justify-content: center; margin: 0; padding-left: 0; }
.tree li { list-style: none; text-align: center; position: relative; padding: 20px 4px 0; flex: 1; }
.tree li::before, .tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 2px solid #c9d1db; width: 50%; height: 20px; }
.tree li::after { right: auto; left: 50%; border-left: 2px solid #c9d1db; }
.tree li:only-child::after, .tree li:only-child::before { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid #c9d1db; border-radius: 0 6px 0 0; }
.tree li:first-child::after { border-radius: 6px 0 0 0; }
.tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid #c9d1db; height: 20px; }
.tree-node { display: inline-block; text-decoration: none; color: var(--vw-dark); background: #fff; border-radius: 12px; padding: .5rem .6rem; box-shadow: 0 4px 12px rgba(0,0,0,.08); min-width: 110px; font-size: .8rem; }
.tree-node .avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .3rem; color: #fff; font-size: 1.2rem; }
.tree-node.active .avatar { background: var(--vw-green); }
.tree-node.inactive .avatar { background: #E0A100; }
.tree-node.blocked .avatar { background: #C62828; }
.tree-node.empty { opacity: .6; border: 2px dashed #c9d1db; box-shadow: none; }
.tree-node.empty .avatar { background: #c9d1db; }
.tree-node .counts { font-size: .7rem; color: #6b7785; }
.ref-box { background: var(--vw-cream); border: 1px dashed var(--vw-primary); border-radius: 10px; padding: .5rem .75rem; font-size: .85rem; word-break: break-all; }

/* ---------- Visual editor ---------- */
.vw-editor { border: 1px solid #dee2e6; border-radius: 10px; overflow: hidden; background: #fff; }
.vw-editor-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; background: #f8f9fa; border-bottom: 1px solid #dee2e6; }
.vw-editor-bar button { border: 0; background: transparent; width: 34px; height: 32px; border-radius: 6px; color: var(--vw-dark); }
.vw-editor-bar button:hover, .vw-editor-bar button.active { background: var(--vw-primary); color: #fff; }
.vw-editor-sep { width: 1px; background: #dee2e6; margin: 4px 4px; }
.vw-editor-link { display: flex; gap: 6px; padding: 6px; background: #fff8ef; border-bottom: 1px solid #dee2e6; }
.vw-editor-area { min-height: 260px; max-height: 560px; overflow-y: auto; padding: 14px 16px; outline: 0; }
.vw-editor-area:focus { box-shadow: inset 0 0 0 2px rgba(240, 124, 27, .25); }
.vw-editor-area img, .page-content img { max-width: 100%; height: auto; border-radius: 8px; }
.vw-editor-area table, .page-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.vw-editor-area th, .vw-editor-area td, .page-content th, .page-content td { border: 1px solid #dee2e6; padding: 6px 10px; }
.vw-editor-area blockquote, .page-content blockquote { border-left: 4px solid var(--vw-primary); padding-left: 12px; color: #6b7280; }
.vw-editor textarea { border: 0; border-radius: 0; }

/* ---------- Printable pages (invoice, welcome letter, ID card) ---------- */
.print-body { background: #eef0f3; }
.print-toolbar { display: flex; gap: 8px; justify-content: center; padding: 14px; }
.print-sheet { background: #fff; max-width: 820px; margin: 0 auto 30px; padding: 40px 44px; box-shadow: 0 6px 24px rgba(0, 0, 0, .08); border-radius: 6px; }
.print-sheet-plain { background: transparent; box-shadow: none; padding: 10px; }
.letter-text { line-height: 1.8; font-size: 1.02rem; }

.id-card { width: 300px; margin: 0 auto; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); border: 1px solid #e5e7eb; }
.id-card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: #fff; background: linear-gradient(135deg, var(--vw-primary), #F9A43A); }
.id-card-head img { height: 44px; background: #fff; border-radius: 8px; padding: 3px; }
.id-card-tag { font-size: .68rem; opacity: .95; }
.id-card-body { padding: 18px 16px 12px; text-align: center; }
.id-card-photo { width: 96px; height: 96px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--vw-secondary); overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f3f4f6; font-size: 3.2rem; color: #9ca3af; }
.id-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-card-name { font-weight: 700; font-size: 1.1rem; color: var(--vw-dark); }
.id-card-id { display: inline-block; margin: 4px 0 10px; padding: 2px 14px; border-radius: 20px; background: var(--vw-secondary); color: #fff; font-weight: 600; letter-spacing: .5px; }
.id-card-info { margin: 0 auto 10px; font-size: .82rem; text-align: left; }
.id-card-info th { padding: 1px 10px 1px 0; color: #6b7280; font-weight: 500; }
.id-card-qr svg { width: 110px; height: 110px; }
.id-card-scan { font-size: .68rem; color: #6b7280; }
.id-card-foot { background: var(--vw-dark); color: #fff; text-align: center; font-size: .72rem; padding: 7px; }

@media print {
  .print-body { background: #fff; }
  .print-sheet { box-shadow: none; margin: 0; max-width: none; padding: 0; border-radius: 0; }
  .id-card { box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
}

/* Legal documents */
.legal-number { display: inline-block; align-self: flex-start; background: var(--vw-cream); border: 1px dashed var(--vw-primary); border-radius: 8px; padding: .25rem .7rem; font-weight: 600; font-size: .85rem; letter-spacing: .03em; }
