@import url('https://fonts.googleapis.com/css2?family=Anton&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #15151b;
  --surface: #1f1f28;
  --border: #34343f;
  --accent: #e8a33d;
  --accent-deep: #c97f1e;
  --text: #ece8de;
  --text-muted: #8c8a82;
  --font-display: 'Anton', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; }

.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 32px;
  border-bottom: 3px solid var(--border);
}
.wordmark { margin-right: auto; }
#nav-account { display: flex; align-items: center; gap: 24px; }   
#nav-center { grid-column: 2; justify-self: center; }


.nav-dropdown { position: relative; }
.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 16px;
  min-width: 220px;
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown-panel:hover { display: block; }

.nav-group-divider { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 8px; }

.wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--text);
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 24px;
  color: var(--text-muted);
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 16px;
  line-height: 1.1;
}

h1 { font-size: 40px; }
h2 { font-size: 26px; }
h3 { font-size: 18px; }

.card {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

.login-card { max-width: 400px; margin: 40px auto; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 640px) {
  .catalog-grid { grid-template-columns: 1fr; }
}

.game-card {
  background: var(--surface);
  border: 2px solid var(--border);
  position: relative;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-card::before {
  content: '';
  display: block;
  height: 6px;
  background: var(--accent);
  margin: -20px -20px 16px -20px;
}

.game-card h2 { font-size: 20px; margin-bottom: 4px; }
.game-card h2 a { color: var(--text); }
.game-card h2 a:hover { color: var(--accent); }
.game-card p { color: var(--text-muted); margin: 0; flex-grow: 1; }

.price-tag {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--border);
  display: inline-block;
  padding: 4px 10px;
  align-self: flex-start;
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 15px;
  margin-bottom: 16px;
}

input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 20px;
  cursor: pointer;
}
button:hover { background: var(--accent-deep); }
button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
button.secondary:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

.message { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }

.meta-row { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.meta-row strong { color: var(--text); }

@media (prefers-reduced-motion: no-preference) {
  .game-card { transition: transform 0.15s ease, border-color 0.15s ease; }
  .game-card:hover { transform: translateY(-3px); border-color: var(--accent); }
}

.table-toolbar {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.table-toolbar > div { flex: 0 0 auto; }
.table-toolbar input, .table-toolbar select { margin-bottom: 0; min-width: 220px; }

.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 2px solid var(--border);
}
.admin-table th, .admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.admin-table th {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.admin-table tr:hover td { background: rgba(232, 163, 61, 0.06); }
.admin-table input, .admin-table select {
  margin-bottom: 0;
  padding: 6px 8px;
  font-size: 13px;
}
.row-message {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-top: 4px;
}
.no-results {
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

.admin-page { max-width: 1200px; padding: 32px 32px 48px; }
.admin-page h1 { font-size: 26px; margin-bottom: 4px; }
.admin-page h2 { font-size: 18px; margin: 28px 0 10px; }
.admin-page .card { padding: 16px 20px; margin-bottom: 16px; }

.admin-page details.card summary {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
}
.admin-page details.card summary::-webkit-details-marker { display: none; }
.admin-page details.card summary::before { content: '+ '; }
.admin-page details.card[open] summary::before { content: '\2212 '; }

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 16px;
  margin-top: 14px;
}
.inline-form label { margin-bottom: 4px; }
.inline-form input, .inline-form select { margin-bottom: 0; }
.inline-form .field { display: flex; flex-direction: column; }
.inline-form .field.full-width { grid-column: 1 / -1; }
.inline-form .field.checkbox-field { flex-direction: row; align-items: center; }
.inline-form .field.checkbox-field input { width: auto; margin: 0 8px 0 0; }
.inline-form .field.checkbox-field label { margin-bottom: 0; }
.inline-form button { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }

/* Styled select dropdowns to match inputs */
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 36px 10px 12px;
  font-family: var(--font-body);
  font-size: 15px;
  margin-bottom: 16px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%238c8a82' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 7px;
  cursor: pointer;
}
select:hover { border-color: var(--accent); }
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.admin-table select {
  margin-bottom: 0;
  padding: 6px 28px 6px 8px;
  font-size: 13px;
  background-position: right 8px center;
}

/* Status badges — used for active/disabled/banned states */
.status-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  display: inline-block;
}
.status-badge.is-good { color: var(--accent); border-color: var(--accent); }
.status-badge.is-bad { color: #d8674f; border-color: #d8674f; }

/* Inline code/key display */
code {
  font-family: var(--font-mono);
  background: var(--bg);
  padding: 2px 6px;
  border: 1px solid var(--border);
  font-size: 13px;
}

/* Wider variant for tables with more columns */
.admin-page--wide { max-width: 1400px; }

.table-toolbar {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* === Admin shell layout === */
.admin-shell { display: flex; gap: 0; align-items: flex-start; }

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 2px solid var(--border);
  padding-right: 20px;
  margin-right: 32px;
  position: sticky;
  top: 24px;
}
.admin-sidebar h1 { font-size: 22px; margin-bottom: 4px; }
.admin-sidebar .role-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}

