/* ============================================================
   base.css — Reset e tipografia global · ProthesisLab
   Incluído em TODAS as páginas. Nunca edite fontes/tamanhos
   em arquivos individuais — sempre aqui.
   ============================================================ */

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Tipografia base ─────────────────────────────────────────── */
html {
  font-size: 15px;              /* 1rem = 15px em todo o site   */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: 1rem;              /* 15px                         */
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Headings consistentes ───────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--text);
}

h1 { font-size: 1.6rem;  }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .92rem;  }

/* ── Parágrafos e texto ──────────────────────────────────────── */
p    { font-size: .9rem; color: var(--text-2); line-height: 1.65; }
small, .text-sm { font-size: .8rem; }
.text-xs  { font-size: .72rem; }

/* ── Mono / código ───────────────────────────────────────────── */
code, kbd, .mono, [class*="mono"] {
  font-family: var(--font-mono);
  font-size: .85em;
}

/* ── Links ───────────────────────────────────────────────────── */
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }

/* ── Inputs e selects base ───────────────────────────────────── */
input, select, textarea, button {
  font-family: var(--font-ui);
  font-size: .88rem;
}

/* ── Layout base ─────────────────────────────────────────────── */
.app-body {
  display: flex;
  min-height: 100vh;
}

/* Conteúdo principal (empurra da sidebar) */
.page-wrap {
  margin-left: var(--sb-w, 240px);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ── Topbar padrão ───────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  flex-shrink: 0;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}

.topbar-sub {
  font-size: .73rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-top: .1rem;
}

/* ── Inner content ───────────────────────────────────────────── */
.page-inner {
  padding: 1.75rem 2rem 3rem;
  flex: 1;
}

/* ── Botões padrão ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem 1.2rem;
  border-radius: 9px;
  font-family: var(--font-ui);
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
  color: #fff;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}
.btn-danger:hover { background: #dc2626; color: #fff; border-color: #dc2626; }

.btn-sm { padding: .4rem .85rem; font-size: .78rem; border-radius: 7px; }
.btn-lg { padding: .75rem 1.5rem; font-size: .92rem; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}

.card-body { padding: 1.25rem 1.35rem; }

/* ── Tabela padrão ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead th {
  padding: .65rem 1.1rem;
  text-align: left;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: var(--font-mono);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--primary-4); }

tbody td {
  padding: .82rem 1.1rem;
  font-size: .83rem;
  color: var(--text-2);
  vertical-align: middle;
}

tbody td strong { color: var(--text); font-weight: 700; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .22rem .65rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-green  { background: var(--primary-4); color: var(--primary);  border-color: var(--primary-3); }
.badge-gray   { background: #f1f5f9;          color: #64748b;         border-color: #e2e8f0; }
.badge-blue   { background: #eff6ff;          color: #2563eb;         border-color: #bfdbfe; }
.badge-red    { background: #fef2f2;          color: #dc2626;         border-color: #fecaca; }
.badge-amber  { background: #fffbeb;          color: #d97706;         border-color: #fde68a; }
.badge-purple { background: #faf5ff;          color: #7c3aed;         border-color: #ddd6fe; }

/* ── Alertas / Flash ─────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .8rem 1rem;
  border-radius: 10px;
  font-size: .83rem;
  border: 1px solid;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.alert-success { background: var(--primary-4); border-color: var(--primary-3); color: var(--primary); }
.alert-error   { background: #fef2f2;          border-color: #fecaca;          color: #dc2626; }
.alert-info    { background: #eff6ff;          border-color: #bfdbfe;          color: #2563eb; }
.alert-warning { background: #fffbeb;          border-color: #fde68a;          color: #d97706; }

/* ── Formulário padrão ───────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid.g1 { grid-template-columns: 1fr; }
.form-grid.full { grid-column: 1 / -1; }

label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-2);
}

label .req { color: var(--primary); margin-left: .15rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: .62rem .85rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: var(--font-ui);
  font-size: .84rem;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

input::placeholder, textarea::placeholder { color: var(--text-3); font-weight: 400; }
textarea { resize: vertical; min-height: 90px; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: .5rem;
  color: var(--text-3);
  text-align: center;
}

.empty-state svg   { opacity: .25; margin-bottom: .25rem; }
.empty-state strong { font-size: .9rem; color: var(--text-2); }
.empty-state p      { font-size: .78rem; font-family: var(--font-mono); }

/* ── Paginação ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: 1rem;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px; height: 32px;
  padding: 0 .5rem;
  border-radius: 7px;
  font-size: .78rem;
  font-family: var(--font-mono);
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  transition: all .13s;
}

.pagination a:hover       { border-color: var(--primary); color: var(--primary); }
.pagination .active,
.pagination .current      { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(3px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.hidden { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title { font-size: 1.05rem; font-weight: 800; color: var(--text); }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  font-size: .85rem;
  transition: all .13s;
}
.modal-close:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

/* ── Utilitários ─────────────────────────────────────────────── */
.text-muted   { color: var(--text-3) !important; }
.text-primary { color: var(--primary) !important; }
.text-mono    { font-family: var(--font-mono); }
.fw-bold      { font-weight: 700; }
.fw-800       { font-weight: 800; }

