/* Painel administrativo PixRush — design system extraído das capturas do vídeo de referência. */

:root {
  --bg: #060d1b;
  --bg-soft: #081223;
  --panel: #0b1626;
  --panel-2: #0d1b2e;
  --panel-3: #101f35;
  --line: #1c2b42;
  --line-soft: #16263c;
  --line-strong: #27395a;

  --text: #ffffff;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --text-4: #64748b;

  --accent: #2dd4e6;
  --accent-strong: #22d3ee;
  --accent-dim: rgba(45, 212, 230, 0.12);
  --accent-line: rgba(45, 212, 230, 0.45);
  --on-accent: #04212a;

  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.14);
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.16);
  --orange: #f59e0b;
  --orange-dim: rgba(245, 158, 11, 0.14);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.14);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --sidebar-w: 248px;
  --header-h: 64px;

  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ============ LOGIN ============ */
.auth-cover {
  position: fixed; inset: 0; z-index: 60;
  background: radial-gradient(1200px 600px at 50% -10%, #0d2340 0%, var(--bg) 60%);
  display: grid; place-items: center; padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.auth-card img { max-height: 56px; margin-bottom: 20px; }
.auth-card h1 { font-size: 24px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.02em; }
.auth-card p { color: var(--text-3); margin: 0 0 24px; font-size: 13px; }
.auth-error { color: #fca5a5; font-size: 13px; min-height: 20px; margin-top: 12px; }
.auth-hint { color: var(--text-4); font-size: 12px; margin-top: 18px; line-height: 1.6; }

/* ============ SHELL ============ */
.shell { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: width .18s ease, flex-basis .18s ease;
}
body.nav-collapsed .sidebar { width: 74px; flex-basis: 74px; }

.sidebar-brand {
  height: var(--header-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.sidebar-brand img { height: 38px; width: auto; max-width: 150px; object-fit: contain; }
.icon-collapse {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text-3);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: grid; place-items: center;
}
.icon-collapse:hover { color: var(--text); border-color: var(--accent-line); }

.sidebar nav { flex: 1 1 auto; overflow-y: auto; padding: 12px 10px 16px; }
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-thumb { background: #1d2c44; border-radius: 3px; }

.nav-group {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--text-4);
  margin: 18px 10px 8px;
  text-transform: uppercase;
}
.nav-group:first-child { margin-top: 4px; }

.nav-item {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px;
  margin-bottom: 2px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item .ico {
  width: 20px; height: 20px; flex: 0 0 20px;
  display: grid; place-items: center;
  color: var(--text-3);
}
.nav-item .ico svg { width: 17px; height: 17px; }
.nav-item .navtext { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item.active {
  background: var(--accent-dim);
  border-color: var(--accent-line);
  color: var(--text);
}
.nav-item.active .ico { color: var(--accent); }
.nav-badge {
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--green-dim); color: var(--green);
}
.nav-badge.zero { background: var(--panel-3); color: var(--text-4); }

.sidebar-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text-3);
}
.sidebar-foot a:hover { color: var(--accent); }

body.nav-collapsed .navtext,
body.nav-collapsed .nav-badge,
body.nav-collapsed .nav-group,
body.nav-collapsed .sidebar-foot span { display: none; }
body.nav-collapsed .sidebar-brand img { max-width: 40px; }
body.nav-collapsed .nav-item { justify-content: center; padding: 10px 6px; }
body.nav-collapsed .sidebar-foot { text-align: center; padding: 14px 0; }

/* ============ WORKSPACE / HEADER ============ */
.workspace { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--header-h);
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 12.5px; color: var(--text-4); text-transform: uppercase; letter-spacing: .06em; }
.crumb b { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 13.5px; }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.api-state { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); }
.api-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(34,197,94,.7); }
.api-dot.off { background: var(--orange); box-shadow: 0 0 8px rgba(245,158,11,.6); }

