/* ==========================================================================
   Componentes do Painel do Cliente & Páginas Internas (Tema Claro GSM Theme)
   ========================================================================== */

.content {
  padding: 24px 20px 38px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.content h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; color: #0f172a; }
.content h2 { font-size: 1.05rem; font-weight: 800; margin: 24px 0 14px; color: #0f172a; }

/* Cards de KPI / Indicadores */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06); }
.stat::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #f59e0b;
}
.stat.s-green::after { background: #16a34a; }
.stat.s-blue::after  { background: #0284c7; }
.stat.s-amber::after { background: #f59e0b; }
.stat.s-red::after   { background: #dc2626; }

.stat small {
  color: #64748b;
  text-transform: uppercase;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
}
.stat b {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: 4px;
  color: #0f172a;
  letter-spacing: -.02em;
}
.stat .s-ico {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat.s-green .s-ico { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.stat.s-blue .s-ico  { background: #f0f9ff; border-color: #bae6fd; color: #0284c7; }
.stat.s-red .s-ico   { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

/* Atalhos rápidos no dashboard */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 14px 0 24px;
}
.qcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  transition: .16s;
}
.qcard:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
.qcard .qi {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.qcard b { display: block; font-size: .9rem; color: #0f172a; }
.qcard span { color: #64748b; font-size: .78rem; }

/* Status badges */
.st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-pending, .st-open { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.st-processing { color: #0369a1; border-color: #bae6fd; background: #f0f9ff; }
.st-completed, .st-paid, .st-closed { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.st-rejected, .st-cancelled { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }

/* Alertas flash */
.flash {
  padding: 12px 20px;
  font-weight: 700;
  font-size: .88rem;
  border-radius: var(--radius);
  margin: 16px auto 0;
  max-width: 1140px;
  border: 1px solid;
}
.flash.ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.flash.err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* Formulários */
.form input, .form select, .form textarea, .inline input, .inline select {
  width: 100%;
  padding: 10px 13px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: .9rem;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.form input:focus, .form select:focus, .form textarea:focus, .inline input:focus {
  outline: none;
  border-color: #f59e0b;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.form input:disabled { background: #e2e8f0; color: #64748b; cursor: not-allowed; }
.form label { display: block; font-size: .84rem; font-weight: 700; color: #334155; }
.form label input, .form label select, .form label textarea { margin-top: 6px; display: block; font-weight: 500; }
.form textarea { min-height: 110px; }

.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input, .inline select { padding: 8px 11px; width: auto; min-width: 80px; }

/* Mensagens de Ticket */
.msg {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.msg.staff {
  border-color: #fde68a;
  background: #fffbeb;
}
.msg small { color: #64748b; font-weight: 700; display: block; margin-bottom: 5px; }

code, pre {
  font-family: 'JetBrains Mono', monospace;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: .82rem;
  color: #0f172a;
}
pre {
  padding: 14px;
  overflow-x: auto;
  margin: 10px 0;
  background: #141920;
  border-color: #232b36;
  color: #f8fafc;
}
.tbl td.wrap { white-space: normal; max-width: 320px; }

/* Pílulas de filtro */
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pill {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
}
.pill:hover, .pill.on {
  border-color: #141920;
  background: #141920;
  color: #ffffff;
}
