@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --gold: #d4af37;
  --gold-2: #c9a52f;

  --bg: #050505;
  --panel: #080808;
  --panel-2: #0d0f14;
  --line: rgba(255, 255, 255, 0.07);
  --line-gold: rgba(212, 175, 55, 0.25);

  --text: #f5f5f5;
  --muted: #b9bec8;

  --green: #00dd84;
  --yellow: #d3ab10;
  --blue: #2e8fff;
  --purple: #b25eff;
  --orange: #ff9e2c;

  --side-1: #0b2245;
  --side-2: #08182f;
  --side-3: #050d1a;
}

/* Reset base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.05), transparent 22%),
    linear-gradient(90deg, #161616 0%, #050505 12%, #050505 88%, #161616 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  color: var(--gold);
}

p {
  line-height: 1.65;
}

.container {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.space-top {
  margin-top: 18px;
}

.auth-help {
  margin: 18px 0 0;
  text-align: center;
}

.auth-help a {
  color: var(--gold);
  font-weight: 700;
}

.auth-help a:hover {
  text-decoration: underline;
}

/* Header público */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.94);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: block;
}

.logo-stack {
  display: flex;
  align-items: center;
  gap: 14px;
}

.center-stack {
  justify-content: center;
}

.logo-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.05));
  border: 1px solid var(--line-gold);
  color: var(--gold);
  font-weight: 800;
  font-family: "Playfair Display", Georgia, serif;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.08));
}

.footer-logo {
  width: 64px;
  height: 64px;
}

.portal-logo {
  width: 72px;
  height: 72px;
}

.brand-title {
  font-size: 1.7rem;
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
}

.brand-subtitle {
  color: #f4efe8;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links > a:not(.btn) {
  color: #ebe7df;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
  outline: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  min-height: 40px;
  padding: 12px 18px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--gold);
  color: #111;
}

.btn-primary:hover {
  background: #e1bc46;
}

.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}

.btn-dark {
  background: #2d2f35;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-dark:hover {
  background: #393b43;
}

/* Secciones públicas */
.hero {
  padding: 40px 0 28px;
}

.hero-copy {
  text-align: center;
  max-width: 950px;
  margin: 0 auto;
}

.hero-copy h1 {
  font-size: clamp(3rem, 5vw, 5.5rem);
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-copy p {
  max-width: 1000px;
  margin: 0 auto;
  color: #f3efe7;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 32px 0;
}

.panel-soft,
.feature-card,
.video-card,
.step-card,
.cta-box,
.table-card,
.metric-card,
.mini-stat,
.auth-card,
.modal-box {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.018) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #09090a 0%, #040404 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.015),
    0 10px 30px rgba(0, 0, 0, 0.24);
}

.hero-visual {
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-symbol {
  font-size: 6rem;
  color: rgba(212, 175, 55, 0.4);
}

.hero-logo {
  width: min(320px, 58vw);
  max-width: 320px;
  opacity: 0.28;
  filter: drop-shadow(0 0 28px rgba(212, 175, 55, 0.08));
}

.section {
  padding: 28px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: clamp(2.2rem, 3vw, 3.2rem);
}

.section-header p {
  color: var(--muted);
}

.cards-grid {
  display: grid;
  gap: 18px;
}

.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.step-card {
  padding: 22px;
}

.icon-box {
  width: 70px;
  height: 70px;
  border-radius: 14px;
  border: 1px solid var(--line-gold);
  display: grid;
  place-items: center;
  color: var(--gold);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.03));
  font-size: 2rem;
}

.feature-card h3,
.step-card h3 {
  margin-top: 18px;
  color: #fff;
  font-size: 1.05rem;
}

.feature-card p,
.step-card p {
  color: #d2cbc0;
}

/* Recursos / videos */
.video-card {
  background: #111;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.18);
  display: flex;
  flex-direction: column;
}

