@font-face {
  font-family: "Recoleta";
  src: url("./assets/Recoleta-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #111111;
  --paper: #f4f0e8;
  --white: #ffffff;
  --wine: #790008;
  --lime: #e8ff55;
  --pink: #bc8e8f;
  --line: rgba(17, 17, 17, 0.2);
  --display: "Recoleta", Georgia, serif;
  --sans: Arial, Helvetica, sans-serif;
  color-scheme: light;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--wine); color: var(--white); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  border: 2px solid var(--ink);
  background: var(--lime);
  padding: 11px 16px;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.kicker {
  margin: 0;
  font: 800 0.72rem/1.2 var(--sans);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.kicker-light { color: var(--lime); }

/* Acceso */
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  min-height: 100svh;
  overflow: auto;
  isolation: isolate;
  background: var(--wine);
  color: var(--white);
  transition: opacity 0.42s ease;
}
.gate.is-unlocking { opacity: 0; pointer-events: none; }
.gate-video,
.gate-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.gate-video {
  z-index: -3;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.82) contrast(1.08) blur(1.4px);
  transform: scale(1.015);
}
.gate-scrim {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(13,0,1,0.94) 0%, rgba(75,0,7,0.74) 49%, rgba(9,9,9,0.91) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.66));
}
.gate-shell {
  display: flex;
  width: min(100%, 1720px);
  min-height: 100svh;
  flex-direction: column;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 50px) clamp(22px, 4.4vw, 76px) 26px;
}
.gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.36);
}
.gate-logo { width: clamp(200px, 18vw, 290px); height: auto; }
.gate-header > span,
.gate-foot {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}
.gate-layout {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.72fr);
  align-items: center;
  gap: clamp(46px, 7vw, 120px);
  padding: clamp(44px, 6vh, 86px) 0;
}
.gate-intro { align-self: end; padding-bottom: clamp(12px, 4vh, 56px); }
.gate-intro h1 {
  max-width: 900px;
  margin: 22px 0 0;
  font: 600 clamp(4.5rem, 8.4vw, 9.2rem)/0.82 var(--display);
  letter-spacing: -0.065em;
  text-wrap: balance;
}
.gate-intro > p:last-child {
  max-width: 650px;
  margin: 30px 0 0;
  font-size: clamp(1rem, 1.4vw, 1.28rem);
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
}
.login-panel {
  width: 100%;
  max-width: 560px;
  justify-self: end;
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 26px;
  background: rgba(12,12,12,0.72);
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  padding: clamp(26px, 3vw, 42px);
  backdrop-filter: blur(18px);
}
.login-panel h2 {
  margin: 16px 0 0;
  font: 600 clamp(2.65rem, 4vw, 4.4rem)/0.9 var(--display);
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.login-intro {
  max-width: 430px;
  margin: 18px 0 28px;
  color: rgba(255,255,255,0.72);
  font-size: 0.96rem;
}
.login-form {
  display: grid;
  gap: 10px;
}
.login-form label {
  margin-top: 7px;
  color: rgba(255,255,255,0.76);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.credential-control {
  display: grid;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,0.38);
  border-radius: 15px;
  background: rgba(255,255,255,0.07);
  padding: 0 14px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.credential-control:hover { border-color: rgba(255,255,255,0.68); }
.credential-control:focus-within {
  border-color: var(--lime);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 4px rgba(232,255,85,0.12);
}
.credential-control:has(input[aria-invalid="true"]) {
  border-color: #ff9e9e;
  box-shadow: 0 0 0 4px rgba(255,158,158,0.1);
}
.credential-control svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.65;
  opacity: 0.7;
}
.credential-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  padding: 16px 0;
}
.credential-control input::placeholder { color: rgba(255,255,255,0.42); }
.password-toggle {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--lime);
  padding: 0 7px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
}
.password-toggle:hover { background: rgba(232,255,85,0.1); }
.login-submit {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  border: 1px solid var(--lime);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  padding: 0 22px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(0,0,0,0.24);
}
.login-submit:disabled { opacity: 0.62; cursor: wait; transform: none; }
.login-submit > span:last-child { font-size: 1.2rem; }
.login-message {
  min-height: 24px;
  margin: 2px 0 0;
  font-size: 0.78rem;
}
.login-message.is-error { color: #ffc0c0; }
.login-message.is-success { color: var(--lime); }
.login-help {
  margin: 12px 0 0;
  color: rgba(255,255,255,0.62);
  font-size: 0.74rem;
}
.login-help a {
  color: var(--white);
  font-weight: 800;
  text-underline-offset: 3px;
}
.gate-foot {
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.36);
  color: rgba(255,255,255,0.72);
}
/* Biblioteca */
.app { display: flex; min-height: 100svh; flex-direction: column; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 42px);
  padding: 14px clamp(22px, 4vw, 66px);
  border-bottom: 1px solid var(--ink);
  background: rgba(244,240,232,0.97);
  backdrop-filter: blur(15px);
}
.brand-link {
  display: block;
  width: clamp(220px, 21vw, 310px);
  flex: 0 1 auto;
}
.brand-link img { width: 100%; height: auto; }
.mobile-menu-toggle {
  display: none;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  padding: 0 14px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}
