:root {
  --bg: #07070b;
  --panel: rgba(17, 19, 26, 0.82);
  --panel2: rgba(11, 13, 18, 0.9);
  --border: rgba(255, 255, 255, 0.09);
  --border2: #242836;
  --yellow: #fbbf24;
  --purple: #7c5cff;
  --text: #f8fafc;
  --muted: #9ca3af;
  --green: #34d399;
  --red: #fb7185;
  --blue: #60a5fa;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
.background-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.background-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 0;
  pointer-events: none;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.2px;
}
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(8, 10, 14, 0.88);
  backdrop-filter: blur(22px);
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(251, 191, 36, 0.62);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.13);
}
.brand-mark.small {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.brand strong {
  display: block;
  font-size: 14px;
}
.brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}
.nav-btn {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  padding: 12px 13px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}
.nav-btn:hover,
.nav-btn.active {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.18);
  color: #fff;
}
.nav-btn.active {
  color: var(--yellow);
}
.nav-btn span {
  width: 20px;
  text-align: center;
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 18px 8px 0;
}
.sidebar-footer a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.sidebar-footer a:hover {
  color: #fff;
}
.main-shell {
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(7, 9, 13, 0.79);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.topbar-title strong {
  display: block;
  font-size: 15px;
}
.topbar-title span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
}
.user-box strong {
  display: block;
  font-size: 12px;
}
.user-box span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}
.content {
  padding: 28px;
  max-width: 1700px;
  width: 100%;
  margin: 0 auto;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
}
.page-heading h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}
.page-heading p:last-child {
  margin: 7px 0 0;
}
.primary-btn,
.secondary-btn,
.ghost-btn,
.mini-btn,
.icon-btn,
.status-btn,
.danger-btn {
  border-radius: 11px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: 0.2s;
  font-weight: 800;
}
.primary-btn {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #111827;
  padding: 11px 16px;
}
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.18);
}
.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 10px 14px;
}
.secondary-btn:hover,
.ghost-btn:hover,
.mini-btn:hover,
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.ghost-btn {
  background: rgba(255, 255, 255, 0.025);
  color: #cbd5e1;
  padding: 9px 12px;
}
.mini-btn {
  background: rgba(255, 255, 255, 0.04);
  color: #dbe4ef;
  padding: 7px 10px;
  font-size: 11px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 20px;
}
.mobile-menu {
  display: none;
}
.danger-btn {
  background: rgba(251, 113, 133, 0.08);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.18);
  padding: 8px 10px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.kpi-card,
.section-card {
  background: linear-gradient(
    180deg,
    rgba(17, 19, 26, 0.83),
    rgba(12, 14, 20, 0.78)
  );
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14);
}
.kpi-card {
  border-radius: 18px;
  padding: 19px;
}
.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: 27px;
}
.kpi-card small {
  display: block;
  color: #737d8c;
  margin-top: 6px;
  font-size: 10px;
}
.section-card {
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
}
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}
.section-heading h2 {
  margin: 0;
  font-size: 18px;
}
.section-heading p {
  margin: 5px 0 0;
  font-size: 11px;
}
.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.live-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(7, 9, 13, 0.58);
  padding: 16px;
}
.live-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--item-color, var(--yellow));
}
.live-head {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.live-head > div {
  min-width: 0;
}
.live-logo {
  width: 74px;
  height: 48px;
  object-fit: contain;
}
.live-head h3 {
  margin: 0;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
.live-head p {
  margin: 4px 0 0;
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: max-content;
  max-width: 100%;

  padding: 5px 8px;
  border-radius: 999px;

  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .45px;

  white-space: nowrap;

  border: 1px solid var(--border);
}
.status-badge.active {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.2);
}
.status-badge.upcoming {
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.08);
  border-color: rgba(96, 165, 250, 0.2);
}
.status-badge.ended,
.status-badge.disabled {
  color: #cbd5e1;
}
.status-badge.unavailable {
  color: #fda4af;
  background: rgba(251, 113, 133, 0.08);
}
.live-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.live-stat {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}
.live-stat span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}
.live-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}
.live-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
  color: #c7cfda;
  font-size: 10px;
}
.live-countdown {
  margin-top: 11px;
  color: var(--item-color, var(--yellow));
  font-size: 12px;
  font-weight: 900;
}
.table-scroll {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}
th {
  position: sticky;
  top: 0;
  background: #11151d;
  z-index: 2;
  color: #8f99a8;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 9px;
  text-align: left;
  padding: 11px 13px;
}
td {
  padding: 12px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: #dbe4ef;
  vertical-align: middle;
}
.entity-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.entity-logo {
  width: 55px;
  height: 34px;
  object-fit: contain;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}
.entity-cell strong {
  display: block;
}
.entity-cell small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.status-btn {
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}
.status-btn.active {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.07);
}
.status-btn.inactive {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.18);
  background: rgba(251, 113, 133, 0.06);
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
}
.inline-form {
  display: grid;
  grid-template-columns: 1fr 130px auto;
  gap: 9px;
  margin-bottom: 15px;
}
.settings-list,
.audit-list {
  display: grid;
  gap: 8px;
}
.settings-list,
.audit-list {
  display: grid;
  gap: 10px;
}

/* ACCESS USERS */

.settings-row.access-user {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);

  padding: 14px 16px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.access-user-info {
  min-width: 0;
}