.d-flex    { display: flex; }
.gap-1     { gap: .5rem; }
.gap-2     { gap: .75rem; }
.gap-3     { gap: 1rem; }
.items-center   { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ── Scrollbar suave ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Responsive base ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .page-wrap { margin-left: 0; }
  .topbar    { padding: .9rem 1.25rem; }
  .page-inner { padding: 1.25rem; }
}

@media (max-width: 560px) {
  .page-inner  { padding: 1rem; }
  .form-grid   { grid-template-columns: 1fr; }
  .topbar      { padding: .8rem 1rem; }
  h1           { font-size: 1.3rem; }
}

/* ============================================================
   CARDS GLASS — padrão global de cards especiais
   Use .glass-primary para stats principais (verde do tema)
   Use .glass-blue para cards secundários (azul claro)
   ============================================================ */

/* ── Wrapper do grid de stats principais ─────────────────────
   Envolve os cards .glass-primary.
   Uso: <div class="glass-grid"> ... </div>                  */
.glass-grid {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    color-mix(in srgb, var(--primary) 70%, #000) 50%,
    var(--primary) 100%
  );
  border-radius: 18px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Orbs decorativos do fundo verde */
.glass-grid::before {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -80px; right: -50px;
  pointer-events: none;
}
.glass-grid::after {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -50px; left: 30px;
  pointer-events: none;
}

/* Grid interno */
.glass-grid-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .85rem;
  position: relative;
  z-index: 1;
}

/* ── Card glass verde (stats principais) ─────────────────────
   Uso: <div class="glass-primary"> ... </div>               */
.glass-primary {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 13px;
  padding: 1.3rem 1.35rem;
  position: relative;
  overflow: hidden;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow:
    0 4px 16px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.glass-primary:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-2px);
  box-shadow:
    0 8px 28px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.25);
}

/* Linha de brilho no topo */
.glass-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
}

/* Orb interno */
.glass-primary::after {
  content: '';
  position: absolute;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  bottom: -25px; right: -15px;
  pointer-events: none;
}

/* Ícone dentro do glass-primary */
.glass-primary .g-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .9rem;
}

/* Textos dentro do glass-primary */
.glass-primary .g-label {
  font-size: .68rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .3rem;
  font-family: var(--font-mono);
}

.glass-primary .g-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -.03em;
  margin-bottom: .4rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.glass-primary .g-sub {
  font-size: .7rem;
  color: rgba(255,255,255,.62);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: .35rem;
}