.mobile-menu-toggle svg,
.nav-dropdown summary svg,
.lock-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.global-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.global-nav-home,
.nav-dropdown summary,
.lock-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  padding: 0 15px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}
.global-nav-home:hover,
.nav-dropdown summary:hover {
  border-color: rgba(17,17,17,0.35);
  background: var(--white);
}
.nav-dropdown { position: relative; }
.nav-dropdown summary { list-style: none; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown[open] summary {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--white);
}
.nav-dropdown[open] summary svg { transform: rotate(180deg); }
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  width: min(310px, calc(100vw - 32px));
  gap: 3px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 22px 55px rgba(0,0,0,0.24);
  padding: 9px;
}
.nav-dropdown-brands .nav-dropdown-panel { right: 0; left: auto; }
.nav-dropdown-panel a {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 11px;
  padding: 8px 12px;
  color: rgba(255,255,255,0.82);
  font-size: 0.79rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
}
.nav-dropdown-panel a:hover,
.nav-dropdown-panel a.is-current {
  background: var(--wine);
  color: var(--white);
}
.nav-dropdown-panel a.is-current::after {
  color: var(--lime);
  content: "●";
  font-size: 0.55rem;
}
.nav-dropdown-brands .nav-dropdown-panel a span {
  color: var(--lime);
  font-size: 0.95rem;
}
.lock-button { border-color: var(--ink); }
.lock-button:hover {
  background: var(--ink);
  color: var(--white);
}
.workspace {
  width: min(100%, 1540px);
  flex: 1;
  margin: 0 auto;
  padding: clamp(54px, 7vw, 112px) clamp(20px, 5vw, 80px) 120px;
}
.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.42fr);
  align-items: end;
  gap: clamp(34px, 8vw, 120px);
}
.page-heading h2 {
  margin: 18px 0 0;
  scroll-margin-top: 120px;
  font: 600 clamp(4.2rem, 8vw, 8.7rem)/0.82 var(--display);
  letter-spacing: -0.065em;
  text-wrap: balance;
}
.page-heading > p {
  max-width: 430px;
  margin: 0 0 8px;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.55;
}
.library-nav {
  display: flex;
  max-width: 100%;
  margin-top: clamp(50px, 6vw, 78px);
  margin-inline: -4px;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px;
  scrollbar-width: thin;
  scroll-padding-inline: 4px;
  scroll-snap-type: x proximity;
}
.library-tab {
  display: flex;
  min-width: max-content;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  padding: 0 clamp(24px, 3vw, 40px);
  cursor: pointer;
  scroll-snap-align: start;
  text-align: center;
  font: 600 clamp(1.25rem, 1.8vw, 1.75rem)/1 var(--display);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.library-tab:hover { background: var(--white); }
.library-tab.is-active {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--white);
  box-shadow: 0 3px 0 rgba(17,17,17,0.18);
}
.library-tab.is-active:hover { background: #650007; }
.library-tab:focus-visible { outline-offset: -4px; }
.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 42px 0 28px;
}
.search-box {
  display: flex;
  width: min(100%, 560px);
  min-height: 50px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ink);
}
.search-box svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.94rem;
}
.search-box input::placeholder { color: rgba(17,17,17,0.58); }
kbd {
  border: 1px solid var(--line);
  background: transparent;
  padding: 2px 7px;
  font: 700 0.72rem var(--sans);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.project-grid[data-category="project"],
.project-grid[data-category="tool"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.project-grid[data-category="people"],
.project-grid[data-category="person"] {
  display: block;
}

/* Personas */
.people-directory {
  border: 1px solid rgba(17,17,17,0.72);
  border-radius: 22px;
  background: rgba(255,255,255,0.48);
  box-shadow: 0 10px 0 rgba(17,17,17,0.06);
  overflow: hidden;
}
.people-policy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  padding: 22px clamp(20px, 3vw, 34px);
}
.people-policy-copy { max-width: 780px; }
.people-policy strong {
  display: block;
  font: 600 clamp(1.55rem, 2vw, 2.1rem)/1 var(--display);
  letter-spacing: -0.025em;
}
.people-policy p {
  max-width: 720px;
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-size: 0.82rem;
}
.people-policy .kicker {
  flex: 0 0 auto;
  color: var(--lime);
  white-space: nowrap;
}
.people-policy-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.44);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.people-team { padding: 0 clamp(20px, 3vw, 34px); }
.people-team + .people-team { border-top: 1px solid rgba(17,17,17,0.28); }
.people-team-filters {
  display: flex;
  max-width: 100%;
  gap: 8px;
  overflow-x: auto;
  padding: 18px clamp(20px, 3vw, 34px);
  border-bottom: 1px solid rgba(17,17,17,0.3);
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.people-team-filters button {
  min-width: max-content;
  min-height: 38px;
  border: 1px solid rgba(17,17,17,0.44);
  border-radius: 999px;
  background: rgba(255,255,255,0.48);
  padding: 0 13px;
  cursor: pointer;
  scroll-snap-align: start;
  font-size: 0.7rem;
  font-weight: 850;
}
.people-team-filters button:hover { background: var(--white); }
.people-team-filters button.is-active,
.people-team-filters button[aria-pressed="true"] {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--white);
}
.people-team-heading,
.people-team-header {
  display: flex;
  min-height: 82px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 16px;
  border-bottom: 1px solid var(--ink);
}
.people-team-heading h3,
.people-team-header h3 {
  margin: 0;
  font: 600 clamp(2rem, 3vw, 3.25rem)/0.92 var(--display);
  letter-spacing: -0.045em;
}
.people-team-heading p,
.people-team-header p {
  max-width: 500px;
  margin: 0;
  color: rgba(17,17,17,0.62);
  font-size: 0.76rem;
}
.people-table-head,
.person-row {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.3fr)
    minmax(135px, 0.72fr)
    minmax(135px, 0.7fr)
    minmax(250px, 1.45fr)
    minmax(150px, 0.8fr);
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
}
.people-table-head {
  min-height: 48px;
  border-bottom: 1px solid rgba(17,17,17,0.32);
  color: rgba(17,17,17,0.58);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.person-row {
  min-height: 86px;
  border-bottom: 1px solid rgba(17,17,17,0.18);
  padding: 13px 0;
}
.people-team .person-row:last-child { border-bottom: 0; }
.person-row:hover { background: rgba(255,255,255,0.54); }
.person-cell { min-width: 0; }
.person-identity,
.person-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}
.person-name img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(17,17,17,0.45);
  border-radius: 50%;
  background: var(--pink);
  object-fit: cover;
  object-position: center 28%;
}
.person-name > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.person-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(17,17,17,0.74);
  border-radius: 50%;
  background: var(--pink);
  color: var(--ink);
  font: 600 1.05rem/1 var(--display);
  letter-spacing: -0.03em;
}
.person-name-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.person-name strong,
.person-name-copy strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-name small,
.person-name-copy small {
  overflow: hidden;
  margin-top: 2px;
  color: rgba(17,17,17,0.58);
  font-size: 0.71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-role,
.person-team,
.person-access {
  min-width: 0;
  font-size: 0.78rem;
}
.person-role-badge,
.person-access-badge,
.role-badge,
.access-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(17,17,17,0.32);
  border-radius: 999px;
  background: rgba(255,255,255,0.48);
  padding: 5px 9px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
}
.role-badge.role-admin {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--white);
}
.role-badge.role-account_manager {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}
.role-badge.role-member {
  background: transparent;
  color: rgba(17,17,17,0.72);
}
.person-role-badge.is-admin,
.person-access-badge.is-all,
.role-badge.is-admin,
.access-badge.is-all {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--white);
}
.person-assets {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.person-team {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.person-team > span,
.person-assets > span {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  border: 1px solid rgba(17,17,17,0.28);
  border-radius: 999px;
  background: var(--white);
  padding: 4px 8px;
  font-size: 0.63rem;
  font-weight: 750;
  line-height: 1.2;
}
.person-team > span { background: rgba(188,142,143,0.2); }
.person-assets > .is-unassigned {
  border-style: dashed;
  background: transparent;
  color: rgba(17,17,17,0.54);
}
.person-asset,
.asset-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(17,17,17,0.3);
  border-radius: 999px;
  background: var(--white);
  padding: 4px 8px;
  font-size: 0.64rem;
  font-weight: 750;
  line-height: 1.2;
}
.person-asset.is-all,
.asset-chip.is-all {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}
.person-access {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(17,17,17,0.64);
  font-size: 0.7rem;
  font-weight: 800;
}
.person-access > span:first-child {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: rgba(17,17,17,0.34);
}
.person-access.can-edit { color: var(--wine); }
.person-access.can-edit > span:first-child {
  background: var(--wine);
  box-shadow: 0 0 0 4px rgba(121,0,8,0.1);
}
.person-manage,
.manage-assets,
.manage-assets-button {
  min-height: 32px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 900;
}
.project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(17,17,17,0.7);
  border-radius: 22px;
  background: var(--card-brand-bg, var(--wine));
  box-shadow: 0 10px 0 rgba(17,17,17,0.08);
}
.project-card-inner {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  color: var(--card-brand-fg, var(--white));
  text-decoration: none;
  transition: transform 0.22s ease;
}
.project-card:not(.is-pending) .project-card-inner:hover {
  transform: translateY(-4px);
}
.project-meta {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: flex-end;
  padding: 0 22px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid color-mix(in srgb, currentColor 48%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-brand-bg) 82%, transparent);
  padding: 7px 11px;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--card-accent, var(--lime));
}
.status-pending::before { background: currentColor; }
.logo-stage {
  display: flex;
  min-height: 258px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 8px 26px 28px;
  color: var(--card-brand-fg, var(--white));
}
.client-logo {
  width: auto;
  object-fit: contain;
  transform-origin: left center;
  transition: transform 0.28s ease;
}
.project-card:not(.is-pending) .project-card-inner:hover .client-logo { transform: scale(1.045); }
.logo-karmina { width: min(86%, 290px); }
.logo-crest { height: 112px; }
.logo-wide { width: min(82%, 270px); max-height: 112px; }
.logo-wide { filter: brightness(0) invert(1); }
.logo-square { width: 126px; height: 126px; }
.logo-directory { width: 122px; height: 122px; }
.logo-dunder { width: min(88%, 360px); max-height: 82px; }
.client-lockup {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.logo-manolita .lockup-symbol,
.logo-calendar .lockup-symbol {
  display: grid;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  place-items: center;
}
.logo-manolita .lockup-symbol {
  border: 1px solid #c7a86a;
  border-radius: 50%;
  color: #ffffff;
  font: 600 2.8rem/1 var(--display);
}
.logo-calendar .lockup-symbol {
  border-radius: 22px;
  background: #f7f7f5;
  color: #790008;
  box-shadow: 6px 6px 0 #4d0005;
  font-size: 2.3rem;
}
.logo-manolita .lockup-copy,
.logo-calendar .lockup-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-manolita .lockup-copy strong,
.logo-calendar .lockup-copy strong {
  font: 600 clamp(2.2rem, 3.7vw, 4.15rem)/0.86 var(--display);
  letter-spacing: -0.052em;
}
.logo-manolita .lockup-copy small,
.logo-calendar .lockup-copy small,
.stage-label {
  font: 800 0.68rem/1.2 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.logo-manolita .lockup-copy small,
.logo-calendar .lockup-copy small {
  margin-top: 10px;
}
.stage-label {
  margin: 0;
  color: currentColor;
  opacity: 0.72;
}
.logo-bcn .lockup-symbol {
  display: grid;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  place-items: center;
  border-radius: 50% 50% 0 50%;
  background: #c7192d;
  color: #ffffff;
  font: 700 3.7rem/1 Georgia, "Times New Roman", serif;
}
.logo-bcn .lockup-copy {
  display: flex;
  flex-direction: column;
  color: #121212;
  line-height: 1;
}
.logo-bcn .lockup-copy strong {
  font: 700 clamp(1.75rem, 3vw, 2.8rem)/0.9 Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
}
.logo-bcn .lockup-copy small {
  margin-top: 8px;
  font: 800 0.72rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.client-name {
  max-width: 94%;
  margin: 0;
  font: 600 clamp(2.35rem, 3.4vw, 4rem)/0.88 var(--display);
  letter-spacing: -0.052em;
  text-wrap: balance;
}
.project-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  border-top: 1px solid color-mix(in srgb, var(--card-panel-fg) 52%, transparent);
  background: var(--card-panel-bg, var(--ink));
  color: var(--card-panel-fg, var(--white));
  padding: 28px 24px 24px;
}
.project-copy h3 {
  margin: 0;
  font: 600 clamp(1.7rem, 2.2vw, 2.5rem)/0.96 var(--display);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.project-description {
  min-height: 66px;
  margin: 14px 0 26px;
  color: currentColor;
  opacity: 0.76;
  font-size: 0.9rem;
  line-height: 1.5;
}
.project-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.project-tags span {
  border: 1px solid color-mix(in srgb, currentColor 42%, transparent);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project-action {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid var(--card-accent, currentColor);
  background: var(--card-accent, transparent);
  color: var(--card-panel-bg, var(--ink));
  border-radius: 50%;
  font-size: 1.3rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.project-card-inner:hover .project-action {
  transform: rotate(8deg) scale(1.06);
}
.project-card.is-pending { opacity: 0.72; }
.project-card.is-pending .client-logo { filter: grayscale(0.12); }
.empty-state {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 70px 0;
}
.empty-state h3 {
  margin: 16px 0 22px;
  font: 600 clamp(2.5rem, 5vw, 5rem)/0.92 var(--display);
}
.empty-state button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
}
.site-footer {
  display: flex;
  min-height: 128px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: auto;
  background: var(--ink);
  color: var(--white);
  padding: 30px clamp(22px, 4vw, 66px);
}
.footer-brand {
  display: block;
  width: clamp(210px, 20vw, 285px);
}
.footer-brand img { width: 100%; height: auto; }
.footer-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-meta a {
  color: var(--white);
  letter-spacing: 0;
  text-transform: none;
  text-underline-offset: 4px;
}

@media (max-width: 1120px) {
  .gate-layout { grid-template-columns: minmax(0, 0.9fr) minmax(380px, 0.72fr); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .gate-video { position: fixed; object-position: center center; }
  .gate-layout {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 46px;
    padding-block: 56px;
  }
  .gate-intro { align-self: auto; padding-bottom: 0; }
  .gate-intro h1 { max-width: 760px; font-size: clamp(4rem, 12vw, 7.2rem); }
  .pass-game { max-width: 620px; justify-self: start; }
  .page-heading { grid-template-columns: 1fr; }
  .page-heading > p { margin: 0; }
  .people-policy {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .people-table-head { display: none; }
  .person-row {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.7fr);
    align-items: start;
    gap: 18px 26px;
    padding: 22px 0;
  }
  .person-identity,
  .person-name,
  .person-assets,
  .person-cell[data-column="name"],
  .person-cell[data-column="assets"] {
    grid-column: 1 / -1;
  }
  .person-role,
  .person-team,
  .person-access,
  .person-cell[data-column="role"],
  .person-cell[data-column="team"],
  .person-cell[data-column="access"] {
    display: grid;
    align-content: start;
    gap: 6px;
  }
  .person-role::before,
  .person-cell[data-column="role"]::before {
    content: "Rol";
  }
  .person-team::before,
  .person-cell[data-column="team"]::before {
    content: "Equipo";
  }
  .person-access::before,
  .person-cell[data-column="access"]::before {
    content: "Acceso";
  }
  .person-assets::before,
  .person-cell[data-column="assets"]::before {
    width: 100%;
    content: "Assets";
  }
  .person-role::before,
  .person-team::before,
  .person-access::before,
  .person-assets::before,
  .person-cell[data-column]::before {
    color: rgba(17,17,17,0.54);
    font-size: 0.59rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
  }
}

@media (max-width: 760px) {
  .gate { position: fixed; }
  .gate-shell { padding: 22px 18px 20px; }
  .gate-header { padding-bottom: 18px; }
  .gate-logo { width: 190px; }
  .gate-header > span { display: none; }
  .gate-layout { gap: 36px; padding: 42px 0 32px; }
  .gate-intro h1 { margin-top: 16px; font-size: clamp(3.6rem, 16vw, 5.7rem); }
  .gate-intro > p:last-child { margin-top: 22px; font-size: 1rem; }
  .pass-game { border-radius: 20px; padding: 22px 18px; }
  .pass-game h2 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .power-board { margin-top: 20px; }
  .power-piece { min-height: 64px; border-radius: 16px; }
  .gate-foot { padding-top: 18px; font-size: 0.59rem; }
  .site-header { min-height: 74px; padding-inline: 18px; }
  .brand-link { width: 180px; }
  .header-meta > span { display: none; }
  .lock-button { width: 42px; padding: 0; justify-content: center; border-radius: 50%; }
  .lock-button span { display: none; }
  .workspace { padding: 50px 18px 78px; }
  .page-heading h2 { font-size: clamp(3.35rem, 15vw, 5.4rem); }
  .library-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 42px;
    margin-inline: 0;
    overflow: visible;
    padding: 0;
  }
  .library-tab { min-width: 0; min-height: 52px; padding-inline: 14px; }
  .library-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .library-toolbar { align-items: stretch; flex-direction: column; margin-top: 30px; }
  .search-box { width: 100%; }
  .project-grid { grid-template-columns: 1fr; }
  .project-grid[data-category="project"],
  .project-grid[data-category="tool"] { grid-template-columns: 1fr; }
  .logo-stage { min-height: 230px; }
  .project-description { min-height: auto; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 18px; }
  .site-footer img { width: 200px; }
}

@media (max-width: 560px) {
  .people-directory { border-radius: 18px; }
  .people-policy { padding: 20px 18px; }
  .people-policy-badge { white-space: normal; }
  .people-team { padding-inline: 18px; }
  .people-team-heading,
  .people-team-header {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-block: 22px 14px;
  }
  .person-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-block: 20px;
  }
  .person-identity,
  .person-name,
  .person-role,
  .person-team,
  .person-access,
  .person-assets,
  .person-cell {
    grid-column: 1;
  }
  .person-assets { align-items: flex-start; }
  .person-manage,
  .manage-assets,
  .manage-assets-button {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .power-piece {
    min-height: 62px;
    gap: 12px;
    padding-inline: 14px 12px;
  }
  .power-piece-indicator {
    width: 48px;
    height: 28px;
    flex-basis: 48px;
  }
  .power-piece-indicator::after {
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
  }
  .power-piece[aria-pressed="true"] .power-piece-indicator::after,
  .power-piece.is-on .power-piece-indicator::after {
    transform: translateX(20px);
  }
  .logo-bcn .lockup-symbol { width: 72px; height: 72px; flex-basis: 72px; font-size: 3rem; }
  .logo-bcn .lockup-copy strong { font-size: 1.65rem; }
  .logo-manolita .lockup-symbol,
  .logo-calendar .lockup-symbol { width: 64px; height: 64px; flex-basis: 64px; }
  .logo-manolita .lockup-copy strong,
  .logo-calendar .lockup-copy strong { font-size: 2rem; }
  kbd { display: none; }
}

@media (max-width: 980px) {
  .site-header {
    min-height: 78px;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 12px 18px;
  }
  .brand-link { width: clamp(190px, 34vw, 240px); }
  .mobile-menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .global-nav {
    order: 3;
    display: none;
    width: 100%;
    max-height: calc(100dvh - 90px);
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    padding: 12px 0 max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(17,17,17,0.3);
  }
  .global-nav.is-open { display: flex; }
  .global-nav-home,
  .nav-dropdown summary,
  .lock-button {
    width: 100%;
    min-height: 48px;
    justify-content: space-between;
    border-radius: 12px;
    padding-inline: 15px;
  }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-panel,
  .nav-dropdown-brands .nav-dropdown-panel {
    position: static;
    width: 100%;
    margin-top: 6px;
    border-radius: 14px;
    box-shadow: none;
  }
  .lock-button {
    margin-top: 4px;
    background: var(--white);
  }
  .lock-button span { display: inline; }
}

@media (max-width: 900px) {
  .login-panel { max-width: 620px; justify-self: start; }
}

@media (max-width: 760px) {
  .brand-link { width: 170px; }
  .login-panel { border-radius: 20px; padding: 24px 18px; }
  .login-panel h2 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .site-footer {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    padding-block: 32px;
  }
  .footer-brand { width: 210px; }
  .footer-brand img { width: 100%; }
  .footer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

@media (max-width: 430px) {
  .gate-intro h1 { font-size: clamp(3.15rem, 15.5vw, 4.7rem); }
  .credential-control { gap: 8px; padding-inline: 12px; }
  .password-toggle { padding-inline: 2px; font-size: 0.66rem; }
}

/* Navegación y vistas del Asset Manager */
.site-header {
  min-height: 78px;
  gap: clamp(14px, 2vw, 28px);
  padding-block: 9px;
}
.brand-cluster {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: clamp(14px, 1.6vw, 22px);
}
.brand-cluster .brand-link { flex: 0 0 auto; }
.brand-descriptor {
  display: flex;
  min-width: 82px;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid rgba(17,17,17,0.66);
  padding-left: clamp(12px, 1.3vw, 18px);
  color: var(--ink);
  font: 850 clamp(0.72rem, 0.8vw, 0.82rem)/1.04 var(--sans);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.global-nav { gap: 4px; }
.global-nav-home,
.nav-dropdown summary,
.lock-button {
  min-height: 38px;
  gap: 6px;
  padding-inline: 11px;
  font-size: 0.67rem;
}
.global-nav-home.is-current {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--white);
}
.nav-dropdown-panel { top: calc(100% + 8px); }
.nav-dropdown-resources .nav-dropdown-panel { width: min(330px, calc(100vw - 32px)); }
.nav-dropdown-resources .nav-dropdown-panel a span {
  color: var(--lime);
  font-size: 0.95rem;
}
.library-nav {
  margin-inline: -6px;
  padding: 12px 6px 10px;
}
.page-heading-secondary h2 { max-width: 1040px; }
.portal-view { min-width: 0; }

/* Recursos */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(54px, 7vw, 88px);
}
.resource-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(17,17,17,0.78);
  border-radius: 22px;
  background: var(--resource-accent);
  color: var(--resource-ink);
  box-shadow: 0 10px 0 rgba(17,17,17,0.07);
}
.resource-card-inner {
  display: flex;
  min-height: 440px;
  flex-direction: column;
  padding: 24px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.22s ease;
}
.resource-card:not(.is-pending) .resource-card-inner:hover { transform: translateY(-5px); }
.resource-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.resource-kind {
  border: 1px solid color-mix(in srgb, currentColor 46%, transparent);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.resource-glyph {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1.2rem;
}
.resource-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  padding: 52px 0 34px;
}
.resource-card-copy > p {
  margin: 0 0 14px;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.72;
}
.resource-card-copy h3 {
  margin: 0;
  font: 600 clamp(2.2rem, 3.5vw, 4.2rem)/0.88 var(--display);
  letter-spacing: -0.052em;
  text-wrap: balance;
}
.resource-card-copy > span {
  max-width: 430px;
  margin-top: 22px;
  font-size: 0.86rem;
  line-height: 1.55;
  opacity: 0.76;
}
.resource-action {
  border-top: 1px solid color-mix(in srgb, currentColor 38%, transparent);
  padding-top: 16px;
  font-size: 0.72rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.resource-card.is-pending {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--resource-accent) 86%, white), var(--resource-accent));
}
.resource-card.is-pending .resource-glyph { border-style: dashed; }

/* Herramientas de IA */
.tools-toolbar { margin-top: clamp(46px, 6vw, 72px); }
.ai-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.ai-tool-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(17,17,17,0.72);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 0 rgba(17,17,17,0.07);
}
.ai-tool-brand {
  display: flex;
  min-height: 142px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background: var(--tool-bg);
  padding: 22px;
}
.ai-tool-logo {
  display: grid;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(17,17,17,0.16);
  border-radius: 21px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--tool-accent) 24%, transparent);
}
.ai-tool-logo img { width: 54px; height: 54px; object-fit: contain; }
.tool-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(17,17,17,0.32);
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  padding: 6px 9px;
  font-size: 0.61rem;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}
