/* SMX App Shell
 * Shared styles for app-side pages (behind login or contextual tools):
 *   /perfil, /perfil/configuracoes, /certificado, /certificados/*, /simulation/*,
 *   /caso/* (and /en/ equivalents).
 * NOT for landing/marketing pages — those keep their own inline headers.
 *
 * Pairs with /assets/app-header.js which injects the markup.
 */

:root {
  --smx-bg: #0a0e17;
  --smx-bg-alt: #0d1220;
  --smx-surface: #131825;
  --smx-border: rgba(255,255,255,0.07);
  --smx-border-strong: rgba(255,255,255,0.14);
  --smx-text: #f2f4f8;
  --smx-muted: #8b95a7;
  --smx-dim: #5c6577;
  --smx-gold: #d4af37;
  --smx-gold-hover: #f4d47a;
  --smx-gold-dim: rgba(212,175,55,0.12);
}

.smx-app-header {
  border-bottom: 1px solid var(--smx-border);
  background: rgba(10,14,23,0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.smx-app-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.smx-app-header .smx-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--smx-text);
  font-weight: 800;
  font-size: 16px;
}

.smx-app-header .smx-brand img {
  height: 44px;
  width: auto;
  display: block;
}

.smx-app-header .smx-brand-sub {
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--smx-gold);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
  padding-left: 12px;
  border-left: 1px solid var(--smx-border-strong);
}

.smx-app-header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--smx-muted);
}

.smx-app-header-right .smx-nav-link {
  color: var(--smx-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color .15s;
}

.smx-app-header-right .smx-nav-link:hover,
.smx-app-header-right .smx-nav-link.is-active {
  color: var(--smx-gold);
}

.smx-app-header-right .smx-user {
  color: var(--smx-muted);
  font-size: 13px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smx-app-header-right .smx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--smx-muted);
  text-decoration: none;
  transition: color .15s, background .15s;
}

.smx-app-header-right .smx-icon-btn:hover {
  color: var(--smx-gold);
  background: var(--smx-gold-dim);
}

.smx-app-header-right .smx-icon-btn svg {
  width: 18px;
  height: 18px;
}

.smx-app-header-right .smx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  border: none;
  transition: all .15s;
  line-height: 1;
}

.smx-app-header-right .smx-btn-primary {
  background: var(--smx-gold);
  color: #0a0e17;
}
.smx-app-header-right .smx-btn-primary:hover {
  background: var(--smx-gold-hover);
}

.smx-app-header-right .smx-btn-ghost {
  background: transparent;
  color: var(--smx-text);
  border: 1px solid var(--smx-border-strong);
}
.smx-app-header-right .smx-btn-ghost:hover {
  border-color: var(--smx-gold);
  color: var(--smx-gold);
}

/* Hidden on print (certificate page prints without the header). */
@media print {
  .smx-app-header { display: none !important; }
}

/* Auth gate — pages using app-gate.js are hidden until checked. */
html.smx-gating { visibility: hidden; }

@media (max-width: 640px) {
  .smx-app-header-inner { padding: 12px 16px; }
  .smx-app-header .smx-brand img { height: 36px; }
  .smx-app-header .smx-brand-sub { display: none; }
  .smx-app-header-right { gap: 10px; }
  .smx-app-header-right .smx-user { max-width: 120px; font-size: 12px; }
}