.nav-group { margin-bottom: 22px; }
.nav-group-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}
.nav-group a {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  padding: 7px 10px;
  margin-bottom: 2px;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-group a:hover { color: var(--accent); border-left-color: var(--border); background: rgba(232,163,61,0.05); }

.admin-main { flex: 1; min-width: 0; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card { background: var(--surface); border: 2px solid var(--border); padding: 16px; position: relative; }
.stat-card::before { content: ''; display: block; height: 4px; background: var(--accent); margin: -16px -16px 14px -16px; }
.stat-number { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--text); }
.stat-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-top: 6px; }
.stat-card.is-alert::before { background: #d8674f; }
.stat-card.is-alert .stat-number { color: #d8674f; }

.attention-list { list-style: none; margin: 0 0 28px; padding: 0; }
.attention-list li {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}
.attention-list li:last-child { border-bottom: none; }
.attention-empty { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 28px; }
.tool-card { background: var(--surface); border: 2px solid var(--border); padding: 16px 18px; display: block; text-decoration: none; color: var(--text); }
.tool-card:hover { border-color: var(--accent); text-decoration: none; }
.tool-card h3 { font-size: 15px; margin-bottom: 6px; color: var(--text); }
.tool-card .tool-icon { font-family: var(--font-mono); color: var(--accent); margin-right: 6px; }
.tool-card p { font-family: var(--font-body); font-size: 13px; color: var(--text-muted); margin: 0; }

@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 2px solid var(--border); padding-right: 0; margin: 0 0 24px; position: static; }
  .nav-group { display: inline-block; margin-right: 24px; vertical-align: top; }
}

.image-upload-area { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.image-preview { width: 280px; max-width: 100%; border: 2px solid var(--border); background: var(--bg); }
.image-preview img { display: block; width: 100%; height: auto; }
.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.screenshot-item { position: relative; border: 2px solid var(--border); background: var(--bg); }
.screenshot-item img { display: block; width: 100%; height: 110px; object-fit: cover; }
.screenshot-item button { position: absolute; top: 6px; right: 6px; padding: 4px 8px; font-size: 11px; }
.upload-btn-wrap { position: relative; display: inline-block; }
.upload-btn-wrap input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; font-family: var(--font-body); font-size: 15px; margin-bottom: 16px;
  min-height: 120px; resize: vertical;
}
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
}
.modal-box {
  background: var(--surface); border: 2px solid var(--border);
  width: 100%; max-width: 760px; max-height: 85vh;
  display: flex; flex-direction: column; padding: 24px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h2 { margin: 0; font-size: 20px; }
.modal-close { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 6px 12px; }
.modal-close:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.modal-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.modal-tab-btn {
  background: transparent; border: none; color: var(--text-muted);
  font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 1px;
  padding: 10px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.modal-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.modal-body { overflow-y: auto; flex: 1; }
.media-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media-picker-item { border: 2px solid var(--border); cursor: pointer; background: var(--bg); }
.media-picker-item:hover { border-color: var(--accent); }
.media-picker-item img { display: block; width: 100%; height: 90px; object-fit: cover; }
.media-picker-item .fname {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
  padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-dropzone { border: 2px dashed var(--border); padding: 32px; text-align: center; margin-bottom: 16px; }
.rename-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rename-row .image-preview { width: 80px; flex-shrink: 0; }
.rename-row .image-preview img { height: 80px; object-fit: cover; }
.rename-row .field { flex: 1; margin: 0; }

/* === Steam-style product page === */
.product-hero {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border);
  background: var(--surface);
}
.product-hero-wrap { position: relative; margin-bottom: 24px; }
.product-hero-overlay {
  position: absolute; left: 0; bottom: 0; right: 0;
  background: linear-gradient(to top, rgba(21,21,27,0.95), rgba(21,21,27,0));
  padding: 32px 24px 18px;
}
.product-hero-overlay h1 { margin-bottom: 4px; }
.product-hero-overlay .meta-row { margin: 0; }

.product-layout { display: flex; gap: 32px; align-items: flex-start; }
.product-main { flex: 2; min-width: 0; }
.product-side { flex: 1; max-width: 300px; flex-shrink: 0; position: sticky; top: 24px; }

@media (max-width: 860px) {
  .product-layout { flex-direction: column; }
  .product-side { max-width: 100%; position: static; width: 100%; }
}

.gallery-strip { display: flex; gap: 10px; overflow-x: auto; margin: 16px 0; padding-bottom: 4px; }
.gallery-thumb {
  width: 160px; height: 90px; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--border); cursor: pointer;
}
.gallery-thumb:hover { border-color: var(--accent); }

.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
}
.lightbox-overlay img { max-width: 100%; max-height: 85vh; border: 2px solid var(--border); }
.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  background: transparent; border: 1px solid var(--border); color: var(--text);
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: transparent; border: 1px solid var(--border); color: var(--text);
  font-size: 20px; padding: 14px 18px;
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 2px solid var(--border); margin: 16px 0; }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.sysreq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
@media (max-width: 640px) { .sysreq-grid { grid-template-columns: 1fr; } }
.sysreq-col h3 { font-size: 14px; color: var(--accent); margin-bottom: 8px; }
.sysreq-col pre {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  white-space: pre-wrap; margin: 0; line-height: 1.7;
}

