.period-panel{padding:20px 24px;background:#f0faf6;border:1px solid #d3e9df;border-radius:14px;margin:20px 0}.period-top,.period-options,.period-custom{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.period-top{justify-content:space-between;margin-bottom:12px}.period-options button,.period-custom button,.period-custom input{padding:9px 13px;border:1px solid #bcdccc;border-radius:8px;background:white;color:#224b3e;font:inherit}.period-options button[aria-pressed=true]{background:#087b5b;color:white;border-color:#087b5b}.period-custom{margin-top:12px}.period-custom label{display:flex;align-items:center;gap:6px}.period-note{font-size:12px;color:#61796e;margin:12px 0 0}.period-error{color:#ae3535}@media(max-width:600px){.period-panel{padding:16px}.period-options{gap:7px}.period-options button{flex:1;min-width:55px}.period-custom label{width:100%;justify-content:space-between}.period-custom input{max-width:70%}.period-custom button{width:100%}}
.period-custom{margin-top:0;gap:12px}.period-options{gap:8px}.period-custom>button{white-space:nowrap}.period-options button{white-space:nowrap}@media(min-width:1100px){.period-custom{flex-wrap:nowrap}.period-options{flex-wrap:nowrap}.period-custom input{padding:8px 10px}.period-options button{padding:9px 12px}}@media(max-width:600px){.period-options{width:100%}.period-options button{flex:1;min-width:50px}.period-custom{gap:10px}}
/* Compact supporting controls, visually secondary to the results. */
.period-panel{padding:12px 14px;margin:14px 0;background:#f8fcfa;border:1px solid #e2ece7;border-radius:8px;box-shadow:none;font-size:12px}
.period-top{margin-bottom:8px;gap:8px;color:#6d8177;font-size:11px}
.period-top strong{font-size:12px;font-weight:500;color:#476356}
.period-custom{gap:8px}.period-options{gap:5px}
.period-options button,.period-custom>button,.period-custom input{padding:5px 9px;border-radius:5px;font-size:12px;line-height:1.3;min-height:30px;border-color:#d5e2da;background:#fff}
.period-custom label{gap:5px;white-space:nowrap;font-size:12px;color:#61786c}
.period-custom input{width:133px;padding:4px 7px}
.period-options button[aria-pressed=true]{background:#e1f2e9;color:#146549;border-color:#a9d1bd;font-weight:600}
.period-note{margin:7px 0 0;font-size:11px;line-height:1.4;color:#829188}
@media(min-width:1100px){.period-options button{padding:5px 9px}.period-custom input{padding:4px 7px}}
@media(max-width:600px){.period-panel{padding:10px;margin:12px 0}.period-custom{gap:8px}.period-custom label{width:auto;flex:1 1 140px;justify-content:flex-start}.period-custom input{max-width:100%;width:125px}.period-custom>button{width:auto}.period-options{width:auto;flex:1 1 auto;flex-wrap:wrap}.period-options button{flex:0 0 auto;min-width:42px;min-height:34px}.period-top{margin-bottom:7px}}
/* Phone: compact two-column dates, no horizontal overflow. */
@media(max-width:600px){
.period-panel{padding:10px 11px;margin:10px 0;min-width:0;overflow:hidden}
.period-top{margin-bottom:8px;font-size:10px}.period-top strong{font-size:11px}.period-top>span{display:none}
.period-custom{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:7px;align-items:end;min-width:0}
.period-custom .period-options{grid-column:1/-1;grid-row:1;display:flex;flex-wrap:nowrap;width:100%;gap:4px;min-width:0}
.period-options button{flex:1 1 0;min-width:0;min-height:30px;padding:5px 3px;font-size:11px;white-space:nowrap}
.period-custom label{display:flex;flex-direction:column;align-items:stretch;gap:3px;width:100%;min-width:0;flex:none;font-size:10px;white-space:normal}
.period-custom input{box-sizing:border-box;width:100%;max-width:100%;min-width:0;height:32px;min-height:32px;padding:4px;font-size:11px;line-height:20px}
.period-custom>button{width:auto;min-width:40px;min-height:32px;height:32px;padding:4px 7px;font-size:11px;white-space:nowrap}
.period-note{font-size:10px;margin-top:6px;line-height:1.4;overflow-wrap:anywhere}
}

.period-picker{display:none}@media(max-width:600px){.period-custom .period-options{display:none}.period-picker{display:block;grid-column:1/-1;grid-row:1;width:auto;max-width:150px;min-width:110px;height:30px;padding:4px 24px 4px 8px;background:#fff;border:1px solid #d5e2da;border-radius:5px;color:#365b48;font-size:11px}.period-note{display:none}.period-custom{row-gap:8px}}
@media(max-width:600px){.period-note.period-error{display:block}.period-top{margin-bottom:6px}}
.period-date-button{display:none}
@media(max-width:600px){
.period-custom{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:9px;row-gap:8px;align-items:end}
.period-custom input[type=date]{display:none}
.period-custom label{min-width:0;gap:4px;font-size:10px}
.period-custom .period-date-button,.period-custom>button{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:34px;min-height:34px;margin:0;padding:4px 2px;border:1px solid #d5e2da;border-radius:5px;background:#fff;color:#365b48;font-size:11px;line-height:24px;text-align:center;white-space:nowrap}
.period-custom .period-picker{grid-column:1/-1;max-width:140px}
.period-date-button:disabled{color:#aab3ae;background:#f4f6f5}
}
.period-calendar-overlay{position:fixed;inset:0;z-index:10000;background:rgba(24,43,34,.18);display:flex;align-items:center;justify-content:center;padding:18px;box-sizing:border-box}
.period-calendar{width:280px;max-width:100%;background:#fff;border:1px solid #d8e7df;border-radius:12px;padding:12px;box-sizing:border-box;box-shadow:0 8px 36px #183b2926}
.period-calendar-head{display:grid;grid-template-columns:30px 1fr 30px 30px;align-items:center;gap:3px;margin-bottom:8px;text-align:center;font-size:12px;color:#315644}
.period-calendar button{font:inherit;cursor:pointer;border:0;border-radius:5px;background:transparent;color:#315644;min-width:0;padding:0;height:30px}
.period-calendar-head button{font-size:20px}
.period-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center;font-size:12px}
.period-calendar-grid span{height:25px;line-height:25px;font-size:10px;color:#82948a}
.period-calendar-grid button[aria-pressed=true]{background:#dff0e7;color:#126649;font-weight:600}
.period-calendar button:disabled{color:#c3c9c5;background:#f6f7f6;cursor:default}
.period-calendar>p{margin:9px 0 0;font-size:10px;color:#8a9990;text-align:center}
.period-picker-wrap{display:none}
@media(max-width:600px){
.period-custom>.period-picker{display:none}
.period-picker-wrap{display:block;position:relative;grid-column:1/-1;grid-row:1;width:max-content;max-width:100%}
.period-picker-button{box-sizing:border-box;height:30px;min-width:100px;padding:4px 9px;border:1px solid #d5e2da;border-radius:5px;background:#fff;font-size:11px;color:#365b48;text-align:left}
.period-picker-menu{position:absolute;z-index:50;top:calc(100% + 4px);left:0;width:108px;padding:4px;background:#fff;border:1px solid #d7e4dc;border-radius:7px;box-shadow:0 4px 16px #254d3420;box-sizing:border-box}
.period-picker-menu[hidden]{display:none}
.period-picker-menu button{display:block;box-sizing:border-box;width:100%;height:28px;min-height:28px;padding:3px 8px;border:0;border-radius:4px;background:#fff;color:#365b48;font-size:11px;text-align:left;line-height:22px}
.period-picker-menu button[aria-checked=true]{background:#e5f3eb;color:#176548;font-weight:600}
.period-picker-menu button:hover{background:#f0f7f3}
.period-panel{overflow:visible}
}

.period-panel.has-pending .period-custom>button{border-color:#79b89a;background:#ebf7f0;color:#126447}.period-picker-button:focus-visible,.period-picker-menu button:focus-visible,.period-date-button:focus-visible{outline:2px solid #82bca0;outline-offset:2px}@media(max-width:600px){.period-calendar{max-height:calc(100dvh - 36px);overflow-y:auto}.chart-empty{padding:12px}.period-picker-menu{max-height:190px;overflow-y:auto}}

.performance .chart-wrap{height:380px;padding:16px 18px 10px;background:#fff;border:1px solid #dce9e4;border-radius:14px;box-shadow:none}
#chart{overflow:hidden;touch-action:pan-y;outline:none}#chart:focus-visible{outline:2px solid #a9c8ed;outline-offset:4px;border-radius:8px}
#chart text{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;font-variant-numeric:tabular-nums}
.pnl-chart-label{font-size:12px;fill:#74867f}.pnl-chart-total{font-size:29px;font-weight:600;letter-spacing:-.4px}.pnl-chart-count{font-size:12px;fill:#74867f}.pnl-chart-explainer{font-size:11px;fill:#8c9993}.pnl-axis-label{font-size:12px;fill:#8a9791}.pnl-grid-line{stroke:#edf1ef;stroke-width:1}.pnl-zero-line{stroke:#cddbd5;stroke-width:1;stroke-dasharray:4 5}.pnl-trend-line{fill:none;stroke:#609fe9;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.pnl-trade-point{fill:#fff;stroke:#609fe9;stroke-width:1.5}.pnl-crosshair{stroke:#9cacb8;stroke-width:1;stroke-dasharray:3 4}.pnl-focus-dot{fill:#fff;stroke:#4d93e6;stroke-width:2}.pnl-tooltip-bg{fill:#fff;stroke:#d8e5de;stroke-width:1;filter:drop-shadow(0 3px 8px #203a2b12)}.pnl-tooltip-date{font-size:11px;fill:#82918a}.pnl-tooltip-value{font-size:13px;fill:#25483a;font-weight:600}
@media(max-width:600px){.performance .chart-wrap{height:310px;padding:10px 5px 4px;border-radius:12px}.pnl-axis-label{font-size:10px}.pnl-chart-total{font-size:26px}.pnl-chart-label,.pnl-chart-count{font-size:11px}.pnl-chart-explainer{font-size:10px}}
