/* 04-panels.css — Card / section header / help button / settings accordion.
   TradePad · design system v2. */
.panel{position:relative;background:var(--surf);border:1px solid var(--line);border-radius:var(--r-lg);padding:18px;min-width:0;overflow:hidden;box-shadow:var(--sh-1),var(--hl)}
@media(max-width:860px){.panel{padding:16px}}

/* Section header: the icon sits in a tinted tile, the title reads as a heading. */
.panel-label{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:var(--fs-sm);font-weight:700;color:var(--ink);margin-bottom:16px;min-height:30px}
.panel-label>.ic:first-child{width:16px;height:16px;padding:7px;box-sizing:content-box;color:var(--acc);background:var(--acc-dim);border-radius:10px}
.panel-label .ic{color:var(--acc)}
.panel-label .lbl{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.panel-label .end{margin-inline-start:auto;color:var(--mute);font-size:var(--fs-xs);font-weight:500}
.panel-label button.end{cursor:pointer;color:var(--dim);font-weight:600;padding:6px 12px;border-radius:var(--r-pill);background:var(--surf2);border:1px solid var(--line);transition:color var(--t1),border-color var(--t1),background var(--t1)}
.panel-label button.end:hover{color:var(--ink);border-color:var(--line2);background:var(--surf3)}

.help-btn{width:22px;height:22px;border-radius:50%;border:1px solid var(--line2);color:var(--mute);font-size:11px;font-weight:700;display:grid;place-items:center;line-height:1;padding:0;flex:0 0 auto;transition:background var(--t1),border-color var(--t1),color var(--t1)}
.help-btn:hover{background:var(--acc-dim);border-color:var(--acc);color:var(--acc)}

/* ── Accordion (settings sections) ── */
/* Scoped to [data-open]: "acc" is also the accent colour modifier on values
   (.kpi-v.acc, .stat-item .v.acc), which must never pick up the card chrome. */
.acc[data-open]{background:var(--surf);border:1px solid var(--line);border-radius:var(--r-lg);margin-bottom:12px;overflow:hidden;box-shadow:var(--sh-1),var(--hl)}
.acc-head{display:flex;align-items:center;gap:12px;padding:14px 16px;width:100%;text-align:start;cursor:pointer;transition:background var(--t1)}
.acc-head:hover{background:var(--hover)}
.acc-head>.ic:first-child{width:18px;height:18px;padding:8px;box-sizing:content-box;color:var(--acc);background:var(--acc-dim);border-radius:11px}
.acc-head .lbl{flex:1 1 auto;min-width:0;font-size:var(--fs-md);color:var(--ink);font-weight:600}
.acc-head .caret{width:18px;height:18px;color:var(--mute);transition:transform var(--t2) var(--ease),color var(--t2)}
.acc[data-open="true"] .acc-head .caret{transform:rotate(180deg);color:var(--acc)}
.acc[data-open="true"] .acc-head{border-bottom:1px solid var(--line)}
.acc[data-open="false"] .acc-body{display:none}
.acc-body{padding:18px 16px}
.acc[data-open="true"] .acc-body{animation:acc-in var(--t3) var(--ease-out)}
@keyframes acc-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
