@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --red: #fe0001;
  --wine: #5f1014;
  --ink: #030505;
  --black: #000000;
  --text: #f3eded;
  --muted: #9a8a8a;
  --line: rgba(254, 0, 1, 0.28);
  --up: #3dd68c;
  --down: #fe0001;
  --degraded: #e8b339;
  --pending: #5c5555;
  --panel: rgba(6, 3, 3, 0.88);
  --radius: 6px;
  --font-display: "Bebas Neue", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --nav-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--black);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Atmosfera fixa no viewport (não rola com a página) */
.bg-fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background: var(--black);
}

.bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(254, 0, 1, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(254, 0, 1, 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  mask-image: linear-gradient(180deg, #000 0%, #000 28%, transparent 62%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 28%, transparent 62%);
}

.bg-speckle {
  position: absolute;
  inset: 0;
  mask-image: linear-gradient(180deg, transparent 0%, transparent 35%, #000 68%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 35%, #000 68%, #000 100%);
}

.bg-speckle-motion {
  position: absolute;
  inset: -12%;
  opacity: 0.95;
  background:
    radial-gradient(1.5px 1.5px at 12% 70%, rgba(254, 0, 1, 0.85), transparent 60%),
    radial-gradient(1.2px 1.2px at 28% 82%, rgba(254, 0, 1, 0.55), transparent 60%),
    radial-gradient(1.8px 1.8px at 45% 65%, rgba(95, 16, 20, 0.9), transparent 60%),
    radial-gradient(1.3px 1.3px at 63% 88%, rgba(254, 0, 1, 0.7), transparent 60%),
    radial-gradient(1px 1px at 78% 72%, rgba(254, 0, 1, 0.5), transparent 60%),
    radial-gradient(1.6px 1.6px at 91% 84%, rgba(95, 16, 20, 0.8), transparent 60%),
    radial-gradient(2px 2px at 35% 90%, rgba(254, 0, 1, 0.65), transparent 60%),
    radial-gradient(1.4px 1.4px at 55% 78%, rgba(254, 0, 1, 0.45), transparent 60%),
    radial-gradient(700px 420px at 20% 100%, rgba(254, 0, 1, 0.18), transparent 70%),
    radial-gradient(600px 380px at 85% 95%, rgba(95, 16, 20, 0.35), transparent 70%);
  animation: speckleDrift 16s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes speckleDrift {
  from {
    transform: translate3d(-2%, 1%, 0) scale(1);
  }
  to {
    transform: translate3d(3%, -4%, 0) scale(1.06);
  }
}

/* Navbar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: all 0.35s ease;
}

.nav-inner {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  transition: all 0.35s ease;
}

.nav.is-floating .nav-inner {
  background: rgba(0, 0, 0, 0.82);
  border-color: var(--line);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.nav.is-floating {
  top: 0.75rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.06em;
  justify-self: start;
  line-height: 1;
}

.nav-brand span {
  color: var(--red);
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-self: center;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  transform: translateY(1px);
}

.nav-center::-webkit-scrollbar {
  display: none;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}

.nav-pill:hover {
  border-color: rgba(254, 0, 1, 0.45);
  color: var(--text);
}

.nav-pill img {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.nav-pill .status-ball {
  width: 8px;
  height: 8px;
}

.nav-right {
  justify-self: end;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  transform: translateY(-1px);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.55rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: filter 0.2s, transform 0.2s, background 0.2s;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-red {
  background: linear-gradient(180deg, #fe0001, #a30002);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-discord {
  background: linear-gradient(180deg, #fe0001, #a30002);
  color: #fff;
  border-color: transparent;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: 0.02em;
  height: 28px;
}

.btn-nav-status {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 3px;
  height: 28px;
  transform: translateY(2px);
}

.btn-nav-status:hover {
  border-color: rgba(254, 0, 1, 0.55);
  background: rgba(254, 0, 1, 0.08);
}

.shell {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 1.75rem) 0 3rem;
}

.hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(254, 0, 1, 0.14), transparent 50%),
    var(--panel);
  padding: 1.6rem 1.35rem;
  margin-bottom: 1.75rem;
  animation: rise 0.7s ease both;
}

.hero .label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 6.2vw, 3.8rem);
  letter-spacing: 0.03em;
  line-height: 1.05;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  max-width: 48ch;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 100%;
}

.hero .pulse {
  display: flex;
  align-items: flex-start;
}

.status-ball {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 currentColor;
  animation: ballPulse 1.8s ease-out infinite;
}

.status-ball.lg {
  width: 14px;
  height: 14px;
}

.hero .pulse > .status-ball {
  margin-top: 0.28em;
}

@keyframes ballPulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 12px transparent;
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    transform: scale(1);
  }
}

.typewriter {
  display: inline-block;
  border-right: 2px solid currentColor;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  min-width: 0;
  flex: 1;
  animation: caretBlink 0.8s step-end infinite;
}

.typewriter.done {
  border-right-color: transparent;
  animation: none;
}

@keyframes caretBlink {
  50% {
    border-right-color: transparent;
  }
}

.group {
  margin-bottom: 1.6rem;
}

.group h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  color: #d8c7c7;
}

.list {
  display: grid;
  gap: 0.65rem;
}

/* Cards estilo Kuma, mais quadrados */
.service {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
}

.service:hover {
  border-color: rgba(254, 0, 1, 0.45);
  transform: translateY(-2px);
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0505;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--red);
  overflow: hidden;
  flex-shrink: 0;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service .name {
  font-weight: 700;
  font-size: 1.02rem;
}

.service .desc {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 0.15rem;
}

.service-side {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  width: min(100%, 240px);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.bars span {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 100%;
  border-radius: 1px;
  background: var(--pending);
  opacity: 0.85;
}

.bars span.up {
  background: var(--up);
}
.bars span.down {
  background: var(--down);
}
.bars span.degraded {
  background: var(--degraded);
}
.bars span.pending {
  background: var(--pending);
}

.bars-wrap {
  display: flex;
  width: 100%;
  min-width: 0;
  margin-top: 0.15rem;
}

.bars.bars-lg {
  width: 100%;
  height: 42px;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

.bars.bars-lg span {
  border-radius: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border-radius: 3px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.kind-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.kind-tag.site {
  border-color: rgba(61, 214, 140, 0.35);
  color: #7dffb8;
}

.kind-tag.bot {
  border-color: rgba(254, 0, 1, 0.4);
  color: #ff7b7b;
}

.service-link {
  color: var(--up);
  font-size: 0.84rem;
  margin-top: 0.2rem;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-link:hover {
  text-decoration: underline;
}

.service .name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.uptime-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.status-up,
.overall-operational {
  color: var(--up);
}
.status-down,
.overall-major_outage {
  color: var(--down);
}
.status-degraded,
.overall-partial_outage {
  color: var(--degraded);
}
.status-pending,
.overall-pending {
  color: var(--pending);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  margin: 1.1rem 0;
}

.stat {
  position: relative;
  border-radius: var(--radius);
  padding: 0.85rem 0.7rem;
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
  z-index: 0;
  isolation: isolate;
  border: 1px solid rgba(254, 0, 1, 0.18);
}

.stat:nth-child(2)::before {
  animation-delay: -0.55s;
}
.stat:nth-child(3)::before {
  animation-delay: -1.1s;
}
.stat:nth-child(4)::before {
  animation-delay: -1.65s;
}
.stat:nth-child(5)::before {
  animation-delay: -2.2s;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--stat-angle, 0deg),
    transparent 0%,
    transparent 55%,
    rgba(254, 0, 1, 0.15) 70%,
    #fe0001 82%,
    rgba(254, 0, 1, 0.15) 90%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderSpin 3.2s linear infinite;
  pointer-events: none;
  z-index: -1;
}

@property --stat-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes borderSpin {
  to {
    --stat-angle: 360deg;
  }
}

.stat small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
  position: relative;
  z-index: 1;
}

.stat strong {
  font-size: 1.15rem;
  position: relative;
  z-index: 1;
}

.chart-wrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  margin-top: 1rem;
}

.chart-wrap canvas {
  width: 100% !important;
  max-height: 260px;
}

.detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.detail-title {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.detail-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: 0.04em;
}

.detail-title a {
  color: var(--up);
  font-size: 0.9rem;
}

.incident {
  padding: 0;
}

.console {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  background: #050505;
  border: 1px solid rgba(254, 0, 1, 0.25);
  border-radius: 4px;
  overflow: hidden;
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  background: rgba(254, 0, 1, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.console-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fe0001;
  box-shadow: 12px 0 0 #5f1014, 24px 0 0 #3dd68c;
  margin-right: 1.6rem;
}

.console-body {
  padding: 0.75rem 0.85rem;
  max-height: 280px;
  overflow: auto;
  color: #cfc4c4;
}

.console-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  padding: 0.2rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
}

.console-line:last-child {
  border-bottom: 0;
}

.console-time {
  color: #6d6262;
  white-space: nowrap;
}

.console-msg .tag-down {
  color: #fe0001;
}

.console-msg .tag-up {
  color: #3dd68c;
}

.console-msg .tag-degraded {
  color: #e8b339;
}

.console-empty {
  color: #6d6262;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-left {
  display: grid;
  gap: 0.25rem;
}

.made-by {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.heart {
  color: var(--red);
  display: inline-block;
  transform-origin: center;
  animation: heartbeat 1.1s ease-in-out infinite;
  font-size: 1rem;
  line-height: 1;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.25);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.2);
  }
  70% {
    transform: scale(1);
  }
}

.empty {
  color: var(--muted);
  padding: 1.1rem;
  border: 1px dashed rgba(254, 0, 1, 0.28);
  border-radius: var(--radius);
}

/* Admin */
.admin-shell {
  width: min(1100px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 1.5rem) 0 3rem;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 0.9rem;
}

.panel h2,
.panel h3 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

.login-box {
  max-width: 460px;
  margin: 8vh auto 0;
  text-align: center;
}

.login-box .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.75rem;
}

label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: left;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(254, 0, 1, 0.55);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.7rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.actions .btn {
  padding: 0.4rem 0.55rem;
  font-size: 0.75rem;
}

.token-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(254, 0, 1, 0.25);
  border-radius: 4px;
  padding: 0.6rem 0.7rem;
  text-align: left;
}

.note {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.error {
  color: #ff7b7b;
  font-size: 0.9rem;
}

.ok {
  color: var(--up);
}

.confirm-bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 20;
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }
  70% {
    box-shadow: 0 0 0 10px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  width: min(420px, 100%);
  background: #090505;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.15rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.modal h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  font-size: 1.4rem;
}

.modal p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.icon-upload {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px dashed rgba(254, 0, 1, 0.35);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
}

.icon-upload-preview {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0505;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
}

.icon-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-upload-meta {
  display: grid;
  gap: 0.35rem;
}

.icon-upload-meta .btn,
.icon-upload-meta label.btn {
  width: fit-content;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.icon-upload input[type="file"] {
  display: none;
}

.order-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  min-width: 52px;
}

.order-cell .btn {
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  min-width: 32px;
  justify-content: center;
}

.order-num {
  font-size: 0.72rem;
  color: var(--muted);
}

.pending-list {
  display: grid;
  gap: 0.55rem;
}

.pending-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
}

