@charset "UTF-8";
@import url("css/pagos-banking.css");

/* ── Layout ─────────────────────────────────────────────── */

body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

/* ── Header ─────────────────────────────────────────────── */

body > header {
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Suppress h1 from pagos-banking.css (not used in this layout) */
body > header h1 {
  display: none;
}
body > header p {
  display: none;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: #fff;
  flex-shrink: 0;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-org {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.header-system {
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.header-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.01em;
  margin-top: 1px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.badge-uso-interno {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.75);
}

.header-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Nav ────────────────────────────────────────────────── */

nav {
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

nav > ul {
  list-style: none;
  margin: 0;
  padding: 0 20px;
  display: flex;
  gap: 2px;
  align-items: stretch;
}

.nav-item {
  position: relative;
}

.nav-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.75);
  font: 600 13.5px/1 "Segoe UI Variable", "Aptos", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.02em;
  padding: 14px 16px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0;
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  outline: none;
  transform: none;
  box-shadow: none;
}

.nav-item.is-open > .nav-link {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-item.is-active > .nav-link {
  color: #fff;
  box-shadow: inset 0 -2px 0 rgba(99, 179, 237, 0.7);
}

.nav-chevron {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.15s ease;
}

.nav-item.is-open .nav-chevron {
  transform: rotate(180deg);
  opacity: 0.85;
}

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 228px;
  padding: 6px;
  margin: 6px 0 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
  z-index: 200;
  animation: navDropIn 0.14s ease;
}

.nav-item.is-open > .nav-dropdown {
  display: block;
}

@keyframes navDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown li {
  list-style: none;
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background: #eef4ff;
  color: var(--bank-blue);
  outline: none;
}

.nav-badge-prod {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 5px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid rgba(21, 128, 61, 0.2);
  flex-shrink: 0;
}

.nav-badge-qa {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 5px;
  background: #fef9c3;
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.2);
  flex-shrink: 0;
}

/* ── Main ───────────────────────────────────────────────── */

main {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 44px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* ── Landing Hero ─────────────────────────────────────────────────────── */

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 18px;
  align-items: stretch;
}

.landing-copy,
.landing-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(216, 225, 234, 0.95);
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.08), transparent 35%),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.06), transparent 30%),
    rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.landing-copy {
  padding: 30px 30px 28px;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bank-blue);
  background: rgba(29, 78, 216, 0.08);
  border: 1px solid rgba(29, 78, 216, 0.14);
  border-radius: 999px;
  padding: 7px 10px;
}

.landing-copy h1 {
  margin: 18px 0 12px;
  max-width: 16ch;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--text);
}

.landing-lead {
  max-width: 66ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 22px;
}

.landing-actions .btn {
  padding-inline: 16px;
}

.landing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.landing-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 15px;
  border-radius: 16px;
  background: rgba(248, 251, 254, 0.98);
  border: 1px solid rgba(216, 225, 234, 0.95);
}

.stat-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.landing-stat strong {
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.landing-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 2px;
}

.panel-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-note {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

/* ── Portal Sections ────────────────────────────────────── */

.portal-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-heading {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* ── Portal Grids ───────────────────────────────────────── */

.portal-grid {
  display: grid;
  gap: 14px;
}

.portal-grid--primary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-grid--secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ── Portal Cards ───────────────────────────────────────── */

.portal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

button.portal-card {
  text-align: left;
  width: 100%;
  appearance: none;
  font: inherit;
}

.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(29, 78, 216, 0.3);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
  outline: none;
}

.portal-card.is-active {
  border-color: rgba(29, 78, 216, 0.5);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08), var(--shadow-soft);
}

.portal-card--primary {
  padding: 20px 22px 24px;
  gap: 8px;
  border-left: 3px solid transparent;
}

.portal-card--primary:hover {
  border-left-color: var(--bank-blue);
}

.portal-card--primary.is-active {
  border-left-color: var(--bank-blue);
}

.portal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.portal-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bank-blue);
}

.portal-card-title {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.3;
  display: block;
}

.portal-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.portal-card:focus-visible,
.nav-link:focus-visible,
.btn:focus-visible,
#btnNewTab:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.15);
  outline-offset: 2px;
}

.portal-card--primary .portal-card-desc {
  font-size: 13.5px;
}

/* ── Environment Badges ─────────────────────────────────── */

.badge-env {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
}

.badge-prod {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid rgba(21, 128, 61, 0.2);
}

.badge-qa {
  background: #fef9c3;
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.2);
}

/* ── Frame Shell ────────────────────────────────────────── */

.frame-shell {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(216, 225, 234, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--surface);
}

.frame-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 18px;
  background: rgba(248, 251, 254, 0.98);
  border-bottom: 1px solid var(--line);
  min-height: 46px;
}

.frame-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.frame-cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.frame-sep {
  font-size: 13px;
  color: var(--muted);
  opacity: 0.45;
  flex-shrink: 0;
}

.frame-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Small ghost button override */
#btnNewTab {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  background: transparent;
  color: var(--bank-blue);
  border: 1px solid var(--line);
  box-shadow: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#btnNewTab:hover {
  background: #eef4ff;
  border-color: rgba(29, 78, 216, 0.25);
  transform: none;
  box-shadow: none;
}

#contentFrame {
  width: 100%;
  min-height: min(76vh, 940px);
  border: none;
  display: block;
  background: var(--surface);
}

/* ── Footer ─────────────────────────────────────────────── */

body > footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

/* Suppress pseudo-element from pagos-banking.css */
body > footer::before {
  display: none;
}

.footer-sep {
  opacity: 0.35;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1100px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }

  .portal-grid--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body > header {
    padding: 16px 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-meta {
    align-self: flex-start;
  }

  .portal-grid--primary,
  .portal-grid--secondary {
    grid-template-columns: 1fr;
  }

  .landing-stats {
    grid-template-columns: 1fr;
  }

  .landing-copy,
  .landing-panel {
    border-radius: 20px;
  }

  .landing-copy {
    padding: 24px 20px 22px;
  }

  .landing-copy h1 {
    max-width: none;
  }

  .landing-panel-top {
    flex-direction: column;
    align-items: flex-start;
  }

  main {
    width: calc(100% - 20px);
    margin: 18px auto 28px;
  }

  nav > ul {
    padding: 0 10px;
    gap: 0;
  }

  .nav-link {
    padding: 13px 12px;
    font-size: 13px;
  }

  .frame-shell {
    border-radius: 18px;
  }

  #contentFrame {
    min-height: 72vh;
  }
}

@media (max-width: 600px) {
  .header-tagline {
    display: none;
  }

  .header-clock {
    display: none;
  }

  .landing-lead {
    font-size: 14px;
  }

  .landing-actions {
    flex-direction: column;
  }

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

  .portal-grid--secondary {
    grid-template-columns: 1fr;
  }
}
