/* My Portfolio uses the shared God’s EYE workspace and market-table tokens. */
#main:has(.mp-dashboard) { max-width: 1540px; padding: 18px clamp(12px, 2.1vw, 28px) 30px; }
body.mp-home #reset { display: none; }

.mp-dashboard {
  --mp-border: var(--grid-line, var(--line));
  --mp-surface: var(--panel);
  --mp-header: var(--grid-head);
  --mp-muted: var(--text-2, var(--muted));
  --mp-series-0: var(--accent);
  --mp-series-1: var(--amber);
  --mp-series-2: var(--positive);
  display: grid;
  gap: 15px;
  min-width: 0;
  font: 400 13px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
}

.mp-up { color: var(--positive); }
.mp-down { color: var(--harm); }
.mp-warn { color: var(--amber); }
.mp-muted { color: var(--mp-muted); }
.mp-header, .mp-section-head, .mp-chart-dates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.mp-header { justify-content: space-between; gap: 12px; }
.mp-header h1 { font-size: clamp(25px, 3vw, 34px); }
.mp-dashboard .mp-create { min-height: 39px; }
.mp-create span { font-size: 17px; line-height: 1; }
.mp-section-head h2 { font-size: 16px; }
.mp-section-head { margin-bottom: 8px; }
.mp-filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-filter-group {
  min-width: 0; margin: 0; padding: 5px 7px 7px; border: 1px solid var(--mp-border);
  border-radius: 8px; background: var(--mp-surface);
}
.mp-filter-label, .mp-filter-group legend { color: var(--mp-muted); font-size: 11px; font-weight: 650; }
.mp-filter-label { display: block; margin-bottom: 3px; }
.mp-filter-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.mp-dashboard .mp-choice, .mp-dialog label.mp-choice {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 33px; min-width: 0; padding: 4px 7px; background: var(--gs-action-bg);
  border: 1px solid var(--gs-action-border); border-radius: var(--gs-radius); color: var(--mp-muted);
  font: 600 11.5px/1.3 var(--font); cursor: pointer;
  transition: color .14s, background-color .14s, border-color .14s, transform .14s;
}
.mp-choice-icon { display: inline-flex; width: 15px; height: 15px; flex: none; }
.mp-dashboard .mp-choice:hover, .mp-dialog label.mp-choice:hover {
  color: var(--text); border-color: color-mix(in srgb, var(--accent) 55%, var(--mp-border));
  background: var(--surface); transform: translateY(-1px);
}
.mp-dashboard .mp-choice:is([aria-pressed="true"], [aria-current="page"]), .mp-dialog label.mp-choice:has(input:checked) {
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 70%, var(--mp-border));
  background: var(--gs-selected-bg);
}
.mp-dialog .mp-choice input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; margin: 0; }
.mp-dialog .mp-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.mp-dialog .mp-choice:has(input:disabled) { opacity: .65; cursor: default; transform: none; }
.mp-account-options { margin-top: 5px; }
.mp-dialog input[type="text"] {
  min-height: 34px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--mp-border);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  padding: 4px 7px;
  font: inherit;
  color-scheme: dark;
}
.mp-snapshot { color: var(--mp-muted); font-size: 11px; }
.mp-switch {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 2px;
  background: var(--mp-header); border-radius: 7px; border: 1px solid var(--mp-border);
}
.mp-dashboard :is(.mp-switch button, .mp-quiet) { min-height: 32px; padding: 4px 9px; font-size: 12px; border-radius: 5px; }
.mp-dashboard .mp-switch button { background: transparent; border-color: transparent; color: var(--mp-muted); }
.mp-dashboard :is(.mp-switch button, .mp-quiet)[aria-pressed="true"] {
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 38%, var(--mp-border));
  background: color-mix(in srgb, var(--accent) 12%, var(--mp-header));
}
.mp-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0; border: 1px solid var(--mp-border); border-radius: 10px;
  background: var(--mp-surface);
}
.mp-kpi { min-width: 0; padding: 10px 14px; }
.mp-kpi + .mp-kpi { border-inline-start: 1px solid var(--mp-border); }
.mp-kpi dt, .mp-kpi small { color: var(--mp-muted); }
.mp-kpi dd { margin: 0; font-size: clamp(22px, 2.7vw, 35px); font-weight: 730; line-height: 1.3; letter-spacing: -.035em; overflow-wrap: anywhere; }
.mp-kpi dd span { color: var(--mp-muted); font-size: .62em; font-weight: 540; }
.mp-kpi small { display: block; font-size: 11px; font-weight: 400; letter-spacing: normal; }
.mp-feedback { color: var(--accent); padding: 6px 9px; border-inline-start: 2px solid var(--accent); background: var(--mp-surface); overflow-wrap: anywhere; }
.mp-feedback:empty, #mp-form-error:empty { display: none; }

