:root {
  color-scheme: dark;
  --bg: #050202;
  --panel: #160707;
  --panel-2: #1f0b0b;
  --line: #532121;
  --line-soft: #351616;
  --text: #fff8ef;
  --muted: #c9ada4;
  --gold: #dfa938;
  --red: #b42420;
  --green: #67c06b;
  --blue: #7ea7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0, rgba(100, 20, 20, .28), transparent 32rem), var(--bg);
  color: var(--text);
  font: 500 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.hero {
  min-height: clamp(220px, 32vw, 420px);
  display: flex;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .25) 42%, rgba(0, 0, 0, .9) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, var(--bg) 100%),
    url("https://www.mucabrasil.com.br/templates/mucabrasil/images/bg.jpg") center top / cover no-repeat;
}

.hero-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.kicker,
.label {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: 64px;
  line-height: 1;
}

h2 {
  font-size: 18px;
}

.hero p {
  margin-top: 12px;
  color: #f1dfd5;
}

.shell {
  width: min(1280px, calc(100% - 32px));
  margin: -44px auto 64px;
}

.status-card,
.panel,
.toolbar,
.kpis article,
.tabs {
  background: rgba(22, 7, 7, .94);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .3);
}

.status-card strong {
  display: block;
  margin-top: 3px;
  font-size: 21px;
}

small,
.muted {
  color: var(--muted);
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid #8e6420;
  background: var(--gold);
  color: #1a0b04;
  cursor: pointer;
  font-weight: 900;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.kpis article {
  padding: 16px;
  min-height: 100px;
}

.kpis span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kpis strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  line-height: 1;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 16px;
  overflow: hidden;
}

.tabs button {
  min-height: 52px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.tabs button:last-child {
  border-right: 0;
}

.tabs button.active {
  background: #351010;
  box-shadow: inset 0 3px 0 var(--gold);
}

.toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
}

.toolbar label {
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090202;
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: var(--gold);
}

.tab-panel {
  display: none;
  margin-top: 16px;
}

.tab-panel.active {
  display: block;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head span {
  color: var(--gold);
  font-weight: 900;
}

.list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.list.compact {
  max-height: 580px;
  overflow: auto;
}

.guild-card,
.character-card,
.alert-card,
.run-card,
.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #100505;
  padding: 16px;
}

.guild-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.character-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
}

.character-card:hover {
  border-color: var(--gold);
}

.guild-card h3,
.character-card h3,
.alert-card h3 {
  margin: 0;
  font-size: 20px;
}

.guild-meta {
  margin-top: 6px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid currentColor;
  padding: 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.green {
  color: var(--green);
}

.badge.red {
  color: #ff7770;
}

.badge.blue {
  color: var(--blue);
}

.alert-card {
  border-left: 5px solid var(--gold);
}

.alert-card.rival {
  border-left-color: #ff7b31;
}

.alert-card.tohell {
  border-left-color: var(--blue);
}

.alert-card p {
  margin-top: 8px;
}

.run-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.ok {
  color: var(--green);
}

.fail {
  color: #ff7770;
}

.empty {
  color: var(--muted);
  text-align: center;
  border-style: dashed;
}

.modal-layer {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .72);
  z-index: 50;
}

.modal-layer.open {
  display: flex;
}

.modal-card {
  width: min(1040px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid #8e6420;
  border-radius: 8px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, .5);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: rgba(22, 7, 7, .98);
  border-bottom: 1px solid var(--line);
}

.modal-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.icon-button.secondary {
  background: transparent;
  color: var(--text);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-box {
  min-height: 82px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: #0d0404;
}

.detail-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-box strong {
  display: block;
  margin-top: 6px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  border-left: 4px solid var(--gold);
  padding: 12px 14px;
  background: #0d0404;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .shell,
  .hero-inner {
    width: min(100% - 20px, 720px);
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs button {
    border-bottom: 1px solid var(--line);
  }

  .toolbar,
  .grid.two,
  .guild-card,
  .character-card,
  .detail-grid,
  .run-card {
    grid-template-columns: 1fr;
  }

  .badges {
    justify-content: flex-start;
  }

  h1 {
    font-size: 44px;
  }
}

@media (max-width: 520px) {
  .kpis {
    grid-template-columns: 1fr;
  }

  .status-card {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 34px;
  }
}
