/* ========================================
   Portal financiero (Shaar) - Showcase
   Componentes reales recreados como UI nativa
   (datos de ejemplo), no capturas.
   ======================================== */

.portal {
    padding: 7rem 0;
    background: var(--bg-soft);
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.portal::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 12% 8%, rgba(255, 106, 19, 0.06) 0%, transparent 45%),
        radial-gradient(ellipse at 88% 95%, rgba(255, 94, 138, 0.05) 0%, transparent 45%);
    pointer-events: none;
}

.portal-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3.5rem;
    position: relative;
    z-index: 2;
}

.portal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-primary);
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 111, 15, 0.3);
    border-radius: var(--border-radius-xl);
    margin-bottom: var(--spacing-lg);
    background: rgba(255, 111, 15, 0.06);
}

.portal-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: portalPulse 2s ease-out infinite;
}

@keyframes portalPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 111, 15, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(255, 111, 15, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 111, 15, 0); }
}

.portal-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.15;
}

.portal-subtitle {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.7;
}

#home, #portal, #products, #about, #values, #contact {
    scroll-margin-top: 80px;
}

.hero .hero-text h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-shadow: 0 0 40px rgba(255, 111, 15, 0.25);
}

/* ============================================================
   UI kit de muestra (mk-*) — reproduce el portal con datos demo
   ============================================================ */

.mk {
    --mk-border: #e7e7ea;
    font-family: var(--font-primary);
    color: #1a1a1a;
    text-align: left;
}

.mk-panel {
    background: #fff;
    border: 1px solid var(--mk-border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mk-stack > * + * { margin-top: 0.7rem; }

.mk-field label,
.mk-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #5b6472;
    margin-bottom: 0.3rem;
    letter-spacing: 0.01em;
}

.mk-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    height: 38px;
    padding: 0 0.7rem;
    font-size: 0.82rem;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
}

.mk-control.is-focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 111, 15, 0.12);
}

