/* Ledger. Tokens follow SPEC.md §12. Practice = graph paper, real = solid ink.
   Green and red are for money only. No all-caps labels, no monospace. */

@font-face { font-family: 'Schibsted Grotesk'; font-weight: 400; font-display: swap; src: url(/vendor/fonts/schibsted-grotesk-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 500; font-display: swap; src: url(/vendor/fonts/schibsted-grotesk-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 600; font-display: swap; src: url(/vendor/fonts/schibsted-grotesk-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 700; font-display: swap; src: url(/vendor/fonts/schibsted-grotesk-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 800; font-display: swap; src: url(/vendor/fonts/schibsted-grotesk-latin-800-normal.woff2) format('woff2'); }

:root {
  --fog: #EEF1F4;
  --ink: #1B2430;
  --ink-2: #2A3544;
  --muted: #5D6876;
  --faint: #8A94A1;
  --line: #DCE1E7;
  --card: #FFFFFF;
  --graph: #F6F9FE;
  --graph-line: #D9E5F3;
  --graph-ink: #33507A;
  --gain: #0E7F58;
  --loss: #C0392B;
  --gain-on-ink: #5FD8A6;
  --loss-on-ink: #FF8E80;
  --action: #2F5BEA;
  --action-soft: #E7EDFD;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 36, 48, .06), 0 4px 16px rgba(27, 36, 48, .05);
  --sidebar: 236px;
  font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fog); }
body { font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
svg { width: 18px; height: 18px; flex: none; }
.acct-card.new svg { width: 22px; height: 22px; }
a { color: var(--action); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 10px; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: inherit; background: var(--fog); padding: 0 4px; border-radius: 4px; }

.gain { color: var(--gain); }
.loss { color: var(--loss); }
.ink .gain, .ink-card .gain { color: var(--gain-on-ink); }
.ink .loss, .ink-card .loss { color: var(--loss-on-ink); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- layout ---------- */

.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--ink); color: #fff; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 800; font-size: 19px; color: #fff; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav a, .nav button.navlink {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: #C9D1DB; font-weight: 600;
  background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.nav a:hover, .nav button.navlink:hover { background: var(--ink-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--ink-2); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav-section { margin: 18px 10px 6px; font-size: 13px; color: #8994A3; font-weight: 600; }
.nav .acct { font-weight: 500; font-size: 14px; justify-content: space-between; flex-wrap: nowrap; }
.nav .acct > span:first-child { flex-wrap: nowrap; min-width: 0; }
.nav .acct .small { flex: none; opacity: .8; }
.nav .acct .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.dot.paper { background: var(--graph-line); }
.dot.real { background: #fff; }
.sidebar .trade-btn { margin: 8px 0 4px; }
.sidebar .foot { margin-top: auto; padding: 12px 10px 0; font-size: 12px; color: #8994A3; }

main { flex: 1; min-width: 0; padding: 26px 32px 80px; max-width: 1180px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }

.tabbar, .fab { display: none; }

/* ---------- cards ---------- */

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card > h2, .card > .spread > h2 { margin-bottom: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2, .card.flush > .spread { padding: 16px 18px 0; }
.section-title { margin: 26px 0 10px; }

.paper-card, .paper {
  background-color: var(--graph);
  background-image: linear-gradient(var(--graph-line) 1px, transparent 1px), linear-gradient(90deg, var(--graph-line) 1px, transparent 1px);
  background-size: 22px 22px; background-position: -1px -1px;
  color: var(--graph-ink); border: 1px solid var(--graph-line);
}
.ink-card, .ink { background: var(--ink); color: #fff; }
.ink-card .muted, .ink .muted { color: #A9B3C0; }
.paper-card .muted, .paper .muted { color: #5D7398; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.paper { background: var(--graph); color: var(--graph-ink); border: 1px dashed #9DB5D6; background-image: none; }
.badge.real { background: var(--ink); color: #fff; }
.ink .badge.real, .ink-card .badge.real { background: #fff; color: var(--ink); }
.badge.soft { background: var(--fog); color: var(--muted); }
.badge.st, .badge.lt, .badge.wash { background: var(--fog); color: var(--ink); font-weight: 700; }
.badge.wash { background: #FFF2D6; color: #7A5200; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--card); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .k { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 20px; font-weight: 700; margin-top: 2px; }
.kpi .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.paper-card .kpi, .ink-card .kpi { box-shadow: none; }
.ink-card .kpi { background: var(--ink-2); }
.ink-card .kpi .k, .ink-card .kpi .s { color: #A9B3C0; }
.paper-card .kpi { background: rgba(255, 255, 255, .75); border: 1px solid var(--graph-line); }

/* summary panels on Home */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.panel { border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel .big { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 2px; }
.panel .lines { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 16px; margin-top: 12px; font-size: 13.5px; }
.panel .lines .k { color: inherit; opacity: .75; }
.panel .lines b { font-weight: 700; display: block; font-size: 15px; }
.panel h2 { display: flex; align-items: center; gap: 8px; }

/* account hero */
.hero { border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.hero .top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.hero .value { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.hero .facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px 18px; margin-top: 16px; }
.hero .facts .k { font-size: 13px; opacity: .78; }
.hero .facts .v { font-weight: 700; font-size: 16px; }
.hero .rule { font-size: 13px; margin-top: 12px; opacity: .85; }

.acct-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.acct-card { border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); cursor: pointer; display: block; }
.acct-card.ink-card { color: #fff; }
.acct-card.paper-card { color: var(--graph-ink); }
.acct-card:hover { text-decoration: none; transform: translateY(-1px); }
.acct-card .v { font-size: 22px; font-weight: 800; margin: 6px 0 2px; }
.acct-card.archived { opacity: .6; }
.acct-card.new { border: 2px dashed #B9C3CF; box-shadow: none; display: flex; align-items: center; justify-content: center; min-height: 120px; color: var(--muted); font-weight: 600; background: transparent; }

/* ---------- buttons + forms ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 9px 14px;
  font-weight: 650; font-size: 14.5px; cursor: pointer; background: var(--action); color: #fff; white-space: nowrap; text-decoration: none;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.btn.secondary { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost { background: transparent; color: var(--action); padding: 6px 8px; }
.btn.danger { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px #E3B5AF; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; padding: 12px; font-size: 16px; }
.ink .btn.secondary, .ink-card .btn.secondary { background: var(--ink-2); color: #fff; box-shadow: none; }
.trade-btn { width: 100%; padding: 11px; }

.seg { display: inline-flex; background: var(--fog); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--muted); font-size: 14px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg.big { display: flex; }
.seg.big button { flex: 1; padding: 9px; font-size: 15px; }
.seg.side button.on.buy { background: var(--action); color: #fff; }
.seg.side button.on.sell { background: var(--ink); color: #fff; }

label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
label.field > small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
textarea { resize: vertical; min-height: 70px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th.num, td.num { text-align: right; white-space: nowrap; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: #F7F9FB; }
.sym { font-weight: 700; }
.sym a { color: var(--ink); }
.subname { font-size: 12.5px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsavg { display: block; font-size: 12px; }
tr.lots-row td { background: #F8FAFC; padding: 0; }
tr.lots-row table td, tr.lots-row table th { font-size: 13px; padding: 7px 12px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
@media (max-width: 1240px) and (min-width: 641px) { table.pos td.actions { flex-direction: column; } table.pos th:nth-child(8), table.pos td:nth-child(8) { display: none; } }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 10px; }

.barline { height: 8px; background: var(--fog); border-radius: 99px; overflow: hidden; display: flex; }
.barline span { display: block; height: 100%; }

/* ---------- tabs ---------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 15px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--action); }

/* ---------- charts ---------- */

.chart-box { position: relative; height: 280px; }
.chart-box.short { height: 200px; }
.chart-tools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }

/* ---------- activity / news ---------- */

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 12px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.feed li:last-child { border-bottom: 0; }
.feed .what { font-weight: 650; }
.feed .note { font-size: 13.5px; color: var(--ink); background: var(--fog); border-radius: 8px; padding: 4px 8px; margin-top: 4px; display: inline-block; }
.feed .snap { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.feed .side { text-align: right; }
.feed .acts { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.news li:last-child { border-bottom: 0; }
.news .h { font-weight: 600; color: var(--ink); }
.news .m { font-size: 12.5px; color: var(--muted); }

/* ---------- coach ---------- */

.review { line-height: 1.6; }
.review h3 { font-size: 17px; margin: 18px 0 6px; }
.review h3:first-child { margin-top: 0; }
.review h4 { font-size: 15px; margin: 12px 0 4px; }
.review ul, .review ol { margin: 4px 0 10px; padding-left: 22px; }
.review li { margin: 3px 0; }
.prompt-box { white-space: pre-wrap; font-size: 12.5px; max-height: 60vh; overflow: auto; background: var(--fog); padding: 12px; border-radius: 10px; word-break: break-word; }
details > summary { cursor: pointer; font-weight: 600; }

/* ---------- analyst bar ---------- */

.analyst { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin: 6px 0; background: var(--fog); }
.analyst span:nth-child(1) { background: #1E3A8A; }
.analyst span:nth-child(2) { background: #5B7FD9; }
.analyst span:nth-child(3) { background: #B8C2CF; }
.analyst span:nth-child(4) { background: #8D96A3; }
.analyst span:nth-child(5) { background: #4B5563; }

/* ---------- sheet (modal) ---------- */

.overlay { position: fixed; inset: 0; background: rgba(15, 20, 28, .42); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s ease; }
.sheet { background: var(--card); border-radius: 18px; width: 100%; max-width: 480px; max-height: calc(100vh - 40px); overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.sheet.wide { max-width: 760px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 6px; position: sticky; top: 0; background: var(--card); z-index: 2; }
.sheet-body { padding: 8px 18px 18px; }
.x { border: 0; background: var(--fog); width: 32px; height: 32px; border-radius: 99px; cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }

.search-wrap { position: relative; }
.results { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 5; margin-top: 4px; max-height: 280px; overflow-y: auto; }
.results button { display: flex; width: 100%; text-align: left; gap: 10px; padding: 9px 12px; border: 0; background: none; cursor: pointer; align-items: baseline; }
.results button:hover, .results button.hl { background: var(--fog); }
.results .owned { font-size: 12px; color: var(--action); margin-left: auto; white-space: nowrap; }
.quote-card { border-radius: 12px; padding: 12px 14px; background: var(--fog); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quote-card .p { font-size: 20px; font-weight: 800; }
.preview { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; font-size: 14px; }
.preview .l { display: flex; justify-content: space-between; padding: 3px 0; gap: 10px; }
.preview .warn { color: var(--ink); background: #FFF2D6; border-radius: 8px; padding: 8px 10px; margin-top: 8px; font-size: 13.5px; }
.fill-note { font-size: 13px; color: var(--muted); margin: -4px 0 12px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; z-index: 80; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); font-weight: 600; max-width: calc(100vw - 32px); animation: fade .15s ease; }
.toast.err { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--loss), 0 8px 30px rgba(0, 0, 0, .2); }

.login { max-width: 360px; margin: 14vh auto; padding: 0 16px; }
.login .brand { color: var(--ink); justify-content: center; padding-bottom: 24px; font-size: 24px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--action); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.verdict { font-size: 16px; line-height: 1.55; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini-head { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 6px; }

/* ---------- phones ---------- */

@media (max-width: 760px) {
  .sidebar { display: none; }
  main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 23px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--ink); z-index: 40;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around;
  }
  .tabbar a { color: #A9B3C0; display: flex; flex-direction: column; align-items: center; font-size: 11px; gap: 2px; padding: 4px 8px; font-weight: 600; flex: 1; }
  .tabbar a.active { color: #fff; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar svg { width: 22px; height: 22px; }
  .fab {
    display: flex; position: fixed; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 41; background: var(--action); color: #fff;
    border: 0; border-radius: 999px; padding: 13px 20px; font-weight: 700; font-size: 16px; box-shadow: 0 8px 24px rgba(47, 91, 234, .4); cursor: pointer; gap: 6px; align-items: center;
  }
  .panels, .grid2 { grid-template-columns: 1fr; }
  .panel .lines { grid-template-columns: repeat(2, auto); }
  .hero .value { font-size: 30px; }
  .overlay { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 18px 18px 0 0; max-height: 92vh; max-width: none; padding-bottom: env(safe-area-inset-bottom); }
  .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
}

/* .stack tables become cards on phones */
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.stack td.num { text-align: right; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; font-weight: 500; }
  table.stack td.lead { display: block; text-align: left; padding-bottom: 6px; }
  table.stack td.lead::before { content: none; }
  table.stack td.actions { justify-content: flex-start; padding-top: 8px; }
  table.stack td.actions::before { content: none; }
  table.stack td:empty { display: none; }

  /* holdings: labeled Shares / Avg / Price grid */
  table.pos tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; }
  table.pos td { display: block; text-align: left; padding: 0; }
  table.pos td.num { text-align: left; }
  table.pos td::before { display: block; font-size: 12px; }
  table.pos td.lead { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-start; }
  table.pos td.lead .lead-value { display: block; text-align: right; font-weight: 800; font-size: 17px; }
  table.pos td.c-value { display: none; }
  table.pos td.actions { grid-column: 1 / -1; display: flex; }
  table.pos tr.lots-row { display: block; padding: 0; }
  table.pos tr.lots-row td { display: block; }
  table.pos tr.lots-row td::before { content: none; }
  table.pos tr.lots-row table thead { display: table-header-group; }
  table.pos tr.lots-row table tr { display: table-row; padding: 0; }
  table.pos tr.lots-row table td { display: table-cell; padding: 6px 8px; }
  table.pos tr.lots-row table td::before { content: none; }
}
@media (min-width: 641px) { .lead-value { display: none; } }

/* ---------- screenshot import ---------- */
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed #B9C3CF; border-radius: 14px; padding: 26px 16px; margin: 12px 0; cursor: pointer; text-align: center; background: var(--fog); }
.drop:hover, .drop.over { border-color: var(--action); background: var(--action-soft); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.thumb { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; font-size: 15px; background: rgba(255,255,255,.9); }
.im-table input[type=text], .im-table input[type=number], .im-table input[type=date] { padding: 6px 8px; font-size: 15px; min-width: 0; }
.im-table td { vertical-align: top; }
.im-table .im-sym { width: 110px; font-weight: 700; }
.im-table .subname { display: block; margin-top: 3px; max-width: 170px; }
.im-table tr:has(+ tr.im-msgrow) td { border-bottom: 0; }
.im-table tr.im-msgrow td { padding-top: 0; }
.im-table input[data-f=qty], .im-table input[data-f=avgCost] { width: 96px; }
.im-table input[data-f=acquired] { width: 150px; }
.im-table tr.off td { opacity: .5; }
.im-table tr.off td.lead { opacity: 1; }
.im-msgs { font-size: 12.5px; }
.im-msgs > div { display: inline-block; margin-right: 6px; }
.im-err { color: var(--ink); background: #FDE7E4; border-radius: 6px; padding: 3px 7px; margin-bottom: 4px; }
.im-warn { color: #6B4A00; background: #FFF2D6; border-radius: 6px; padding: 3px 7px; margin-bottom: 4px; }
.im-note { background: var(--fog); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
@media (max-width: 640px) {
  .im-table td { align-items: center; }
  .im-table input[data-f=qty], .im-table input[data-f=avgCost], .im-table input[data-f=acquired] { width: 60%; }
  .im-table td.im-msgs { display: block; text-align: left; }
  .im-table td.im-msgs:empty { display: none; }
}
