/* Painel de certificados — construido sobre os tokens/componentes do design
   system da Pratica Biomed (vendor/*.css). Mesma base visual do painel de links. */

/* components.css define display:flex em .alert, que vence o [hidden]{display:none}
   padrao do browser (mesma especificidade, stylesheet do autor ganha). */
[hidden] { display: none !important; }

body::before {
  content: "";
  position: fixed;
  width: 640px;
  height: 640px;
  right: -220px;
  top: -200px;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow-teal-soft), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ---------------- Topbar ---------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--background);
}

.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-logo { height: 34px; width: auto; }

/* ---------------- Abas ---------------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
}

.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 18px;
}

.tab:hover { color: var(--foreground); }
.tab.is-active { color: var(--teal); border-bottom-color: var(--teal); }

/* ---------------- Conteudo ---------------- */
.page { padding: 32px; max-width: 1100px; }
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 220px; }

textarea.input { min-height: 110px; resize: vertical; font-family: inherit; }

/* O dropdown nativo do <select> e desenhado pelo sistema operacional: as
   <option> nao herdam a cor do .input, e no tema escuro saem texto claro sobre
   fundo claro (ilegivel). Definir cor/fundo direto na option resolve. */
select.input option {
  background: var(--card-2);
  color: var(--foreground);
}

/* ---------------- Tabela ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--subtle-foreground);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table code { font-size: 13px; color: var(--teal); }

.muted { color: var(--muted-foreground); font-size: 13px; }
.truncate {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 5px 7px;
  border-radius: var(--r-sm);
  color: var(--muted-foreground);
}
.icon-btn:hover { background: rgba(143, 203, 198, .1); color: var(--foreground); }

/* ---------------- Progresso da emissao ---------------- */
.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--input);
  overflow: hidden;
  margin: 12px 0 8px;
}
.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0;
  transition: width .3s ease;
}

/* ---------------- Modal ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 20, 23, .78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  overflow-y: auto;
}
.modal {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
}

/* ---------------- Login ---------------- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-aura {
  position: fixed;
  width: 520px;
  height: 520px;
  left: 50%;
  top: -160px;
  transform: translateX(-50%);
  background: var(--aura);
  filter: blur(8px);
  pointer-events: none;
  z-index: -1;
}

.login-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-logo { height: 44px; width: auto; margin: 0 auto 4px; display: block; }

@media (max-width: 700px) {
  .topbar, .tabs, .page { padding-left: 18px; padding-right: 18px; }
  .page { padding-top: 22px; }
}
