/* ============== Pro-tier v2: accordion, forms, data display, sections ============== */

/* ---- accordion ---- */
.d-acc{width:100%;max-width:380px;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.d-acc__item{border-bottom:1px solid var(--border)}
.d-acc__item:last-child{border-bottom:none}
.d-acc__head{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;cursor:pointer;font-size:13.5px;font-weight:600}
.d-acc__plus{transition:transform .25s;color:var(--muted)}
.d-acc__item.is-open .d-acc__plus{transform:rotate(45deg)}
.d-acc__body{max-height:0;overflow:hidden;transition:max-height .3s ease,opacity .3s}
.d-acc__body p{margin:0;padding:0 16px 14px;font-size:12.5px;color:var(--muted);line-height:1.5}
.d-acc__item.is-open .d-acc__body{max-height:120px}

.d-tree{font-size:13px;color:var(--muted);width:100%;max-width:300px}
.d-tree__row{display:flex;align-items:center;gap:6px;padding:6px 4px;cursor:pointer}
.d-tree__row b{color:var(--ink);font-weight:500}
.d-tree__caret{transition:transform .2s;font-size:10px}
.d-tree__caret.is-open{transform:rotate(90deg)}
.d-tree__children{padding-left:20px;max-height:0;overflow:hidden;transition:max-height .25s}
.d-tree__children.is-open{max-height:120px}

/* ---- forms ---- */
.d-floatfield{position:relative;width:100%;max-width:260px}
.d-floatfield input{width:100%;background:var(--surface-3);border:1px solid var(--border);border-radius:9px;padding:17px 12px 7px;color:var(--ink);font-size:13.5px;outline:none}
.d-floatfield input:focus{border-color:var(--accent)}
.d-floatfield label{position:absolute;left:12px;top:13px;font-size:13.5px;color:var(--muted-2);pointer-events:none;transition:top .15s,font-size .15s,color .15s}
.d-floatfield input:focus+label,.d-floatfield input.has-val+label{top:5px;font-size:10px;color:var(--accent)}

.d-otp{display:flex;gap:8px}
.d-otp input{width:38px;height:46px;text-align:center;font-size:18px;font-weight:700;background:var(--surface-3);border:1px solid var(--border);border-radius:9px;color:var(--ink);outline:none}
.d-otp input:focus{border-color:var(--accent)}

.d-switchrow{display:flex;align-items:center;gap:12px}
.d-switch{width:42px;height:24px;border-radius:999px;background:var(--surface-3);border:1px solid var(--border);position:relative;cursor:pointer;transition:background .2s}
.d-switch__knob{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:var(--muted);transition:transform .2s,background .2s}
.d-switch.is-on{background:var(--accent-soft);border-color:var(--accent)}
.d-switch.is-on .d-switch__knob{transform:translateX(18px);background:var(--accent)}

.d-segment{display:inline-flex;background:var(--surface-3);border:1px solid var(--border);border-radius:9px;padding:3px;position:relative}
.d-segment__opt{padding:7px 16px;font-size:12.5px;color:var(--muted);cursor:pointer;position:relative;z-index:2}
.d-segment__opt.is-active{color:#0a0a0d}
.d-segment__pill{position:absolute;top:3px;bottom:3px;background:var(--accent);border-radius:7px;transition:left .22s cubic-bezier(.65,0,.35,1),width .22s}

.d-rangewrap2{width:100%;max-width:280px}
.d-rangeval2{font-size:13px;color:var(--muted);margin-bottom:8px}
.d-rangeval2 b{color:var(--ink);font-size:16px}

.d-starrow{display:flex;gap:4px;font-size:22px;cursor:pointer}
.d-star{color:var(--border)}
.d-star.is-on{color:#ffb648}

.d-tagfield{display:flex;flex-wrap:wrap;gap:6px;background:var(--surface-3);border:1px solid var(--border);border-radius:9px;padding:8px;width:100%;max-width:280px;min-height:42px}
.d-tagchip{background:var(--surface-2);border:1px solid var(--border);border-radius:999px;padding:3px 10px;font-size:12px;display:flex;align-items:center;gap:5px}
.d-tagchip span{cursor:pointer;color:var(--muted-2)}
.d-tagfield input{flex:1;min-width:60px;background:none;border:none;color:var(--ink);font-size:12.5px;outline:none}

.d-searchwrap{position:relative;width:100%;max-width:280px}
.d-searchwrap input{width:100%;background:var(--surface-3);border:1px solid var(--border);border-radius:9px;padding:10px 12px;color:var(--ink);font-size:13px;outline:none}
.d-searchsug{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--surface-2);border:1px solid var(--border);border-radius:9px;overflow:hidden;opacity:0;transform:translateY(-6px);pointer-events:none;transition:opacity .15s,transform .15s}
.d-searchsug.is-open{opacity:1;transform:translateY(0);pointer-events:auto}
.d-searchsug div{padding:9px 12px;font-size:12.5px;color:var(--muted);cursor:pointer}
.d-searchsug div:hover{background:var(--surface-3);color:var(--ink)}

.d-dropzone{width:100%;max-width:280px;height:110px;border:2px dashed var(--border);border-radius:12px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;font-size:12.5px;color:var(--muted);transition:border-color .2s,background .2s}
.d-dropzone.is-drag{border-color:var(--accent);background:var(--accent-soft)}

.d-pwstrength{width:100%;max-width:260px}
.d-pwstrength input{width:100%;background:var(--surface-3);border:1px solid var(--border);border-radius:9px;padding:10px 12px;color:var(--ink);font-size:13px;outline:none;margin-bottom:8px}
.d-pwbar{height:5px;border-radius:4px;background:var(--surface-3);overflow:hidden}
.d-pwbar__fill{height:100%;width:0%;border-radius:4px;transition:width .25s,background .25s}
.d-pwlabel{font-size:11px;color:var(--muted-2);margin-top:5px}

/* ---- data display ---- */
.d-avatargroup{display:flex}
.d-avatar{width:34px;height:34px;border-radius:50%;background:var(--surface-3);border:2px solid var(--surface);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;margin-left:-10px;color:var(--ink)}
.d-avatar:first-child{margin-left:0}
.d-avatar.more{background:var(--surface-2);color:var(--muted)}

.d-badgerow2{display:flex;gap:8px;flex-wrap:wrap}
.d-badge{font-size:11px;font-weight:600;padding:4px 10px;border-radius:999px}
.d-badge.ok{background:#5ee6a822;color:#5ee6a8}
.d-badge.warn{background:#ffb64822;color:#ffb648}
.d-badge.bad{background:#ff5a7a22;color:#ff5a7a}
.d-badge.info{background:var(--accent-soft);color:var(--accent)}

.d-progwrap{width:100%;max-width:260px}
.d-progtrack{height:8px;border-radius:5px;background:var(--surface-3);overflow:hidden}
.d-progfill{height:100%;width:0%;background:var(--accent);border-radius:5px;transition:width 1s cubic-bezier(.16,1,.3,1)}
.d-proglabel{font-size:11.5px;color:var(--muted);margin-top:6px;display:flex;justify-content:space-between}

.d-stepper{display:flex;align-items:center;width:100%;max-width:320px}
.d-step{width:26px;height:26px;border-radius:50%;background:var(--surface-3);border:2px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:11.5px;font-weight:700;color:var(--muted);flex:0 0 auto}
.d-step.is-done{background:var(--accent);border-color:var(--accent);color:#0a0a0d}
.d-stepline{flex:1;height:2px;background:var(--border)}
.d-stepline.is-done{background:var(--accent)}

.d-table{width:100%;max-width:380px;border-collapse:collapse;font-size:12.5px}
.d-table th{text-align:left;padding:8px 10px;color:var(--muted-2);font-weight:600;font-size:11px;cursor:pointer;border-bottom:1px solid var(--border)}
.d-table td{padding:9px 10px;border-bottom:1px solid var(--border);color:var(--muted)}
.d-table tr:hover td{background:var(--surface-2);color:var(--ink)}
.d-table__sort{margin-left:4px;color:var(--muted-2)}

.d-pagination{display:flex;gap:6px}
.d-pagebtn{width:30px;height:30px;border-radius:8px;background:var(--surface-3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:12.5px;cursor:pointer;color:var(--muted)}
.d-pagebtn.is-active{background:var(--accent);color:#0a0a0d;border-color:var(--accent)}

.d-breadcrumb{display:flex;gap:6px;align-items:center;font-size:12.5px;color:var(--muted)}
.d-breadcrumb a{color:var(--muted);cursor:pointer}
.d-breadcrumb a:last-child{color:var(--ink);font-weight:600}
.d-breadcrumb span{color:var(--muted-2)}

.d-timeline{display:flex;flex-direction:column;gap:0;width:100%;max-width:320px}
.d-tlrow{display:flex;gap:12px;position:relative;padding-bottom:22px}
.d-tlrow:last-child{padding-bottom:0}
.d-tldot{width:10px;height:10px;border-radius:50%;background:var(--accent);flex:0 0 auto;margin-top:3px;position:relative;z-index:2}
.d-tlrow::before{content:"";position:absolute;left:4.5px;top:12px;bottom:0;width:1px;background:var(--border)}
.d-tlrow:last-child::before{display:none}
.d-tlbody b{display:block;font-size:13px;margin-bottom:2px}
.d-tlbody span{font-size:11.5px;color:var(--muted-2)}

.d-statcard{background:var(--surface-3);border:1px solid var(--border);border-radius:14px;padding:16px;width:160px}
.d-statcard__fig{font-size:26px;font-weight:800}
.d-statcard__trend{font-size:11.5px;color:var(--good);margin-top:4px;display:flex;align-items:center;gap:4px}
.d-statcard__trend.down{color:#ff5a7a}

.d-kanban{display:flex;gap:10px}
.d-kcol{width:120px;background:var(--surface-2);border-radius:10px;padding:8px;display:flex;flex-direction:column;gap:8px}
.d-kcard{background:var(--surface-3);border:1px solid var(--border);border-radius:8px;padding:8px;font-size:11.5px;cursor:grab}
.d-kcard.is-drag{opacity:.4}

/* ---- dropdown menu ---- */
.d-ddwrap{position:relative;display:inline-block}
.d-ddpanel{position:absolute;top:calc(100% + 6px);left:0;min-width:160px;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:5px;opacity:0;transform:translateY(-6px) scale(.98);pointer-events:none;transition:opacity .15s,transform .15s;z-index:10}
.d-ddpanel.is-open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
.d-ddrow{padding:8px 10px;font-size:12.5px;color:var(--muted);border-radius:6px;cursor:pointer}
.d-ddrow:hover{background:var(--surface-3);color:var(--ink)}

/* ---- notification bell ---- */
.d-bellwrap{position:relative;width:40px;height:40px;border-radius:50%;background:var(--surface-3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:18px;cursor:pointer}
.d-bellbadge{position:absolute;top:4px;right:5px;width:8px;height:8px;border-radius:50%;background:#ff5a7a}

/* ---- heart burst ---- */
.d-heartburst{position:relative;width:44px;height:44px;border-radius:50%;border:1px solid var(--border);background:var(--surface-3);display:flex;align-items:center;justify-content:center;font-size:18px;cursor:pointer;color:var(--muted)}
.d-heartburst.is-on{color:#ff5a7a}
.d-burstp{position:absolute;width:5px;height:5px;border-radius:50%;background:#ff5a7a;top:50%;left:50%;pointer-events:none}

/* ---- copy button ---- */
.d-copybtn2{background:var(--surface-3);border:1px solid var(--border);border-radius:8px;padding:8px 14px;font-size:12.5px;color:var(--muted);cursor:pointer;display:flex;align-items:center;gap:6px}

/* ---- marketing sections ---- */
.d-splithero{display:flex;gap:16px;width:100%;max-width:480px;align-items:center}
.d-splithero__text{flex:1}
.d-splithero__text h3{font-size:20px;margin:0 0 8px;font-weight:800}
.d-splithero__text p{font-size:12.5px;color:var(--muted);margin:0 0 12px;line-height:1.5}
.d-splithero__img{flex:0 0 140px;height:110px;border-radius:12px;background:linear-gradient(160deg,var(--surface-3),var(--surface-2));border:1px solid var(--border)}

.d-videohero{position:relative;width:100%;max-width:480px;height:160px;border-radius:14px;overflow:hidden;border:1px solid var(--border);background:linear-gradient(160deg,#1c1c30,#0d0d12);display:flex;align-items:center;justify-content:center}
.d-videohero__play{width:48px;height:48px;border-radius:50%;background:#ffffff22;backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff;border:1px solid #ffffff44}
.d-videohero__text{position:absolute;bottom:14px;left:16px;color:#fff;font-weight:700;font-size:14px}

.d-statshero{display:flex;gap:30px;width:100%;max-width:480px;justify-content:space-around}
.d-statshero__fig{font-size:30px;font-weight:800}
.d-statshero__lbl{font-size:11.5px;color:var(--muted);margin-top:2px}

.d-pricing{display:flex;gap:12px;width:100%;max-width:480px}
.d-pricecard{flex:1;background:var(--surface-3);border:1px solid var(--border);border-radius:14px;padding:16px}
.d-pricecard.is-mid{background:var(--accent-soft);border-color:var(--accent);transform:scale(1.04)}
.d-pricecard b{font-size:13px;display:block;margin-bottom:6px}
.d-pricecard .fig{font-size:22px;font-weight:800}

.d-featgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%;max-width:480px}
.d-featcell{background:var(--surface-3);border:1px solid var(--border);border-radius:12px;padding:14px;font-size:12px;color:var(--muted)}
.d-featcell b{display:block;color:var(--ink);font-size:13px;margin-bottom:4px}

.d-newsbar{display:flex;gap:10px;width:100%;max-width:420px;background:var(--surface-3);border:1px solid var(--border);border-radius:12px;padding:14px}
.d-newsbar input{flex:1;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:9px 12px;color:var(--ink);font-size:12.5px;outline:none}

.d-footer{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;width:100%;max-width:480px;font-size:11.5px;color:var(--muted)}
.d-footer b{display:block;color:var(--ink);font-size:12.5px;margin-bottom:8px}
.d-footer div div{margin-bottom:6px}

.d-comptable{width:100%;max-width:400px;border-collapse:collapse;font-size:12px}
.d-comptable th,.d-comptable td{padding:8px 10px;text-align:center;border-bottom:1px solid var(--border)}
.d-comptable th:first-child,.d-comptable td:first-child{text-align:left;color:var(--muted)}

.d-ctabanner{width:100%;max-width:480px;border-radius:16px;padding:26px;background:linear-gradient(120deg,#8b7cff,#5a4bd6);display:flex;align-items:center;justify-content:space-between;gap:16px;color:#fff}
.d-ctabanner b{font-size:16px}
.d-ctabanner button{background:#fff;color:#1b1030;border:none;border-radius:9px;padding:9px 18px;font-weight:700;font-size:12.5px;cursor:pointer}

@media (max-width:860px){
  .d-featgrid{grid-template-columns:repeat(2,1fr)}
  .d-footer{grid-template-columns:repeat(2,1fr)}
  .d-pricing{flex-direction:column}
}

/* ============== v3: 21st.dev / Motion Primitives / shadcn-registry sourced ============== */

/* ---- text shimmer ---- */
.d-textshimmer{font-size:24px;font-weight:800;background:linear-gradient(100deg,var(--muted-2) 30%,#fff 50%,var(--muted-2) 70%);background-size:220% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:tshimmer 3s linear infinite}
@keyframes tshimmer{to{background-position:-220% 0}}

/* ---- border beam (rotating light riding the border) ---- */
.d-borderbeam{position:relative;width:260px;border-radius:14px;border:1px solid var(--border);background:var(--surface-3);padding:20px;overflow:hidden}
.d-borderbeam::before{content:"";position:absolute;inset:0;border-radius:14px;padding:1.5px;background:conic-gradient(from var(--bba,0deg),transparent 0 70%,#fff 78%,var(--accent) 86%,transparent 100%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}

/* ---- animated beam connecting two nodes ---- */
.d-beamwrap{position:relative;width:100%;max-width:300px;height:110px;display:flex;align-items:center;justify-content:space-between}
.d-beamnode{width:46px;height:46px;border-radius:50%;background:var(--surface-3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:18px;z-index:2}
.d-beamwrap svg{position:absolute;top:50%;left:0;width:100%;height:2px;transform:translateY(-50%)}
.d-beamline{stroke:var(--border);stroke-width:2}
.d-beamtravel{stroke:var(--accent);stroke-width:2;stroke-dasharray:40 220;animation:beamGo 2s linear infinite}
@keyframes beamGo{to{stroke-dashoffset:-260}}

/* ---- number ticker ---- */
.d-ticker{font-size:34px;font-weight:800;font-variant-numeric:tabular-nums}

/* ---- vertical marquee ---- */
.d-vmarq{height:170px;width:100%;max-width:200px;overflow:hidden;mask-image:linear-gradient(180deg,transparent,#000 15%,#000 85%,transparent)}
.d-vmarq__track{display:flex;flex-direction:column;gap:10px;animation:vmarqScroll 12s linear infinite}
.d-vmarq__item{background:var(--surface-3);border:1px solid var(--border);border-radius:10px;padding:10px 12px;font-size:12px}
@keyframes vmarqScroll{to{transform:translateY(-50%)}}

/* ---- glow card (21st.dev "Glow") ---- */
.d-glow21{position:relative;width:250px;border-radius:16px;background:var(--surface-3);border:1px solid var(--border);padding:20px;isolation:isolate}
.d-glow21::before{content:"";position:absolute;inset:-1px;border-radius:16px;background:radial-gradient(160px circle at var(--gx,30%) var(--gy,20%),#8b7cff55,transparent 70%);z-index:-1;filter:blur(6px)}
