/* ============================================================
   LINHAS CSS - Estilos específicos da página de linhas
   ============================================================ */

:root {
  --bg-site: #f4f7f6;
  --card-bg: #ffffff;
  --text-main: #333;
  --border-light: #e0e0e0;
  --color-pronto: #2ecc71;
  --color-descarga: #f39c12;
  --color-livre: #bdc3c7;
  --color-erro: #e74c3c;
  --color-bxd: #3498db;
  --color-conferencia: #9b59b6;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-site);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text-main);
  overflow-y: auto;
  height: auto; 
}

.main-wrapper {
  display: block;
  width: 100%;
  padding: 15px;
  box-sizing: border-box;
}

/* HEADER OTIMIZADO: Logo à esquerda, Stats à direita */
.header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
}

.logo-container {
  display: flex;
  justify-content: flex-start;
}



.stats-bar { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 15px; 
  justify-content: flex-end; 
}

/* BLOCOS DE ESTATÍSTICA (FILTROS CLICÁVEIS) */
.stat-item {
  display: flex; 
  flex-direction: column;
  align-items: center; 
  text-align: center;
  background: #fff; 
  padding: 8px 16px;
  border-radius: 12px; 
  border: 2px solid var(--border-light);
  min-width: 100px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.stat-item:hover {
  background: #fcfcfc;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.stat-item.active {
  border-color: #2ecc71; 
  background-color: #f4fbe9;
  box-shadow: 0 4px 8px rgba(46, 204, 113, 0.15);
}

.stat-number {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800; 
  font-size: 1.3rem;
  line-height: 1;
}

.stat-desc {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #7f8c8d;
  margin-top: 5px;
  letter-spacing: 0.5px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.pronto       { background-color: var(--color-pronto); }
.dot.descarga     { background-color: var(--color-descarga); }
.dot.livre        { background-color: var(--color-livre); }
.dot.erro         { background-color: var(--color-erro); }
.dot.bxd          { background-color: var(--color-bxd); }
.dot.conferencia  { background-color: var(--color-conferencia); }

/* GRELHA DOS CARTÕES */
.group-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
  margin-bottom: 35px;
}

/* ESTILO DO CARD */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 12px; 
  padding: 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border-bottom: 8px solid var(--color-livre);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.card[data-status="LIVRE"]        { border-bottom-color: var(--color-livre); }
.card[data-status="DESCARGA"]    { border-bottom-color: var(--color-descarga); }
.card[data-status="PRONTO"]      { border-bottom-color: var(--color-pronto); }
.card[data-status="CONFERENCIA"] { border-bottom-color: var(--color-conferencia); }
.card[data-status="BXD"]         { border-bottom-color: var(--color-bxd); }

.card:not([data-status="LIVRE"]):not([data-status="DESCARGA"]):not([data-status="PRONTO"]):not([data-status="CONFERENCIA"]):not([data-status="BXD"]) {
  border-bottom-color: var(--color-erro);
}

.card-id { font-size: 1.3rem; font-weight: 900; margin-bottom: 12px; text-align: center; }

/* SELETORES */
select {
  width: 100%;
  padding: 10px 30px 10px 10px;
  border-radius: 8px;
  background: #f9f9f9;
  border: 1.5px solid var(--border-light);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

.footer { padding: 40px; color: #999; font-size: 0.8rem; text-align: center; }

/* BOTÃO TV */
.header-left {
  display: flex;
  align-items: center;
}

.btn-tv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-tv:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1f6dad 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-tv i {
  font-size: 1.1rem;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .header { grid-template-columns: 1fr; text-align: center; gap: 15px; }
  .logo-container { justify-content: center; }
  .stats-bar { justify-content: center; gap: 10px; }
  .stat-item { min-width: 85px; padding: 6px 10px; }
  .stat-number { font-size: 1.1rem; }
  .group-container { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-id { font-size: 1.1rem; }
  .main-wrapper { padding: 10px; }
}