.mp-table-card, .mp-chart-card { border: 1px solid var(--mp-border); border-radius: 8px; background: var(--mp-surface); min-width: 0; }
.mp-table-card { overflow: hidden; }
.mp-dashboard table { width: 100%; border-collapse: collapse; }
.mp-dashboard table :is(th, td) { padding: 5px 10px; border-bottom: 1px solid var(--mp-border); text-align: left; }
.mp-dashboard thead th { background: var(--mp-header); color: var(--mp-muted); font-size: 12px; min-height: 32px; font-weight: 650; }
.mp-dashboard tbody tr:hover { background: var(--row-hover, var(--surface)); }
.mp-dashboard .mp-number { text-align: right; white-space: nowrap; }
.mp-dashboard .mp-center { text-align: center; }
.mp-dashboard .mp-row-link {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent;
  width: min(100%, 29em); min-height: 34px; padding: 2px 3px; margin-inline: -3px;
  border-color: transparent; background: transparent; justify-content: space-between;
  text-align: left; font-size: 13px; line-height: 1.35;
}
.mp-dashboard .mp-row-link:hover { border-color: transparent; color: var(--accent); }
.mp-row-link > span:first-child { min-width: 0; }
.mp-row-link b, .mp-row-link small { display: block; overflow-wrap: anywhere; }
.mp-row-link small, .mp-table-foot { font-size: 11px; color: var(--mp-muted); font-weight: 400; }
.mp-row-link > span:last-child { color: var(--accent); font-size: 17px; }
.mp-table-foot { padding: 5px 10px; display: flex; flex-wrap: wrap; gap: 2px 11px; justify-content: space-between; }
.mp-status-ok { color: var(--positive); font-size: 12px; }
.mp-dashboard input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 3px; cursor: pointer; vertical-align: middle; }
.mp-dashboard .mp-empty { text-align: center; padding: 18px 9px; color: var(--mp-muted); }
.mp-chart-card { padding: 9px 12px; }
.mp-legend { display: flex; list-style: none; flex-wrap: wrap; gap: 3px 16px; padding: 0; margin: 0 0 7px; }
.mp-legend li { display: inline-flex; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.mp-legend li > span { width: 10px; height: 3px; flex: none; border-radius: 3px; background: var(--mp-series-0); }
.mp-legend .mp-series-1 > span { background: var(--mp-series-1); }
.mp-legend .mp-series-2 > span { background: var(--mp-series-2); }
.mp-legend.mp-compare-legend li > span {
  width: 22px; height: 0; border-radius: 0; border-top: 3px solid var(--mp-series-0); background: none;
}
.mp-legend.mp-compare-legend .mp-series-1 > span { border-top: 3px dashed var(--mp-series-1); }
.mp-legend.mp-compare-legend .mp-series-2 > span { border-top: 3px dotted var(--mp-series-2); }
.mp-chart { display: block; width: 100%; height: 165px; color: var(--mp-muted); }
.mp-chart-dates { padding-left: min(65px, 18%); color: var(--mp-muted); font-size: 11px; }
.mp-chart-card p { font-size: 11px; }
#mp-chart-title { scroll-margin-top: 116px; }

.mp-dialog {
  width: min(530px, 100% - 24px); max-width: none; max-height: calc(100dvh - 25px); margin: auto; padding: 14px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--text); overflow: auto;
}
.mp-dialog::backdrop { background: var(--gs-backdrop); }
.mp-dialog form, .mp-details { display: grid; gap: 10px; }
.mp-dialog .mp-section-head { margin: 0; }
.mp-dialog label { display: grid; gap: 3px; color: var(--mp-muted); font-size: 12px; }
.mp-form-options legend { padding-inline: 4px; }
.mp-form-preview { padding: 7px 8px; border: 1px solid var(--mp-border); border-radius: 6px; background: var(--mp-header); color: var(--accent); }
.mp-dialog footer { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.mp-details-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mp-details-metrics > span { padding: 6px 7px; border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.mp-details-metrics b, .mp-details li small { display: block; }
.mp-details ul { list-style: none; padding: 0; margin: 0; }
.mp-details li { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 5px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.mp-details li > span:last-child { text-align: right; }
.mp-details li small { color: var(--mp-muted); }
.mp-details li small.mp-warn { color: var(--amber); }
.mp-header > div { min-width: 0; overflow-wrap: anywhere; }
.mp-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mp-header-actions .mp-filter-group { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding-block: 3px; }
.mp-header-actions .mp-filter-label { margin: 0 2px; }
.mp-header-actions > button { min-height: 39px; }
.mp-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.mp-scope > :first-child, .mp-scope > :last-child:nth-child(2) { grid-column: 1 / -1; }
.mp-monitor .mp-filter-group { padding: 6px 8px; }
.mp-monitor-tabs .mp-choice { font-size: 12px; }
.mp-monitor a.mp-kpi-link { display: inline-flex; align-items: center; min-height: var(--gs-target); color: var(--accent); font-size: 16px; letter-spacing: 0; }
.mp-monitor a.mp-kpi-link:hover { text-decoration: underline; }
.mp-monitor-section table small { display: block; color: var(--mp-muted); font-size: 11px; font-weight: 400; }
.mp-monitor-section table small.mp-warn { color: var(--amber); }
.mp-monitor-section table small.mp-inline-kind { display: inline; font-size: 10px; }
.mp-monitor-section table small.mp-mobile-order { display: none; }
.mp-monitor-section table [data-holding] th { min-width: 135px; }
.mp-monitor-section table tbody :is(th, td) { padding-block: 6px; background-clip: padding-box; }
.mp-monitor-note { margin: 0; color: var(--mp-muted); font-size: 12px; }
.mp-monitor .mp-details-metrics b { margin-top: 2px; }
.mp-monitor .mp-details footer { justify-content: flex-start; }

