/* Astra RP · Discord Activity — bug reports UI */
:root {
  --bg: #1a1b1e;
  --panel: #232428;
  --panel-2: #2b2d31;
  --panel-3: #313338;
  --border: #3f4147;
  --border-soft: #35373c;
  --text: #f2f3f5;
  --muted: #b5bac1;
  --dim: #80848e;
  --gold: #f0b232;
  --gold-dark: #c88c1d;
  --blurple: #5865f2;
  --success: #23a559;
  --warn: #f0b232;
  --danger: #da373c;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "gg sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--blurple); text-decoration: none; }
a:hover { text-decoration: underline; }
.is-hidden { display: none !important; }

/* Boot */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 50% 30%, #2b2d31, #16171a 70%);
}
.boot__logo {
  width: 64px; height: 64px; border-radius: 20px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), #ffd479);
  color: #1a1b1e; font-size: 34px; font-weight: 800;
  box-shadow: 0 8px 30px rgba(240,178,50,.25);
}
.boot__spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}
.boot p { color: var(--muted); margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Shell */
.app { display: flex; height: 100vh; }
.sidebar {
  width: 244px; flex: 0 0 244px; background: var(--panel);
  display: flex; flex-direction: column; padding: 18px 12px 14px;
  border-right: 1px solid var(--border-soft);
}
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 20px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), #ffd479); color: #1a1b1e;
  font-weight: 800; font-size: 22px;
}
.sidebar__brand strong { display: block; font-size: 15px; letter-spacing: .2px; }
.sidebar__brand span { display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .8px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav__item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); text-align: left;
  font-weight: 500; transition: background .15s, color .15s;
}
.nav__item:hover { background: var(--panel-3); color: var(--text); }
.nav__item.is-active { background: rgba(240,178,50,.14); color: var(--gold); }
.nav__icon { width: 20px; text-align: center; font-size: 17px; opacity: .9; }
.nav__badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; display: none; place-items: center;
}
.nav__badge.has-value { display: grid; }
.is-admin-only { display: none; }
body.is-admin .is-admin-only { display: flex; }

.sidebar__footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.reward-pill {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: rgba(240,178,50,.09); border: 1px solid rgba(240,178,50,.22);
  border-radius: 9px; padding: 9px 10px; margin-bottom: 10px; font-size: 12px; color: var(--muted);
}
.reward-pill strong { color: var(--gold); font-size: 15px; }
.reward-pill .coin { font-size: 16px; }
.reward-pill span:last-child { flex: 1 0 100%; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 6px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blurple); display: grid; place-items: center; font-weight: 700; font-size: 13px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-chip__name { font-size: 13px; font-weight: 600; }
.user-chip__sub { font-size: 11px; color: var(--dim); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; flex: 0 0 56px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-soft); background: var(--panel);
}
.topbar__title { font-weight: 700; font-size: 15px; }
.topbar__actions { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 18px;
}
.icon-btn:hover { background: var(--panel-3); color: var(--text); }
.view { flex: 1; overflow-y: auto; padding: 26px 28px 60px; }
.view::-webkit-scrollbar { width: 9px; }
.view::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 6px; }