.tool-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tool-accent);
}
.ai-tool-card.status-inactive .tool-status > span { background: #777; }
.ai-tool-card.status-limited .tool-status > span { background: #d67a17; }
.ai-tool-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px 22px 24px;
}
.ai-tool-copy .kicker { color: var(--tool-accent); }
.ai-tool-copy h3 {
  margin: 13px 0 0;
  font: 600 clamp(2rem, 3vw, 3.35rem)/0.9 var(--display);
  letter-spacing: -0.048em;
  text-wrap: balance;
}
.ai-tool-copy > p:not(.kicker) {
  margin: 18px 0 24px;
  color: rgba(17,17,17,0.68);
  font-size: 0.86rem;
  line-height: 1.55;
}
.ai-tool-copy > a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  border-top: 1px solid rgba(17,17,17,0.28);
  padding-top: 16px;
  font-size: 0.7rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}
.ai-tool-copy > a span { color: var(--tool-accent); font-size: 1rem; }
.tool-accounts {
  display: grid;
  border-top: 1px solid rgba(17,17,17,0.42);
  background: rgba(244,240,232,0.62);
}
.tool-account {
  display: grid;
  gap: 4px;
  padding: 16px 22px;
}
.tool-account + .tool-account { border-top: 1px solid rgba(17,17,17,0.18); }
.tool-account-label {
  color: rgba(17,17,17,0.54);
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tool-account strong {
  overflow-wrap: anywhere;
  font-size: 0.76rem;
}
.tool-credential {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(17,17,17,0.62);
  font-size: 0.66rem;
}
.tool-credential svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

/* Administración */
.admin-security-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  margin-top: clamp(46px, 6vw, 72px);
  border-radius: 22px;
  background: var(--ink);
  color: var(--white);
  padding: clamp(24px, 3vw, 38px);
}
.admin-security-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 1.35rem;
}
.admin-security-note .kicker { color: var(--lime); }
.admin-security-note h3 {
  margin: 10px 0 8px;
  font: 600 clamp(1.8rem, 3vw, 3.1rem)/0.95 var(--display);
  letter-spacing: -0.04em;
}
.admin-security-note p:last-child {
  max-width: 850px;
  margin: 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
}
.admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.55fr);
  align-items: start;
  gap: clamp(16px, 2vw, 28px);
  margin-top: 28px;
}
.admin-panel {
  overflow: hidden;
  border: 1px solid rgba(17,17,17,0.72);
  border-radius: 22px;
  background: rgba(255,255,255,0.54);
}
.admin-panel-heading {
  border-bottom: 1px solid rgba(17,17,17,0.44);
  padding: 22px;
}
.admin-panel-heading h3 {
  margin: 10px 0 0;
  font: 600 clamp(2rem, 3vw, 3.1rem)/0.92 var(--display);
  letter-spacing: -0.045em;
}
.admin-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}
.admin-form label {
  display: grid;
  gap: 7px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-form input,
.admin-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(17,17,17,0.42);
  border-radius: 11px;
  background: var(--white);
  padding: 0 12px;
  font: 400 0.8rem var(--sans);
  text-transform: none;
}
.admin-form button,
.admin-permission-row button {
  min-height: 42px;
  border: 1px solid rgba(17,17,17,0.28);
  border-radius: 999px;
  background: rgba(17,17,17,0.08);
  padding: 0 14px;
  font-size: 0.66rem;
  font-weight: 850;
}
.admin-form :disabled,
.admin-permission-row button:disabled { cursor: not-allowed; opacity: 0.62; }
.admin-form > p {
  margin: 0;
  color: rgba(17,17,17,0.56);
  font-size: 0.68rem;
  line-height: 1.45;
}
.admin-permission-list {
  max-height: min(72vh, 780px);
  overflow: auto;
}
.admin-permission-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(130px, 0.75fr) minmax(190px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(17,17,17,0.18);
}
.admin-permission-row:last-child { border-bottom: 0; }
.admin-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}
.admin-person img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(17,17,17,0.35);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
}
.admin-person > span { display: flex; min-width: 0; flex-direction: column; }
.admin-person strong {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-person small { color: rgba(17,17,17,0.56); font-size: 0.65rem; }
.admin-person-teams,
.admin-person-assets {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}
.admin-person-teams span,
.admin-person-assets span {
  border: 1px solid rgba(17,17,17,0.24);
  border-radius: 999px;
  background: var(--white);
  padding: 4px 7px;
  font-size: 0.59rem;
  font-weight: 750;
}
.admin-person-assets .is-unassigned {
  border-style: dashed;
  background: transparent;
  color: rgba(17,17,17,0.52);
}

@media (max-width: 1180px) {
  .resource-grid,
  .ai-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .site-header { min-height: 78px; }
  .brand-cluster { max-width: calc(100% - 96px); }
  .global-nav { gap: 5px; }
  .global-nav-home,
  .nav-dropdown summary,
  .lock-button {
    min-height: 48px;
    padding-inline: 15px;
  }
  .admin-permission-list { max-height: none; }
}

@media (max-width: 760px) {
  .brand-descriptor { display: none; }
  .brand-cluster { max-width: calc(100% - 88px); }
  .library-nav {
    margin-inline: 0;
    padding: 6px 0 4px;
  }
  .resource-grid,
  .ai-tool-grid { grid-template-columns: 1fr; }
  .resource-card-inner { min-height: 390px; }
  .admin-security-note { grid-template-columns: 1fr; }
  .admin-permission-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 18px;
  }
  .admin-person,
  .admin-person-assets { grid-column: 1 / -1; }
  .admin-permission-row button { grid-column: 2; grid-row: 2; }
}

