:root {
  --brand: #f28c18;
  --brand-dark: #d8740a;
  --navy: #10233f;
  --navy-2: #173257;
  --bg: #f4f6fa;
  --radius: 14px;
}
body { background: var(--bg); font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: #1d2433; }
a { color: var(--brand-dark); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.text-brand { color: var(--brand-dark) !important; }

.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #ffb347, var(--brand)); color: #fff; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 6px 14px rgba(242, 140, 24, .35); flex-shrink: 0;
}

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; background: linear-gradient(180deg, var(--navy), var(--navy-2)); position: fixed; inset: 0 auto 0 0;
  z-index: 1040; overflow-y: auto; transition: transform .25s;
}
.sb-brand { display: flex; gap: 12px; align-items: center; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sb-nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.sb-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; color: rgba(255,255,255,.75);
  text-decoration: none; font-size: .94rem;
}
.sb-nav a i { font-size: 1.1rem; }
.sb-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-nav a.active { background: var(--brand); color: #fff; box-shadow: 0 6px 14px rgba(242,140,24,.3); }
.content { margin-left: 250px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: #fff;
  border-bottom: 1px solid #e7eaf0; position: sticky; top: 0; z-index: 1020;
}
.page-title { font-size: 1.2rem; font-weight: 700; margin: 0; }
.page { padding: 24px; flex: 1; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; }
.sb-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .content { margin-left: 0; }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1030; }
  .page { padding: 16px; }
  .topbar { padding: 10px 16px; }
}