.profile-chip { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.profile-chip .avatar {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #0ea5b7);
  color: var(--on-accent); font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
}
.profile-chip b { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.profile-chip small { display: block; font-size: 11px; color: var(--text-4); }

main.content { flex: 1 1 auto; padding: 26px 28px 56px; max-width: 1720px; width: 100%; }

/* ============ PAGE HEADING ============ */
.notice {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px;
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 26px;
}
.notice b, .notice strong { color: var(--accent); font-weight: 700; }
.notice.warn { background: var(--orange-dim); border-color: rgba(245,158,11,.35); color: #fcd9a0; }
.notice.warn b { color: #fbbf24; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 24px;
}
.eyebrow {
  font-size: 11.5px; font-weight: 800; letter-spacing: .16em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 8px;
}
.page-head h1 { font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 8px; }
.page-head p { color: var(--text-3); margin: 0; font-size: 14px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex: 0 0 auto; padding-top: 6px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, opacity .12s ease;
}
.btn:hover { border-color: var(--accent-line); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { background: #67e8f9; border-color: #67e8f9; }
.btn-ghost { background: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 46px; width: 100%; }
.btn-danger { border-color: rgba(239,68,68,.45); color: #fca5a5; }

/* ============ PERIOD TABS ============ */
.period-tabs {
  display: flex; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); overflow: hidden; margin-bottom: 18px;
}
.period-tabs button {
  flex: 1 1 0; height: 46px; background: transparent; border: 0;
  border-left: 1px solid var(--line-soft);
  color: var(--text-3); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.period-tabs button:first-child { border-left: 0; }
.period-tabs button:hover { background: var(--panel-2); color: var(--text-2); }
.period-tabs button.active {
  background: var(--panel-3); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.range-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 18px;
}
.range-row b { color: var(--text); }
.range-row span { color: var(--text-4); font-size: 13px; }
.range-side { color: var(--text-4); font-size: 12.5px; text-align: right; white-space: nowrap; }

/* ============ CARDS ============ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.card + .card { margin-top: 20px; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.card-head .eyebrow { margin-bottom: 6px; }
.card-head h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.015em; }
.card-head p { color: var(--text-3); margin: 0; font-size: 13px; }
.card-meta { color: var(--text-4); font-size: 12.5px; white-space: nowrap; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1280px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .metrics { grid-template-columns: 1fr; } }

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.metric.featured { border-color: var(--accent-line); }
.metric-label { color: var(--text-3); font-size: 13.5px; margin-bottom: 14px; }
.metric-value { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.metric-value.accent { color: var(--accent); }
.metric-note { color: var(--text-4); font-size: 12px; line-height: 1.6; }
.metric-chip {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-dim); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.metric-chip svg { width: 20px; height: 20px; }

.metric-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); overflow: hidden; margin-top: 16px;
}
.metric-strip > div { padding: 18px 20px; border-left: 1px solid var(--line-soft); }
.metric-strip > div:first-child { border-left: 0; }
.metric-strip .label { color: var(--text-3); font-size: 13px; margin-bottom: 8px; }
.metric-strip .value { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.metric-strip .note { color: var(--text-4); font-size: 11.5px; margin-top: 6px; }

/* ============ NUMBERED SECTION ============ */
.section-head { display: flex; align-items: center; gap: 14px; margin: 34px 0 18px; }
.section-num {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--accent); background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: 8px; padding: 5px 8px; line-height: 1;
}
.section-head h2 { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.section-head p { color: var(--text-3); margin: 4px 0 0; font-size: 13px; }

/* ============ CHART ============ */
.chart-legend { display: flex; gap: 20px; align-items: center; margin-bottom: 14px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.chart-legend i { width: 18px; height: 3px; border-radius: 2px; background: var(--accent); display: inline-block; }
.chart-legend i.alt { background: var(--orange); }
.chart { position: relative; height: 220px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis-label { fill: var(--text-4); font-size: 11px; }

/* ============ FORMS ============ */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; }
@media (max-width: 1100px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.field.span-2 { grid-column: 1 / -1; }
.field.span-half { grid-column: span 1; }
@media (max-width: 1100px) { .field.span-half { grid-column: 1 / -1; } }

.field label, .field .label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-2); margin-bottom: 8px;
}
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 13px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 230, 0.14);
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.help { color: var(--text-4); font-size: 12px; margin-top: 7px; line-height: 1.55; }

.switch-row {
  display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 13px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  cursor: pointer; user-select: none;
}
.switch {
  width: 40px; height: 22px; border-radius: 999px;
  background: #33415c; position: relative; flex: 0 0 40px;
  transition: background .15s ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #dbe6f5; transition: transform .15s ease;
}
.switch-row.on .switch { background: var(--green); }
.switch-row.on .switch::after { transform: translateX(18px); }
.switch-row span { font-size: 13.5px; font-weight: 600; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ============ FILTER BAR ============ */
.filters {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px;
}
.filters-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters-row .field { flex: 1 1 220px; min-width: 0; }
.filters-row .field.grow { flex: 3 1 320px; }
.filters-row .field.narrow { flex: 0 0 180px; }
.filters-row .field .label:empty { display: none; }
.filters-actions { display: flex; gap: 10px; margin-left: auto; }

/* ============ TABLES ============ */
.table-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 14px 16px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--text-4); text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--panel-2);
}
table.data td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-2); vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--panel-2); }
table.data .num { color: var(--text-4); width: 40px; }
.cell-main { display: flex; align-items: center; gap: 12px; }
.cell-avatar {
  width: 36px; height: 36px; border-radius: 9px; flex: 0 0 36px;
  background: linear-gradient(135deg, var(--accent), #0ea5b7);
  color: var(--on-accent); font-weight: 800; font-size: 12.5px;
  display: grid; place-items: center;
}
.cell-name { color: var(--text); font-weight: 600; }
.cell-sub { color: var(--text-4); font-size: 12px; margin-top: 2px; }
.money { color: var(--green); font-weight: 700; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 11.5px; color: var(--accent); }
.nowrap { white-space: nowrap; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--text-4); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.green { background: var(--green-dim); color: var(--green); }
.pill.purple { background: var(--purple-dim); color: var(--purple); }
.pill.orange { background: var(--orange-dim); color: var(--orange); }
.pill.red { background: var(--red-dim); color: var(--red); }
.pill.cyan { background: var(--accent-dim); color: var(--accent); }
.pill.plain { background: var(--panel-3); color: var(--text-3); }
.pill.plain::before { display: none; }

/* ============ TABS (segmented) ============ */
.seg-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.seg-tab {
  height: 36px; padding: 0 16px;
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: 9px; color: var(--text-3);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.seg-tab:hover { color: var(--text); border-color: var(--accent-line); }
.seg-tab.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ============ RADIO CARDS ============ */
.radio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .radio-cards { grid-template-columns: 1fr; } }
.radio-card {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 16px; cursor: pointer; background: var(--panel-2);
  transition: border-color .12s ease, background .12s ease;
}
.radio-card:hover { border-color: var(--accent-line); }
.radio-card.active { border-color: var(--accent); background: var(--accent-dim); }
.radio-card .radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--text-4); display: inline-grid; place-items: center;
  margin-right: 10px; vertical-align: -2px;
}
.radio-card.active .radio { border-color: var(--accent); }
.radio-card.active .radio::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.radio-card b { font-size: 14px; }
.radio-card p { color: var(--text-4); font-size: 12.5px; margin: 6px 0 0 26px; }