.video-thumb {
  width: 100%;
  height: 190px;
  background: #1a1a1a;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-body {
  padding: 18px;
  background: linear-gradient(180deg, #111111 0%, #191919 100%);
}

.video-body h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.35;
  color: #f5f1e8;
  font-family: "Playfair Display", Georgia, serif;
}

.video-body p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #d7d0c2;
}

.video-body a {
  display: inline-block;
  margin-top: 4px;
  color: var(--gold);
  font-weight: 600;
}

.video-body a:hover {
  text-decoration: underline;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
}

.step-number {
  font-size: 2rem;
  color: rgba(212, 175, 55, 0.75);
  font-family: "Playfair Display", Georgia, serif;
  margin-bottom: 8px;
}

.cta-box {
  text-align: center;
  padding: 48px 24px;
  margin-top: 26px;
}

.mission-vision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 22px;
}

/* Footer */
.footer {
  padding: 40px 0 60px;
  background: #050505;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 0.9fr;
  gap: 28px;
}

.map-box {
  height: 220px;
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #1c1c1f;
  color: #c4b07c;
  margin: 12px 0;
}

.map-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.footer-links li {
  margin: 12px 0;
}

/* Auth */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-shell {
  width: min(520px, 100%);
}

.wide-shell {
  width: min(980px, 100%);
}

.auth-back {
  display: inline-block;
  margin-bottom: 16px;
  color: #e7dfcf;
}

.auth-card {
  padding: 28px;
}

.auth-card h1 {
  font-size: 2.25rem;
  margin: 18px 0 10px;
}

.sample-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
}