@media (max-width: 520px) {
  .resource-card-inner { min-height: 360px; padding: 20px; }
  .resource-card-copy h3 { font-size: clamp(2.25rem, 12vw, 3.4rem); }
  .ai-tool-brand,
  .ai-tool-copy,
  .tool-account { padding-inline: 18px; }
  .admin-security-note,
  .admin-panel-heading,
  .admin-form { padding-inline: 18px; }
  .admin-permission-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .admin-person,
  .admin-person-teams,
  .admin-person-assets,
  .admin-permission-row button {
    grid-column: 1;
    grid-row: auto;
  }
  .admin-permission-row button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gate-video { display: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Portada de acceso: un único frame de vídeo y panel carmín */
body:not(.is-inside) { overflow: hidden; }
.gate {
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}
.gate-scrim {
  background:
    linear-gradient(90deg, rgba(13,0,1,0.34) 0%, rgba(45,0,5,0.18) 55%, rgba(25,0,3,0.52) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.4));
}
.gate-shell {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 37vw);
  margin: 0;
  padding: 0;
}
.login-panel {
  display: flex;
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 0;
  grid-column: 2;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid rgba(255,255,255,0.3);
  border-radius: 0;
  background: rgba(88,0,8,0.95);
  box-shadow: -28px 0 90px rgba(0,0,0,0.24);
  padding: clamp(30px, 4vw, 68px);
  backdrop-filter: blur(18px);
}
.login-brand-lockup {
  display: flex;
  width: min(100%, 510px);
  align-items: center;
  gap: 8px;
  margin: 0 auto clamp(34px, 6vh, 70px);
}
.login-brand { width: min(270px, 74%); height: auto; }
.login-brand-lockup > span {
  display: flex;
  min-width: 74px;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.64);
  padding-left: 9px;
  font-size: clamp(0.67rem, 0.8vw, 0.79rem);
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1.03;
  text-transform: uppercase;
}
.login-panel-content { width: min(100%, 510px); margin: 0 auto; }
.login-panel h1 {
  margin: 16px 0 0;
  font: 600 clamp(2.75rem, 4vw, 4.55rem)/0.88 var(--display);
  letter-spacing: -0.052em;
  text-wrap: balance;
}

