:root{--sb-w:268px;--grad:linear-gradient(135deg,#4f46e5 0%,#06b6d4 100%);--bg:#f3f5fb;--ink:#1e293b}
body{font-family:'Poppins',sans-serif;background:var(--bg);color:var(--ink);font-size:.92rem}
.sidebar{--bs-offcanvas-width:var(--sb-w)}
.sidebar-inner{height:100%;width:100%;background:linear-gradient(180deg,#0f172a 0%,#1e1b4b 100%);color:#cbd5e1;display:flex;flex-direction:column;overflow-y:auto}
@media(min-width:992px){.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sb-w);z-index:1030}.main{margin-left:var(--sb-w)}}
.brand{display:flex;align-items:center;gap:.7rem;padding:1.1rem 1.2rem;border-bottom:1px solid rgba(255,255,255,.08)}
.brand-logo{width:42px;height:42px;border-radius:12px;background:var(--grad);display:grid;place-items:center;color:#fff;font-weight:700;font-size:1.25rem;flex-shrink:0}
.brand-name{color:#fff;font-weight:600;letter-spacing:.4px}
.nav-label{font-size:.68rem;letter-spacing:1.6px;color:#64748b;padding:1rem 1.4rem .4rem}
.side-nav a{display:flex;align-items:center;gap:.75rem;color:#cbd5e1;text-decoration:none;padding:.62rem 1rem;margin:.12rem .75rem;border-radius:11px;transition:.2s}
.side-nav a:hover{background:rgba(255,255,255,.07);color:#fff}
.side-nav>a.active,.side-nav>a.open{background:var(--grad);color:#fff;box-shadow:0 6px 18px rgba(79,70,229,.35)}
.side-nav .bi{font-size:1.05rem}
.side-nav .caret{margin-left:auto;font-size:.72rem;transition:transform .2s}
.side-nav a[aria-expanded=true] .caret{transform:rotate(180deg)}
.side-nav .sub{list-style:none;padding:.2rem 0 .3rem 1rem;margin:0}
.side-nav .sub a{padding:.42rem .9rem;font-size:.84rem}
.side-nav .sub a::before{content:'';width:8px;height:8px;border-radius:50%;border:2px solid #22d3ee;flex-shrink:0}
.side-nav .sub a.active{background:rgba(34,211,238,.14);color:#fff}
.social{margin-top:auto;padding:1.3rem;display:flex;gap:.9rem;justify-content:center}
.social a{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:1.3rem;transition:.2s}
.social a:hover{transform:translateY(-3px)}
.topbar{position:sticky;top:0;z-index:1020;background:var(--grad);color:#fff;display:flex;align-items:center;gap:.8rem;padding:.75rem 1.3rem;box-shadow:0 4px 20px rgba(15,23,42,.12)}
.topbar .page-title{font-size:1.1rem;margin:0;font-weight:600}
.user-chip{display:flex;align-items:center;gap:.5rem;background:rgba(255,255,255,.18);padding:.28rem .8rem .28rem .28rem;border-radius:50px;color:#fff;text-decoration:none}
.user-chip:hover{color:#fff;background:rgba(255,255,255,.28)}
.avatar{width:34px;height:34px;border-radius:50%;background:#fff;color:#4f46e5;display:grid;place-items:center;font-weight:700}
.content{padding:1.4rem}
@media(max-width:576px){.content{padding:.85rem}}
.card{border:0;border-radius:16px;box-shadow:0 8px 30px rgba(15,23,42,.06)}
.card-header{background:#fff;border-bottom:1px solid #eef2f7;border-radius:16px 16px 0 0!important;padding:.9rem 1.2rem}
.card-header>.bi{color:#4f46e5;font-size:1.1rem}
.stat{border-radius:16px;padding:1.1rem 1.2rem;color:#fff;position:relative;overflow:hidden;height:100%;box-shadow:0 10px 25px rgba(15,23,42,.1);transition:.25s}
.stat:hover{transform:translateY(-3px)}
.stat .bi{position:absolute;right:-4px;bottom:-14px;font-size:4.3rem;opacity:.22}
.stat small{opacity:.92;font-weight:500}.stat h4{font-weight:700;margin:.35rem 0 0;font-size:clamp(1.05rem,2.4vw,1.45rem)}
.g1{background:linear-gradient(135deg,#4f46e5,#06b6d4)}.g2{background:linear-gradient(135deg,#7c3aed,#ec4899)}
.g3{background:linear-gradient(135deg,#059669,#34d399)}.g4{background:linear-gradient(135deg,#f59e0b,#ef4444)}
.g5{background:linear-gradient(135deg,#0ea5e9,#6366f1)}.g6{background:linear-gradient(135deg,#db2777,#f97316)}
.g7{background:linear-gradient(135deg,#0f766e,#22d3ee)}.g8{background:linear-gradient(135deg,#475569,#1e293b)}
.welcome{font-weight:700;font-size:clamp(1.05rem,2.5vw,1.5rem)}
.welcome span{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero{border-radius:18px;overflow:hidden;box-shadow:0 12px 30px rgba(15,23,42,.12)}
.hero .carousel-item{height:290px}@media(max-width:576px){.hero .carousel-item{height:170px}}
.hero img{object-fit:cover;height:100%;width:100%}
.hero .slide{height:100%;display:flex;flex-direction:column;justify-content:center;padding:1.5rem 12%;color:#fff}
.hero .slide h2{font-size:clamp(1.2rem,3.5vw,2.4rem);font-weight:700}
.info-row{display:flex;justify-content:space-between;gap:1rem;padding:.6rem 0;border-bottom:1px dashed #e2e8f0}
.info-row:last-child{border:0}.info-row span:first-child{color:#64748b}.info-row span:last-child{font-weight:500;text-align:right}
.table thead th{background:#f8fafc;color:#64748b;font-weight:600;font-size:.74rem;text-transform:uppercase;letter-spacing:.5px;white-space:nowrap;border-bottom:0}
.table td{white-space:nowrap;font-size:.87rem}
.btn-grad{background:var(--grad);color:#fff;border:0;border-radius:10px}.btn-grad:hover,.btn-grad:focus{color:#fff;opacity:.92}
.form-control,.form-select{border-radius:10px;padding:.58rem .85rem}
.form-control:focus,.form-select:focus{border-color:#818cf8;box-shadow:0 0 0 .2rem rgba(99,102,241,.15)}
.income-card{text-align:center;padding:1.8rem 1rem}
.income-card .ic{width:62px;height:62px;border-radius:18px;display:grid;place-items:center;margin:0 auto .9rem;color:#fff;font-size:1.6rem}
.income-card h5{color:#4c1d95;font-weight:600}.income-card h3{font-weight:700;margin:0}
.product-card .pimg{height:190px;object-fit:cover;width:100%;border-radius:16px 16px 0 0}
.product-card .pph{height:190px;border-radius:16px 16px 0 0;display:grid;place-items:center;color:#fff;font-size:3.5rem}
.tree-wrap{overflow-x:auto;padding:.5rem 0 1rem}
.tree{min-width:660px}
.tree ul{padding-top:22px;position:relative;display:flex;justify-content:center;margin:0;padding-left:0}
.tree>ul{padding-top:0}
.tree li{list-style:none;text-align:center;position:relative;padding:22px 5px 0;flex:1}
.tree>ul>li{padding-top:0}
.tree li::before,.tree li::after{content:'';position:absolute;top:0;right:50%;border-top:2px solid #c7d2fe;width:50%;height:22px}
.tree li::after{right:auto;left:50%;border-left:2px solid #c7d2fe}
.tree li:only-child::before,.tree li:only-child::after{display:none}
.tree li:first-child::before,.tree li:last-child::after{border:0 none}
.tree li:last-child::before{border-right:2px solid #c7d2fe;border-radius:0 8px 0 0}
.tree li:first-child::after{border-radius:8px 0 0 0}
.tree ul ul::before{content:'';position:absolute;top:0;left:50%;border-left:2px solid #c7d2fe;height:22px}
.node{display:inline-block;width:124px;padding:.6rem .4rem;border-radius:14px;background:#fff;box-shadow:0 5px 16px rgba(15,23,42,.09);text-decoration:none;color:var(--ink);font-size:.74rem;transition:.2s}
a.node:hover{transform:translateY(-3px);box-shadow:0 10px 22px rgba(79,70,229,.2)}
.node .dot{width:44px;height:44px;border-radius:50%;margin:0 auto .35rem;display:grid;place-items:center;color:#fff;font-size:1.25rem}
.node.active .dot{background:linear-gradient(135deg,#059669,#34d399)}.node.inactive .dot{background:linear-gradient(135deg,#ef4444,#f97316)}
.node.empty{opacity:.7}.node.empty .dot{background:#e2e8f0;color:#94a3b8}
.node .nm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.node .lr{color:#64748b;font-size:.68rem;margin-top:.15rem}
.footer{padding:1rem 1.4rem;color:#64748b;font-size:.82rem}
.auth-bg{min-height:100vh;background:radial-gradient(circle at 10% 15%,#4f46e5 0,transparent 42%),radial-gradient(circle at 90% 85%,#06b6d4 0,transparent 42%),#0f172a;display:flex;align-items:center;justify-content:center;padding:1.5rem}
.auth-card{width:100%;max-width:470px;border-radius:24px;background:rgba(255,255,255,.97);padding:2rem}
.side-pick .btn-check+label{border-radius:12px;padding:.7rem;border:2px solid #e2e8f0;width:100%}
.side-pick .btn-check:checked+label{border-color:#4f46e5;background:#eef2ff;color:#4f46e5}
@media print{.sidebar,.topbar,.footer,.no-print,.alert{display:none!important}.main{margin:0!important}.card{box-shadow:none}body{background:#fff}}
