:root {
  --bg-dark: #0e1118;
  --brand-red: #e01f45;
  --brand-magenta: #bc2c60;
  --brand-cyan: #8dc7de;
  --brand-gold: #e09900;
  --surface: #ffffff;
  --surface-2: #f8f8fb;
  --text-main: #151922;
  --text-muted: #525a6b;
  --line: #e2e5ee;
  --primary: #e01f45;
  --primary-hover: #c9163c;
  --focus: #8dc7de;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 10%, rgba(224, 31, 69, 0.28), transparent 32%),
    radial-gradient(circle at 94% 86%, rgba(141, 199, 222, 0.22), transparent 28%),
    linear-gradient(128deg, #161a23 0%, #0d1017 52%, #1b2130 100%);
  min-height: 100vh;
}

.portal-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 92px 16px 28px;
}

.corp-corner {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 40;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.corp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 8px;
}

.corp-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 4px;
}

.corp-logo {
  display: block;
  block-size: 62px;
  inline-size: auto;
  object-fit: contain;
  background: transparent;
  filter: brightness(0) invert(1);
}

.portal-card {
  width: min(1180px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  overflow: hidden;
  box-shadow: 0 36px 85px rgba(7, 9, 14, 0.42);
}

.brand-panel {
  padding: 30px;
  background:
    radial-gradient(circle at 16% 12%, rgba(224, 31, 69, 0.14), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(141, 199, 222, 0.22), transparent 46%),
    linear-gradient(155deg, #ffffff 0%, #f6f7fb 65%, #f2f3f9 100%);
  border-right: 1px solid var(--line);
}

.config-panel {
  padding: 26px 24px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fd 100%);
}

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

.brand-logo {
  inline-size: clamp(118px, 13vw, 154px);
  block-size: 108px;
  object-fit: contain;
  border-radius: 16px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e4e6ef;
  box-shadow: 0 14px 36px rgba(188, 44, 96, 0.2);
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0;
  color: #bc2c60;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 11px;
  font-weight: 800;
}

h1 {
  margin: 4px 0 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.72rem, 3vw, 2.24rem);
  line-height: 1.2;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.description-block {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e6e9f3;
  border-radius: 16px;
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.description-block p {
  margin: 0;
  color: #32384a;
  line-height: 1.6;
  font-size: 0.94rem;
}

.guide-launch-row {
  margin-top: 14px;
}

/* Guide Button & Modal Styles (alineado al Dashboard) */
.guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef4444 0%, #e01f45 100%);
  color: #fff;
  border: 1px solid rgba(224, 31, 69, 0.7);
  padding: 12px 16px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 12px 22px -12px rgba(224, 31, 69, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.guide-btn:hover {
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  transform: translateY(-1px);
  box-shadow: 0 18px 28px -14px rgba(224, 31, 69, 0.9);
}

.guide-btn span {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  font-size: 12px;
}

.guide-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.guide-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.guide-modal {
  background: #fff;
  width: 92%;
  max-width: 1260px;
  max-height: 92vh;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-modal-overlay.active .guide-modal {
  transform: scale(1);
}

.guide-header {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
}

.guide-header h2 {
  margin: 0;
  font-size: 20px;
  color: #f8fafc;
}

.guide-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}

.guide-close:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #fff;
}

.guide-content {
  padding: 24px 28px 28px;
  overflow-y: auto;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.guide-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.2s;
}

.guide-card.brand {
  border-top: 3px solid rgba(190, 18, 60, 0.28);
}

.guide-card.transversal {
  border-top: 3px solid rgba(15, 118, 110, 0.32);
}

.guide-card.brand:hover {
  border-color: #fda4af;
  box-shadow: 0 14px 28px -18px rgba(190, 18, 60, 0.28);
}

.guide-card.transversal:hover {
  border-color: #99f6e4;
  box-shadow: 0 14px 28px -18px rgba(13, 148, 136, 0.28);
}

.guide-card:hover {
  box-shadow: 0 14px 28px -18px rgba(15, 23, 42, 0.35);
}

.guide-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.guide-card h3 span {
  color: var(--primary);
  margin-right: 6px;
}

.guide-card.brand h3 {
  border-bottom-color: #ffe4e6;
}

.guide-card.transversal h3 {
  border-bottom-color: #ccfbf1;
}

.guide-card.brand h3 span {
  color: #be123c;
}

.guide-card.transversal h3 span {
  color: #0f766e;
}

.guide-section {
  margin-bottom: 12px;
}

.guide-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.guide-card.brand .guide-label {
  color: #9f1239;
}

.guide-card.transversal .guide-label {
  color: #0f766e;
}

.guide-text {
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}

.accent-marks {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.mark {
  display: inline-block;
  block-size: 6px;
  border-radius: 999px;
}

.mark-a {
  inline-size: 88px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-magenta));
}

.mark-b {
  inline-size: 34px;
  background: linear-gradient(90deg, var(--brand-gold), #efb63a);
}

.mark-c {
  inline-size: 22px;
  background: linear-gradient(90deg, var(--brand-cyan), #a6d7eb);
}

.panel-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.panel-block + .panel-block {
  margin-top: 14px;
}

.panel-head {
  margin-bottom: 8px;
}

.panel-head-auth {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-kicker {
  margin: 0;
  color: #c33a6b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.panel-head h2 {
  margin: 6px 0 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.16rem;
  line-height: 1.2;
}

.access-mode-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
}

.access-mode-badge {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.access-mode-badge.off {
  color: #5f6a80;
  background: #eff2f8;
  border-color: #d8deea;
}

.access-mode-badge.on {
  color: #8c1030;
  background: #ffe7ee;
  border-color: #f0b7c6;
}

.mode-switch {
  position: relative;
  display: inline-flex;
  inline-size: 44px;
  block-size: 24px;
}

.mode-switch input {
  opacity: 0;
  inline-size: 0;
  block-size: 0;
  position: absolute;
}

.mode-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d3d9e8;
  border: 1px solid #c3cbe0;
  transition: all 180ms ease;
}

.mode-slider::before {
  content: "";
  position: absolute;
  inline-size: 18px;
  block-size: 18px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(12, 16, 26, 0.25);
  transition: transform 180ms ease;
}

.mode-switch input:checked + .mode-slider {
  background: linear-gradient(90deg, var(--brand-red), var(--brand-magenta));
  border-color: #ca335f;
}

.mode-switch input:checked + .mode-slider::before {
  transform: translateX(20px);
}

.mode-switch input:focus + .mode-slider {
  box-shadow: 0 0 0 3px rgba(141, 199, 222, 0.35);
}

.panel-note {
  margin: 0 0 10px;
  color: #596175;
  font-size: 0.86rem;
  line-height: 1.5;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

.auth-status {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #6a7184;
}

.filters-block {
  margin-top: 22px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-label {
  font-size: 0.82rem;
  color: #444e65;
  font-weight: 700;
}

.field-control {
  width: 100%;
  border: 1px solid #d7dce8;
  border-radius: 11px;
  background: var(--surface-2);
  min-height: 44px;
  padding: 0 12px;
  color: #1d2432;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field-control:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(141, 199, 222, 0.28);
  background: #ffffff;
}

.field-control:disabled {
  background: #eef0f6;
  color: #8a8fa0;
}

.cta-row {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.status-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  min-height: 1.3em;
}

.cta-button {
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 22px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand-red) 0%, var(--brand-magenta) 100%);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(188, 44, 96, 0.28);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.cta-button:hover {
  filter: brightness(1.02);
  box-shadow: 0 16px 28px rgba(188, 44, 96, 0.32);
  transform: translateY(-1px);
}

.cta-button:active {
  transform: translateY(0);
}

.cta-button:disabled {
  background: #95afa9;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .corp-corner {
    top: 14px;
    right: 14px;
  }

  .corp-logo {
    block-size: 50px;
  }

  .portal-shell {
    padding-top: 78px;
  }

  .brand-logo {
    inline-size: 104px;
    block-size: 92px;
  }

  .guide-btn {
    width: 100%;
    justify-content: center;
  }

  .portal-card {
    border-radius: 18px;
    grid-template-columns: 1fr;
  }

  .brand-panel,
  .config-panel {
    padding: 20px;
  }

  .brand-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .panel-head-auth {
    flex-direction: column;
  }
}
