.positions-content { display: grid; gap: 16px; }
.positions-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.eyebrow { margin: 0 0 8px; color: #7f9287; font-size: 9px; letter-spacing: 1.7px; }
.positions-heading h1 { font-size: 25px; letter-spacing: 3px; }
.address-form { width: min(520px, 55%); }
.address-form > label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.address-form > div { display: flex; }
.address-form input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #35463d; border-radius: 8px 0 0 8px; outline: 0; background: #101613; color: var(--text); font-size: 11px; }
.address-form input:focus { border-color: var(--accent); }
.address-form > div button, .dialog-actions button { padding: 9px 15px; border: 1px solid #3c7056; border-left: 0; border-radius: 0 8px 8px 0; background: #1c3126; color: #c8e4d5; font-size: 11px; }
.inline-action { float: right; margin-top: 6px; padding: 0; border: 0; background: transparent; color: #9bc8b0; font-size: 9px; }
.page-message { margin: 2px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.position-summary { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.position-summary article { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--line); }
.position-summary article:last-child { border-right: 0; }
.position-summary span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 9px; }
.position-summary strong { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.positions-section { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.section-heading { min-height: 66px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: #0f1512; }
.section-heading h2 { margin: 0; color: #dfe8e3; font-size: 11px; letter-spacing: 2px; }
.section-heading p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.position-cards { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 14px; }
.position-card { min-width: 0; overflow: hidden; border: 1px solid #2f3934; border-radius: 11px; background: #101512; }
.position-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.position-pair { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.position-pair strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.position-pair span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.position-state { flex: 0 0 auto; padding: 4px 7px; border: 1px solid #355844; border-radius: 12px; color: #9ed1b4; font-size: 8px; text-transform: uppercase; }
.position-state.empty { border-color: #464c49; color: #8b9590; }
.position-card dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 4px 16px; }
.position-card dl > div { min-width: 0; padding: 12px 0; border-bottom: 1px solid #252d29; }
.position-card dl > div:nth-child(even) { padding-left: 14px; }
.position-card dt { color: var(--muted); font-size: 8px; }
.position-card dd { margin: 6px 0 0; overflow-wrap: anywhere; color: #dce5e0; font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1.5; }
.position-card .fees { grid-column: 1 / -1; padding-left: 0 !important; border-bottom: 0; }
.position-card .fees dd { color: #a9d7bd; }
.position-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.position-actions a { color: var(--muted); font-size: 9px; }
.position-actions a:hover { color: var(--text); }
.collect-button { padding: 7px 10px; border: 1px solid #3d7057; border-radius: 6px; background: #193024; color: #c5e6d4; font-size: 9px; }
.collect-button:hover:not(:disabled) { background: #234332; }
.empty-positions { grid-column: 1 / -1; padding: 52px 20px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.7; }
.pool-position-group { overflow: hidden; border: 1px solid #303a35; border-radius: 12px; background: #0d1210; }
.pool-position-group > header { min-height: 56px; display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr); align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.pool-position-group > header > small { color: var(--muted); font-size: 9px; text-align: center; }
.pool-position-group > header > a { justify-self: end; color: var(--muted); font-size: 10px; }
.pool-position-group > header > a:hover { color: var(--text); }
.pool-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pool-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; letter-spacing: 1px; }
.pool-position-list { display: grid; gap: 12px; padding: 12px; }
.wide-position { border-radius: 10px; background: linear-gradient(135deg, #121714 0%, #101512 70%); }
.position-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid #29312e; background: linear-gradient(90deg, rgba(255,255,255,.025), transparent); }
.position-badges, .position-action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.position-badges span { padding: 5px 8px; border: 1px solid #3a4540; border-radius: 14px; color: #9ca9a2; font-size: 8px; text-transform: uppercase; }
.position-badges span.in-range { border-color: #39694f; color: #79c79d; }
.position-badges span.out-of-range { border-color: #725c3a; color: #d2ad73; }
.position-badges span.closed { color: #7f8984; }
.position-badges b { color: var(--muted); font-size: 8px; font-weight: 400; }
.position-action-row { justify-content: flex-end; }
.position-action-row button, .position-action-row a { padding: 7px 10px; border: 1px solid #3c4742; border-radius: 16px; background: transparent; color: #c2cbc6; font-size: 8px; letter-spacing: .7px; white-space: nowrap; }
.position-action-row button:hover:not(:disabled), .position-action-row a:hover { border-color: #62947a; color: #e0ece5; }
.position-action-row button:last-child { background: #e8edeb; border-color: #e8edeb; color: #111613; }
.range-visual { padding: 18px 14px 10px; }
.range-labels { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 10px; margin-bottom: 12px; }
.range-labels > span:last-child { text-align: right; }
.range-labels .current-price { text-align: center; }
.range-labels b { display: block; color: #dfe6e2; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.range-labels small { display: block; margin-top: 4px; color: #78857e; font-size: 7px; }
.range-labels .current-price small { margin: 0 0 4px; color: #6db991; }
.range-track { position: relative; height: 58px; padding-top: 14px; }
.range-bars { display: grid; grid-template-columns: repeat(19, 1fr); align-items: end; gap: 2px; height: 42px; border-bottom: 1px solid #445049; }
.range-bars i { height: 100%; min-width: 2px; border-radius: 2px 2px 0 0; background: #7b8480; opacity: .78; }
.range-bars i.current { background: #64ba92; opacity: 1; }
.price-marker { position: absolute; top: 4px; bottom: -4px; width: 2px; transform: translateX(-1px); background: #e7efeb; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.price-marker::before { content: ""; position: absolute; top: -1px; left: -4px; border-right: 5px solid transparent; border-left: 5px solid transparent; border-top: 6px solid #e7efeb; }
.price-marker.outside { background: #d1ad73; }
.position-card .position-market-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0 14px 14px; }
.managed-ladder-card .ladder-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 8px 16px 16px; }
.managed-ladder-card .ladder-metrics > div { padding: 12px 12px 4px 0; border: 0; }
.managed-ladder-card .ladder-metrics > div:nth-child(even) { padding-left: 0; }
.managed-ladder-card .ladder-metrics small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.position-card .position-market-metrics > div { padding: 12px 12px 6px 0; border: 0; }
.position-card .position-market-metrics > div:nth-child(even) { padding-left: 0; }
.position-market-metrics dt { letter-spacing: 1px; }
.position-market-metrics dd { color: #dce3df; font-size: 12px; line-height: 1.65; }
.position-market-metrics dd.positive { color: #55b38a; }
.position-market-metrics dd small { display: block; color: #77837c; font-size: 7px; }
.transaction-wrap { overflow-x: auto; }
.transaction-table { min-width: 820px; table-layout: auto; }
.transaction-table th { height: 46px; padding: 9px 12px; font-size: 9px; }
.transaction-table th:first-child { padding-left: 18px; }
.transaction-table td { height: 58px; padding: 9px 12px; font-size: 10px; }
.transaction-table td:first-child { padding-left: 18px; }
.transaction-table a { color: #acd4bd; }
.transaction-table .muted { color: var(--muted); }
.transaction-table .success { color: #62b88f; }
.transaction-table .failed { color: #d47d70; }
.transaction-section > .section-note { margin: 10px 18px 14px; }
.positions-note code { color: #a9c8b7; }
.collect-dialog { width: min(520px, calc(100% - 30px)); padding: 0; border: 1px solid #3b4942; border-radius: 14px; background: #111714; color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.collect-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.collect-dialog form { position: relative; padding: 24px; }
.dialog-close { position: absolute; top: 13px; right: 14px; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.collect-dialog h2 { margin: 0 0 12px; font-size: 17px; letter-spacing: 0; }
.collect-dialog h2 span { color: #9fd0b5; }
.confirm-amounts { margin: 0 0 18px; color: #b9dfca; font-size: 13px; line-height: 1.7; }
.collect-dialog dl { display: grid; gap: 8px; margin: 0; }
.collect-dialog dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; font-size: 9px; line-height: 1.5; }
.collect-dialog dt { color: var(--muted); }
.collect-dialog dd { margin: 0; overflow-wrap: anywhere; }
.dialog-warning { margin: 18px 0; padding: 11px 12px; border: 1px solid #604e31; border-radius: 7px; background: #211c13; color: #d6bb89; font-size: 9px; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.dialog-actions button { border: 1px solid #3c7056; border-radius: 7px; }
.dialog-actions .secondary-action { background: transparent; border-color: #414a46; color: var(--muted); }
#collectStatus { margin: 12px 0 0; color: #a9d6bd; font-size: 9px; line-height: 1.6; }
.pnl-dialog { width: min(980px, calc(100% - 30px)); }
.pnl-dialog form { padding: 24px 28px; }
.pnl-card-body { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(360px, 1.25fr); gap: 20px; padding: 26px; border: 1px solid #222f29; border-radius: 12px; background: radial-gradient(circle at 15% 40%, rgba(28,93,60,.18), transparent 38%), #09100d; }
.pnl-hero { align-self: center; }
.pnl-hero h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: 1px; }
.pnl-hero p { margin: 0 0 26px; color: var(--muted); font-size: 10px; }
.pnl-hero strong { display: block; color: #50b582; font-size: 58px; font-weight: 500; line-height: 1; }
.pnl-hero > span { display: block; margin-top: 10px; color: #809089; font-size: 9px; }
.pnl-range-visual { align-self: center; min-width: 0; padding: 16px; border: 1px solid #25332c; border-radius: 10px; background: rgba(4,9,7,.72); }
.pnl-range-visual .range-visual { padding: 0; }
.pnl-range-visual .range-track { height: 150px; padding-top: 44px; }
.pnl-range-visual .range-bars { height: 102px; }
.pnl-details { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding-top: 20px; border-top: 1px solid #243129; }
.pnl-details > div { min-width: 0; }
.pnl-details dt { color: #7e8d85; font-size: 8px; letter-spacing: 1px; }
.pnl-details dd { margin: 7px 0 0; overflow-wrap: anywhere; color: #b9c3bd; font-size: 12px; line-height: 1.5; }

@media (max-width: 800px) {
  .positions-heading { align-items: stretch; flex-direction: column; gap: 16px; }
  .address-form { width: 100%; }
  .position-summary { grid-template-columns: 1fr 1fr; }
  .position-summary article:nth-child(2) { border-right: 0; }
  .position-summary article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pool-position-group > header { grid-template-columns: 1fr auto; }
  .pool-position-group > header > small { display: none; }
  .position-toolbar { align-items: flex-start; flex-direction: column; }
  .position-action-row { justify-content: flex-start; }
  .position-card .position-market-metrics { grid-template-columns: repeat(3, 1fr); }
  .managed-ladder-card .ladder-metrics { grid-template-columns: 1fr 1fr; }
  .pnl-card-body { grid-template-columns: 1fr; }
  .pnl-details { grid-column: auto; }
}
@media (max-width: 520px) {
  .position-summary strong { font-size: 15px; }
  .section-heading { align-items: flex-start; }
  .position-card dl { grid-template-columns: 1fr; }
  .position-card dl > div:nth-child(even) { padding-left: 0; }
  .position-card .fees { grid-column: auto; }
  .pool-position-group > header { grid-template-columns: 1fr; }
  .pool-position-group > header > a { justify-self: start; }
  .position-card .position-market-metrics { grid-template-columns: 1fr 1fr; }
  .managed-ladder-card .ladder-metrics { grid-template-columns: 1fr; }
  .range-labels { grid-template-columns: 1fr 1fr; }
  .range-labels .current-price { grid-column: 1 / -1; grid-row: 1; }
  .pnl-card-body { padding: 18px; }
  .pnl-hero strong { font-size: 46px; }
  .pnl-details { grid-template-columns: 1fr 1fr; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
}

.eyebrow { color: var(--muted); }
.address-form input { border-color: var(--line); background: var(--surface); }
.address-form > div button, .dialog-actions button { border-color: var(--accent); background: var(--surface-raised); color: var(--text); }
.inline-action { color: var(--accent-bright); }
.section-heading { background: var(--surface-deep); }
.section-heading h2 { color: var(--text); }
.position-card { border-color: var(--line); background: var(--surface-deep); }
.position-state { border-color: var(--accent); color: #83c7fa; }
.position-state.empty { border-color: var(--muted); color: var(--muted); }
.position-card dl > div { border-bottom-color: #36506b; }
.position-card dd { color: var(--text-soft); }
.position-card .fees dd { color: var(--accent-bright); }
.collect-button { border-color: var(--accent); background: var(--surface-raised); color: var(--text); }
.collect-button:hover:not(:disabled) { background: var(--surface-hover); }
.pool-position-group { border-color: var(--line); background: var(--surface-deep); }
.wide-position { background: linear-gradient(135deg, var(--panel) 0%, var(--surface-deep) 72%); }
.position-toolbar { border-bottom-color: var(--line); background: linear-gradient(90deg, #748ca414, transparent); }
.position-badges span { border-color: var(--line); color: var(--muted); }
.position-badges span.in-range { border-color: var(--accent); color: var(--accent-bright); }
.position-badges span.out-of-range { border-color: #846f40; color: var(--warning); }
.position-badges span.closed { color: var(--muted); }
.position-action-row button, .position-action-row a { border-color: var(--line); color: var(--text-soft); }
.position-action-row button:hover:not(:disabled), .position-action-row a:hover { border-color: var(--accent-bright); color: var(--text); }
.position-action-row button:last-child { background: #bfe0fb; border-color: #bfe0fb; color: #05253f; }
.range-labels b, .position-market-metrics dd { color: var(--text); }
.range-labels small, .position-market-metrics dd small { color: var(--muted); }
.range-labels .current-price small { color: var(--accent-bright); }
.range-bars { border-bottom-color: var(--line); }
.range-bars i { background: var(--muted); }
.range-bars i.current { background: var(--accent-bright); }
.price-marker { background: var(--text); box-shadow: 0 0 0 1px #eef5fb1f; }
.price-marker::before { border-top-color: var(--text); }
.price-marker.outside { background: var(--warning); }
.position-market-metrics dd.positive, .transaction-table .success { color: var(--positive); }
.transaction-table a, .positions-note code { color: var(--accent-bright); }
.transaction-table .failed { color: var(--negative); }
.collect-dialog { border-color: var(--line); background: var(--surface-deep); box-shadow: 0 24px 80px #00070eb8; }
.collect-dialog::backdrop { background: #00070ec7; }
.collect-dialog h2 span, .confirm-amounts, #collectStatus { color: var(--accent-bright); }
.dialog-warning { border-color: #846f40; background: #302844; color: #f0d58f; }
.dialog-actions .secondary-action { border-color: var(--line); color: var(--muted); }
.pnl-card-body { border-color: var(--line); background: radial-gradient(circle at 15% 40%, #4a9be02e, transparent 38%), var(--background); }
.pnl-hero strong { color: var(--positive); }
.pnl-hero > span, .pnl-details dt { color: var(--muted); }
.pnl-range-visual { border-color: var(--line); background: #00070eb8; }
.pnl-details { border-top-color: var(--line); }
.pnl-details dd { color: var(--text-soft); }

.new-position-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.liquidity-dialog { width: min(640px, calc(100% - 30px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
#ladderActionForm > label, #ladderAddFields > label { display: grid; gap: 7px; margin: 12px 0; color: var(--muted); font-size: 9px; }
#ladderActionForm input, #ladderActionForm select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); }
#ladderActionForm .builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#ladderActionForm .builder-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 9px; }
#ladderActionStatus { min-height: 18px; color: var(--accent-bright); font-size: 9px; line-height: 1.6; }
.liquidity-fields { display: grid; gap: 12px; margin: 16px 0; }
.liquidity-dialog .section-note { font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.liquidity-fields label { display: grid; gap: 7px; color: var(--text-soft); font-size: 11px; }
.liquidity-fields label span { display: inline; }
.liquidity-fields input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: var(--surface); color: var(--text); font: inherit; }
.liquidity-fields input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.liquidity-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.liquidity-review { margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.liquidity-review ol { padding-left: 20px; }
#liquidityStatus { color: var(--text-soft); line-height: 1.6; overflow-wrap: anywhere; font-size: 11px; }
#liquidityStatus a { color: var(--accent-bright); }
.liquidity-dialog [hidden] { display: none !important; }
@media (max-width: 520px) { .liquidity-columns { grid-template-columns: 1fr; } }