/* Cabecera compacta y perfil */
.brand-cluster { gap: clamp(14px, 1.35vw, 20px); }
.brand-cluster .brand-link {
  width: clamp(179px, 17.1vw, 253px);
  overflow: hidden;
}
.brand-cluster .brand-link img {
  width: 122.6%;
  max-width: none;
}
.brand-descriptor {
  min-width: 78px;
  padding-left: clamp(12px, 1.1vw, 16px);
}
.nav-profile .profile-trigger {
  min-height: 38px;
  gap: 7px;
  padding: 3px 7px 3px 3px;
  letter-spacing: 0;
  text-transform: none;
}
.profile-trigger img {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border: 1px solid rgba(17,17,17,0.36);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
}
.profile-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
}
.profile-avatar .user-avatar-fallback {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  border-color: rgba(17,17,17,0.36);
  font-size: 0.58rem;
}
.nav-profile .nav-dropdown-panel {
  right: 0;
  left: auto;
  width: min(220px, calc(100vw - 32px));
}
.profile-menu-action {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(255,255,255,0.82);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.79rem;
  font-weight: 750;
  text-align: left;
}
.profile-menu-action:hover { background: var(--wine); color: var(--white); }

/* Administración local de personas y permisos */
.admin-form button[type="submit"],
.admin-permission-row button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
}
.admin-form button[type="submit"]:hover,
.admin-permission-row button:hover {
  border-color: var(--wine);
  background: var(--wine);
}
.admin-form-status { min-height: 0; font-weight: 800; }
.admin-form-status:empty { display: none; }
.admin-form-status.is-success { color: #365200; }
.admin-form-status.is-error { color: var(--wine); }
.user-avatar-fallback {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  place-items: center;
  border: 1px solid rgba(17,17,17,0.35);
  border-radius: 50%;
  background: var(--lime);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.admin-person .user-avatar-fallback {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  font-size: 0.68rem;
}
.permission-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(880px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 30px 100px rgba(0,0,0,0.35);
}
.permission-dialog::backdrop {
  background: rgba(10,4,4,0.7);
  backdrop-filter: blur(7px);
}
.permission-dialog-card {
  max-height: min(880px, calc(100dvh - 32px));
  overflow-y: auto;
  padding: clamp(22px, 4vw, 40px);
}
.permission-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
.permission-dialog-head h3 {
  margin: 10px 0 7px;
  font: 600 clamp(2rem, 4vw, 3.5rem)/0.92 var(--display);
  letter-spacing: -0.045em;
}
.permission-dialog-head > div > p:last-child { color: rgba(17,17,17,0.62); font-size: 0.8rem; }
.dialog-close {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
}
.permission-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px 0;
}
.permission-settings label {
  display: grid;
  gap: 8px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.permission-settings select {
  min-height: 46px;
  border: 1px solid rgba(17,17,17,0.42);
  border-radius: 11px;
  background: var(--white);
  padding: 0 12px;
  font-size: 0.8rem;
  text-transform: none;
}
.permission-assets { margin: 0; border: 0; padding: 0; }
.permission-assets legend {
  margin-bottom: 12px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.permission-assets > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.5);
}
.permission-assets label {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  cursor: pointer;
}
.permission-assets label:nth-child(odd) { border-right: 1px solid var(--line); }
.permission-assets input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--wine); }
.permission-assets label > span { display: flex; min-width: 0; flex-direction: column; }
.permission-assets strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.permission-assets small { color: rgba(17,17,17,0.58); font-size: 0.64rem; }
.permission-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 24px;
}
.permission-dialog-actions button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  padding: 0 18px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 900;
}
.permission-dialog-actions button[type="submit"] { background: var(--wine); color: var(--white); border-color: var(--wine); }
.permission-dialog-note { margin: 14px 0 0; color: rgba(17,17,17,0.58); font-size: 0.66rem; }

