/* =====================================================================
   Legacy compatibility — screens not yet rebuilt on the new components
   render inside <div class="legacy">. Old dgp-* classes are restyled on
   the new tokens so they sit inside the new shell without clashing.
   Delete this file once every view uses app.css components.
   ===================================================================== */
.legacy { display: block; min-width: 0; }
.legacy a { color: var(--plat-ink); text-decoration: none; }
.legacy a:hover { text-decoration: underline; }
.legacy h1, .legacy h2, .legacy h3 { margin: 0 0 12px; }
.legacy h1 { font-size: var(--fs-2xl); }
.legacy h2 { font-size: 18px; }
.legacy p { margin: 0 0 12px; color: var(--ink-2); }
.legacy code { font-family: var(--dgp-font-mono); font-size: .92em; }
.legacy input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .legacy select, .legacy textarea { border-color: var(--line-strong); border-radius: var(--r-input) !important; background: var(--surface); color: var(--ink); min-height: 38px; }

.dgp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 20px; }
.dgp-card + .dgp-card { margin-top: 16px; }
.dgp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.dgp-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 20px; box-shadow: var(--shadow-card); }
.dgp-stat .label { color: var(--ink-3); font-size: var(--fs-sm); }
.dgp-stat .value { font: 700 24px/1.2 var(--font-head); margin-top: 4px; font-variant-numeric: tabular-nums; }
.dgp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: var(--r-input); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink) !important; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.dgp-btn:hover { border-color: var(--ink-3); }
.dgp-btn-primary { background: var(--plat-ink); border-color: var(--plat-ink); color: var(--btn-text) !important; font-weight: 600; }
.dgp-btn-primary:hover { filter: brightness(1.12); }
.dgp-btn-ghost { background: var(--surface); }
.dgp-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: var(--r-pill); background: color-mix(in oklab, var(--plat) 9%, var(--surface)); color: var(--plat-ink); }
.dgp-badge.off { background: var(--bg-alt); color: var(--ink-3); }
.dgp-table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.dgp-table th { text-align: left; color: var(--ink-3); font-weight: 600; font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.dgp-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.dgp-table tr:hover td { background: var(--surface-2); }
.dgp-card .dgp-table { margin: -4px 0; }
.dgp-center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.dgp-panel { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: var(--shadow-pop); padding: 32px; }
.dgp-brand { display: flex; align-items: center; gap: 8px; font: 700 18px/1.2 var(--font-head); color: var(--ink); padding-bottom: 16px; }
.dgp-brand .dot { width: 22px; height: 22px; border-radius: 7px; background: var(--navy); display: inline-block; }
.dgp-muted { color: var(--ink-3); font-size: var(--fs-sm); }
.dgp-kbd { font-family: var(--dgp-font-mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: var(--fs-sm); }
@media (max-width: 760px) { .legacy [style*="grid-template-columns"] { grid-template-columns: 1fr !important; } .legacy .dgp-card { overflow-x: auto; } }