/* Badges dentro do glass-primary */
.glass-primary .g-badge-up   { background: rgba(187,247,208,.25); color: #bbf7d0; border: 1px solid rgba(187,247,208,.3); }
.glass-primary .g-badge-down { background: rgba(254,202,202,.2);  color: #fecaca; border: 1px solid rgba(254,202,202,.25); }
.glass-primary .g-badge-warn { background: rgba(253,230,138,.2);  color: #fde68a; border: 1px solid rgba(253,230,138,.25); }

.glass-primary .g-badge-up,
.glass-primary .g-badge-down,
.glass-primary .g-badge-warn {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .67rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 99px;
  font-family: var(--font-mono);
}

/* ── Card glass secundário (cards de conteúdo) ───────────────
   Usa variáveis do tema — muda cor junto com theme.css.
   Uso: <div class="glass-blue"> ... </div>                   */
.glass-blue {
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--primary-3);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 2px 12px var(--primary-glow),
    inset 0 1px 0 rgba(255,255,255,.5);
  transition: box-shadow .2s, transform .2s;
}

.glass-blue:hover {
  box-shadow:
    0 6px 24px var(--primary-glow),
    inset 0 1px 0 rgba(255,255,255,.7);
  transform: translateY(-1px);
}

/* Brilho sutil no topo */
.glass-blue::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent);
  pointer-events: none;
}

/* Cabeçalho do glass-blue */
.glass-blue .gb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--primary-3);
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}

.glass-blue .gb-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
}

.glass-blue .gb-sub {
  font-size: .71rem;
  color: var(--text-2);
  font-family: var(--font-mono);
  margin-top: .1rem;
}

.glass-blue .gb-body {
  padding: 1.25rem 1.35rem;
}

/* Tabela dentro do glass-blue */
.glass-blue table thead th {
  background: var(--primary-4);
  color: var(--text-3);
  border-bottom: 1px solid var(--primary-3);
}

.glass-blue table tbody tr:hover {
  background: var(--primary-4);
}

.glass-blue table tbody tr {
  border-bottom: 1px solid var(--border);
}

/* ── Responsive dos glass cards ──────────────────────────────*/
@media (max-width: 1050px) {
  .glass-grid-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .glass-grid-inner { grid-template-columns: 1fr 1fr; }
  .glass-grid       { padding: 1rem; }
}

/* ============================================================
   DS-LAYOUT — Classes de layout compartilhadas entre páginas
   Centralizado aqui para que qualquer troca em theme.css
   reflita em TODAS as páginas automaticamente.
   ============================================================ */

/* ── Body / wrapper ──────────────────────────────────────── */
.ds-body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  margin: 0;
}

.ds-wrap {
  margin-left: var(--sb-w, 240px);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ds-inner {
  padding: 1.75rem 2rem 3rem;
  flex: 1;
}

/* ── Topbar ─────────────────────────────────────────────── */
.ds-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  flex-shrink: 0;
}

.ds-topbar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}

.ds-topbar-sub {
  font-size: .73rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-top: .15rem;
}

.ds-topbar-right {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* ── Chip / Badge de topbar ─────────────────────────────── */
.ds-chip {
  background: var(--primary-4);
  border: 1px solid var(--primary-3);
  border-radius: 99px;
  padding: .35rem .85rem;
  font-size: .72rem;
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: 500;
}

/* ── Botão primário de topbar ───────────────────────────── */
.ds-btn-new {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .6rem 1.15rem;
  font-family: var(--font-ui);
  font-size: .83rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .1s;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.ds-btn-new:hover {
  background: var(--primary-2);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* ── Cards genéricos ds-card ────────────────────────────── */
.ds-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.03);
  overflow: hidden;
}

.ds-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
}

.ds-card-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
}

.ds-card-sub {
  font-size: .71rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-top: .1rem;
}

.ds-card-body    { padding: 1.15rem 1.35rem; }
.ds-card-body-sm { padding: .25rem .5rem; }

.ds-link {
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color .15s;
}
.ds-link:hover { color: var(--primary-2); }

/* ── Tabela DS ──────────────────────────────────────────── */
.ds-table-wrap { overflow-x: auto; }

.ds-table {
  width: 100%;
  border-collapse: collapse;
}

.ds-table thead th {
  padding: .6rem 1rem;
  text-align: left;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: var(--font-mono);
}