@media (max-width: 980px) {
  .nav-profile .profile-trigger {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    padding-inline: 4px 15px;
  }
  .nav-profile .profile-trigger svg { margin-left: auto; }
  .nav-profile .nav-dropdown-panel { width: 100%; }
}

@media (max-width: 980px) {
  .brand-cluster .brand-link { width: clamp(155px, 27.7vw, 196px); }
}

@media (max-width: 760px) {
  .brand-cluster .brand-link { width: 139px; }
  .gate-shell {
    display: flex;
    align-items: flex-end;
  }
  .login-panel {
    width: 100%;
    height: auto;
    max-height: 100%;
    grid-column: auto;
    justify-content: flex-start;
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.36);
    border-radius: 26px 26px 0 0;
    padding: 24px 20px max(22px, env(safe-area-inset-bottom));
  }
  .login-brand-lockup {
    gap: 7px;
    margin-bottom: 22px;
  }
  .login-brand { width: min(220px, 70%); }
  .login-brand-lockup > span { min-width: 66px; font-size: 0.64rem; }
  .login-panel h1 { font-size: clamp(2.45rem, 11vw, 3.7rem); }
  .login-intro { margin: 12px 0 18px; font-size: 0.86rem; }
  .credential-control { min-height: 52px; }
  .credential-control input { padding-block: 13px; }
  .login-submit { min-height: 50px; margin-top: 9px; }
  .login-message { min-height: 18px; }
  .login-help { margin-top: 6px; }
  .permission-settings,
  .permission-assets > div { grid-template-columns: 1fr; }
  .permission-assets label:nth-child(odd) { border-right: 0; }
}

