/* Trade Center v2 — eigen stylesheet (los van de Tailwind-build).
   Kleuren volgen de site: bg #0D0F14, surface #12141C, accent #3B82F6. */
.tc {
  --bg: #0d0f14; --surface: #12141c; --surface-2: #181b25; --border: rgba(255,255,255,.07);
  --text: #f3f4f6; --muted: #9ca3af; --dim: #6b7280; --accent: #3b82f6;
  --win: #22c55e; --fair: #eab308; --loss: #ef4444;
  color: var(--text); font-size: 14px; line-height: 1.45;
  max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; width: 100%; box-sizing: border-box;
}
.tc *, .tc *::before, .tc *::after { box-sizing: border-box; }
.tc a { color: inherit; text-decoration: none; }

/* Kop */
.tc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.tc-kicker { font-size: 10px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.tc-title { font-size: 32px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.02em; margin: 2px 0 0;
  color: #fff; -webkit-text-fill-color: currentColor; background: none; }
.tc-title span { color: var(--accent); -webkit-text-fill-color: currentColor; }
.tc-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Knoppen */
.tc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--border);
  background: rgba(255,255,255,.04); color: var(--text); cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.tc-btn:hover { background: rgba(255,255,255,.08); }
.tc-btn:disabled { opacity: .45; cursor: not-allowed; }
.tc-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.tc-btn-primary:hover { background: #2f6fd6; }
.tc-btn-danger { color: #fca5a5; border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.08); }
.tc-btn-sm { padding: 6px 10px; font-size: 11px; border-radius: 10px; }

/* Tabs / nav */
.tc-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tc-nav a { padding: 7px 12px; border-radius: 10px; font-size: 12px; font-weight: 800; color: var(--muted); border: 1px solid transparent; }
.tc-nav a.on, .tc-nav a:hover { color: var(--text); background: var(--surface); border-color: var(--border); }

/* Filters */
.tc-filters { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; margin-bottom: 16px; }
.tc-input, .tc-select, .tc-textarea { width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 10px 12px; font-size: 14px; outline: none; font-family: inherit; }
.tc-input:focus, .tc-select:focus, .tc-textarea:focus { border-color: rgba(59,130,246,.6); }
.tc-textarea { resize: vertical; min-height: 70px; }
@media (max-width: 720px) { .tc-filters { grid-template-columns: 1fr 1fr; } .tc-filters .tc-search { grid-column: 1 / -1; } }

/* Kaarten */
.tc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.tc-card + .tc-card { margin-top: 12px; }
.tc-card:hover.tc-card-link { border-color: rgba(59,130,246,.35); }
.tc-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tc-user { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 220px; }
.tc-avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.06); object-fit: cover; flex-shrink: 0; }
.tc-user b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-user small { color: var(--dim); font-size: 11px; }
.tc-meta { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 11px; flex-shrink: 0; }
.tc-type { font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; border-radius: 8px;
  background: rgba(59,130,246,.12); color: #93c5fd; }
.tc-rep { font-size: 11px; font-weight: 800; color: #facc15; }
.tc-rep span { color: var(--dim); font-weight: 600; }
.tc-rep-new { color: var(--dim); }

/* Twee kanten van een trade */
.tc-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.tc-side { background: rgba(255,255,255,.02); border: 1px solid var(--border); border-radius: 14px; padding: 10px; min-width: 0; }
.tc-side-label { display: flex; justify-content: space-between; font-size: 10px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.tc-side-label b { color: var(--text); font-style: italic; letter-spacing: 0; font-size: 12px; }
.tc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tc-arrow { align-self: center; color: var(--dim); font-size: 18px; }
.tc-open { display: flex; align-items: center; justify-content: center; min-height: 86px; color: var(--muted); font-style: italic; font-size: 13px; }
@media (max-width: 720px) { .tc-sides { grid-template-columns: 1fr; } .tc-arrow { transform: rotate(90deg); justify-self: center; } }

/* Item-tegel */
.tc-tile, .tc-tile-sm { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  aspect-ratio: 1 / 1.15; border-radius: 12px; padding: 6px 4px; overflow: hidden; min-width: 0;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rar) 35%, transparent), transparent 70%), var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--rar) 35%, transparent); }
.tc-tile img, .tc-tile-sm img { position: absolute; top: 8%; left: 15%; width: 70%; height: 55%; object-fit: contain; }
.tc-tile-name { position: relative; font-size: 10px; font-weight: 800; text-align: center; line-height: 1.15; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-tile-val { position: relative; font-size: 11px; font-weight: 900; font-style: italic; color: #93c5fd; }
.tc-qty { position: absolute; top: 4px; right: 5px; font-size: 10px; font-weight: 900; color: #fff; background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 6px; }
.tc-tile-sm .tc-tile-name { font-size: 9px; }

/* Win/Fair/Loss */
.tc-wfl { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; padding: 4px 8px; border-radius: 8px; }
.tc-wfl-w { color: var(--win);  background: rgba(34,197,94,.1); }
.tc-wfl-f { color: var(--fair); background: rgba(234,179,8,.1); }
.tc-wfl-l { color: var(--loss); background: rgba(239,68,68,.1); }
.tc-wfl-n { color: var(--dim);  background: rgba(255,255,255,.04); }

.tc-note { margin-top: 10px; color: var(--muted); font-size: 13px; font-style: italic; overflow-wrap: anywhere; }
.tc-empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.tc-empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.tc-flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 13px; font-weight: 600; }
.tc-flash-err { background: rgba(239,68,68,.1); color: #fca5a5; border: 1px solid rgba(239,68,68,.25); }
.tc-flash-ok  { background: rgba(34,197,94,.1); color: #86efac; border: 1px solid rgba(34,197,94,.25); }
.tc-pager { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }

/* Builder (nieuwe trade / offer) */
.tc-builder { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .tc-builder { grid-template-columns: 1fr; } }
.tc-slot { position: relative; }
.tc-slot-x { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.6); color: #fff; font-size: 12px; line-height: 20px; padding: 0; z-index: 2; }
.tc-slot-qty { position: absolute; top: 3px; right: 3px; display: flex; gap: 3px; z-index: 2; }
.tc-slot-qty button { width: 20px; height: 20px; border-radius: 6px; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-weight: 900; padding: 0; }
.tc-add { aspect-ratio: 1 / 1.15; border-radius: 12px; border: 1px dashed rgba(255,255,255,.15); background: transparent; color: var(--dim);
  font-size: 24px; cursor: pointer; }
.tc-add:hover { border-color: var(--accent); color: var(--accent); }
.tc-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.tc-field { margin-top: 14px; }
.tc-field label { display: block; font-size: 10px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }

/* Picker-modal */
.tc-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.7); display: none; align-items: center; justify-content: center; padding: 16px; }
.tc-modal.open { display: flex; }
.tc-modal-box { width: 100%; max-width: 640px; max-height: 86vh; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.tc-modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.tc-modal-head b { flex: 1; font-size: 15px; }
.tc-modal-tabs { display: flex; gap: 6px; padding: 10px 16px 0; }
.tc-modal-body { overflow-y: auto; padding: 12px 16px 16px; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tc-grid .tc-tile { cursor: pointer; }
.tc-grid .tc-tile:hover { outline: 2px solid var(--accent); }
.tc-have { position: absolute; top: 4px; left: 5px; font-size: 9px; font-weight: 900; color: #86efac; }
.tc-x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.tc-set-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; margin-bottom: 6px; }
.tc-set-row:hover { border-color: var(--accent); }
.tc-set-row img { width: 40px; height: 40px; object-fit: contain; }

/* Categorie-label in de kiezer (onderscheidt items met dezelfde naam) */
.tc-tile-cat { position: relative; font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--rar); }
.tc-slot .tc-qty { top: 30px; right: 5px; }

/* Fase 2: offers, gesprekken, inbox */
.tc-h2 { font-size: 13px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin: 28px 0 10px; }
.tc-card-dim { opacity: .55; }
.tc-type-muted { background: rgba(255,255,255,.06); color: var(--muted); }
.tc-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 900; }
.tc-row { display: flex !important; align-items: center; gap: 12px; }
.tc-room { display: grid; gap: 12px; }
.tc-chat { display: flex; flex-direction: column; }
.tc-msgs { height: min(55vh, 520px); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.tc-msg { align-self: flex-start; max-width: 78%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 8px 12px; overflow-wrap: anywhere; }
.tc-msg.me { align-self: flex-end; background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.3); border-radius: 14px 14px 4px 14px; }
.tc-msg small { display: block; color: var(--dim); font-size: 10px; margin-top: 2px; }
.tc-msg-sys { align-self: center; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; padding: 4px 10px; background: rgba(255,255,255,.03); border-radius: 10px; }
.tc-compose { display: flex; gap: 8px; margin-top: 10px; }
.tc-server { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 14px; background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.3); }
.tc-server small { display: block; color: #86efac; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.tc-server b { font-size: 15px; }
.tc-link { color: #93c5fd; text-decoration: underline; word-break: break-all; }
/* Eigen bevestigingsdialoog */
.tc-confirm-box { max-width: 420px; }
.tc-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 20px 20px; }
.tc-btn-danger-solid { background: #dc2626; border-color: #dc2626; color: #fff; }
.tc-btn-danger-solid:hover { background: #b91c1c; }
#tc-confirm.tc { margin: 0; width: auto; }
/* Toast-meldingen */
.tc-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 200; max-width: min(92vw, 440px);
  padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.tc-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tc-toast-err { background: #2a1416; color: #fca5a5; border: 1px solid rgba(239,68,68,.4); }
.tc-toast-ok  { background: #10241a; color: #86efac; border: 1px solid rgba(34,197,94,.4); }

/* Fase 3: afronden, reviews, reputatie */
.tc-progress { border-color: rgba(59,130,246,.3); }
.tc-steps { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: s; }
.tc-steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.tc-steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); font-size: 11px; font-weight: 900; color: var(--muted); flex-shrink: 0; }
.tc-steps li.done { color: var(--text); }
.tc-steps li.done::before { content: '✓'; background: rgba(34,197,94,.2); color: var(--win); }
.tc-review { margin-bottom: 8px; }
.tc-review p { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.tc-stars { color: #facc15; letter-spacing: 2px; margin-right: 6px; }
.tc-star-pick { display: inline-flex; flex-direction: row-reverse; gap: 2px; margin-bottom: 8px; }
.tc-star-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tc-star-pick label { font-size: 30px; color: rgba(255,255,255,.15); cursor: pointer; line-height: 1; }
.tc-star-pick label:hover, .tc-star-pick label:hover ~ label, .tc-star-pick input:checked ~ label { color: #facc15; }
.tc-star-pick input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.tc-rep-big { display: flex; gap: 18px; }
.tc-rep-big div { text-align: center; }
.tc-rep-big b { display: block; font-size: 22px; font-weight: 900; font-style: italic; }
.tc-rep-big small { color: var(--dim); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }

/* Watchlist */
.tc-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.tc-chip-wrap { position: relative; }
.tc-chip-x { position: absolute; top: -6px; right: -6px; z-index: 3; margin: 0; }
.tc-chip-x button, .tc-row .tc-chip-x button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg);
  color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.tc-chip-x button:hover { color: #fca5a5; }
.tc-row .tc-chip-x { position: static; }
/* My trades: tegels niet te klein */
.tc-row .tc-tiles { grid-template-columns: repeat(4, 52px) !important; width: auto !important; }
