:root {
    color-scheme: dark;
    --bg: #08111d;
    --panel: #101d2d;
    --panel-2: #142438;
    --line: rgba(255,255,255,.09);
    --text: #eef5ff;
    --muted: #8fa3bb;
    --cyan: #49d6c8;
    --cyan-dark: #174d4c;
    --green: #5ee09b;
    --yellow: #f1c65b;
    --red: #ff6b7d;
    --shadow: 0 18px 50px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 78% 3%, rgba(38,123,131,.17), transparent 29rem),
        linear-gradient(180deg, #0a1624 0, var(--bg) 38rem);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(8,17,29,.82); backdrop-filter: blur(18px); }
.topbar-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.main-nav { display: flex; align-items: center; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5,13,23,.35); }
.main-nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.main-nav a.active, .main-nav a:hover { color: var(--text); background: rgba(73,214,200,.11); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand > div { display: grid; gap: 2px; }
.brand strong { letter-spacing: .01em; }
.brand span:not(.brand-mark) { color: var(--muted); font-size: .78rem; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: #061315; font-weight: 900; letter-spacing: -.04em; background: linear-gradient(145deg, #79eee2, #2ab6b4); box-shadow: 0 12px 30px rgba(44,195,190,.22); }
.brand-mark.small { width: 42px; height: 42px; border-radius: 13px; font-size: .85rem; }
.main-content { padding: 52px 0 70px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 12px; font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.045em; line-height: 1.05; }
h2 { margin-bottom: 5px; font-size: 1.45rem; letter-spacing: -.025em; }
h3 { margin-bottom: 6px; font-size: 1.2rem; }
.eyebrow { margin-bottom: 9px; color: var(--cyan); font-size: .73rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.hero .muted { max-width: 720px; margin-bottom: 0; line-height: 1.65; }
.sync-state { min-width: 245px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(16,29,45,.75); }
.sync-state div { display: grid; gap: 3px; }
.sync-state strong { font-size: .82rem; }
.sync-state span:not(.status-dot) { color: var(--muted); font-size: .75rem; }
.status-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(255,107,125,.12); }
.sync-state.online .status-dot { background: var(--green); box-shadow: 0 0 0 5px rgba(94,224,155,.12); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0 44px; }
.stat-card { min-height: 135px; display: flex; flex-direction: column; justify-content: center; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(20,36,56,.96), rgba(13,27,43,.96)); box-shadow: var(--shadow); }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card span { font-size: .78rem; font-weight: 700; }
.stat-card strong { margin: 7px 0 3px; font-size: 1.7rem; letter-spacing: -.04em; }
.stat-card small { font-size: .72rem; }
.stat-card.attention { border-color: rgba(255,107,125,.45); background: linear-gradient(145deg, rgba(84,33,49,.78), rgba(39,25,38,.95)); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-head p, .section-head h2 { margin-bottom: 4px; }
.section-head > span { font-size: .78rem; }
.auto-limit-panel { display: grid; grid-template-columns: minmax(280px, 1fr) auto 150px 150px auto; align-items: center; gap: 18px; margin-bottom: 18px; padding: 20px 22px; border: 1px solid rgba(73,214,200,.2); border-radius: 18px; background: linear-gradient(135deg, rgba(20,48,61,.8), rgba(14,29,45,.92)); }
.auto-limit-panel h3 { margin-bottom: 5px; }
.auto-limit-panel p:last-child { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.setting-switch { margin-right: 3px; }
.percent-field { display: grid; gap: 6px; color: var(--muted); font-size: .68rem; font-weight: 700; }
.percent-field > div { height: 42px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: rgba(5,13,23,.45); }
.percent-field strong, .percent-field b { color: var(--muted); font-size: .8rem; }
.percent-field strong { padding-left: 10px; }
.percent-field b { padding-right: 10px; }
.percent-field input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; padding: 0 6px; color: var(--text); background: transparent; font-weight: 800; }
.positions { display: grid; gap: 17px; }
.position-card { overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: rgba(16,29,45,.92); box-shadow: var(--shadow); }
.position-main { display: grid; grid-template-columns: minmax(240px, 1fr) 170px 120px 230px; align-items: center; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line); }
.position-title p { margin: 0; color: var(--muted); font-size: .76rem; }
.position-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.position-actions a { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--cyan); background: rgba(73,214,200,.045); font-size: .66rem; font-weight: 800; }
.position-actions a:hover { border-color: rgba(73,214,200,.35); background: rgba(73,214,200,.1); }
.holding-badge { display: inline-block; margin-bottom: 9px; padding: 5px 9px; border-radius: 999px; color: var(--green); background: rgba(94,224,155,.1); font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.holding-badge.closed { color: var(--muted); background: rgba(143,163,187,.1); }
.holding-badge.watch { color: var(--yellow); background: rgba(241,198,91,.1); }
.quote-block, .quantity-block, .performance-block { display: grid; gap: 4px; }
.quote-block span, .quantity-block span, .performance-block span { color: var(--muted); font-size: .72rem; }
.quote-block strong { font-size: 1.35rem; }
.quantity-block strong { font-size: 1.12rem; }
.quote-block small, .quantity-block small { color: var(--muted); font-size: .68rem; }
.performance-block strong { font-size: 1.02rem; }
.performance-block small { color: var(--muted); font-size: .65rem; line-height: 1.35; }
.performance-block.positive strong, .profit-positive { color: var(--green) !important; }
.performance-block.negative strong, .profit-negative { color: var(--red) !important; }
.quote-block small.stale { color: var(--yellow); }
.purchase-reference-form { display: grid; grid-template-columns: minmax(240px, 1fr) 190px auto; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: rgba(73,214,200,.035); }
.purchase-reference-form > div { display: grid; gap: 3px; }
.purchase-reference-form strong { font-size: .78rem; }
.purchase-reference-form > div span { color: var(--muted); font-size: .68rem; }
.purchase-reference-input { height: 40px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: rgba(5,13,23,.46); }
.purchase-reference-input input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; padding: 0 11px; color: var(--text); background: transparent; font-weight: 700; }
.purchase-reference-input input:focus { box-shadow: inset 0 0 0 1px var(--cyan); }
.purchase-reference-input span { padding-right: 11px; color: var(--muted); font-size: .7rem; }
.alert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; background: rgba(5,13,23,.22); }
.alert-box { min-width: 0; padding: 17px; border: 1px solid rgba(73,214,200,.2); border-radius: 16px; background: rgba(20,36,56,.74); transition: opacity .2s, border-color .2s; }
.alert-box.disabled { opacity: .63; border-color: var(--line); }
.alert-box.state-triggered, .alert-box.state-notified { border-color: rgba(255,107,125,.52); background: rgba(68,29,44,.55); }
.alert-box.state-acknowledged { border-color: rgba(241,198,91,.38); }
.alert-box-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 16px; }
.alert-box-head > div { display: grid; gap: 3px; }
.alert-box-head strong { font-size: .9rem; }
.alert-box-head span:not(.state-pill) { color: var(--muted); font-size: .7rem; }
.state-pill { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: var(--cyan); background: rgba(73,214,200,.1); font-size: .64rem; font-weight: 800; }
.state-triggered .state-pill, .state-notified .state-pill { color: #ffd8dd; background: rgba(255,107,125,.17); }
.state-acknowledged .state-pill { color: var(--yellow); background: rgba(241,198,91,.12); }
.disabled .state-pill { color: var(--muted); background: rgba(143,163,187,.1); }
.threshold-row { display: flex; align-items: center; gap: 13px; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; cursor: pointer; border-radius: 999px; background: #34465b; transition: .2s; }
.switch span::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #dfe8f4; transition: .2s; }
.switch input:checked + span { background: var(--cyan-dark); box-shadow: inset 0 0 0 1px var(--cyan); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--cyan); }
.threshold-input { height: 43px; flex: 1; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(5,13,23,.46); }
.threshold-input input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; padding: 0 12px; color: var(--text); background: transparent; font-weight: 700; }
.threshold-input > span { padding-right: 12px; color: var(--muted); font-size: .72rem; }
.limit-distance { margin-top: 10px; color: var(--muted); font-size: .7rem; }
.limit-distance strong { color: var(--cyan); font-size: .76rem; }
.limit-distance.breached { color: #ffbcc6; }
.limit-distance.breached strong { color: #ffd8dd; }
.trigger-info { margin-top: 13px; color: #ffbcc6; font-size: .72rem; }
.alert-actions { display: flex; gap: 15px; margin-top: 9px; }
.link-button { border: 0; padding: 0; color: var(--cyan); background: transparent; cursor: pointer; font-size: .72rem; font-weight: 700; }
.save-row { grid-column: 1 / -1; display: flex; justify-content: end; padding-top: 2px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: 0 17px; cursor: pointer; color: var(--text); background: rgba(255,255,255,.035); font-weight: 750; font-size: .8rem; }
.button.primary { border-color: transparent; color: #061315; background: linear-gradient(135deg, #70e8dc, #37c1bb); }
.button.ghost:hover { background: rgba(255,255,255,.08); }
.notice { margin: 18px 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; font-size: .82rem; }
.notice.success { color: #c9ffe1; border-color: rgba(94,224,155,.3); background: rgba(94,224,155,.08); }
.notice.danger { color: #ffd6dc; border-color: rgba(255,107,125,.3); background: rgba(255,107,125,.08); }
.empty-state { padding: 70px 25px; text-align: center; border: 1px dashed rgba(73,214,200,.25); border-radius: 21px; background: rgba(16,29,45,.5); }
.empty-state p { margin-bottom: 0; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 50%; color: var(--cyan); background: rgba(73,214,200,.1); font-size: 1.5rem; }
.history-section { margin-top: 42px; }
.history-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(16,29,45,.72); }
.history-row { display: grid; grid-template-columns: 12px minmax(220px, 1fr) 180px 120px; align-items: center; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-icon { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); }
.history-icon.event-triggered { background: var(--red); box-shadow: 0 0 0 4px rgba(255,107,125,.1); }
.history-icon.event-notified { background: var(--green); }
.history-row > div { display: grid; gap: 3px; }
.history-row strong { font-size: .78rem; }
.history-row span, .history-row time { color: var(--muted); font-size: .68rem; }
.history-price { text-align: right; font-size: .78rem; font-weight: 700; }
.history-row time { text-align: right; }
.info-strip { margin-top: 26px; padding: 20px 22px; border-left: 3px solid var(--cyan); border-radius: 0 13px 13px 0; background: rgba(73,214,200,.055); }
.info-strip strong { display: block; margin-bottom: 5px; font-size: .78rem; }
.info-strip p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.6; }
.login-page { display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: rgba(16,29,45,.94); box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 27px; }
.login-card h1 { font-size: 2.1rem; }
.login-card .muted { line-height: 1.55; }
.login-form { display: grid; gap: 16px; margin-top: 27px; }
.login-form label { display: grid; gap: 7px; color: var(--muted); font-size: .74rem; font-weight: 700; }
.login-form input { height: 47px; width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; outline: 0; color: var(--text); background: rgba(5,13,23,.5); }
.login-form input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(73,214,200,.09); }
.login-form .button { margin-top: 4px; }

.alert-popup { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 22px; }
.alert-popup[hidden] { display: none; }
.alert-popup-backdrop { position: absolute; inset: 0; background: rgba(2,8,15,.78); backdrop-filter: blur(7px); }
.alert-popup-card { position: relative; width: min(460px, 100%); padding: 32px; border: 1px solid rgba(255,107,125,.48); border-radius: 23px; background: linear-gradient(145deg, #17263a, #101b2b); box-shadow: 0 28px 90px rgba(0,0,0,.55); }
.alert-popup-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 19px; border-radius: 50%; color: #fff; background: var(--red); box-shadow: 0 0 0 8px rgba(255,107,125,.1); font-size: 1.55rem; font-weight: 900; }
.alert-popup-card h2 { margin-bottom: 7px; }
.alert-popup-card > p:not(.eyebrow) { margin-top: 0; color: #ffccd3; font-weight: 700; }
.alert-popup-card dl { display: grid; gap: 1px; overflow: hidden; margin: 24px 0; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
.alert-popup-card dl div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 14px; background: #111f31; }
.alert-popup-card dt { color: var(--muted); font-size: .75rem; }
.alert-popup-card dd { margin: 0; text-align: right; font-size: .78rem; font-weight: 800; }
.alert-popup-card .button { width: 100%; }

.protocol-hero { align-items: center; }
.review-indicator { min-width: 210px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid rgba(241,198,91,.35); border-radius: 15px; background: rgba(241,198,91,.08); }
.review-indicator strong { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #191305; background: var(--yellow); }
.review-indicator span { color: #f8dfa0; font-size: .73rem; font-weight: 750; }
.protocol-stats .result-positive { border-color: rgba(94,224,155,.4); background: linear-gradient(145deg, rgba(27,73,59,.75), rgba(20,43,43,.95)); }
.protocol-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 18px; margin-bottom: 46px; }
.transaction-form, .protocol-explanation { border: 1px solid var(--line); border-radius: 20px; background: rgba(16,29,45,.9); box-shadow: var(--shadow); }
.transaction-form { padding: 24px; }
.transaction-form > .button { margin-top: 19px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: grid; gap: 7px; }
.form-field.wide { grid-column: 1 / -1; }
.form-field > span { color: var(--muted); font-size: .7rem; font-weight: 750; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--text); background: rgba(5,13,23,.52); }
.form-field input, .form-field select { height: 44px; padding: 0 12px; }
.form-field textarea { min-height: 86px; resize: vertical; padding: 12px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(73,214,200,.08); }
.form-field option { color: #101820; background: #eef5ff; }
.protocol-explanation { padding: 24px; }
.protocol-explanation > p { color: var(--muted); font-size: .76rem; line-height: 1.6; }
.protocol-explanation dl, .position-ledger-card dl { display: grid; gap: 1px; overflow: hidden; margin: 20px 0; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.protocol-explanation dl div, .position-ledger-card dl div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 12px; background: rgba(13,27,43,.98); }
.protocol-explanation dt, .position-ledger-card dt { color: var(--muted); font-size: .68rem; }
.protocol-explanation dd, .position-ledger-card dd { margin: 0; text-align: right; font-size: .72rem; font-weight: 800; }
.protocol-note { margin: 0 !important; padding-top: 15px; border-top: 1px solid var(--line); }
.protocol-section { margin-top: 42px; }
.position-ledger-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.position-ledger-card { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(16,29,45,.76); }
.position-ledger-card h3 { margin-bottom: 3px; }
.position-ledger-card > div:first-child small { color: var(--muted); font-size: .68rem; }
.position-ledger-card dl { grid-template-columns: 1fr 1fr; }
.ledger-result { display: flex; align-items: end; justify-content: space-between; gap: 15px; padding-top: 5px; }
.ledger-result span { color: var(--muted); font-size: .7rem; }
.ledger-result strong { font-size: 1.05rem; }
.ledger-result.positive strong { color: var(--green); }
.ledger-result.negative strong { color: var(--red); }
.ledger-result.incomplete strong { color: var(--yellow); font-size: .78rem; }
.review-link { display: block; margin-top: 14px; color: var(--yellow); font-size: .68rem; font-weight: 800; }
.transaction-history { display: grid; gap: 10px; }
.transaction-row { display: grid; grid-template-columns: 90px minmax(180px, 1fr) minmax(210px, .9fr) 150px 110px; align-items: center; gap: 15px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(16,29,45,.72); }
.transaction-row.needs-review { border-color: rgba(241,198,91,.42); background: rgba(55,47,29,.48); }
.transaction-type { justify-self: start; padding: 6px 9px; border-radius: 999px; font-size: .65rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.transaction-type.type-buy { color: #bfffe0; background: rgba(94,224,155,.12); }
.transaction-type.type-sell { color: #ffd0d6; background: rgba(255,107,125,.12); }
.transaction-type.type-dividend { color: #fff0bd; background: rgba(241,198,91,.13); }
.transaction-security, .transaction-details, .transaction-value, .transaction-actions { display: grid; gap: 4px; }
.transaction-security strong, .transaction-details strong, .transaction-value strong { font-size: .78rem; }
.transaction-security span, .transaction-details span, .transaction-value time { color: var(--muted); font-size: .65rem; }
.transaction-value { text-align: right; }
.transaction-value.positive strong { color: var(--green); }
.transaction-value.negative strong { color: var(--red); }
.transaction-actions { justify-items: end; }
.transaction-actions form { margin: 0; }
.review-badge { padding: 4px 6px; border-radius: 6px; color: #f9e4a6; background: rgba(241,198,91,.12); font-size: .61rem; font-weight: 850; }
.danger-link { color: var(--red); }
.transaction-note { grid-column: 2 / -1; margin: -3px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.45; }

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .auto-limit-panel { grid-template-columns: 1fr auto 1fr 1fr; }
    .auto-limit-panel .button { grid-column: 3 / 5; }
    .position-main { grid-template-columns: 1fr 1fr; }
    .position-title { grid-column: 1 / -1; }
    .purchase-reference-form { grid-template-columns: 1fr 190px; }
    .purchase-reference-form .button { grid-column: 2; }
    .protocol-layout { grid-template-columns: 1fr; }
    .protocol-explanation { order: -1; }
    .transaction-row { grid-template-columns: 80px 1fr 1fr 120px; }
    .transaction-actions { grid-column: 2 / -1; display: flex; justify-content: end; align-items: center; }
    .transaction-note { grid-column: 2 / -1; }
}

@media (max-width: 660px) {
    .shell { width: min(100% - 24px, 1180px); }
    .topbar-inner { min-height: 66px; }
    .brand span:not(.brand-mark), .topbar .button { display: none; }
    .topbar-actions { gap: 8px; }
    .main-nav a { padding: 7px 9px; }
    .main-content { padding-top: 30px; }
    .hero { display: grid; align-items: stretch; }
    .sync-state { min-width: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 34px; }
    .stat-card { min-height: 112px; padding: 16px; }
    .stat-card strong { font-size: 1.3rem; }
    .section-head { display: block; }
    .section-head > span { display: block; margin-top: 8px; }
    .auto-limit-panel { grid-template-columns: auto 1fr 1fr; padding: 17px; gap: 13px; }
    .auto-limit-panel > div:first-child { grid-column: 1 / -1; }
    .auto-limit-panel .button { grid-column: 1 / -1; }
    .position-main { grid-template-columns: 1fr 1fr; padding: 18px; gap: 16px; }
    .quote-block strong { font-size: 1.12rem; }
    .purchase-reference-form { grid-template-columns: 1fr; padding: 14px 12px; }
    .purchase-reference-form .button { grid-column: 1; width: 100%; }
    .alert-grid { grid-template-columns: 1fr; padding: 12px; }
    .save-row { grid-column: 1; }
    .save-row .button { width: 100%; }
    .history-row { grid-template-columns: 10px 1fr auto; gap: 11px; }
    .history-price { display: none !important; }
    .login-card { padding: 28px 24px; }
    .protocol-hero { display: grid; }
    .review-indicator { min-width: 0; }
    .protocol-stats { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-field.wide { grid-column: 1; }
    .position-ledger-grid { grid-template-columns: 1fr; }
    .position-ledger-card dl { grid-template-columns: 1fr; }
    .transaction-row { grid-template-columns: 1fr auto; gap: 10px; }
    .transaction-type { grid-column: 1; }
    .transaction-security { grid-column: 1; }
    .transaction-details { grid-column: 1 / -1; }
    .transaction-value { grid-column: 2; grid-row: 1 / 3; }
    .transaction-actions { grid-column: 1 / -1; justify-content: start; }
    .transaction-note { grid-column: 1 / -1; }
}
