:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --panel2: #1a2438;
  --border: #2a3650;
  --text: #e8eef7;
  --muted: #93a0b8;
  --accent: #5eead4;
  --accent2: #38bdf8;
  --good: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #1a2a44 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent2); }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  background: rgba(10,16,28,.85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; letter-spacing: .02em; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; color: #06201c; font-size: 1rem;
}
.nav { display: flex; gap: .5rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--muted); padding: .4rem .75rem; border-radius: 999px;
  border: 1px solid transparent;
}
.nav a:hover, .nav a.active { color: var(--text); border-color: var(--border); background: var(--panel2); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.card h2 { margin: 0 0 .75rem; font-size: 1.05rem; }
.muted { color: var(--muted); font-size: .9rem; }
label { display: block; font-size: .8rem; color: var(--muted); margin: .55rem 0 .25rem; }
input, textarea, select, button {
  font: inherit; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); padding: .55rem .7rem; width: 100%;
}
textarea { min-height: 72px; resize: vertical; }
button { cursor: pointer; font-weight: 600; }
button.primary {
  background: linear-gradient(135deg, #2dd4bf, #22d3ee); color: #042f2e; border: 0;
}
button.good { background: #065f46; border-color: #047857; color: #ecfdf5; }
button.bad { background: #7f1d1d; border-color: #991b1b; color: #fef2f2; }
button.ghost { background: transparent; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.thread {
  height: 420px; overflow: auto; display: flex; flex-direction: column; gap: .55rem;
  padding: .5rem; background: #0a101c; border-radius: 12px; border: 1px solid var(--border);
}
.bubble {
  max-width: 85%; padding: .6rem .8rem; border-radius: 14px; white-space: pre-wrap;
  line-height: 1.4; font-size: .92rem;
}
.bubble.in { align-self: flex-end; background: #1e3a5f; border-bottom-right-radius: 4px; }
.bubble.out { align-self: flex-start; background: #1f2937; border-bottom-left-radius: 4px; }
.bubble .meta { font-size: .7rem; opacity: .6; margin-top: .25rem; }
.bubble img { max-width: 180px; border-radius: 8px; display: block; margin-top: .35rem; }
.pill {
  display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600;
}
.pill.pending { background: #422006; color: var(--warn); }
.pill.accepted { background: #064e3b; color: var(--good); }
.pill.rejected { background: #450a0a; color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: rgba(255,255,255,.02); }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.flash {
  padding: .65rem .8rem; border-radius: 10px; margin-bottom: .75rem;
  background: #0c2a2a; border: 1px solid #134e4a; color: #99f6e4; font-size: .9rem;
}
.flash.err { background: #2a1212; border-color: #7f1d1d; color: #fecaca; }
.bal {
  font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); font-size: 1.25rem;
}
.detail-grid { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; }
@media (max-width: 700px) { .detail-grid { grid-template-columns: 1fr; } }
.preview { width: 100%; max-height: 320px; object-fit: contain; background: #000; border-radius: 10px; }
.flags { display: flex; flex-wrap: wrap; gap: .3rem; }
.flag { background: #243044; padding: .15rem .45rem; border-radius: 6px; font-size: .72rem; color: var(--muted); }
