/* ── vport.css — Virtual Port module styles ─────────────────────────────── */

/* Port tab pill */
.port-tab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 1rem;
  border-radius: .75rem;
  font-size: .8125rem;
  font-weight: 700;
  border: 1.5px solid #e2e8f0;
  background: white;
  color: #64748b;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.port-tab:hover { border-color: #94a3b8; }
.port-tab.active { background: #2563eb; color: white; border-color: #2563eb; }
.dark .port-tab { background: #1e293b; border-color: #334155; color: #94a3b8; }
.dark .port-tab.active { background: #2563eb; border-color: #2563eb; color: white; }

/* Stock row */
.vp-stock-row {
  background: white;
  border: 1.5px solid #f1f5f9;
  border-radius: .875rem;
  transition: border-color .15s, box-shadow .15s;
  cursor: pointer;
}
.vp-stock-row:hover  { border-color: #bfdbfe; box-shadow: 0 2px 12px rgba(37,99,235,.07); }
.vp-stock-row.expanded { border-color: #3b82f6; }
.dark .vp-stock-row  { background: #1e293b; border-color: #334155; }
.dark .vp-stock-row:hover { border-color: #3b82f6; }

/* Expand panel */
.vp-expand-panel { background: #f8fafc; border-top: 1px solid #e2e8f0; border-radius: 0 0 .875rem .875rem; }
.dark .vp-expand-panel { background: #0f172a; border-color: #334155; }

/* Metric block */
.m-block { display: flex; flex-direction: column; align-items: center; }
.m-val   { font-size: .9rem; font-weight: 900; line-height: 1.25; }
.m-lbl   { font-size: .6rem; font-weight: 700; text-transform: uppercase; color: #94a3b8; }

/* Colour helpers */
.ok   { color: #16a34a; }
.bad  { color: #dc2626; }
.warn { color: #d97706; }
.neu  { color: #94a3b8; }
.dark .ok  { color: #4ade80; }
.dark .bad { color: #f87171; }

/* Stock pill */
.vp-stock-pill {
  display: inline-flex;
  align-items: center;
  font-size: .875rem;
  font-weight: 900;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: .5rem;
  padding: .2rem .55rem;
}
.dark .vp-stock-pill { color: #93c5fd; background: #1e3a5f; border-color: #3b82f6; }

/* Action buttons */
.vp-act-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .9rem;
  border-radius: .625rem;
  font-size: .75rem;
  font-weight: 800;
  transition: all .15s;
  border: none;
  cursor: pointer;
}
.vp-btn-buy  { background: #dbeafe; color: #1d4ed8; }
.vp-btn-buy:hover  { background: #2563eb; color: white; }
.vp-btn-sell { background: #fee2e2; color: #dc2626; }
.vp-btn-sell:hover { background: #dc2626; color: white; }
.vp-btn-hist { background: #f3f4f6; color: #374151; }
.vp-btn-hist:hover { background: #374151; color: white; }
.vp-btn-xd   { background: #fef3c7; color: #92400e; }
.vp-btn-xd:hover   { background: #d97706; color: white; }
.dark .vp-btn-hist { background: #334155; color: #e2e8f0; }

/* Stat card */
.vp-stat-card {
  background: white;
  border: 1.5px solid #f1f5f9;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
}
.dark .vp-stat-card { background: #1e293b; border-color: #334155; }

/* Modal / Drawer */
.vp-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; display: none; align-items: center; justify-content: center; }
.vp-modal-overlay.open { display: flex; }
.vp-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 60; display: none; align-items: flex-start; justify-content: flex-end; }
.vp-drawer-overlay.open { display: flex; }
.vp-drawer {
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: white;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
}
.dark .vp-drawer { background: #0f172a; }

/* Form elements */
.vp-form-label { font-size: .8rem; font-weight: 700; color: #374151; }
.dark .vp-form-label { color: #e2e8f0; }
.vp-form-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: .625rem;
  padding: .5rem .875rem;
  font-size: .875rem;
  font-weight: 600;
  color: #374151;
  outline: none;
  transition: border-color .18s;
  background: white;
}
.vp-form-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.dark .vp-form-input { background: #1e293b; border-color: #334155; color: #e2e8f0; }

/* Volume stepper */
.vp-vol-btn { padding: .4rem .75rem; border-radius: .5rem; font-size: .78rem; font-weight: 800; border: none; cursor: pointer; transition: all .15s; }
.vp-vol-minus { background: #fee2e2; color: #dc2626; }
.vp-vol-minus:hover { background: #dc2626; color: white; }
.vp-vol-plus  { background: #dcfce7; color: #16a34a; }
.vp-vol-plus:hover  { background: #16a34a; color: white; }

/* History table */
.vp-htable th { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: #94a3b8; padding: .5rem .75rem; text-align: center; }
.vp-htable td { font-size: .8rem; font-weight: 600; padding: .5rem .75rem; text-align: center; vertical-align: middle; }
.vp-htable tr.buy-row  td { background: rgba(220,252,231,.5); }
.vp-htable tr.sell-row td { background: rgba(254,226,226,.5); }
.dark .vp-htable tr.buy-row  td { background: rgba(20,83,45,.25); }
.dark .vp-htable tr.sell-row td { background: rgba(127,29,29,.25); }

/* XD table */
.vp-xdtable th { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: #fff; background: #1e293b; padding: .5rem .75rem; text-align: center; }
.vp-xdtable td { font-size: .82rem; font-weight: 600; padding: .5rem .75rem; text-align: center; vertical-align: middle; }

/* Claim badge / button */
.vp-claim-done {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: .7rem;
  font-weight: 800;
  padding: .25rem .6rem;
  border-radius: .5rem;
}
.vp-claim-btn {
  background: #1e293b;
  color: white;
  font-size: .7rem;
  font-weight: 800;
  padding: .3rem .75rem;
  border-radius: .5rem;
  border: none;
  cursor: pointer;
  transition: background .15s;
}
.vp-claim-btn:hover { background: #374151; }

/* Search input */
.vp-search-input {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: .75rem;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  color: #374151;
  transition: border-color .18s;
  outline: none;
}
.vp-search-input:focus { border-color: #2563eb; }
.dark .vp-search-input { background: #1e293b; border-color: #334155; color: #e2e8f0; }