.access-user-name {
  display: block;
  margin: 0;

  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.access-user-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;

  margin-top: 6px;

  font-size: 10px;
  color: var(--muted);
}

.access-dot {
  opacity: 0.45;
}

.access-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.access-user-actions .status-btn {
  min-width: 70px;
  white-space: nowrap;
}

.access-role-select {
  width: 100px;
  min-width: 100px;
}

.access-reset-btn {
  white-space: nowrap;
}

/* AUDIT */

.audit-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  padding: 11px;

  display: block;
}

.audit-row strong {
  font-size: 11px;
}

.audit-row p {
  margin: 4px 0 0;
  font-size: 10px;
  color: var(--muted);
}

/* MOBILE */

@media (max-width: 760px) {
  .settings-row.access-user {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .access-user-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
label {
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 800;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: #0c0f15;
  color: #f8fafc;
  padding: 10px 11px;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.06);
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
.switch-label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 20px;
}
.switch-label input {
  width: 17px;
  height: 17px;
  accent-color: var(--yellow);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.image-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.field-help {
  color: #707988;
  font-size: 9px;
  font-weight: 500;
}
.repeater-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 17px 0 8px;
}
.repeater-heading h3 {
  margin: 0;
  font-size: 12px;
}
.repeater {
  display: grid;
  gap: 7px;
}
.repeater-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}
.method-row {
  grid-template-columns: 140px 1fr auto;
}
.prize-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.prize-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.02);
}
.prize-row span {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.form-error {
  margin-right: auto;
  color: #fda4af;
  font-size: 10px;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal.hidden {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
.modal-panel {
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(10, 12, 17, 0.97);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
  padding: 20px;
}
.editor-panel {
  width: min(1450px, 100%);
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 17px;
}
.modal-heading h2 {
  margin: 0;
  font-size: 20px;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 20px;
}
.form-column {
  min-width: 0;
}
.preview-column {
  position: sticky;
  top: 0;
  align-self: start;
  border-left: 1px solid var(--border);
  padding-left: 20px;
}
.preview-label {
  display: block;
  color: var(--yellow);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.preview-card {
  --preview-color: #7c5cff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  background: rgba(17, 19, 26, 0.8);
  text-align: center;
}
.preview-card:hover {
  border-color: var(--preview-color);
  box-shadow: 0 0 24px color-mix(in srgb, var(--preview-color) 35%, transparent);
}
.preview-logo {
  height: 90px;
  width: 100%;
  object-fit: contain;
}
.preview-card h3 {
  margin: 12px 0;
  font-size: 20px;
}
.preview-features {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 11px;
}
.preview-btn {
  margin-top: 14px;
  width: 100%;
  border: 1px solid var(--preview-color);
  color: #fff;
  background: color-mix(in srgb, var(--preview-color) 15%, transparent);
  padding: 9px;
  border-radius: 10px;
}
.preview-lb {
  --preview-color: #fbbf24;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  background: rgba(17, 19, 26, 0.8);
}
.preview-lb img {
  width: 150px;
  height: 90px;
  object-fit: contain;
}
.preview-lb h3 {
  margin: 8px 0;
}
.preview-prize {
  font-size: 27px;
  font-weight: 900;
  color: var(--preview-color);
}
.preview-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}
.preview-meta div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
}
.preview-meta span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}
.preview-meta strong {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
.api-test-box {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px;
  font-size: 10px;
}
.full-preview-card {
  max-width: 720px;
  margin: 0 auto;
}
.full-preview-description {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 18px;
  color: #dbe4ef;
  line-height: 1.6;
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  background: #101b18;
  color: #a7f3d0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
  font-size: 11px;
  font-weight: 800;
}
.toast[data-type="error"] {
  background: #211117;
  border-color: rgba(251, 113, 133, 0.25);
  color: #fecdd3;
}
.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
}
.login-shell {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
}
.login-card {
  background: rgba(11, 13, 18, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}
.login-card .brand-mark {
  margin: 0 auto 18px;
}
.login-card h1 {
  margin: 0;
  font-size: 31px;
}
.login-copy {
  margin: 10px auto 22px;
  line-height: 1.5;
}
.twitch-btn {
  display: block;
  text-decoration: none;
  background: #9146ff;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 900;
}
.login-note {
  display: block;
  color: #6b7280;
  margin-top: 17px;
  font-size: 9px;
}
.centered-btn {
  display: inline-block;
  text-decoration: none;
}
.deny-icon {
  margin: 0 auto 15px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(251, 113, 133, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.2);
  color: #fb7185;
  font-size: 24px;
  font-weight: 900;
}
@media (max-width: 1050px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .preview-column {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 18px 0 0;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: -260px;
    width: 235px;
    z-index: 80;
    transition: left 0.25s;
  }
  .sidebar.open {
    left: 0;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    padding: 0 12px;
  }
  .topbar-actions .user-box {
    display: none;
  }
  .content {
    padding: 18px 12px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .form-grid,
  .image-input-row {
    grid-template-columns: 1fr;
  }
  .inline-form {
    grid-template-columns: 1fr;
  }
  .prize-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .live-stats {
    grid-template-columns: 1fr 1fr;
  }
  .topbar-title {
    display: none;
  }
  .modal {
    padding: 8px;
  }
  .modal-panel {
    max-height: calc(100vh - 16px);
    padding: 15px;
  }
  .method-row {
    grid-template-columns: 1fr;
  }
  .repeater-row {
    grid-template-columns: 1fr;
  }
}
