:root {
  --bg: #0a0a0a;
  --panel: #131519;
  --muted: #9aa4b2;
  --text: #ffffff;
  --brand: #dc143c; /* crimson */
  --brand-2: #ff1744; /* brighter crimson */
  --ok: #23b665;
  --warn: #ffb703;
  --err: #ff5c5c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}
.cms-header {
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.9), transparent);
  border-bottom: 1px solid rgba(220, 20, 60, 0.15);
}
.cms-header h1 {
  margin: 0;
  font-size: 20px;
  background: linear-gradient(45deg, var(--brand), #b22222);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cms-nav {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}
.nav-btn {
  background: #15171c;
  color: var(--text);
  border: 1px solid #24262c;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
.nav-btn:hover {
  border-color: rgba(220, 20, 60, 0.5);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.12);
}
.nav-btn.active {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  border-color: rgba(220, 20, 60, 0.8);
}
.cms-main {
  padding: 16px 0;
}
.tab {
  display: none;
}
.tab.active {
  display: block;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.toolbar .spacer {
  flex: 1 1 auto;
}
.quick-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}
.quick-filters input,
.quick-filters select {
  background: #0f1216;
  color: var(--text);
  border: 1px solid #24262c;
  border-radius: 8px;
  padding: 8px 10px;
}
.btn {
  background: #15171c;
  color: var(--text);
  border: 1px solid #24262c;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  border-color: rgba(220, 20, 60, 0.8);
}
.btn.success {
  background: linear-gradient(180deg, #23b665, #159c53);
  border-color: #2ab573;
}
.btn.danger {
  background: linear-gradient(180deg, #e53935, #b71c1c);
  border-color: #e53935;
}
.btn:hover {
  transform: translateY(-1px);
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}
.btn.xs {
  padding: 6px 10px;
  font-size: 12px;
}
.list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.card {
  background: var(--panel);
  border: 1px solid #1d2026;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 160ms ease, border-color 160ms ease,
    transform 160ms ease;
}
.card-header {
  padding: 10px 12px;
  border-bottom: 1px solid #20242c;
}
.card-header .title {
  font-weight: 600;
}
.card-header .meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.card-body {
  padding: 12px;
  color: #c7d2e0;
  font-size: 14px;
}
.card-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #20242c;
}
.card-comments {
  padding: 10px 12px 12px;
  border-top: 1px dashed #20242c;
}
.card-comments .card {
  margin-top: 8px;
}
.badge {
  display: inline-block;
}
.badge-steam {
  margin-right: 6px;
  background: #0b2236;
  color: #9cd2ff;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  border: 1px solid #11314d;
}
.badge-roadmap {
  margin-right: 6px;
  background: #23200f;
  color: #ffe08a;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  border: 1px solid #3a2f12;
}
.badge-featured {
  margin-right: 6px;
  background: #2c0f14;
  color: #ff8aa0;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  border: 1px solid #4a1a23;
}
.badge-status {
  margin-right: 6px;
  background: #0f1216;
  color: #c9cfda;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  border: 1px solid #2a2e36;
  text-transform: capitalize;
}
.badge-status.status-draft {
  color: #ffb703;
  border-color: #5b4014;
}
.badge-status.status-published {
  color: #a3ffb3;
  border-color: #2f5a2f;
}
.badge-qa {
  margin-left: 6px;
  background: #8b1f2f;
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
}
.badge-dev {
  margin-left: 6px;
  background: #1f6f8b;
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
}
.card:hover {
  border-color: rgba(220, 20, 60, 0.35);
  box-shadow: 0 8px 28px rgba(220, 20, 60, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}
.dialog-form {
  min-width: 70vw;
  background: var(--panel);
  color: var(--text);
  border: 1px solid #252931;
  border-radius: 12px;
  padding: 16px;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row.full {
  grid-column: 1/-1;
}
input[type='text'],
input[type='number'],
input[type='datetime-local'],
textarea {
  background: #0f1216;
  color: var(--text);
  border: 1px solid #24262c;
  border-radius: 8px;
  padding: 8px;
}
/* Dropdowns (select) */
select {
  background: #0f1216;
  color: var(--text);
  border: 1px solid #24262c;
  border-radius: 8px;
  padding: 8px 28px 8px 10px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5' fill='none' stroke='%23c9cfda' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 12px;
}
select:focus {
  outline: none;
  border-color: rgba(220, 20, 60, 0.6);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.18);
}
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
select option {
  background: #0f1216;
  color: var(--text);
}
input[type='text']:focus,
input[type='number']:focus,
input[type='datetime-local']:focus,
textarea:focus {
  outline: none;
  border-color: rgba(220, 20, 60, 0.6);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.18);
}
label {
  font-size: 12px;
  color: var(--muted);
}
.info {
  color: #c9cfda;
  background: #121418;
  border: 1px dashed rgba(220, 20, 60, 0.35);
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
}
.info.small {
  font-size: 12px;
}
.log {
  margin-top: 10px;
  white-space: pre-wrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: #cfe3ff;
}

/* Steam / Panels */
.steam-panel {
  background: var(--panel);
  border: 1px solid #1d2026;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

/* Progress panel */
.progress-bar {
  height: 10px;
  background: #0f1216;
  border: 1px solid #24262c;
  border-radius: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
}

/* Kanban (Steam-like roadmap) */
.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.kanban-col {
  background: #0f1216;
  border: 1px solid #24262c;
  border-radius: 10px;
  padding: 10px;
}
.kanban-header {
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 8px;
}
.kanban-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  border: 1px dashed transparent;
}
.kanban-card {
  background: #121418;
  border: 1px solid #252931;
  border-radius: 8px;
  padding: 8px 10px;
}
.kanban-list.drag-over {
  border-color: rgba(220, 20, 60, 0.4);
  background: rgba(220, 20, 60, 0.05);
}
.kanban-card .title {
  font-weight: 600;
}
.kanban-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.kanban-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.tag {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid #2a2e36;
  background: #0b0e12;
}
.tag.gameplay {
  color: #8be9fd;
  border-color: #224e66;
}
.tag.content {
  color: #ffd166;
  border-color: #5b4920;
}
.tag.performance {
  color: #aaffaa;
  border-color: #2f5a2f;
}
.tag.multiplayer {
  color: #ff99c8;
  border-color: #5a294a;
}
.tag.uiux {
  color: #c3b1e1;
  border-color: #403a54;
}

/* Toasts */
#toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.toast {
  background: #15171c;
  color: var(--text);
  border: 1px solid #24262c;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast-success {
  border-color: rgba(35, 182, 101, 0.6);
}
.toast-error {
  border-color: rgba(229, 57, 53, 0.8);
}
.toast-info {
  border-color: rgba(220, 20, 60, 0.5);
}

.wys-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.wys-toolbar button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
}
.wys-toolbar button:hover {
  background: rgba(255, 255, 255, 0.06);
}
.wys-editor {
  min-height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px;
}
.upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gallery-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gallery-list .thumb {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}
.gallery-list .thumb img {
  display: block;
  max-height: 68px;
}
.gallery-list .thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
}
.gallery-list .thumb {
  width: 120px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1216;
}
.gallery-list .thumb img {
  max-width: 120px;
  max-height: 80px;
  object-fit: cover;
}
