/* =================================
   RESET GLOBAL
================================= */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, sans-serif;
  transition: all 0.25s ease;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #0a0f1c, #1b263b);
  color: #e5e7eb;
  font-size: 16px;
  line-height: 1.55;
}

/* =================================
   CONTAINER
================================= */
.container {
  max-width: 950px;
  margin: 50px auto;
  padding: 32px;
  background: rgba(10, 15, 28, 0.7);
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* =================================
   TIPOGRAFIA
================================= */
h1, h2, h3 {
  margin: 0 0 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

/* =================================
   BUSCA
================================= */
.search {
  display: flex;
  gap: 12px;
  margin-bottom: 35px;
}

input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 10, 25, 0.6);
  color: #e5e7eb;
  font-size: 0.95rem;
}

input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 8px #2563ebaa;
}

/* =================================
   BOTÕES
================================= */
button {
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.4px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
  white-space: nowrap;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6);
}

/* =================================
   CARDS
================================= */
.card {
  background: rgba(2, 6, 23, 0.8);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 22px;
  border: 1px solid rgba(37, 99, 235, 0.4);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.subcard {
  background: rgba(2, 6, 23, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}

/* =================================
   GRID (DESKTOP)
================================= */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  padding: 10px 0;
  align-items: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.row:last-child {
  border-bottom: none;
}

/* =================================
   STATUS
================================= */
.status.ok {
  color: #22c55e;
  text-shadow: 0 0 6px #22c55e80;
}

.status.alert {
  color: #facc15;
  text-shadow: 0 0 6px #facc1580;
}

/* =================================
   TOTAIS
================================= */
.totals {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  font-weight: 600;
}

/* =================================
   HEADER ADMIN
================================= */
.admin-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px;
  background: rgba(5,10,25,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* =================================
   MOBILE — AJUSTE REAL
================================= */
@media (max-width: 768px) {

  body {
    font-size: 15px;
  }

  .container {
    margin: 20px 12px;
    padding: 20px;
    border-radius: 16px;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.05rem; }

  .search {
    flex-direction: column;
  }

  input,
  button {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
  }

  /* GRID MOBILE → VERTICAL */
  .row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 0;
  }

  .row > * {
    font-size: 0.95rem;
  }

  .totals {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .admin-header {
    padding: 16px;
  }
}

@media (max-width: 768px) {

  .search {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .search input,
  .search button {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  input#code {
    display: block;
  }
}

/* ===============================
   CONTEXTO DO SISTEMA (SUTIL)
================================ */
.system-context {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  font-size: 0.72rem;
  letter-spacing: 0.3px;
  color: rgba(229,231,235,0.85);

  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.06);

  z-index: 1000;
}

.system-context strong {
  color: #93c5fd;
  font-weight: 600;
}

.system-context .dot {
  opacity: 0.4;
}

/* ===============================
   AJUSTE DE CONTEÚDO
================================ */
.container {
  margin-top: 60px;
}

/* ===============================
   MOBILE
================================ */
@media (max-width: 768px) {
  .system-context {
    height: 28px;
    font-size: 0.7rem;
    padding: 0 8px;
    text-align: center;
  }

  .container {
    margin-top: 52px;
  }
}

@media (max-width: 768px) {
  .floating-site-button {
    width: 54px;
    height: 54px;
    bottom: 16px;
    right: 16px;
    border-radius: 16px;
  }
}

/* ===============================
   BOTÃO FLUTUANTE — SITE OFICIAL
================================ */

.floating-site-button {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;

  width: 62px;
  height: 62px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(8px);

  border-radius: 18px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.floating-site-button img {
  width: 70%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.floating-site-button:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}