/* Alertas */
.alert {
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.alert-success {
  background: rgba(0, 193, 106, 0.12);
  border: 1px solid rgba(0, 193, 106, 0.25);
  color: #7cf0b6;
}

.alert-error {
  background: rgba(255, 85, 85, 0.1);
  border: 1px solid rgba(255, 85, 85, 0.22);
  color: #ff9b9b;
}

/* Formularios */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.single-col {
  grid-template-columns: 1fr;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group-full {
  width: 100%;
  margin-top: 20px;
}

.form-group-full textarea {
  width: 100%;
  resize: vertical;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  display: block;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea,
.filters-row input,
.filters-row select,
input,
select,
textarea {
  width: 100%;
  background: #0b101a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  outline: none;
}

.form-group textarea,
textarea {
  resize: vertical;
  min-height: 110px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(212, 175, 55, 0.58);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.11);
}

.span-2 {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

/* Portal */
.portal-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, var(--side-1) 0%, var(--side-2) 42%, var(--side-3) 100%);
  border-right: 1px solid rgba(130, 160, 230, 0.16);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}

.sidebar-brand {
  min-height: 180px;
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  gap: 14px;
}

.sidebar-brand .brand-logo {
  width: 88px;
  height: 88px;
}

.sidebar-brand-copy {
  text-align: center;
  line-height: 1.25;
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
}

.sidebar-brand-copy span {
  display: block;
  color: #f0f0f0;
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 14px 0;
  padding: 14px 16px;
  border-radius: 14px;
  color: #f5f7fa;
  font-size: 15px;
  font-weight: 600;
  transition: 0.18s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-link.active {
  background: var(--gold);
  color: #111;
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.16);
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.portal-main {
  min-width: 0;
  background: transparent;
}

.portal-header {
  height: 86px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(6px);
}

.portal-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
}

.header-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.header-user strong {
  color: #f5f5f5;
  font-size: 14px;
}

.header-user a {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.header-user span {
  display: block;
  color: #6982a9;
  font-size: 0.92rem;
}

.portal-content {
  padding: 22px 28px 28px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.metric-card {
  min-height: 148px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}

.metric-kpi {
  color: #b3b9c5;
  font-size: 15px;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.table-card {
  overflow: hidden;
  margin-bottom: 22px;
}

.table-card-header {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
}

.table-card-header.between,
.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.table-card-header h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  font-family: "Playfair Display", Georgia, serif;
}

.filters-row {
  padding: 20px 28px 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: #080808;
}

.filters-row input,
.filters-row select {
  min-width: 220px;
  flex: 1 1 220px;
}

.table-wrap {
  padding: 18px 28px 24px;
  overflow: auto;
}

.table-wrap table,
table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap table {
  min-width: 900px;
}

.table-wrap thead th,
th {
  text-align: left;
  padding: 14px 16px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table-wrap tbody td,
td {
  padding: 16px;
  color: #f2f2f2;
  font-size: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-wrap tbody td {
  vertical-align: middle;
}

.table-wrap td {
  vertical-align: top;
}

.table-wrap tbody tr {
  background: rgba(255, 255, 255, 0.012);
}

.table-wrap tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-blue { background: rgba(34, 104, 255, 0.18); color: #70a6ff; }
.badge-green { background: rgba(0, 188, 102, 0.18); color: #31e48c; }
.badge-yellow { background: rgba(212, 175, 55, 0.18); color: #f5cb49; }
.badge-purple { background: rgba(166, 98, 255, 0.18); color: #ca93ff; }
.badge-orange { background: rgba(255, 145, 61, 0.18); color: #ffbf79; }
.badge-gray { background: rgba(255, 255, 255, 0.10); color: #ddd; }

.stats-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.mini-stat {
  min-height: 106px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mini-stat div {
  color: #b3b8c3;
  font-size: 15px;
  margin-bottom: 6px;
}

.mini-stat strong {
  color: #fff;
  font-size: 28px;
}

.mini-stat.green strong {
  color: #20e28c;
}

.mini-stat.yellow strong {
  color: #ffcf3d;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.message-cell {
  max-width: 320px;
  white-space: normal;
  line-height: 1.45;
}

.inline-form {
  display: inline-flex;
  margin-left: 6px;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

.modal.open {
  display: flex;
}

.modal-box {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  position: relative;
}

.modal-box h3 {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 28px;
  font-family: "Playfair Display", Georgia, serif;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #1a1c20;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
}

/* Vista previa sitio */
.site-preview {
  padding: 24px 28px 30px;
}

.site-preview-image {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 14px;
}

/* Notificaciones JS */
.js-notify-box {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(92vw, 360px);
}

.js-notify {
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.25s ease;
  background: #15161a;
  border: 1px solid #2d3138;
  color: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  font-weight: 700;
}

.js-notify.show {
  opacity: 1;
  transform: translateY(0);
}

.js-notify.success {
  border-color: rgba(0, 221, 132, 0.28);
  color: #8df5bf;
}

.js-notify.error {
  border-color: rgba(255, 86, 86, 0.28);
  color: #ffb0b0;
}

/* Responsive */
@media (max-width: 1200px) {
  .cards-3,
  .steps-grid,
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .portal-layout {
    grid-template-columns: 210px 1fr;
  }
}

@media (max-width: 1100px) {
  .stats-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .portal-header {
    padding: 18px 20px;
    height: auto;
  }

  .portal-content {
    padding: 18px;
  }

  .metrics-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .table-card-header,
  .filters-row,
  .table-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 820px) {
  .container {
    width: min(100% - 24px, 1500px);
  }

  .nav-links {
    display: none;
  }

  .cards-3,
  .steps-grid,
  .mission-vision-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 2.6rem;
  }

  .filters-row {
    grid-template-columns: 1fr;
  }
}
/* ===== AJUSTES FINOS DE ESPACIADO ===== */

/* Login: que no se vea tan lejos ni tan “flotado” */
.auth-body {
  padding: 18px;
}

.auth-shell {
  width: min(560px, 100%);
}

.auth-card {
  padding: 24px;
}

.auth-card h1 {
  font-size: 2rem;
  margin: 14px 0 8px;
}

/* Recursos: tarjetas un poco más compactas */
.cards-grid {
  gap: 18px;
}

.video-thumb {
  height: 190px;
}

.video-body {
  padding: 16px;
}

.video-body h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.video-body p {
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 10px;
}

/* Cómo trabajamos: menos amontonado */
.section {
  padding: 40px 0;
}

.section-header {
  margin-bottom: 30px;
}

.steps-grid {
  gap: 22px;
}

.step-card {
  padding: 24px;
}

.step-card h3 {
  margin-top: 10px;
  margin-bottom: 10px;
}

.step-card p {
  margin: 0;
  line-height: 1.55;
}

/* Misión y visión un poco más respiradas */
.mission-vision-grid {
  gap: 22px;
  margin-top: 22px;
}

/* CTA de abajo: menos alto */
.cta-box {
  padding: 34px 22px;
  margin-top: 22px;
}

/* Footer: mapa un poquito más equilibrado */
.map-box {
  height: 260px;
}

/* Portal: tabla con menos “aire vacío” */
.table-card-header {
  padding: 18px 22px;
}

.table-wrap {
  padding: 12px 22px 18px;
}

.table-wrap thead th {
  padding: 12px 14px;
}

.table-wrap tbody td {
  padding: 14px;
}

/* Calendario del portal */
.portal-layout {
  grid-template-columns: 264px minmax(0, 1fr);
  background:
    radial-gradient(circle at 88% 4%, rgba(212, 175, 55, 0.08), transparent 24%),
    #06070a;
}

.sidebar {
  padding: 16px 12px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(16, 42, 80, 0.98), rgba(5, 17, 35, 0.99)),
    var(--side-2);
  box-shadow: 18px 0 45px rgba(0, 0, 0, 0.18);
}

.sidebar-brand {
  min-height: 150px;
  margin: 0 6px 10px;
  border: 1px solid rgba(212, 175, 55, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-brand .brand-logo { width: 74px; height: 74px; }

.sidebar-link {
  position: relative;
  margin: 5px 6px 0;
  border: 1px solid transparent;
}

.sidebar-link::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  content: "";
}

.sidebar-link:hover {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.sidebar-link.active::before { background: #111; }

.sidebar-group {
  margin: 6px 6px 0;
}

.sidebar-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: #f5f7fa;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition: .18s ease;
}

.sidebar-group-toggle::-webkit-details-marker { display: none; }
.sidebar-group-toggle:hover { background: rgba(255, 255, 255, 0.06); }
.sidebar-group[open] .sidebar-group-toggle { border-color: rgba(212, 175, 55, 0.22); color: var(--gold); }
.sidebar-chevron { transition: transform .18s ease; }
.sidebar-group[open] .sidebar-chevron { transform: rotate(180deg); }
.sidebar-submenu { padding: 3px 0 5px 10px; }
.sidebar-sublink { min-height: 40px; margin-top: 3px; padding: 10px 12px; font-size: 13px; }

.portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 94px;
  height: auto;
  border-bottom-color: rgba(212, 175, 55, 0.12);
  background: rgba(7, 8, 11, 0.86);
  backdrop-filter: blur(18px);
}

.portal-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #7f8ba0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portal-header-actions,
.header-user {
  display: flex;
  align-items: center;
}

.portal-header-actions { gap: 14px; }

.header-user {
  min-width: 0;
  flex-direction: row;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.header-user div { min-width: 0; }
.header-user strong { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-user a { margin: 0 0 0 4px; }

.user-avatar {
  display: grid !important;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  place-items: center;
  background: linear-gradient(145deg, var(--gold), #a57b12);
  color: #111 !important;
  font-weight: 900;
}

.portal-content { max-width: 1680px; margin: 0 auto; padding: 28px 32px 40px; }

.metric-card,
.table-card,
.calendar-card {
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.metric-card {
  overflow: hidden;
  background: linear-gradient(145deg, rgba(18, 21, 29, 0.98), rgba(9, 10, 14, 0.98));
}

.metric-card::after {
  position: absolute;
  top: -25px;
  right: -25px;
  width: 92px;
  height: 92px;
  border: 18px solid rgba(212, 175, 55, 0.055);
  border-radius: 50%;
  content: "";
}

.notification-center { position: relative; }

.notification-button {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  place-items: center;
  background: rgba(212, 175, 55, 0.07);
  color: var(--gold);
  font-size: 24px;
  cursor: pointer;
}

.notification-button b {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #08090c;
  border-radius: 999px;
  place-items: center;
  background: #e45757;
  color: #fff;
  font-size: 10px;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 100;
  width: min(390px, calc(100vw - 30px));
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 18px;
  background: #101218;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.notification-panel[hidden] { display: none; }

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.notification-panel-head strong,
.notification-panel-head span { display: block; }
.notification-panel-head span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.notification-panel-head button { border: 0; background: transparent; color: var(--gold); font-size: 11px; font-weight: 800; cursor: pointer; }
.notification-panel-head button:disabled { color: #7f8794; cursor: default; }

.notification-list { max-height: 430px; overflow-y: auto; }

.notification-item {
  position: relative;
  display: block;
  padding: 14px 18px 14px 22px;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease;
}

.notification-item::before { position: absolute; top: 18px; left: 10px; width: 5px; height: 5px; border-radius: 50%; background: #2e8fff; content: ""; }
.notification-item.audiencia::before { background: var(--gold); }
.notification-item:hover { background: rgba(255, 255, 255, 0.035); }
.notification-item time { display: block; margin-bottom: 4px; color: var(--gold); font-size: 11px; font-weight: 800; }
.notification-item strong { display: block; color: #f7f7f7; font-size: 13px; }
.notification-item span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.notification-empty { padding: 28px 18px; color: var(--muted); text-align: center; }

.calendar-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-2);
}

.calendar-toolbar,
.calendar-controls,
.calendar-nav,
.calendar-create-actions,
.calendar-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-toolbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-toolbar h2 {
  text-transform: capitalize;
}

.calendar-controls {
  padding: 12px 0 18px;
}

.calendar-controls label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.calendar-controls input[type="checkbox"] {
  accent-color: var(--gold);
}

.calendar-create-actions {
  margin-left: auto;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  padding: 10px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-grid {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #08090c;
}

.calendar-day {
  min-height: 128px;
  padding: 8px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: rgba(255, 255, 255, 0.018); color: #676b73; }
.calendar-day.selected { box-shadow: inset 0 0 0 2px var(--gold); }
.calendar-day.today .calendar-day-number { background: var(--gold); color: #111; }

.calendar-day-number {
  display: grid;
  width: 28px;
  height: 28px;
  margin: 0 0 6px auto;
  border-radius: 50%;
  place-items: center;
  font-weight: 800;
}

.calendar-event {
  display: flex;
  width: 100%;
  gap: 5px;
  margin: 4px 0;
  padding: 6px 7px;
  overflow: hidden;
  border: 0;
  border-left: 3px solid;
  border-radius: 7px;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.calendar-event time { flex: 0 0 auto; font-size: 11px; font-weight: 800; }
.calendar-event span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.cita { border-color: #2e8fff; background: rgba(46, 143, 255, 0.25); }
.calendar-event.audiencia { border-color: var(--gold); background: rgba(212, 175, 55, 0.2); }
.calendar-event.agenda { border-color: var(--muted); background: rgba(255, 255, 255, 0.09); }

.calendar-legend { justify-content: flex-end; margin-top: 14px; color: var(--muted); font-size: 12px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-dot.cita { background: #2e8fff; }
.legend-dot.audiencia { background: var(--gold); }

.calendar-detail {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 10px 16px;
  margin: 22px 0 0;
}

.calendar-detail dt { color: var(--muted); font-weight: 700; }
.calendar-detail dd { margin: 0; }

@media (max-width: 820px) {
  .calendar-card { padding: 14px; }
  .calendar-grid { overflow-x: auto; grid-template-columns: repeat(7, minmax(105px, 1fr)); }
  .calendar-weekdays { grid-template-columns: repeat(7, minmax(105px, 1fr)); overflow-x: auto; }
  .calendar-day { min-height: 110px; }
  .calendar-create-actions { width: 100%; margin-left: 0; }
}

/* Responsive */
@media (max-width: 820px) {
  .video-thumb {
    height: 210px;
  }

  .steps-grid,
  .mission-vision-grid {
    gap: 18px;
  }

  .section {
    padding: 32px 0;
  }

  .auth-body {
    padding: 14px;
  }

  .portal-header {
    align-items: flex-start;
    gap: 14px;
  }

  .portal-header-actions { margin-left: auto; }
  .header-user { padding: 6px; }
  .header-user div { display: none; }
  .portal-content { padding: 18px 14px 30px; }
  .notification-panel { position: fixed; top: 82px; right: 12px; }
}

/* ===== Pulido visual global (misma paleta) ===== */
.topbar {
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

.topbar-inner {
  min-height: 92px;
}

.brand-link,
.nav-links > a,
.footer-links a,
.auth-back {
  transition: transform 0.18s ease, opacity 0.18s ease, color 0.18s ease;
}

.brand-link:hover { transform: translateY(-1px); }

.nav-links > a:not(.btn) {
  position: relative;
  padding: 12px 2px;
  font-size: 14px;
  font-weight: 650;
}

.nav-links > a:not(.btn)::after {
  position: absolute;
  right: 50%;
  bottom: 6px;
  left: 50%;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  content: "";
  transition: right 0.18s ease, left 0.18s ease;
}

.nav-links > a:not(.btn):hover::after { right: 0; left: 0; }

.btn {
  position: relative;
  overflow: hidden;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.16);
}

.btn:active { transform: translateY(0) scale(0.985); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.hero {
  min-height: calc(100vh - 92px);
  display: flex;
  align-items: center;
  padding: 72px 0 58px;
}

.hero-copy { max-width: 1120px; }

.hero-copy h1 {
  max-width: 1040px;
  margin-right: auto;
  margin-left: auto;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-copy > p {
  max-width: 820px;
  text-wrap: pretty;
}

.hero-visual {
  position: relative;
  min-height: 320px;
  max-width: 980px;
  margin: 0 auto;
  border-radius: 26px;
}

.hero-visual::before,
.hero-visual::after {
  position: absolute;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  content: "";
}

.hero-visual::before { width: 250px; height: 250px; }
.hero-visual::after { width: 310px; height: 310px; opacity: 0.45; }
.hero-logo { position: relative; z-index: 1; opacity: 0.42; }

.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-header {
  max-width: 760px;
  margin-right: auto;
  margin-bottom: 42px;
  margin-left: auto;
}

.section-header h2 {
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-header p {
  max-width: 650px;
  margin: 14px auto 0;
  text-wrap: pretty;
}

.feature-card,
.video-card,
.step-card {
  position: relative;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.feature-card:hover,
.video-card:hover,
.step-card:hover {
  z-index: 1;
  border-color: var(--line-gold);
  transform: translateY(-5px);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.feature-card {
  min-height: 250px;
  padding: 28px;
}

.feature-card h3,
.step-card h3 { font-size: 1.12rem; }

.feature-card p,
.step-card p {
  margin-bottom: 0;
  text-wrap: pretty;
}

.icon-box {
  width: 64px;
  height: 64px;
  transition: transform 0.22s ease;
}

.feature-card:hover .icon-box { transform: scale(1.06) rotate(-2deg); }

.video-card { border-radius: 20px; }
.video-thumb { height: 220px; }
.video-thumb img { transition: transform 0.4s ease; }
.video-card:hover .video-thumb img { transform: scale(1.045); }

.video-body {
  display: flex;
  min-height: 205px;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.video-body a { margin-top: auto; padding-top: 12px; }

.steps-grid { gap: 18px; }

.step-card {
  min-height: 235px;
  padding: 28px;
}

.step-number {
  display: inline-flex;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  font-size: 1.35rem;
}

.mission-vision-grid .step-card { min-height: 210px; }

.cta-box {
  position: relative;
  overflow: hidden;
  padding: 52px 28px;
  border-color: var(--line-gold);
  border-radius: 24px;
}

.cta-box::after {
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  border: 30px solid rgba(212, 175, 55, 0.04);
  border-radius: 50%;
  content: "";
}

.cta-box > * { position: relative; z-index: 1; }

.footer {
  padding-top: 58px;
  border-top: 1px solid var(--line-gold);
}

.footer-grid { gap: 48px; }
.footer-grid > div { min-width: 0; }
.footer h3 { margin-bottom: 18px; }
.footer p { color: var(--muted); }

.footer-links li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.footer-links a {
  display: block;
  padding: 12px 0;
}

.footer-links a:hover { padding-left: 6px; color: var(--gold); }

.map-box {
  height: 280px;
  border-color: var(--line-gold);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.auth-body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(212, 175, 55, 0.07), transparent 28%),
    radial-gradient(circle at 82% 82%, rgba(11, 34, 69, 0.38), transparent 30%),
    #050505;
}

.auth-shell { position: relative; }

.auth-back {
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
}

.auth-back:hover { color: var(--gold); transform: translateX(-3px); }

.auth-card {
  padding: 34px;
  border-color: var(--line-gold);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.auth-card h1 { letter-spacing: -0.025em; }
.auth-card > .muted { margin-bottom: 24px; }

.sample-box {
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.65;
}

.form-grid { gap: 20px; }

.form-group label {
  letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea,
.filters-row input,
.filters-row select,
input,
select,
textarea {
  min-height: 50px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

textarea { line-height: 1.55; }

input:hover,
select:hover,
textarea:hover { border-color: var(--line-gold); }

input:focus,
select:focus,
textarea:focus { transform: translateY(-1px); }

.form-actions {
  gap: 10px;
  padding-top: 4px;
}

.alert {
  position: relative;
  padding-left: 42px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.alert::before {
  position: absolute;
  top: 50%;
  left: 16px;
  font-weight: 900;
  content: "•";
  transform: translateY(-50%);
}

.filters-row {
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.table-wrap { scrollbar-color: var(--gold) transparent; }

.table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
  backdrop-filter: blur(12px);
}

.table-wrap tbody tr { transition: background 0.16s ease, transform 0.16s ease; }
.table-wrap tbody tr:hover { background: rgba(212, 175, 55, 0.028); }

.table-actions,
.inline-form {
  gap: 7px;
}

.badge {
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.modal {
  padding: 22px;
  backdrop-filter: blur(10px);
}

.modal.open .modal-box { animation: modal-enter 0.2s ease both; }

.modal-box {
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  border-color: var(--line-gold);
  border-radius: 24px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.5);
}

.modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  place-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.modal-close:hover { border-color: var(--line-gold); transform: rotate(4deg); }

@keyframes modal-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1100px) {
  .topbar-inner { align-items: flex-start; flex-direction: column; padding-top: 16px; padding-bottom: 14px; }
  .nav-links { width: 100%; justify-content: flex-start; }
  .hero { min-height: auto; }
}

@media (max-width: 820px) {
  .topbar { position: relative; }
  .topbar-inner { gap: 12px; }
  .brand-title { font-size: 1.35rem; }
  .brand-subtitle { font-size: 0.82rem; }
  .nav-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 4px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links > a { flex: 0 0 auto; }
  .nav-links > a:not(.btn) { padding: 12px 4px; }
  .hero { padding: 54px 0 42px; }
  .hero-copy h1 { font-size: clamp(2.45rem, 12vw, 3.5rem); }
  .hero-visual { min-height: 250px; }
  .hero-visual::before { width: 190px; height: 190px; }
  .hero-visual::after { width: 230px; height: 230px; }
  .section { padding: 52px 0; }
  .section-header { margin-bottom: 30px; }
  .feature-card, .step-card { min-height: auto; }
  .video-thumb { height: 210px; }
  .footer-grid { gap: 34px; }
  .auth-card { padding: 24px 20px; }
  .form-actions .btn { width: 100%; }
  .modal { padding: 12px; }
  .modal-box { max-height: calc(100vh - 24px); padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.consent-field {
  border: 1px solid var(--border, #d8d2c7);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
}