.ds-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

.ds-table tbody tr:last-child { border-bottom: none; }
.ds-table tbody tr:hover      { background: var(--primary-4); }

.ds-table tbody td {
  padding: .75rem 1rem;
  font-size: .82rem;
  color: var(--text-2);
  vertical-align: middle;
}

.ds-table tbody td strong { color: var(--text); font-weight: 700; }

/* Número de OS */
.ds-os-num {
  font-family: var(--font-mono);
  font-size: .73rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-4);
  border: 1px solid var(--primary-3);
  padding: .2rem .55rem;
  border-radius: 5px;
}

/* ── Utilitários de texto DS ────────────────────────────── */
.ds-muted  { color: var(--text-3) !important; }
.ds-valor  {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--text) !important;
}
.ds-title-red { color: #dc2626; }

/* Prazos */
.ds-prazo-ok   { color: var(--text-3); font-family: var(--font-mono); font-size: .75rem; }
.ds-prazo-warn { color: #d97706;       font-family: var(--font-mono); font-size: .75rem; font-weight: 600; }
.ds-prazo-late { color: #dc2626;       font-family: var(--font-mono); font-size: .75rem; font-weight: 700; }

/* ── Badge DS ───────────────────────────────────────────── */
.ds-badge {
  padding: .22rem .65rem;
  border-radius: 99px;
  font-size: .71rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Badges KPI (dentro de glass-grid) ─────────────────── */
.ds-badge-up   { background: rgba(187,247,208,.25); color: #bbf7d0; border: 1px solid rgba(187,247,208,.3); }
.ds-badge-down { background: rgba(254,202,202,.2);  color: #fecaca; border: 1px solid rgba(254,202,202,.25); }
.ds-badge-warn { background: rgba(253,230,138,.2);  color: #fde68a; border: 1px solid rgba(253,230,138,.25); }

/* ── Alertas de atraso ──────────────────────────────────── */
.ds-alert-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem .85rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin: .5rem .85rem;
}

.ds-alert-item:first-child { margin-top: .85rem; }
.ds-alert-item:last-child  { margin-bottom: .85rem; }

.ds-alert-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
  animation: ds-blink 1.5s infinite;
}

@keyframes ds-blink { 0%,100%{opacity:1} 50%{opacity:.25} }

.ds-alert-info { flex: 1; min-width: 0; }

.ds-alert-os  { font-size: .73rem; font-weight: 700; color: #dc2626; font-family: var(--font-mono); }
.ds-alert-cli { font-size: .73rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ds-alert-days {
  font-size: .7rem;
  font-weight: 700;
  color: #dc2626;
  font-family: var(--font-mono);
  background: #fee2e2;
  padding: .18rem .45rem;
  border-radius: 5px;
  white-space: nowrap;
}

/* ── Top clientes ───────────────────────────────────────── */
.ds-cliente-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .85rem;
  border-bottom: 1px solid var(--border);
}

.ds-cliente-item:last-child { border-bottom: none; }

.ds-rank {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .67rem;
  font-weight: 800;
  color: var(--text-3);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.ds-rank-top {
  background: var(--primary-4);
  border-color: var(--primary-3);
  color: var(--primary);
}

.ds-cliente-info { flex: 1; min-width: 0; }

.ds-cliente-nome {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-cliente-qtd {
  font-size: .69rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-top: .1rem;
}

.ds-cliente-total {
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ── Empty state DS ─────────────────────────────────────── */
.ds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  color: var(--text-3);
  text-align: center;
}

.ds-empty svg    { opacity: .3; }
.ds-empty strong { font-size: .83rem; color: var(--text-2); }

/* ── Responsive DS ──────────────────────────────────────── */
@media (max-width: 860px) {
  .ds-wrap   { margin-left: 0; }
  .ds-inner  { padding: 1.25rem; }
  .ds-topbar { padding: .9rem 1.25rem; }
}

@media (max-width: 560px) {
  .ds-inner { padding: 1rem; }
}