:root {
  --navy: #0f2b66;
  --royal: #1e6fea;
  --cyan: #16c5e8;
  --teal: #18d1b7;
  --orange: #f7941d;
  --graphite: #1e2430;
  --muted: #687386;
  --line: #dbe4f0;
  --soft: #e9eef5;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(15, 43, 102, .16);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--graphite);
  background: #f8fbff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
a { color: var(--royal); text-decoration: none; }
.glass-nav {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 228, 240, .8);
}
.brand-lockup { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--navy); }
.brand-lockup img {
  width: 58px;
  height: 44px;
  object-fit: contain;
}
.brand-lockup span { line-height: 1.1; }
.btn { border-radius: 8px; font-weight: 700; }
.btn-primary {
  --bs-btn-bg: var(--royal);
  --bs-btn-border-color: var(--royal);
  --bs-btn-hover-bg: var(--navy);
  --bs-btn-hover-border-color: var(--navy);
}
.btn-accent { background: var(--orange); color: #16120d; border: 0; }
.hero-section {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(15,43,102,.97), rgba(30,111,234,.88) 47%, rgba(24,209,183,.82)),
    radial-gradient(circle at 18% 22%, rgba(247,148,29,.45), transparent 30%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}
.hero-content { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 42px; }
.eyebrow {
  display: inline-flex;
  color: #dffcff;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.eyebrow.dark { color: var(--royal); }
.hero-section h1 { font-size: clamp(2.8rem, 6vw, 5.8rem); line-height: .95; font-weight: 900; margin-bottom: 22px; }
.hero-section .lead { max-width: 760px; font-size: 1.2rem; color: rgba(255,255,255,.9); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.signal-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: end;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.22), transparent 32%),
    radial-gradient(circle at 82% 72%, rgba(255,255,255,.12), transparent 28%),
    linear-gradient(145deg, rgba(22,58,120,.96), rgba(35,102,190,.92) 48%, rgba(52,174,214,.88));
  border: 1px solid rgba(148, 224, 255, .34);
  padding: clamp(24px, 4vw, 34px);
  border-radius: 8px;
  box-shadow: 0 34px 90px rgba(3, 18, 45, .34);
  min-height: 430px;
}
.signal-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(120deg, transparent 0 42%, rgba(255,255,255,.18) 42% 43%, transparent 43% 100%);
  opacity: .7;
}
.signal-panel::after {
  content: "";
  position: absolute;
  inset: auto -16% -34% 22%;
  z-index: -1;
  height: 230px;
  background: linear-gradient(90deg, rgba(30,111,234,.38), rgba(22,197,232,.3), rgba(247,148,29,.22));
  filter: blur(46px);
}
.signal-logo-box {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 2px 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.signal-logo-box::before {
  content: "";
  position: absolute;
  inset: 14% 4% 8%;
  background:
    radial-gradient(circle at 38% 35%, rgba(255,255,255,.22), transparent 34%),
    radial-gradient(circle at 70% 56%, rgba(247,148,29,.24), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.03));
  border-radius: 999px;
  filter: blur(10px);
  opacity: .95;
}
.signal-panel img {
  position: relative;
  width: min(100%, 390px);
  height: auto;
  max-height: 220px;
  object-fit: contain;
  filter: brightness(1.28) contrast(1.18) saturate(1.12) drop-shadow(0 18px 28px rgba(0,0,0,.32));
}
.signal-copy {
  min-width: 0;
}
.signal-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(24,209,183,.14);
  border: 1px solid rgba(24,209,183,.32);
  color: #dffcff;
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}
.signal-panel strong {
  display: block;
  color: white;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1;
  font-weight: 950;
}
.signal-panel p {
  margin: 12px 0 20px;
  color: rgba(255,255,255,.82);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 600;
}
.signal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.signal-tags span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.9);
  font-size: .76rem;
  font-weight: 850;
}
.signal-tags span:nth-child(2) { border-color: rgba(22,197,232,.45); }
.signal-tags span:nth-child(3) { border-color: rgba(247,148,29,.48); color: #ffe7c8; }
.section-pad { padding: 96px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.section-heading h2, .bio-page h2 { color: var(--navy); font-weight: 900; font-size: clamp(2rem, 4vw, 3.2rem); }
.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(15,43,102,.08);
  margin-bottom: 28px;
}
.activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.setup-callout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(247, 148, 29, .35);
  background: linear-gradient(135deg, #fff8ed, #eefbff);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(15,43,102,.08);
  margin-bottom: 24px;
}
.setup-callout strong {
  color: var(--navy);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .82rem;
}
.setup-callout span { color: var(--graphite); }
.activity-card {
  position: relative;
  min-height: 260px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15,43,102,.08);
}
.activity-card h3 { color: var(--navy); font-weight: 900; font-size: 1.35rem; margin: 18px 0 12px; }
.activity-card p { color: var(--muted); }
.preview-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--royal);
  font-weight: 900;
}
.card-topline, .meta-row { display: flex; gap: 8px; flex-wrap: wrap; }
.card-topline span, .card-topline strong, .meta-row span, .status-pill {
  font-size: .76rem;
  font-weight: 800;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--navy);
}
.card-topline strong { background: #fff0dc; color: #8b4b00; }
.meta-row { margin-top: 24px; }
.cover-sheet { padding: 120px 0 80px; background: linear-gradient(180deg, #eef6ff, #ffffff); }
.cover-document {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  background: var(--white);
  border-top: 10px solid var(--royal);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 56px);
}
.activity-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}
.cover-head {
  display: grid;
  grid-template-columns: minmax(170px, 220px) 1fr;
  gap: clamp(22px, 4vw, 42px);
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}
.cover-head img {
  width: 100%;
  max-width: 220px;
  max-height: 140px;
  object-fit: contain;
}
.cover-head span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff0dc;
  color: #9a5200;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.cover-head h1 {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.06;
  font-weight: 950;
  margin: 0;
}
.cover-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.cover-meta span { background: var(--soft); padding: 12px; border-radius: 8px; }
.activity-summary { font-size: 1.12rem; color: var(--muted); }
.activity-content { font-size: 1.08rem; line-height: 1.75; }
.activity-content h2, .activity-content h3 { color: var(--navy); font-weight: 900; margin-top: 30px; }
.activity-content blockquote { border-left: 5px solid var(--orange); padding: 14px 18px; background: #fff8ef; }
.media-frame { margin-top: 28px; border-radius: 8px; overflow: hidden; }
.resource-link { display: inline-flex; margin-top: 22px; font-weight: 900; color: var(--navy); }
.attachments-title { margin-top: 34px; color: var(--navy); font-weight: 900; }
.attachment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.attachment-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; color: var(--graphite); }
.attachment-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; margin-bottom: 10px; }
.file-icon { display: grid; place-items: center; height: 130px; background: var(--soft); color: var(--royal); font-weight: 900; border-radius: 6px; margin-bottom: 10px; }
.bio-portrait { background: var(--navy); color: white; padding: 34px; border-radius: 8px; box-shadow: var(--shadow); }
.bio-portrait img { width: 132px; margin-bottom: 24px; }
.bio-portrait img { width: 100%; max-width: 300px; height: auto; object-fit: contain; }
.bio-portrait h1 { font-weight: 900; }
.timeline-list { display: grid; gap: 14px; margin-top: 28px; }
.timeline-list div { border-left: 4px solid var(--teal); background: white; padding: 18px; border-radius: 8px; box-shadow: 0 10px 24px rgba(15,43,102,.07); }
.timeline-list strong { display: block; color: var(--navy); }
.site-footer { padding: 36px 0; color: white; background: var(--graphite); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: white; }
.footer-stack { display: grid; gap: 14px; justify-items: end; }
.footer-email { display: inline-flex; margin-top: 8px; color: #dffcff; font-weight: 800; }
.social-links, .bio-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.social-links { justify-content: flex-end; }
.social-links a, .bio-social a {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 7px 11px;
  color: white;
  font-size: .84rem;
  font-weight: 800;
}
.bio-social { margin-top: 26px; }
.bio-social a {
  border-color: var(--line);
  color: var(--navy);
  background: white;
  box-shadow: 0 10px 24px rgba(15,43,102,.07);
}
.login-body, .install-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--royal), var(--teal));
  padding: 20px;
}
.login-card, .install-card {
  width: min(100%, 430px);
  background: white;
  padding: 34px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.login-card img, .install-card img { width: 190px; display: block; margin-bottom: 18px; }
.login-card h1, .install-card h1 { color: var(--navy); font-weight: 900; }
.login-card a, .install-card a { display: inline-flex; margin-top: 16px; font-weight: 800; }
.admin-body { background: #f4f7fb; }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: var(--navy);
  color: white;
  padding: 22px;
}
.admin-brand { display: flex; align-items: center; gap: 12px; color: white; font-weight: 900; margin-bottom: 28px; }
.admin-brand img { width: 56px; height: 42px; object-fit: contain; background: white; border-radius: 8px; padding: 4px; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar nav a { color: rgba(255,255,255,.82); padding: 11px 12px; border-radius: 8px; font-weight: 800; }
.admin-sidebar nav a.active, .admin-sidebar nav a:hover { background: rgba(255,255,255,.12); color: white; }
.admin-main { margin-left: 260px; padding: 28px; }
.admin-topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
.admin-topbar span { color: var(--royal); font-weight: 900; text-transform: uppercase; }
.admin-topbar h1 { color: var(--navy); font-weight: 900; margin: 0; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.metric-card, .admin-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15,43,102,.06);
}
.metric-card { padding: 22px; }
.metric-card span { color: var(--muted); font-weight: 800; }
.metric-card strong { display: block; color: var(--navy); font-size: 2.5rem; line-height: 1; }
.admin-panel { padding: 22px; margin-bottom: 20px; }
.admin-panel h2 { color: var(--navy); font-weight: 900; font-size: 1.35rem; }
.config-hint { color: var(--muted); font-weight: 800; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.editor-shell { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }
.editor-toolbar { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px; background: #f1f6ff; border-bottom: 1px solid var(--line); }
.editor-toolbar button { border: 1px solid var(--line); background: white; border-radius: 6px; min-width: 40px; height: 36px; font-weight: 800; color: var(--navy); }
.visual-editor { min-height: 430px; padding: 28px; outline: none; line-height: 1.7; }
.visual-editor h2, .visual-editor h3 { color: var(--navy); font-weight: 900; }
.attachment-admin-list { display: flex; gap: 10px; flex-wrap: wrap; }
.attachment-admin-list a { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbff; font-weight: 800; }
.empty-state { grid-column: 1 / -1; padding: 32px; background: white; border: 1px dashed var(--line); border-radius: 8px; text-align: center; color: var(--muted); }

@media (max-width: 991px) {
  .filter-bar, .activity-grid, .cover-meta, .attachment-grid, .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .signal-panel { min-height: 390px; }
  .signal-logo-box { min-height: 170px; }
  .admin-sidebar { position: static; width: auto; }
  .admin-sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .admin-main { margin-left: 0; padding: 18px; }
}

@media (max-width: 640px) {
  .hero-section { min-height: auto; }
  .hero-content { padding-top: 82px; }
  .hero-section h1 { font-size: clamp(2.35rem, 13vw, 3.8rem); }
  .hero-section .lead { font-size: 1.02rem; }
  .hero-actions .btn { width: 100%; }
  .signal-panel, .cover-head { grid-template-columns: 1fr; }
  .activity-actions { justify-content: stretch; }
  .activity-actions .btn { width: 100%; }
  .cover-head img { max-width: 190px; }
  .signal-panel { padding: 20px; gap: 18px; min-height: 360px; }
  .signal-logo-box { min-height: 150px; }
  .signal-panel img { max-height: 160px; }
  .filter-bar, .activity-grid, .cover-meta, .attachment-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .section-pad { padding: 72px 0; }
  .cover-sheet { padding-top: 96px; }
  .admin-sidebar nav { grid-template-columns: 1fr 1fr; }
  .panel-heading, .admin-topbar { align-items: flex-start; flex-direction: column; }
  .setup-callout { grid-template-columns: 1fr; }
  .site-footer { text-align: center; }
  .footer-stack, .social-links { justify-items: center; justify-content: center; }
  .footer-links { justify-content: center; }
}

@media print {
  .glass-nav, .site-footer { display: none; }
  .cover-sheet { padding: 0; background: white; }
  .cover-document { box-shadow: none; border-radius: 0; }
}

/* Biografia editável */
.bio-portrait { overflow: hidden; padding: 0; }
.bio-portrait .bio-profile-logo { display: block; width: min(72%, 320px); max-width: none; margin: 42px auto 20px; object-fit: contain; }
.bio-portrait .bio-profile-photo { display: block; width: 100%; height: 430px; max-width: none; margin: 0; object-fit: cover; object-position: center top; }
.bio-portrait-content { padding: 30px 34px 34px; }
.bio-portrait-content h1 { margin-bottom: 10px; }
.bio-portrait-content p { margin: 0; color: rgba(255,255,255,.86); }
.bio-main-text { font-size: 1.05rem; line-height: 1.78; color: #24324a; white-space: normal; }
.timeline-list span { display: block; margin-top: 5px; line-height: 1.55; }
.bio-admin-preview { min-height: 300px; border: 2px dashed #cbd7eb; border-radius: 14px; overflow: hidden; background: #f5f8fd; display: grid; place-items: center; }
.bio-admin-preview img { width: 100%; height: 340px; object-fit: cover; object-position: center top; }
.bio-admin-placeholder { color: #6f7f99; font-weight: 800; }
.bio-admin-block { height: 100%; padding: 18px; border: 1px solid #e1e8f3; border-radius: 12px; background: #f9fbff; }

@media (max-width: 767.98px) {
  .bio-portrait .bio-profile-photo { height: 360px; }
  .bio-portrait-content { padding: 24px; }
  .bio-page h2 { font-size: 2rem; }
}
