/* ============================================================
   Pérgamo — complementos do portal
   Carregado DEPOIS do style.css, então sobrescreve o necessário.
   Para reverter: remova a linha do <link> no partials/head.ejs.
   ============================================================ */

/* ---------- Fonte do sistema ---------- */
:root {
  --font: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
}
body,
input, select, textarea, button,
.btn, .table, .nav, h1, h2, h3 {
  font-family: var(--font);
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ---------- Marca na barra superior ---------- */
.topbar-inner { position: relative; }
.brand { gap: 11px; }

/* o nome fica no centro exato da barra, independente do logo e do menu */
.brand .sub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: .015em;
  line-height: 1;
  color: var(--ink);
  padding-bottom: 5px;
}

/* degradê do azul da marca para o tom escuro do texto */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .brand .sub {
    background: linear-gradient(135deg, #0b7fc4 0%, #0f2a3a 72%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* filete de destaque sob o nome */
.brand .sub::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
              rgba(2,167,246,0), var(--brand) 45%, rgba(2,167,246,0));
  opacity: .75;
}

.brand-sep { display: none; }

/* telas estreitas: volta a ficar ao lado do logo, para nao colidir com o menu */
@media (max-width: 860px) {
  .brand .sub {
    position: static;
    transform: none;
    font-size: 17px;
    padding-bottom: 0;
  }
  .brand .sub::after { display: none; }
  .brand-sep {
    display: block;
    width: 1px;
    height: 22px;
    align-self: center;
    flex: none;
    background: linear-gradient(180deg, rgba(225,235,241,0), var(--line) 25%, var(--line) 75%, rgba(225,235,241,0));
  }
}

/* ---------- Sino de notificações ---------- */
.sino-area { position: relative; display: flex; align-items: center; }
.sino {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; margin-right: 4px;
  background: none; border: 0; border-radius: 10px;
  color: var(--muted); cursor: pointer; transition: background .12s, color .12s;
}
.sino:hover { background: var(--bg); color: var(--ink); }
.sino svg { width: 19px; height: 19px; }
.sino-n {
  position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff;
  font: 700 10px/17px var(--font); text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.sino-cx[hidden] { display: none; }
.sino-cx {
  position: absolute; top: 46px; right: 0; width: 340px; max-height: 420px;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(15,42,58,.18); z-index: 60;
}
.sino-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 15px; border-bottom: 1px solid var(--line);
}
.sino-top b { font-size: 14px; }
.sino-lim {
  background: none; border: 0; color: var(--primary-dark);
  font: 600 12px var(--font); cursor: pointer; padding: 0;
}
.sino-lim:hover { text-decoration: underline; }
.sino-lista { overflow-y: auto; }
.sino-vazio { color: var(--muted); font-size: 13.5px; text-align: center; padding: 30px 20px; margin: 0; line-height: 1.6; }
.sino-vazio small { color: #93a9b6; font-size: 12.5px; }
.sino-it {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 15px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.sino-it:last-child { border-bottom: 0; }
.sino-it:hover { background: var(--bg); }
.sino-it.nova { background: #f2faff; }
.sino-it.nova:hover { background: #e9f5fd; }
.sino-it b { font-size: 13.5px; display: block; }
.sino-it p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.sino-it small { display: block; margin-top: 5px; font-size: 11.5px; color: #93a9b6; }
.sino-pt { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--primary); }
.sino-pt.alerta { background: var(--danger); }
.sino-pt.ok { background: var(--ok); }
@media (max-width: 560px) { .sino-cx { width: calc(100vw - 32px); right: -8px; } }