@media (max-height: 690px) {
  .login-brand-lockup { margin-bottom: 16px; }
  .login-brand { width: min(190px, 66%); }
  .login-panel h1 { margin-top: 10px; font-size: clamp(2.25rem, 6vh, 3.3rem); }
  .login-intro { margin: 8px 0 12px; }
  .credential-control { min-height: 46px; }
  .credential-control input { padding-block: 10px; }
  .login-submit { min-height: 46px; margin-top: 6px; }
  .login-message { min-height: 14px; font-size: 0.68rem; }
  .login-help { margin-top: 2px; }
}


/* Personas externas */
.people-group + .people-group {
  margin-top: 34px;
  border-top: 1px solid rgba(17,17,17,0.22);
  padding-top: 34px;
}
.people-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 0 0 18px;
}
.people-group-heading h3 {
  margin: 7px 0 0;
  font: 600 clamp(1.75rem, 2.7vw, 2.9rem)/0.95 var(--display);
  letter-spacing: -0.04em;
}
.people-group-heading > p {
  max-width: 440px;
  margin: 0;
  color: rgba(17,17,17,0.62);
  font-size: 0.82rem;
  line-height: 1.5;
}
.external-user-row {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.2fr)
    minmax(220px, 1.2fr)
    minmax(150px, 0.72fr)
    minmax(240px, 1.35fr)
    minmax(130px, 0.68fr);
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
}
.external-user-row:not(.people-table-head) {
  min-height: 92px;
  border-bottom: 1px solid rgba(17,17,17,0.18);
  padding: 15px 0;
}
.external-user-row:last-child { border-bottom: 0; }
.external-user-row:not(.people-table-head):hover { background: rgba(232,255,85,0.16); }
.external-user-email,
.external-user-password {
  min-width: 0;
}
.external-user-email span {
  display: block;
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.external-user-password {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.external-user-password > span {
  font: 800 0.78rem/1 monospace;
  letter-spacing: 0.1em;
}
.external-user-password small {
  color: rgba(17,17,17,0.56);
  font-size: 0.64rem;
  font-weight: 800;
}
.role-badge.role-external {
  border-color: #355849;
  background: #355849;
  color: var(--white);
}

@media (max-width: 900px) {
  .people-group-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .external-user-row:not(.people-table-head) {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.7fr);
    align-items: start;
    gap: 18px 26px;
    padding: 22px 0;
  }
  .external-user-row .person-name,
  .external-user-row .person-assets {
    grid-column: 1 / -1;
  }
  .external-user-email,
  .external-user-password,
  .external-user-row .person-access {
    display: grid;
    align-content: start;
    gap: 6px;
  }
  .external-user-email::before { content: "Correo"; }
  .external-user-password::before { content: "Contraseña"; }
  .external-user-row .person-assets::before { content: "Assets"; }
  .external-user-row .person-access::before { content: "Acceso"; }
  .external-user-email::before,
  .external-user-password::before {
    color: rgba(17,17,17,0.54);
    font-size: 0.59rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
  }
}

@media (max-width: 560px) {
  .external-user-row:not(.people-table-head) {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-block: 20px;
  }
  .external-user-row .person-name,
  .external-user-row .person-assets,
  .external-user-email,
  .external-user-password,
  .external-user-row .person-access {
    grid-column: 1;
  }
  .external-user-email span {
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}
