@font-face {
  font-family: "Montserrat";
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/montserrat.woff2") format("woff2-variations");
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Montserrat", sans-serif; }

body { background: #f2f4f8; color: #002056; min-height: 100vh; font-size: 14px; }

.header {
  background: #002056;
  border-bottom: 2px solid #cdac80;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.header-logo { height: 40px; object-fit: contain; display: block; }
.header-title { font-size: 19px; font-weight: 700; color: #ffffff; letter-spacing: 3px; text-transform: uppercase; }
.header-sub { font-size: 13px; color: #cdac80; letter-spacing: 1px; margin-top: 3px; }
.user-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.user-name { color: #cdac80; font-size: 11px; font-weight: 600; letter-spacing: .5px; }

.btn {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 9px 18px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
}
.btn-ghost { background: transparent; color: #e9e9e9; border: 1px solid #5a6b8c; }
.btn-ghost:hover { border-color: #cdac80; color: #cdac80; }
.btn-gold { background: #cdac80; color: #002056; font-weight: 700; }
.btn-gold:hover { background: #a89274; color: #ffffff; }

.main { max-width: 1080px; margin: 0 auto; padding: 44px 32px 90px; }
.main--full { max-width: none; }
.section-title {
  font-size: 15px; font-weight: 700; color: #002056; text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 20px; padding-bottom: 9px; border-bottom: 1px solid #cdac80;
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.sim-card {
  position: relative;
  background: #00194a; border: 1px solid #1f4fa0; border-top: 4px solid #cdac80; border-radius: 6px;
  padding: 24px 26px; display: flex; flex-direction: column; gap: 10px;
}
.sim-card .tag {
  align-self: flex-start; background: #002056; color: #cdac80; border: 1px solid #cdac80;
  font-size: 12px; font-weight: 600; letter-spacing: 1px; padding: 3px 12px; border-radius: 2px;
  text-transform: uppercase;
}
.sim-card h3 { font-size: 18px; font-weight: 700; color: #ffffff; }
.sim-card a { align-self: flex-start; text-decoration: none; margin-top: auto; }

/* Descrição do módulo em tooltip (mouse sobre o bloco inteiro), no lugar do <p> sempre visível --
   usa data-tip em vez de title para poder estilizar com a identidade da marca (o title nativo do
   navegador usa a fonte do sistema, não a Montserrat). */
.sim-card[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: 0; right: 0; bottom: calc(100% + 10px);
  background: #002056; color: #e9e9e9; border: 1px solid #cdac80; border-radius: 4px;
  padding: 10px 14px; font-size: 13px; font-weight: 400; line-height: 1.5;
  text-transform: none; letter-spacing: normal;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 8px 24px rgba(0, 32, 86, .35); z-index: 20; pointer-events: none;
}
.sim-card[data-tip]:hover::after, .sim-card[data-tip]:focus-within::after {
  opacity: 1; visibility: visible; transform: translateY(0);
}

#loginOverlay {
  position: fixed; inset: 0; z-index: 1000; background: #f2f4f8;
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #ffffff; border: 1px solid #e2e6ee; border-top: 4px solid #cdac80; border-radius: 6px;
  padding: 36px 40px; width: 360px; box-shadow: 0 14px 44px rgba(0, 32, 86, .14);
}
.login-title { text-align: center; font-size: 16px; font-weight: 700; color: #002056; letter-spacing: 2px; text-transform: uppercase; }
.login-sub { text-align: center; font-size: 13px; color: #5a6b8c; margin: 6px 0 22px; }
.login-card label { display: block; font-size: 13px; font-weight: 600; color: #002056; margin-bottom: 5px; }
.login-card input {
  width: 100%; font-size: 14px; padding: 11px 13px; border: 1px solid #c9d2e0; border-radius: 4px;
  background: #ffffff; color: #002056; outline: none; margin-bottom: 14px;
}
#loginMsg { color: #b3261e; font-size: 13px; min-height: 18px; margin-top: 2px; }

#painel { display: none; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th {
  color: #cdac80; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  text-align: left; padding: 9px 10px; border-bottom: 2px solid #cdac80; background: #002056;
}
td { font-size: 13px; color: #002056; padding: 8px 10px; border-bottom: 1px solid #e2e6ee; }
tbody tr:nth-child(even) { background: #f5f7fa; }

.panel {
  background: #ffffff; border: 1px solid #e2e6ee; border-top: 3px solid #cdac80; border-radius: 6px;
  padding: 20px 22px; margin-bottom: 20px;
}
.panel input {
  font-family: "Montserrat", sans-serif; font-size: 14px; padding: 9px 12px; border: 1px solid #c9d2e0;
  border-radius: 4px; background: #ffffff; color: #002056; outline: none; width: 100%; box-sizing: border-box;
  height: 38px;
}
.panel label { display: block; font-size: 13px; font-weight: 600; color: #002056; margin-bottom: 4px; }
/* Título sempre acima do campo, mesmo quando o campo é estreito (ex.: max-width curto) -- sem
   isto, um input/select mais estreito que o texto do rótulo cabe do lado dele na mesma linha. */
.panel label > input, .panel label > select { display: block; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.form-row > div { flex: 1; min-width: 160px; }

.back-link { display: inline-block; margin-bottom: 18px; color: #1f4fa0; font-size: 13px; text-decoration: none; font-weight: 600; }
.back-link:hover { color: #cdac80; }

.msg { font-size: 13px; min-height: 18px; margin-top: 10px; }
.msg.erro { color: #b3261e; }
.msg.sucesso { color: #1f4fa0; }

.icon-btn {
  background: transparent; border: 1px solid #c9d2e0; color: #002056; border-radius: 4px;
  padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: "Montserrat", sans-serif;
}
.icon-btn:hover { border-color: #1f4fa0; color: #1f4fa0; }
.icon-btn.perigo:hover { border-color: #b3261e; color: #b3261e; }
.checkbox-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.checkbox-row label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #002056; }
select.panel-select {
  font-family: "Montserrat", sans-serif; font-size: 14px; padding: 9px 12px; border: 1px solid #c9d2e0;
  border-radius: 4px; background: #ffffff; color: #002056; outline: none; width: 100%; box-sizing: border-box;
  height: 38px;
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 20px; padding-bottom: 9px; border-bottom: 1px solid #cdac80;
}
.panel-header .section-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0, 32, 86, .55);
  align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.aberto { display: flex; }
.modal-box {
  width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto; margin: 0;
  box-shadow: 0 20px 60px rgba(0, 32, 86, .35);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-close {
  background: transparent; border: none; font-size: 22px; line-height: 1; color: #5a6b8c; cursor: pointer;
  padding: 2px 8px;
}
.modal-close:hover { color: #b3261e; }