.mk-control .mk-muted { color: #9aa1ab; }

.mk-caret { color: #9aa1ab; flex-shrink: 0; }
.mk-caret svg { width: 14px; height: 14px; display: block; }

.mk-prefix {
    color: #9aa1ab;
    font-weight: 600;
    border-right: 1px solid #eceef1;
    padding-right: 0.6rem;
    margin-right: 0.1rem;
}

.mk-row { display: flex; gap: 0.6rem; }
.mk-row > * { flex: 1; min-width: 0; }

.mk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 40px;
    padding: 0 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    width: 100%;
}

.mk-btn svg { width: 15px; height: 15px; }

.mk-btn-primary { background: var(--color-primary); color: #fff; }
.mk-btn-ghost { background: #fff; color: #5b6472; border-color: #dfe3e8; }

.mk-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.mk-chip {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    background: #f3f4f6;
    color: #5b6472;
    border: 1px solid #e7e7ea;
}
.mk-chip.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Tabla */
.mk-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.mk-table th {
    text-align: left;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8a929e;
    padding: 0 0.4rem 0.5rem;
    border-bottom: 1px solid #eceef1;
}
.mk-table td {
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid #f2f3f5;
    vertical-align: middle;
}
.mk-table tr:last-child td { border-bottom: none; }
.mk-table .mk-name { font-weight: 600; color: #1a1a1a; }
.mk-table .mk-bank { color: #6b7280; }
.mk-table .mk-amt { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.mk-table .mk-clabe { color: var(--color-primary); font-size: 0.72rem; font-variant-numeric: tabular-nums; }

.mk-check {
    width: 16px; height: 16px;
    border-radius: 4px;
    background: var(--color-primary);
    display: inline-flex; align-items: center; justify-content: center;
}
.mk-check svg { width: 11px; height: 11px; color: #fff; }
.mk-check.off { background: #fff; border: 1px solid #cfd4da; }

.mk-total {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 0.7rem;
    padding: 0.55rem 0.75rem;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 0.8rem;
}
.mk-total strong { font-size: 0.92rem; }

/* Modal flotante (beneficiario, programada) */
.mk-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 0.7rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #eceef1;
}
.mk-modal-head h4 { font-size: 0.95rem; font-weight: 700; }
.mk-x { color: #b6bcc4; font-size: 1.1rem; line-height: 1; }

/* OTP */
.mk-otp { text-align: center; }
.mk-otp-head {
    display: flex; align-items: center; justify-content: center; gap: 0.45rem;
    font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem;
}
.mk-otp-head svg { width: 17px; height: 17px; color: var(--color-primary); }
.mk-otp p { font-size: 0.78rem; color: #6b7280; margin-bottom: 0.85rem; }
.mk-otp-code { display: flex; gap: 0.45rem; justify-content: center; margin-bottom: 0.9rem; }
.mk-otp-cell {
    width: 34px; height: 42px;
    border: 1px solid #dfe3e8; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; font-weight: 700; color: #1a1a1a;
}
.mk-otp-cell.lit { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(255, 111, 15, 0.12); }

/* Autorizaciones (maker-checker) */
.mk-appr-row { display: flex; align-items: center; gap: 0.6rem; }
.mk-appr-ico {
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 9px;
    background: rgba(255, 111, 15, 0.12); color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
}
.mk-appr-ico svg { width: 17px; height: 17px; }
.mk-appr-row .mk-grow { flex: 1; min-width: 0; }
.mk-appr-title { font-size: 0.85rem; font-weight: 700; }
.mk-appr-sub { font-size: 0.72rem; color: #6b7280; }
.mk-badge {
    font-size: 0.65rem; font-weight: 700;
    padding: 0.2rem 0.5rem; border-radius: 20px;
    background: #fff4d4; color: #915e00;
    white-space: nowrap;
}

/* Dashboard (oscuro) */
.mk-dash {
    background:
        radial-gradient(120% 80% at 30% -10%, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 55%),
        #1a1a1a;
    border-radius: 14px;
    padding: 1.2rem 1.3rem;
    color: #fff;
}
.mk-dash-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.mk-dash-label { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.45); }
.mk-dash-amount { font-size: 1.9rem; font-weight: 800; line-height: 1.1; margin-top: 0.15rem; }
.mk-dash-sub { font-size: 0.75rem; color: rgba(255,255,255,0.5); margin-top: 0.2rem; }
.mk-dash-pills { display: flex; gap: 0.4rem; flex-shrink: 0; }
.mk-dash-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.7rem; color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.08);
    padding: 0.35rem 0.6rem; border-radius: 7px;
}
.mk-dash-pill svg { width: 12px; height: 12px; }
.mk-dash-chart { margin-top: 1.1rem; }
.mk-dash-chart svg { width: 100%; height: auto; display: block; }
.mk-dash-foot { display: flex; gap: 1.4rem; margin-top: 0.9rem; }
.mk-dash-stat .v { font-size: 1rem; font-weight: 700; }
.mk-dash-stat .k { font-size: 0.65rem; color: rgba(255,255,255,0.45); }

/* ---- Captura/mock destacado del hero ---- */
.hero-shot {
    position: relative;
    width: 100%;
    z-index: 2;
    transform: perspective(1700px) rotateY(-8deg) rotateX(3deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
}
.hero-shot:hover { transform: perspective(1700px) rotateY(0deg) rotateX(0deg); }
.hero-shot .mk-dash { padding: 1.6rem 1.8rem; border-radius: 18px; }
.hero-shot .mk-dash-amount { font-size: 2.4rem; }

/* ============================================================
   Bento del portal (componentes recreados)
   ============================================================ */

.portal-bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
    max-width: 1140px;
    margin: 0 auto;
    align-items: stretch;
    position: relative;
    z-index: 2;
}

.bento-tile {
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform 0.45s var(--ease),
                box-shadow 0.45s var(--ease),
                border-color 0.45s ease;
}

.bento-tile:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--color-primary-rgb), 0.35);
    box-shadow: var(--shadow-lg);
}

/* Escenario donde vive el mock */
.bento-stage {
    flex: 1;
    padding: 1.25rem;
    background: #f4f4f6;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-tile.is-dark .bento-stage { background: #0f0f10; }

.bento-caption {
    flex-shrink: 0;
    padding: 0.95rem 1.2rem 1.1rem;
    background: #fff;
    border-top: 1px solid #ececec;
}
.bento-caption .bento-tag {
    display: block;
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--color-primary); margin-bottom: 0.28rem;
}
.bento-caption h3 { font-size: 1.02rem; font-weight: 700; color: #1a1a1a; line-height: 1.3; }

/* Composición (6 columnas) */
.bento-transfer    { grid-column: span 2; }
.bento-otp         { grid-column: span 2; }
.bento-scheduled   { grid-column: span 2; }
.bento-multiselect { grid-column: span 3; }
.bento-bulk        { grid-column: span 3; }
.bento-beneficiary { grid-column: span 3; }
.bento-approvals   { grid-column: span 3; }

/* ---- CTA bajo el bento ---- */
.portal-cta-row {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-2xl);
    position: relative;
    z-index: 2;
}
.portal-cta {
    display: inline-flex; align-items: center; gap: var(--spacing-sm);
    padding: 0.85rem 1.75rem; font-size: 1rem; font-weight: 600;
    border-radius: var(--border-radius-xl); transition: all var(--transition-normal);
}
.portal-cta svg { width: 18px; height: 18px; transition: transform var(--transition-fast); }
.portal-cta-primary {
    background: linear-gradient(180deg, #ff7d2e 0%, var(--color-primary) 55%, var(--color-primary-strong) 100%);
    color: #fff;
    box-shadow: var(--shadow-orange);
}
.portal-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -10px rgba(var(--color-primary-rgb), 0.55); }
.portal-cta-primary:hover svg { transform: translateX(4px); }
.portal-cta-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-xs); }
.portal-cta-ghost:hover { transform: translateY(-2px); border-color: #cdd3dd; }

/* ---- Responsive ---- */
@media (max-width: 968px) {
    .bento-transfer,
    .bento-otp,
    .bento-scheduled,
    .bento-beneficiary,
    .bento-approvals { grid-column: span 3; }
    .bento-multiselect,
    .bento-bulk { grid-column: span 6; }
}

@media (max-width: 640px) {
    .portal-bento { grid-template-columns: 1fr; }
    .bento-transfer,
    .bento-otp,
    .bento-scheduled,
    .bento-multiselect,
    .bento-bulk,
    .bento-beneficiary,
    .bento-approvals { grid-column: span 1; }
}