.pending-item strong {
  display: block;
}

.pending-meta {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.edit-inline {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.edit-inline input {
  font-size: 0.82rem;
  padding: 0.45rem 0.55rem;
}

@media (max-width: 860px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand right"
      "center center";
  }

  .nav-brand {
    grid-area: brand;
  }
  .nav-right {
    grid-area: right;
  }
  .nav-center {
    grid-area: center;
    justify-self: stretch;
    padding-top: 0.25rem;
  }

  .nav {
    height: auto;
  }

  .shell,
  .admin-shell {
    padding-top: calc(var(--nav-h) + 2.5rem);
  }

  .service {
    grid-template-columns: auto 1fr;
  }

  .service-side {
    grid-column: 1 / -1;
    justify-items: stretch;
    min-width: 0;
  }

  .service-side .bars {
    width: 100%;
    max-width: 100%;
  }

  .service-side > div {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .hero {
    padding: 1.25rem 1rem;
    overflow: hidden;
  }

  .hero h1 {
    font-size: clamp(1.35rem, 7.5vw, 2.2rem);
    line-height: 1.1;
  }

  .hero .pulse > .status-ball.lg {
    margin-top: 0.22em;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .table,
  .table thead,
  .table tbody,
  .table th,
  .table td,
  .table tr {
    display: block;
  }

  .table thead {
    display: none;
  }

  .table tr {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 520px) {
  .nav-brand {
    font-size: 1.35rem;
  }

  .btn-discord span,
  .nav-right .btn-ghost span {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