/* Cards */
.card { border: 0; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(16,35,63,.06), 0 4px 16px rgba(16,35,63,.04); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 600; border-radius: var(--radius) var(--radius) 0 0 !important; padding: 14px 18px; }
.stat { padding: 18px; display: flex; gap: 14px; align-items: center; }
.stat .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.stat .v { font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.stat .l { color: #6b7385; font-size: .85rem; }
.ic-orange { background: #fff1e0; color: var(--brand-dark); }
.ic-green { background: #e5f7ec; color: #198754; }
.ic-blue { background: #e6efff; color: #2b5fd9; }
.ic-purple { background: #f0e8ff; color: #6f42c1; }
.ic-red { background: #ffe8e8; color: #d63939; }

.table { margin-bottom: 0; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; color: #6b7385; background: #f8f9fb; border-bottom-width: 1px; white-space: nowrap; }
.table td { vertical-align: middle; }
.code-pill { font-family: ui-monospace, Menlo, Consolas, monospace; background: #fff1e0; color: var(--brand-dark); padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: .85rem; }

/* Referral hero */
.ref-hero { background: linear-gradient(135deg, var(--navy), #24508f); color: #fff; border-radius: var(--radius); padding: 22px; }
.ref-hero .code { font-size: 1.8rem; font-weight: 800; letter-spacing: 2px; color: #ffcf8a; }
.ref-hero .link { background: rgba(255,255,255,.1); border-radius: 10px; padding: 8px 12px; word-break: break-all; font-size: .88rem; }
#qrbox { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; }
.notice-member { background: linear-gradient(135deg, #fff7ec, #ffe9cc); border: 1px solid #ffd6a0; border-radius: var(--radius); padding: 20px; }

/* Tree */
.tree-wrap { overflow-x: auto; padding: 10px 0 20px; }
.tree ul { padding-top: 20px; position: relative; display: flex; justify-content: center; padding-left: 0; margin: 0; }
.tree li { list-style: none; text-align: center; position: relative; padding: 20px 6px 0; }
.tree li::before, .tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 2px solid #cfd6e2; width: 50%; height: 20px; }
.tree li::after { right: auto; left: 50%; border-left: 2px solid #cfd6e2; }
.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 #cfd6e2; 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 #cfd6e2; height: 20px; }
.tree > ul { padding-top: 0; }
.node { display: inline-block; min-width: 120px; background: #fff; border: 2px solid #e1e6ef; border-radius: 12px; padding: 8px 10px; text-decoration: none; color: inherit; font-size: .82rem; }
.node:hover { border-color: var(--brand); }
.node.prime { border-color: #20c374; background: #f1fcf6; }
.node.blocked { border-color: #e35d5d; background: #fff4f4; }
.node .nm { font-weight: 700; color: #1d2433; white-space: nowrap; }
.node .st { font-size: .72rem; }
.node .more { font-size: .7rem; color: #6b7385; }

/* Auth */
.auth-bg { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 20% 10%, #ffd59a 0, transparent 40%), linear-gradient(135deg, var(--navy), #24508f); }
.auth-card { width: 100%; max-width: 440px; border-radius: 18px; }
.form-control, .form-select { border-radius: 10px; padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(242,140,24,.18); }
.level-chip { display: inline-block; min-width: 34px; text-align: center; padding: 2px 8px; border-radius: 20px; background: #e6efff; color: #2b5fd9; font-weight: 700; font-size: .8rem; }

/* v4: logo, avatar, hints, footer, KB */
.min-w-0 { min-width: 0; }
.sb-logo { flex-shrink: 0; }
.brand-logo { display: block; max-width: 140px; width: auto; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.auth-logo .brand-logo { max-width: 220px; margin: 0 auto; padding: 0; background: transparent; }
.avatar { flex-shrink: 0; }
.avatar-img { object-fit: cover; border-radius: 50%; display: block; border: 2px solid #fff; box-shadow: 0 0 0 1px #e1e6ef; }
.hint { color: #2b5fd9; cursor: help; font-size: .9em; vertical-align: middle; margin-left: 2px; opacity: .85; }
.hint:hover, .hint:focus { opacity: 1; outline: none; }
.tooltip-inner { max-width: 300px; text-align: left; font-size: .82rem; line-height: 1.4; }
.app-footer { text-align: center; color: #6b7385; font-size: .82rem; padding: 16px 12px 20px; line-height: 1.7; border-top: 1px solid #e7eaf0; background: #fff; }
.app-footer a { color: var(--brand-dark); text-decoration: none; }
.auth-footer { text-align: center; color: rgba(255,255,255,.8); font-size: .8rem; margin-top: 18px; line-height: 1.7; }
.auth-footer a { color: #ffcf8a; text-decoration: none; }
.auth-wrap { width: 100%; max-width: 520px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.perm-item { border: 1px solid #e7eaf0; border-radius: 10px; padding: 10px 12px; }
.perm-item:has(input:checked) { border-color: var(--brand); background: #fffaf3; }
.kb-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: #1d2433; text-decoration: none; font-size: .9rem; }
.kb-nav a:hover { background: #fff1e0; color: var(--brand-dark); }
.kb-section { scroll-margin-top: 80px; }
.kb-section h5 { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.kb-section h5 .num { width: 30px; height: 30px; border-radius: 8px; background: #fff1e0; color: var(--brand-dark); display: grid; place-items: center; font-size: .9rem; flex-shrink: 0; }
.kb-body { line-height: 1.7; }
.kb-body pre { background: #f4f6fa; border-radius: 10px; padding: 12px 14px; font-size: .85rem; }
.kb-body .table { font-size: .9rem; }
.kb-tip { background: #e6efff; border-left: 4px solid #2b5fd9; border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.kb-warn { background: #fff4e5; border-left: 4px solid var(--brand); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
mark { background: #ffe39a; padding: 0 2px; }

/* v5: Public homepage */
.home { background: #fff; }
.home-nav { background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid #eef0f4; padding: 10px 0; }
.home-nav .brand-logo { background: transparent; padding: 0; }
.home-nav .nav-link { color: #1d2433; font-weight: 500; }
.home-nav .nav-link:hover { color: var(--brand-dark); }
.home-hero { background: radial-gradient(circle at 85% 15%, rgba(255,179,71,.35) 0, transparent 40%), linear-gradient(135deg, var(--navy) 0%, #1f4479 100%); color: #fff; padding: 70px 0 80px; }
.hero-pill { display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 6px 14px; border-radius: 30px; font-size: .85rem; margin-bottom: 18px; }
.hero-pill i { color: #ffcf8a; }
.hero-title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; line-height: 1.15; margin-bottom: 18px; }
.hero-title span { color: #ffb347; }
.hero-sub { font-size: 1.08rem; color: rgba(255,255,255,.85); max-width: 600px; line-height: 1.7; margin-bottom: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 1.5rem; color: #ffcf8a; }
.hero-stats span { font-size: .85rem; color: rgba(255,255,255,.7); }
.hero-card { border-radius: 18px; color: #1d2433; }
.home-sec { padding: 72px 0; }
.home-sec.alt { background: var(--bg); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.sec-head span { color: var(--brand-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: .8rem; }
.sec-head h2 { font-weight: 800; margin: 6px 0 10px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.sec-head p { color: #6b7385; margin: 0; }
.step-card { background: #fff; border: 1px solid #eef0f4; border-radius: 16px; padding: 26px 22px; position: relative; transition: transform .2s, box-shadow .2s; }
.step-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(16,35,63,.08); }
.step-no { position: absolute; top: 16px; right: 18px; font-size: 2.2rem; font-weight: 800; color: #f1f3f7; }
.step-ic { font-size: 2rem; color: var(--brand); display: inline-block; margin-bottom: 12px; }
.step-card h5 { font-weight: 700; }
.step-card p { color: #5b6476; margin: 0; font-size: .95rem; }
.note-strip { background: #e6efff; border-radius: 12px; padding: 14px 18px; color: #1d3c7a; }
.note-strip i { color: #2b5fd9; margin-right: 6px; }
.tier-card { background: #fff; border: 2px solid #e1e6ef; border-radius: 16px; overflow: hidden; }
.tier-card.prime { border-color: var(--brand); box-shadow: 0 12px 30px rgba(242,140,24,.15); }
.tier-top { padding: 16px 22px; font-weight: 800; font-size: 1.2rem; background: #f4f6fa; }
.tier-card.prime .tier-top { background: linear-gradient(135deg, #ffb347, var(--brand)); color: #fff; }
.tier-card ul { list-style: none; padding: 18px 22px 6px; margin: 0; }
.tier-card li { padding: 6px 0; }
.tier-card li i { margin-right: 8px; font-size: 1.1rem; }
.tier-foot { padding: 12px 22px 18px; font-weight: 600; color: var(--brand-dark); }
.example-card { background: linear-gradient(135deg, #fff7ec, #fff); border: 1px solid #ffd6a0; border-radius: 16px; padding: 24px; }
.chain { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chain > i { color: #b8c0cf; }
.ch-node { background: #fff; border: 2px solid #20c374; border-radius: 12px; padding: 6px 18px; font-weight: 800; text-align: center; min-width: 170px; }
.ch-node small { display: block; font-weight: 500; color: #6b7385; font-size: .75rem; }
.ch-node.new { border-color: var(--brand); background: #fff1e0; }
.example-list { list-style: none; padding: 0; margin: 0; }
.example-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed #f0d4ad; }
.example-list b { color: #198754; }
.feat { display: flex; gap: 14px; background: #fff; border-radius: 14px; padding: 20px; height: 100%; border: 1px solid #eef0f4; }
.feat > i { font-size: 1.6rem; color: var(--brand); flex-shrink: 0; }
.feat h6 { font-weight: 700; margin-bottom: 4px; }
.feat p { color: #5b6476; margin: 0; font-size: .92rem; }
.accordion-button:not(.collapsed) { background: #fff1e0; color: var(--brand-dark); box-shadow: none; }
.accordion-button:focus { box-shadow: none; }
.home-cta { background: linear-gradient(135deg, var(--navy), #1f4479); color: #fff; padding: 64px 0; }
.home-cta h2 { font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); }
.home-cta p { color: rgba(255,255,255,.8); margin-bottom: 24px; }
.home-footer { background: #0b1830; color: rgba(255,255,255,.7); text-align: center; font-size: .85rem; line-height: 1.8; padding: 22px 12px; }
.home-footer a { color: #ffcf8a; text-decoration: none; }
@media (max-width: 575.98px) { .home-hero { padding: 40px 0 50px; } .home-sec { padding: 48px 0; } .hero-stats { gap: 18px; } }

/* v6: icon buttons, notifications */
.btn-icon { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; padding: 0; border: 1px solid #e1e6ef; background: #fff; color: #1d2433; font-size: 1.1rem; }
.btn-icon:hover { border-color: var(--brand); color: var(--brand-dark); }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #e03131; color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.notif-menu { width: 360px; max-width: calc(100vw - 24px); border-radius: 14px; overflow: hidden; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { color: inherit; border-bottom: 1px solid #f1f3f7; }
.notif-item:hover { background: #f8f9fb; }
.notif-item.unread { background: #fff8ef; }
.notif-item.unread .fw-semibold::before, .notif-item.unread b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: 6px; vertical-align: middle; }
.notif-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 1rem; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.auth-theme { position: fixed; top: 14px; right: 14px; z-index: 10; }

/* ================= DARK MODE ================= */
[data-bs-theme="dark"] { --bg: #0f1726; color-scheme: dark; }
[data-bs-theme="dark"] body { background: var(--bg); color: #dbe2ee; }
[data-bs-theme="dark"] .topbar, [data-bs-theme="dark"] .app-footer { background: #162135; border-color: #24324a; }
[data-bs-theme="dark"] .card, [data-bs-theme="dark"] .card-header { background: #162135; border-color: #24324a; color: #dbe2ee; }
[data-bs-theme="dark"] .card { box-shadow: 0 1px 3px rgba(0,0,0,.4); }
[data-bs-theme="dark"] .table { --bs-table-bg: transparent; --bs-table-color: #dbe2ee; border-color: #24324a; }
[data-bs-theme="dark"] .table thead th { background: #1b2840; color: #9fb0cc; border-color: #24324a; }
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * { --bs-table-hover-bg: #1d2b45; --bs-table-color-state: #fff; }
[data-bs-theme="dark"] .table-warning { --bs-table-bg: #3a2e14; --bs-table-color: #ffe2a8; }
[data-bs-theme="dark"] .stat .l, [data-bs-theme="dark"] .text-muted { color: #93a3bd !important; }
[data-bs-theme="dark"] .text-dark { color: #e6ecf5 !important; }
[data-bs-theme="dark"] .bg-light { background: #1b2840 !important; color: #dbe2ee; }
[data-bs-theme="dark"] .btn-light { background: #1d2b45; border-color: #2a3a57; color: #dbe2ee; }
[data-bs-theme="dark"] .btn-icon { background: #1b2840; border-color: #2a3a57; color: #dbe2ee; }
[data-bs-theme="dark"] .notif-badge { border-color: #162135; }
[data-bs-theme="dark"] .notif-item { border-color: #24324a; }
[data-bs-theme="dark"] .notif-item:hover { background: #1d2b45; }
[data-bs-theme="dark"] .notif-item.unread { background: #2a2416; }
[data-bs-theme="dark"] .ic-orange { background: #3a2a14; } [data-bs-theme="dark"] .ic-green { background: #12301f; }
[data-bs-theme="dark"] .ic-blue { background: #15264a; color: #7ea6ff; } [data-bs-theme="dark"] .ic-purple { background: #2a1d45; color: #b996ff; }
[data-bs-theme="dark"] .ic-red { background: #3a1818; }
[data-bs-theme="dark"] .level-chip { background: #15264a; color: #8fb2ff; }
[data-bs-theme="dark"] .code-pill { background: #3a2a14; color: #ffcf8a; }
[data-bs-theme="dark"] .node { background: #1b2840; border-color: #2e3f5e; }
[data-bs-theme="dark"] .node .nm { color: #e6ecf5; }
[data-bs-theme="dark"] .node.prime { background: #102b1e; border-color: #20c374; }
[data-bs-theme="dark"] .node.blocked { background: #341a1a; border-color: #e35d5d; }
[data-bs-theme="dark"] .tree li::before, [data-bs-theme="dark"] .tree li::after, [data-bs-theme="dark"] .tree ul ul::before { border-color: #33476a; }
[data-bs-theme="dark"] .notice-member { background: linear-gradient(135deg, #2a2112, #33270f); border-color: #5a4318; color: #f1e2c6; }
[data-bs-theme="dark"] .kb-tip { background: #15264a; color: #cfe0ff; }
[data-bs-theme="dark"] .kb-warn { background: #33270f; color: #f6dfb4; }
[data-bs-theme="dark"] .kb-body pre { background: #0f1726; color: #dbe2ee; }
[data-bs-theme="dark"] .kb-nav a { color: #dbe2ee; }
[data-bs-theme="dark"] .kb-nav a:hover { background: #3a2a14; color: #ffcf8a; }
[data-bs-theme="dark"] .perm-item { border-color: #2a3a57; }
[data-bs-theme="dark"] .perm-item:has(input:checked) { background: #2a2416; }
[data-bs-theme="dark"] .avatar-img { border-color: #162135; box-shadow: 0 0 0 1px #2a3a57; }
[data-bs-theme="dark"] .avatar { background: #2b4a7a; }
[data-bs-theme="dark"] mark { background: #7a5a10; color: #fff; }
[data-bs-theme="dark"] .brand-logo { background: #fff; }
[data-bs-theme="dark"] .auth-bg { background: radial-gradient(circle at 20% 10%, #3a2a10 0, transparent 40%), linear-gradient(135deg, #070d18, #13274a); }
[data-bs-theme="dark"] .alert-light { background: #1b2840; border-color: #2a3a57; color: #dbe2ee; }
/* homepage dark */
[data-bs-theme="dark"] .home { background: #0f1726; }
[data-bs-theme="dark"] .home-nav { background: rgba(15,23,38,.95); border-color: #24324a; }
[data-bs-theme="dark"] .home-nav .nav-link { color: #dbe2ee; }
[data-bs-theme="dark"] .home-sec.alt { background: #0b1220; }
[data-bs-theme="dark"] .step-card, [data-bs-theme="dark"] .tier-card, [data-bs-theme="dark"] .feat { background: #162135; border-color: #24324a; }
[data-bs-theme="dark"] .step-card p, [data-bs-theme="dark"] .feat p { color: #a9b7cf; }
[data-bs-theme="dark"] .step-no { color: #22314c; }
[data-bs-theme="dark"] .tier-top { background: #1b2840; }
[data-bs-theme="dark"] .example-card { background: linear-gradient(135deg, #2a2112, #162135); border-color: #5a4318; }
[data-bs-theme="dark"] .ch-node { background: #162135; }
[data-bs-theme="dark"] .ch-node.new { background: #3a2a14; }
[data-bs-theme="dark"] .note-strip { background: #15264a; color: #cfe0ff; }
[data-bs-theme="dark"] .accordion-button:not(.collapsed) { background: #3a2a14; color: #ffcf8a; }
[data-bs-theme="dark"] .sec-head p { color: #93a3bd; }

/* v7: language switcher */
.lang-btn { width: auto; min-width: 40px; padding: 0 10px; border-radius: 20px; display: inline-flex; gap: 5px; align-items: center; font-size: .95rem; }
.lang-btn .lang-code { font-size: .72rem; font-weight: 700; letter-spacing: .3px; }
.lang-dd .dropdown-menu { min-width: 170px; border-radius: 12px; }
.lang-dd .dropdown-item.active, .lang-dd .dropdown-item:active { background: var(--brand); color: #fff; }
.lang-dd .dropdown-item.active .text-muted { color: #fff !important; }
.auth-tools { position: fixed; top: 14px; right: 14px; z-index: 20; display: flex; gap: 8px; }
[data-bs-theme="dark"] .lang-dd .dropdown-menu { background: #162135; border-color: #2a3a57; }
[data-bs-theme="dark"] .lang-dd .dropdown-item { color: #dbe2ee; }
[data-bs-theme="dark"] .lang-dd .dropdown-item:hover { background: #1d2b45; }
[lang="hi"] body { font-family: "Segoe UI", "Nirmala UI", "Mangal", "Noto Sans Devanagari", system-ui, sans-serif; }

/* ================= Cashback Reward additions ================= */
.sb-nav a { padding: 8px 14px; }
.sb-group { color: rgba(255,255,255,.38); font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; padding: 14px 14px 4px; }
.empty-state { text-align: center; color: #8a93a6; padding: 40px 16px; }
.empty-state i { font-size: 2.4rem; display: block; margin-bottom: 8px; opacity: .6; }
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: var(--brand-dark); }
.filter-bar { background: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(16,35,63,.06); }
.filter-bar .form-control, .filter-bar .form-select { padding: .4rem .7rem; font-size: .88rem; }
.filter-bar label { font-size: .75rem; color: #6b7385; margin-bottom: 2px; font-weight: 600; }
.stat a.stretched-link { color: inherit; }
.stat-sm .v { font-size: 1.15rem; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: -6px; width: 2px; background: #e1e6ef; }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #cfd6e2; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #e7eaf0; align-items: flex-start; }
.check-list li:last-child { border-bottom: 0; }
.check-list .ci { font-size: 1.1rem; line-height: 1.2; flex-shrink: 0; }
.progress-steps { display: flex; gap: 4px; flex-wrap: wrap; }
.progress-steps span { flex: 1 1 60px; height: 6px; border-radius: 4px; background: #e1e6ef; }
.progress-steps span.done { background: #20c374; }
.progress-steps span.cur { background: var(--brand); }
.tier-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; background: #f8f9fb; margin-bottom: 6px; }
.tier-row.cur { background: #fff1e0; border: 1px solid #ffd6a0; }
.tier-row b { color: var(--brand-dark); }
.money-big { font-size: 1.6rem; font-weight: 800; }
.dl-grid { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: .92rem; }
.dl-grid dt { color: #6b7385; font-weight: 500; }
.dl-grid dd { margin: 0; word-break: break-word; }
@media (max-width: 575.98px) { .dl-grid { grid-template-columns: 1fr; } .dl-grid dt { margin-top: 6px; } }
.alert-soft { background: #fff7ec; border: 1px solid #ffd6a0; color: #6b4a12; }
.table td .small { line-height: 1.3; }
.tbl-actions { white-space: nowrap; }
.scheme-card { border: 2px solid #e1e6ef; border-radius: 14px; padding: 16px; }
.scheme-card.on { border-color: #20c374; }
.terms-box { white-space: pre-line; line-height: 1.7; }
.lead-form .form-label { font-weight: 600; font-size: .9rem; }
[data-bs-theme="dark"] .filter-bar { background: #162135; }
[data-bs-theme="dark"] .timeline li::before { background: #2a3a57; }
[data-bs-theme="dark"] .timeline .dot { border-color: #162135; }
[data-bs-theme="dark"] .check-list li { border-color: #24324a; }
[data-bs-theme="dark"] .tier-row { background: #1b2840; }
[data-bs-theme="dark"] .tier-row.cur { background: #3a2a14; border-color: #5a4318; }
[data-bs-theme="dark"] .scheme-card { border-color: #2a3a57; }
[data-bs-theme="dark"] .alert-soft { background: #2a2112; border-color: #5a4318; color: #f1e2c6; }
[data-bs-theme="dark"] .progress-steps span { background: #2a3a57; }
@media print { .sidebar, .topbar, .app-footer, .filter-bar, .btn, .no-print { display: none !important; } .content { margin: 0; } }
/* phone topbar: keep everything on one line */
.page-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) {
  .topbar { gap: 6px; padding: 8px 10px; }
  .topbar .btn-icon { width: 34px; height: 34px; font-size: 1rem; }
  .topbar .lang-btn { min-width: 34px; padding: 0 8px; }
  .topbar .lang-code, .topbar .home-ic { display: none; }
  .topbar .page-title { font-size: 1rem; }
  .topbar .avatar { width: 32px !important; height: 32px !important; }
}
.kb-side { position: sticky; top: 80px; }
@media (max-width: 991.98px) { .kb-side { position: static; } }
.kb-body caption { caption-side: top; }
@media (max-width: 575.98px) { .home-brand { max-width: calc(100vw - 170px); font-size: 1rem; } }
