:root {
  color-scheme: dark;
  --bg: #0c0f0e;
  --surface: #121614;
  --surface-2: #171c19;
  --line: #26302a;
  --text: #eef2eb;
  --muted: #89938b;
  --green: #77d49c;
  --amber: #dda85c;
  --red: #e17a70;
  --blue: #7ca6d8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, a { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; border-right: 1px solid var(--line); background: #0a0d0c; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 32px; color: var(--text); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #477159; background: #14241a; color: var(--green); font-weight: 800; font-size: 13px; letter-spacing: .08em; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: .17em; }
.workspace-switch { margin: 0 0 22px; padding: 4px; display: grid; gap: 4px; border: 1px solid #273129; background: #0d110f; }
.workspace-button { min-height: 38px; padding: 8px 10px; border: 1px solid transparent; background: transparent; color: #77817a; cursor: pointer; text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.workspace-button:hover, .workspace-button:focus-visible { color: var(--text); outline: none; }
.workspace-button.active { border-color: #35513f; background: #142019; color: #d9eee0; }
nav { display: block; }
.nav-workspace { display: grid; gap: 5px; }
.nav-workspace[hidden] { display: none; }
.nav-heading { margin: 0 12px 7px; color: #59635c; font-size: 8px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.nav-item { display: flex; gap: 13px; align-items: center; padding: 11px 12px; border-left: 2px solid transparent; color: #9ba59d; text-decoration: none; font-size: 13px; }
.nav-item span { color: #4d5851; font-size: 10px; letter-spacing: .12em; }
.nav-item:hover, .nav-item:focus-visible { background: #111612; color: var(--text); outline: none; }
.nav-item.active { border-left-color: var(--green); background: #121a15; color: var(--text); }
.safety-card { margin-top: auto; padding: 16px; border: 1px solid #4f4430; background: linear-gradient(145deg, #1c1a13, #11130f); }
.safety-card .label { color: var(--amber); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.safety-card strong { display: block; margin-top: 8px; font-size: 12px; }
.safety-card p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

main { min-width: 0; }
.topbar { min-height: 94px; padding: 22px 36px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 22px; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.data-badge { padding: 7px 9px; border: 1px solid #63502f; color: var(--amber); background: #18150f; font-size: 9px; letter-spacing: .1em; }
.icon-button, .avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); }
.icon-button { cursor: pointer; font-size: 11px; }
.avatar { background: #203429; color: var(--green); font-size: 12px; font-weight: 800; }
.logout-form { margin: 0; }
.logout-form input { display: none; }

.content { padding: 30px 36px 48px; }
.section-heading, .panel-header, .metric-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading { margin-bottom: 18px; }
.overview-actions { display: flex; align-items: center; gap: 8px; }
.quick-link { min-height: 38px; padding: 0 13px; border: 1px solid #39463e; background: #111713; color: #b9c2bb; cursor: pointer; font-size: 10px; font-weight: 700; }
.quick-link:hover, .quick-link:focus-visible { border-color: #557061; color: var(--text); outline: none; }
.quick-link.live { border-color: #7a3d34; background: #281713; color: #ffab9c; }
h2 { margin-bottom: 0; font-size: 25px; letter-spacing: -.04em; }
h3 { margin-bottom: 0; font-size: 14px; letter-spacing: -.015em; }
.mode-pill { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #345440; color: var(--green); font-size: 10px; letter-spacing: .12em; }
.read-only-pill { padding: 7px 10px; border: 1px solid #36413b; color: var(--muted); font-size: 9px; letter-spacing: .11em; }
.live-budget-pill { padding: 7px 10px; border: 1px solid #7a3d34; color: #ff9a88; background: #231512; font-size: 9px; letter-spacing: .11em; }
.live-warning { margin: -4px 0 16px; padding: 13px 15px; border-left: 3px solid var(--red); background: #1d1311; color: #c8aaa4; font-size: 11px; line-height: 1.55; }
.live-warning.paused { border-left-color: var(--amber); background: #1c1a13; color: #d8c49e; }
.live-buy-pause-panel { margin-bottom: 12px; padding: 17px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-color: #69443d; background: linear-gradient(145deg, #1d1513, #111513 72%); }
.live-buy-pause-panel.active { border-color: #b7584b; box-shadow: inset 4px 0 0 var(--red); }
.live-buy-pause-actions { min-width: 250px; display: grid; grid-template-columns: auto auto; align-items: center; justify-content: end; gap: 8px; }
.live-buy-pause-actions button { min-height: 42px; padding: 0 15px; border: 1px solid #a14c40; background: #442019; color: #ffd8d1; cursor: pointer; font-size: 10px; font-weight: 800; }
.live-buy-pause-actions button.active { border-color: #5c795f; background: #193122; color: #dff6e7; }
.live-buy-pause-actions button:disabled { opacity: .5; cursor: wait; }
#live-buy-pause-status { grid-column: 1 / -1; min-height: 14px; color: var(--muted); font-size: 9px; text-align: right; }
.mode-pill span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { min-height: 126px; padding: 17px; border: 1px solid var(--line); background: var(--surface); }
.metric.primary { background: linear-gradient(145deg, #15221a, #111513 72%); border-color: #314b3a; }
.metric-top { color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin-top: 19px; font-size: 23px; letter-spacing: -.04em; }
.metric small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.trend { padding: 3px 5px; font-size: 9px; }
.trend.up { color: var(--green); background: #16271d; }
.trend.down { color: var(--red); background: #281a18; }

.live-overview { margin-bottom: 18px; border: 1px solid #754238; background: linear-gradient(135deg, #251613, #131714 68%); box-shadow: inset 4px 0 0 #d66f5f; }
.live-overview-heading { min-height: 72px; padding: 15px 18px; border-bottom: 1px solid #49302b; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.live-overview-heading h3 { font-size: 19px; }
.live-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.live-overview-metric { min-height: 148px; padding: 20px; border-right: 1px solid #49302b; }
.live-overview-metric:nth-child(3n) { border-right: 0; }
.live-overview-metric:nth-child(-n+3) { border-bottom: 1px solid #49302b; }
.live-overview-metric span { color: #c4aaa5; font-size: 10px; letter-spacing: .06em; }
.live-overview-metric strong { display: block; margin-top: 22px; font-size: 30px; letter-spacing: -.045em; }
.live-overview-metric small { display: block; margin-top: 7px; color: #8f827e; font-size: 10px; line-height: 1.45; }
.live-overview-metric.live-result { background: rgba(255, 255, 255, .018); }
.live-overview-last { margin: 0; padding: 12px 18px; border-top: 1px solid #49302b; color: #b7aaa6; font-size: 11px; }
.paper-overview-label { margin: 0 0 9px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--muted); }
.paper-overview-label span { font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.paper-overview-label small { font-size: 9px; }
.rank-best { color: var(--green); font-weight: 700; }
.rank-tested { color: var(--amber); font-weight: 700; }
.rank-untested { color: var(--muted); }

.dashboard-grid { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 12px; }
.secondary-view { min-height: calc(100vh - 94px); }
.secondary-view[hidden] { display: none; }
.metric-grid.compact { margin-bottom: 12px; }
.metric-grid.research-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.research-metrics .metric { min-height: 112px; }
.panel-note { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.view-panel { margin-top: 12px; }
.funding-panel { margin-bottom: 12px; padding: 20px; display: grid; grid-template-columns: minmax(220px, .8fr) minmax(340px, 1.2fr); gap: 28px; align-items: center; border-color: #345440; background: linear-gradient(145deg, #142019, #111513 72%); }
.funding-panel p:not(.eyebrow) { margin: 8px 0 0; max-width: 500px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.funding-panel form { display: grid; gap: 8px; }
.funding-panel label { color: #aeb7b0; font-size: 10px; }
.funding-controls { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; align-items: stretch; }
.funding-controls span { display: grid; place-items: center; padding: 0 12px; border: 1px solid #334039; border-right: 0; background: #0d110f; color: var(--muted); }
.funding-controls input { min-width: 0; padding: 12px; border: 1px solid #334039; border-radius: 0; outline: 0; background: #0d110f; color: var(--text); }
.funding-controls input:focus { border-color: var(--green); }
.funding-controls button { padding: 0 16px; border: 1px solid #477159; background: #1b3928; color: #dff6e7; cursor: pointer; font-weight: 700; }
.funding-controls button:disabled { cursor: wait; opacity: .6; }
#paper-funding-status { min-height: 16px; color: var(--green); font-size: 10px; }
#paper-funding-status.error { color: var(--red); }
.manual-order-panel { margin-bottom: 12px; border-color: #693d35; background: linear-gradient(145deg, #1c1512, #111513 72%); }
.manual-order-panel form { padding: 17px; }
.manual-order-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.manual-order-grid label { display: grid; gap: 7px; color: #c4b0aa; font-size: 10px; }
.manual-order-grid input, .manual-order-grid select { width: 100%; min-height: 42px; padding: 10px; border: 1px solid #4b3732; border-radius: 0; outline: 0; background: #0d110f; color: var(--text); }
.manual-order-grid input:focus, .manual-order-grid select:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(225, 122, 112, .12); }
.manual-order-grid .manual-check { min-height: 42px; grid-template-columns: auto 1fr; align-items: center; align-content: center; padding: 10px; border: 1px solid #4b3732; background: #0d110f; }
.manual-order-grid .manual-check input { width: 16px; min-height: 16px; margin: 0; }
.manual-order-grid .manual-check[hidden] { display: none; }
.manual-order-preview { margin: 14px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #392d29; }
.manual-order-preview div { padding: 11px 12px; border-right: 1px solid #392d29; }
.manual-order-preview div:last-child { border-right: 0; }
.manual-order-preview dt { color: var(--muted); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.manual-order-preview dd { margin: 6px 0 0; font-size: 10px; line-height: 1.4; }
.manual-order-actions { margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.manual-order-actions button { min-height: 42px; padding: 0 16px; border: 1px solid #a14c40; background: #442019; color: #ffd8d1; cursor: pointer; font-weight: 700; }
.manual-order-actions button:disabled { opacity: .45; cursor: not-allowed; }
.notification-pairing-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 12px; padding: 17px; border-color: #31533f; }
.notification-pairing-panel h3 { margin-top: 4px; }
.notification-pairing-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.notification-pairing-actions .assignment-button { display: inline-grid; place-items: center; text-decoration: none; }
.notification-topic { margin: 8px 0 0; color: var(--muted); font-size: 9px; }
.notification-topic code { color: #b9dcc5; user-select: all; }
#manual-order-status { color: var(--green); font-size: 10px; }
#manual-order-status.error { color: var(--red); }
.portfolio-section + .portfolio-section { margin-top: 28px; }
.subsection-heading { margin-top: 4px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
#portfolio-live-status { max-width: 460px; color: var(--green); font-size: 10px; text-align: right; }
#portfolio-live-status.error { color: var(--red); }
.sell-position-button { min-width: 82px; padding: 8px 10px; border: 1px solid #a14c40; background: #442019; color: #ffd8d1; cursor: pointer; font-weight: 700; font-size: 9px; }
.sell-position-button:disabled { border-color: #3b403d; background: #1b1f1d; color: #68716b; cursor: not-allowed; }
.health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.facts { margin: 0; padding: 8px 17px 14px; }
.facts div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid #1e2521; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: 10px; }
.facts dd { margin: 0; font-size: 10px; font-weight: 700; }
.facts .locked { color: var(--amber); }
.panel { border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.panel-header { min-height: 66px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.equity-panel { min-height: 330px; }
.chart-wrap { height: 210px; padding: 18px 16px 4px; }
#equity-chart { width: 100%; height: 100%; }
.chart-footer { padding: 0 17px 14px; color: #59635c; font-size: 8px; display: flex; justify-content: space-between; }
.range-control { display: flex; gap: 3px; }
.range-control button { padding: 5px 7px; border: 0; background: transparent; color: #68726b; font-size: 9px; cursor: pointer; }
.range-control .selected { background: #213228; color: var(--green); }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #59625c; }
.status-dot.green { background: var(--green); }
.status-dot.amber { background: var(--amber); }
.status-dot.muted { background: #59625c; }
.status-list { list-style: none; margin: 0; padding: 5px 17px 10px; }
.status-list li { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #1e2521; font-size: 11px; }
.status-list li:last-child { border-bottom: 0; }
.status-list span { display: flex; align-items: center; gap: 9px; color: #aab2ac; }
.status-list strong { color: #d9ded9; font-size: 10px; font-weight: 600; }
.positions-panel { min-height: 268px; }
.text-button { border: 0; background: transparent; color: var(--green); font-size: 10px; cursor: pointer; }
.table-search { display: grid; grid-template-columns: minmax(220px, 420px) auto auto; align-items: center; gap: 9px; padding: 11px 17px; border-top: 1px solid #1e2521; border-bottom: 1px solid #1e2521; background: #0d120f; }
.table-search label { display: block; }
.table-search input { width: 100%; min-height: 36px; padding: 8px 11px; border: 1px solid #344039; background: #0a0e0c; color: var(--text); outline: 0; font-size: 10px; }
.table-search input:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(119, 212, 156, .1); }
.table-search input::placeholder { color: #647069; }
.table-search output { min-width: 105px; color: var(--muted); font-size: 9px; }
.table-search button { min-height: 36px; padding: 0 12px; border: 1px solid #3a4740; background: #151b17; color: #b8c3bc; cursor: pointer; font-size: 9px; font-weight: 700; }
.table-search button:hover:not(:disabled), .table-search button:focus-visible { border-color: #5e7c69; color: #e4ece7; }
.table-search button:disabled { opacity: .35; cursor: default; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 13px 17px; border-bottom: 1px solid #1e2521; text-align: left; font-size: 10px; }
th { color: #667069; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
td:first-child { display: grid; grid-template-columns: 27px auto; grid-template-rows: auto auto; column-gap: 9px; align-items: center; }
td:first-child .coin { grid-row: 1 / 3; }
td:first-child small { color: var(--muted); }
.coin { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 10px; }
.coin.sol { background: #2a2141; color: #bd9cff; }
.coin.btc { background: #382815; color: #f4ae45; }
.coin.sui { background: #152d38; color: #69c9e8; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.feedback-actions { margin: 0; padding: 13px 34px 17px; color: #aeb7b0; font-size: 10px; line-height: 1.6; }
.feedback-actions li + li { margin-top: 4px; }
.empty-row td { display: table-cell !important; padding: 28px 17px; color: var(--muted); text-align: center; }
td input[type="number"] { width: 92px; padding: 8px; border: 1px solid #334039; background: #0d110f; color: var(--text); }
.assignment-button { min-width: 105px; padding: 8px 10px; border: 1px solid #477159; background: #1b3928; color: #dff6e7; cursor: pointer; }
.assignment-button:disabled { opacity: .6; cursor: wait; }
.system-management-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.system-management-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.system-management-actions button { min-height: 36px; padding: 0 13px; border: 1px solid #7d453c; background: #351b17; color: #ffd8d1; cursor: pointer; font-size: 9px; font-weight: 700; }
.system-management-actions button:disabled { border-color: #323a35; background: #171b19; color: #626c65; cursor: not-allowed; }
.system-management-actions output { max-width: 340px; color: var(--muted); font-size: 9px; }
.system-management-actions output.error { color: var(--red); }
.system-selection { width: 17px; height: 17px; accent-color: #d46d5d; cursor: pointer; }
.strategy-with-lineage { display: grid; gap: 4px; min-width: 190px; }
.strategy-with-lineage strong { font-size: 10px; font-weight: 700; }
.strategy-with-lineage small { max-width: 360px; color: #80b895; font-size: 8px; line-height: 1.4; }
.live-switch { position: relative; display: inline-flex; width: 42px; height: 22px; }
.live-switch input { position: absolute; opacity: 0; pointer-events: none; }
.live-switch span { width: 100%; border: 1px solid #4a534e; background: #202522; cursor: pointer; transition: .15s ease; }
.live-switch span::after { content: ""; display: block; width: 16px; height: 16px; margin: 2px; background: #778079; transition: .15s ease; }
.live-switch input:checked + span { border-color: #a14c40; background: #442019; }
.live-switch input:checked + span::after { transform: translateX(19px); background: #ff7966; }
.live-switch input:disabled + span { opacity: .35; cursor: not-allowed; }
.live-label { display: flex; align-items: center; gap: 6px; color: var(--amber); font-size: 8px; letter-spacing: .12em; }
.live-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.activity-list { list-style: none; margin: 0; padding: 6px 17px 10px; }
.activity-list li { display: grid; grid-template-columns: 38px 1fr; gap: 9px; padding: 10px 0; border-bottom: 1px solid #1e2521; }
.activity-list li:last-child { border-bottom: 0; }
.activity-list time { color: #5f6962; font-size: 9px; }
.activity-list strong { font-size: 10px; }
.activity-list p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.strategy-groups { display: grid; gap: 12px; margin-bottom: 16px; }
.strategy-group-card { padding: 18px; border: 1px solid #5f4931; background: linear-gradient(135deg, #161712, #111512); }
.strategy-group-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.strategy-group-heading h3 { margin: 4px 0 7px; }
.group-live-control { display: grid; gap: 7px; min-width: 150px; padding: 11px 13px; border: 1px solid #725242; background: #211713; color: #ffad87; font-size: 9px; letter-spacing: .09em; }
.group-live-control input { width: 100%; accent-color: #ff7966; cursor: pointer; }
.strategy-group-members { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.strategy-group-member { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #304039; background: #101613; color: #c5d2ca; font-size: 9px; cursor: pointer; }
.strategy-group-member input { accent-color: var(--green); }
.strategy-group-member.review-needed { border-color: #765740; color: var(--amber); }
.strategy-group-status { margin: 13px 0 0; color: var(--muted); font-size: 9px; }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .live-overview-grid { grid-template-columns: repeat(2, 1fr); }
  .live-overview-metric { border-right: 1px solid #49302b; border-bottom: 1px solid #49302b; }
  .live-overview-metric:nth-child(2n) { border-right: 0; }
  .live-overview-metric:nth-last-child(-n+2) { border-bottom: 0; }
  .metric-grid.research-metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: 1fr; }
  .manual-order-grid, .manual-order-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-order-preview div:nth-child(2) { border-right: 0; }
  .manual-order-preview div:nth-child(-n+2) { border-bottom: 1px solid #392d29; }
}

@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 17px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 13px; }
  .workspace-button { text-align: center; }
  .nav-workspace { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-heading { grid-column: 1 / -1; margin: 0 0 4px; }
  .nav-item { padding: 9px; font-size: 10px; }
  .nav-item span, .safety-card { display: none; }
  .brand { padding-bottom: 16px; }
  .topbar { padding: 18px; align-items: flex-start; }
  .data-badge { display: none; }
  .content { padding: 22px 18px 36px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .overview-actions { width: 100%; }
  .quick-link { flex: 1; }
  .metric-grid { grid-template-columns: 1fr; }
  .live-overview-grid { grid-template-columns: 1fr; }
  .live-overview-metric { border-right: 0; border-bottom: 1px solid #49302b; }
  .live-overview-metric:last-child { border-bottom: 0; }
  .metric-grid.research-metrics { grid-template-columns: 1fr; }
  .funding-panel { grid-template-columns: 1fr; gap: 18px; }
  .funding-controls { grid-template-columns: auto 1fr; }
  .funding-controls button { grid-column: 1 / -1; min-height: 44px; }
  .manual-order-grid, .manual-order-preview { grid-template-columns: 1fr; }
  .manual-order-preview div { border-right: 0; border-bottom: 1px solid #392d29; }
  .manual-order-preview div:last-child { border-bottom: 0; }
  .manual-order-actions { align-items: stretch; flex-direction: column; }
  .live-buy-pause-panel { align-items: stretch; flex-direction: column; }
  .live-buy-pause-actions { min-width: 0; grid-template-columns: 1fr; justify-content: stretch; }
  .live-buy-pause-actions button { width: 100%; }
  #live-buy-pause-status { grid-column: 1; text-align: left; }
  .notification-pairing-panel { align-items: flex-start; flex-direction: column; }
  .system-management-header { align-items: flex-start; flex-direction: column; }
  .system-management-actions { width: 100%; justify-content: flex-start; }
  .strategy-group-heading { flex-direction: column; }
  .group-live-control { width: 100%; }
  .table-search { grid-template-columns: 1fr auto; }
  .table-search label { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.login-page { min-height: 100vh; background: radial-gradient(circle at 50% 15%, #17231b 0, #0c0f0e 38%, #090b0a 100%); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(420px, 100%); padding: 34px; border: 1px solid #304138; background: rgba(16, 21, 18, .96); box-shadow: 0 28px 80px rgba(0, 0, 0, .38); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 42px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand small { margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.login-panel h1 { margin-bottom: 10px; font-size: 28px; }
.login-intro { margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.login-error { min-height: 18px; margin-bottom: 10px; color: var(--red); font-size: 11px; }
.login-panel form { display: grid; gap: 8px; }
.login-panel label { margin-top: 8px; color: #aeb7b0; font-size: 10px; letter-spacing: .06em; }
.login-panel input { width: 100%; padding: 12px; border: 1px solid #334039; border-radius: 0; outline: 0; background: #0d110f; color: var(--text); }
.login-panel input:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(119, 212, 156, .12); }
.login-panel button { margin-top: 13px; padding: 12px; border: 1px solid #477159; background: #1b3928; color: #dff6e7; cursor: pointer; font-weight: 700; }
.login-panel button:hover, .login-panel button:focus-visible { background: #244b35; }
.login-safety { margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.login-safety i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