/* ============ COLOR ============ */
.color-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.color-swatch-input {
  width: 54px; height: 42px; padding: 3px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.color-hex { width: 190px; }
.color-preview { display: flex; height: 42px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-strong); flex: 1 1 320px; min-width: 260px; }
.color-preview span { flex: 1 1 0; }
.color-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .color-grid { grid-template-columns: 1fr; } }
.color-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--panel-2); }
.color-card .title { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.color-card .row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.color-card .sw { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line-strong); flex: 0 0 36px; }

/* ============ TEXT EDITORS ============ */
.text-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--panel-2); }
.text-card .title { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.text-card .src { color: var(--text-4); font-size: 11.5px; margin-top: 10px; font-family: var(--mono); }

/* ============ GAME CARDS ============ */
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1400px) { .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .game-grid { grid-template-columns: 1fr; } }
.game-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); display: flex; flex-direction: column; }
.game-card.published { border-color: var(--green); }
.game-card .cover { position: relative; aspect-ratio: 16 / 9; background: var(--bg); overflow: hidden; }
.game-card .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-card .badge-fallback {
  position: absolute; top: 10px; right: 10px;
  background: var(--orange-dim); color: var(--orange);
  font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
}
.game-card .body { padding: 16px; flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; }
.game-card .body h4 { margin: 0; font-size: 15px; font-weight: 700; }
.game-card .body p { margin: 0; color: var(--text-4); font-size: 12px; line-height: 1.5; }
.game-card .body .btn { width: 100%; }

/* ============ MODAL ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(2, 8, 20, .78);
  display: grid; place-items: center; padding: 24px;
  backdrop-filter: blur(2px);
}
.modal {
  width: min(920px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal-head h3 { margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.modal-head p { margin: 0; color: var(--text-3); font-size: 13px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 32px;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  color: var(--text-3); cursor: pointer; font-size: 16px; line-height: 1;
}
.modal-close:hover { color: var(--text); border-color: var(--accent-line); }

/* ============ TOAST ============ */
.toast-host { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--panel-3); border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 12px 16px; font-size: 13px;
  box-shadow: 0 12px 34px rgba(0,0,0,.5); max-width: 360px;
}
.toast.error { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }

.proto-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--orange-dim); color: var(--orange);
  border: 1px solid rgba(245,158,11,.35);
  border-radius: 999px; padding: 5px 12px; font-size: 11.5px; font-weight: 700;
}

/* ============ Suporte Chat (dois painéis) ============ */
.chat-pane {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 520px;
}
@media (max-width: 1100px) { .chat-pane { grid-template-columns: 1fr; } }
.chat-list { border-right: 1px solid var(--line); padding: 14px; overflow-y: auto; max-height: 640px; }
.chat-item {
  width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; margin-bottom: 10px;
  color: var(--text-2);
  transition: border-color .12s ease, background .12s ease;
}
.chat-item:hover { background: var(--panel-2); border-color: var(--line-strong); }
.chat-item.active { background: var(--accent-dim); border-color: var(--accent-line); }
.chat-detail { padding: 22px; }
.chat-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}