/* Typography & cards */
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.3px; }
.page-head p { margin: 0; color: var(--muted); max-width: 720px; }
.card {
  background: var(--panel-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 20px;
}
.card + .card { margin-top: 14px; }
.card__title { font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.divider { height: 1px; background: var(--border-soft); margin: 18px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border: 0; border-radius: 8px;
  background: var(--gold); color: #17181b; font-weight: 700; font-size: 13px;
  transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn--secondary { background: var(--panel-3); color: var(--text); }
.btn--ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn--danger { background: rgba(218,55,60,.15); color: #ff8085; }
.btn--sm { padding: 6px 11px; font-size: 12px; }
.btn--block { width: 100%; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 7px; }
.field__hint { font-size: 12px; color: var(--dim); margin-top: 5px; }
.input, .textarea, .select {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  background: #1e1f22; border: 1px solid var(--border);
  color: var(--text); outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(240,178,50,.14); }
.textarea { min-height: 120px; resize: vertical; }
.textarea--tall { min-height: 170px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

/* Status badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700;
  background: var(--panel-3); color: var(--muted); white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--new { background: rgba(88,101,242,.16); color: #a5adff; }
.badge--in_progress { background: rgba(240,178,50,.15); color: var(--gold); }
.badge--accepted, .badge--fixed { background: rgba(35,165,89,.16); color: #5fd99b; }
.badge--rejected { background: rgba(218,55,60,.14); color: #ff8b8f; }
.badge--duplicate { background: rgba(128,132,142,.18); color: var(--muted); }
.badge--known { background: rgba(88,101,242,.16); color: #a5adff; }

/* Home */
.hero {
  background: linear-gradient(120deg, rgba(240,178,50,.14), rgba(88,101,242,.1)), var(--panel-2);
  border: 1px solid rgba(240,178,50,.22); border-radius: 16px; padding: 26px;
  margin-bottom: 18px;
}
.hero h1 { margin: 0 0 8px; font-size: 27px; }
.hero p { margin: 0 0 18px; color: var(--muted); max-width: 700px; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.info-list { display: flex; flex-direction: column; gap: 11px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; }
.info-row__icon { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: var(--panel-3); display: grid; place-items: center; }
.info-row strong { display: block; font-size: 13px; }
.info-row span { color: var(--muted); font-size: 13px; }
.stat { background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 16px; }
.stat__value { font-size: 26px; font-weight: 800; }
.stat__label { color: var(--dim); font-size: 12px; }
.notice {
  border-left: 3px solid var(--gold); background: rgba(240,178,50,.08);
  padding: 12px 14px; border-radius: 0 8px 8px 0; font-size: 13px; color: var(--muted);
}
.notice--danger { border-color: var(--danger); background: rgba(218,55,60,.08); }

/* Wizard */
.stepper { display: flex; gap: 6px; margin-bottom: 22px; }
.stepper__item {
  flex: 1; height: 5px; border-radius: 4px; background: var(--border);
  position: relative;
}
.stepper__item.is-done { background: var(--gold); }
.stepper__item.is-current { background: var(--gold); box-shadow: 0 0 0 2px rgba(240,178,50,.2); }
.stepper__labels { display: flex; gap: 6px; margin: -12px 0 22px; }
.stepper__labels span { flex: 1; font-size: 11px; color: var(--dim); }
.stepper__labels span.is-current { color: var(--gold); font-weight: 700; }
.wizard-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.upload-zone {
  border: 2px dashed var(--border); border-radius: 10px; padding: 26px;
  text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.is-drag { border-color: var(--gold); background: rgba(240,178,50,.06); }
.upload-zone input { display: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.thumb { width: 112px; height: 84px; border-radius: 8px; overflow: hidden; position: relative; background: #1e1f22; border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__remove { position: absolute; top: 3px; right: 3px; width: 21px; height: 21px; border: 0; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; line-height: 1; }
.dup-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px;
  border: 1px solid var(--border); border-radius: 9px; margin-bottom: 9px; cursor: pointer;
}
.dup-item:hover { border-color: var(--gold); }
.dup-item input { margin-top: 4px; accent-color: var(--gold); }
.dup-item__score { margin-left: auto; font-size: 11px; color: var(--dim); }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 16px; }
.radio-row label { display: flex; gap: 7px; align-items: center; cursor: pointer; }
.radio-row input { accent-color: var(--gold); }

/* Report list & detail */
.list { display: flex; flex-direction: column; gap: 10px; }
.report-card {
  display: block; width: 100%; text-align: left;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 15px 17px; color: var(--text);
  transition: border-color .15s, transform .1s;
}
.report-card:hover { border-color: var(--gold); transform: translateX(2px); }
.report-card__top { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.report-card__id { font: 12px ui-monospace, Consolas, monospace; color: var(--gold); }
.report-card__title { font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.report-card__meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--dim); font-size: 11px; }
.report-card__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

.detail-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.detail-head h1 { margin: 0 0 6px; font-size: 21px; }
.detail-head__id { font: 12px ui-monospace, Consolas, monospace; color: var(--gold); }
.detail-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.detail-meta span { background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 6px; padding: 4px 9px; font-size: 12px; color: var(--muted); }
.detail-section { margin-bottom: 20px; }
.detail-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); margin: 0 0 8px; }
.detail-section p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.shot-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.shot-grid a { display: block; width: 180px; height: 120px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.shot-grid img { width: 100%; height: 100%; object-fit: cover; }

.chat { border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; background: var(--panel); }
.chat__head { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.chat__body { max-height: 440px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat__body::-webkit-scrollbar { width: 7px; }
.chat__body::-webkit-scrollbar-thumb { background: #16171a; border-radius: 5px; }
.msg { display: flex; gap: 10px; }
.msg__avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--blurple); }
.msg--admin .msg__avatar { background: var(--success); }
.msg--system .msg__avatar { background: var(--panel-3); color: var(--gold); }
.msg__body { min-width: 0; }
.msg__author { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.msg--admin .msg__author { color: var(--success); }
.msg--system .msg__author { color: var(--gold); }
.msg__text { font-size: 13px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.msg__time { font-size: 10px; color: var(--dim); margin-top: 3px; }
.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border-soft); }
.chat__form input { flex: 1; }

/* Known bugs */
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar .input { max-width: 320px; }
.kb-card { display: flex; gap: 14px; align-items: flex-start; }
.kb-card__icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: rgba(240,178,50,.12); color: var(--gold); display: grid; place-items: center; font-size: 18px; }
.kb-card h3 { margin: 0 0 5px; font-size: 15px; }
.kb-card p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.kb-card__meta { color: var(--dim); font-size: 11px; }

/* Admin */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--border-soft); }
.tab { padding: 9px 13px; border: 0; background: transparent; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tab.is-active { color: var(--gold); border-color: var(--gold); }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.table th { color: var(--dim); font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: .5px; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form .field { flex: 1; min-width: 130px; margin: 0; }

/* Toast */
.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 240px; max-width: 380px; padding: 11px 14px; border-radius: 9px;
  background: var(--panel-3); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 13px; animation: toast-in .2s ease-out;
}
.toast--ok { border-left: 3px solid var(--success); }
.toast--error { border-left: 3px solid var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Empty state */
.empty { text-align: center; padding: 54px 20px; color: var(--dim); }
.empty__icon { font-size: 40px; margin-bottom: 10px; opacity: .7; }
.empty h3 { color: var(--text); margin: 0 0 6px; }

/* Blocked / no Discord */
.gate { max-width: 520px; margin: 8vh auto; text-align: center; }
.gate__icon { font-size: 56px; margin-bottom: 14px; }
.gate h1 { font-size: 25px; margin: 0 0 10px; }
.gate p { color: var(--muted); }
.gate__steps { text-align: left; margin: 22px 0; }

@media (max-width: 860px) {
  .sidebar { width: 68px; flex-basis: 68px; padding: 14px 8px; }
  .sidebar__brand > div:last-child, .nav__item:not(.is-active) span:not(.nav__icon), .sidebar__footer .reward-pill span:last-child { display: none; }
  .nav__item { justify-content: center; font-size: 0; gap: 0; padding: 12px 0; }
  .nav__icon { font-size: 20px; }
  .nav__badge { position: absolute; margin: -18px -18px 0 0; }
  .user-chip__name, .user-chip__sub { display: none; }
  .reward-pill { justify-content: center; }
  .reward-pill span:last-child { display: none; }
  .view { padding: 18px 14px 50px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}