.meta-table { font-family: var(--font-mono); font-size: 12px; margin-bottom: 4px; }
.meta-table .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
.meta-table .row:last-child { border-bottom: none; }
.meta-table .row span:first-child { color: var(--text-muted); }
.meta-table .row span:last-child { color: var(--text); text-align: right; }

.thumb-row { display: flex; align-items: center; gap: 14px; }
.thumb-row img {
  width: 96px; height: 54px; object-fit: cover;
  border: 2px solid var(--border); flex-shrink: 0;
}
.thumb-row .thumb-placeholder {
  width: 96px; height: 54px; flex-shrink: 0;
  background: var(--bg); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
}
.thumb-row .thumb-info { flex: 1; min-width: 0; }

.bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 2px solid var(--accent);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.bulk-bar.is-visible { display: flex; }
.bulk-bar .bulk-actions { display: flex; align-items: center; gap: 12px; }

tr.is-dirty td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.badge-toggle {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-block;
  margin: 2px;
}
.badge-toggle:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.badge-toggle.is-on { border-color: var(--accent); color: var(--accent); background: rgba(232,163,61,0.08); }
.flags-cell { display: flex; flex-wrap: wrap; gap: 2px; max-width: 220px; }

.table-thumb { width: 64px; height: 36px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; background: var(--bg); }
.table-thumb-placeholder {
  width: 64px; height: 36px; flex-shrink: 0; background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 9px; color: var(--text-muted);
}
.game-cell { display: flex; gap: 10px; align-items: center; }
.game-cell .game-fields { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.game-cell input { margin-bottom: 0; }

.game-card .card-thumb {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  margin: -20px -20px 14px -20px; display: block;
}
.game-card .card-thumb-placeholder {
  width: 100%; aspect-ratio: 16/9;
  margin: -20px -20px 14px -20px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
}
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; }
.card-tags .price-tag { font-size: 10px; padding: 2px 7px; }

.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.featured-grid .game-card .card-thumb,
.featured-grid .game-card .card-thumb-placeholder { aspect-ratio: 21/9; }
.featured-grid .game-card h2 { font-size: 24px; }
@media (max-width: 640px) { .featured-grid { grid-template-columns: 1fr; } }

.page--wide { max-width: 1200px; }

.friends-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
@media (max-width: 720px) { .friends-layout { grid-template-columns: 1fr; } }

.friends-sidebar { background: var(--surface); border: 2px solid var(--border); }
.friends-tabs { display: flex; border-bottom: 2px solid var(--border); }
.tab-btn {
  flex: 1; background: none; border: none; color: var(--text-muted);
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px; padding: 12px 8px; cursor: pointer; border-bottom: 3px solid transparent;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { padding: 8px 0; max-height: 480px; overflow-y: auto; }
.tab-panel .meta-row, .tab-panel .field { padding-left: 14px; padding-right: 14px; }

.conv-item { padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.conv-item:hover { background: rgba(232, 163, 61, 0.06); }
.conv-item.active { background: rgba(232, 163, 61, 0.12); }
.conv-main { min-width: 0; flex: 1; }
.conv-name { font-weight: 600; }
.conv-preview { color: var(--text-muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-badge { background: var(--accent); color: var(--bg); font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border-radius: 10px; margin-left: 6px; }
.conv-remove { display: none; background: none; border: none; color: var(--text-muted); font-family: var(--font-mono); font-size: 16px; cursor: pointer; line-height: 1; padding: 4px; }
.conv-item:hover .conv-remove { display: block; }
.conv-remove:hover { color: var(--accent); }

.chat-panel { min-height: 480px; display: flex; flex-direction: column; }
.thread { flex: 1; height: 420px; overflow-y: auto; padding: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 70%; padding: 10px 14px; border: 1px solid var(--border); }
.bubble.mine { align-self: flex-end; background: var(--accent); color: var(--bg); border-color: var(--accent); }
.bubble.theirs { align-self: flex-start; background: var(--bg); }
.bubble-time { font-family: var(--font-mono); font-size: 11px; opacity: 0.7; margin-top: 4px; }
.send-row { display: flex; gap: 10px; margin-top: 12px; }
.send-row input { margin-bottom: 0; }

.thread-row-title { font-weight: 600; font-size: 16px; color: var(--text); text-decoration: none; }
.thread-row-title:hover { color: var(--accent); }
.pin-flag, .lock-flag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); border: 1px solid var(--accent); padding: 2px 6px; margin-right: 6px; }
.tag-pill { display: inline-block; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border: 1px solid var(--border); padding: 3px 8px; margin: 8px 6px 0 0; }
.badge-pill { display: inline-block; font-family: var(--font-mono); font-size: 10px; color: var(--bg); background: var(--accent); padding: 1px 6px; margin-left: 6px; }
.reply-actions { display: flex; gap: 10px; margin-top: 12px; }
.reply-actions button.liked { color: var(--accent); border-color: var(--accent); }