/* ========================================
   PORTFOLIO SECTION
   ======================================== */
@keyframes badgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(64,18,104,0.4); }
    50%       { transform: scale(1.06); box-shadow: 0 12px 32px rgba(64,18,104,0.6); }
}
.portfolio {
    padding: 100px 0;
    background: #f8f5ff;
}

.portfolio .section-tag { color: #401268; }
.portfolio .section-title { color: #0a0020; }
.portfolio .section-description { color: var(--gray-medium); }

/* Switcher */
.portfolio-switcher {
    display: flex;
    gap: 0;
    background: #ede9ff;
    border-radius: 50px;
    padding: 5px;
    width: fit-content;
    margin: 0 auto 3rem;
    border: 1px solid rgba(64, 18, 104, 0.15);
}

.portfolio-sw-btn {
    padding: 10px 28px;
    border-radius: 50px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    background: transparent;
    color: #6b4fa0;
    font-family: 'Inter', sans-serif;
}

.portfolio-sw-btn.active {
    background: #401268;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(64, 18, 104, 0.3);
}

/* Device area */
.portfolio-device-area {
    position: relative;
    min-height: 520px;
}

.portfolio-panel {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.portfolio-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
}

.portfolio-panel.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ========================================
   DASHBOARD FRAME
   ======================================== */

.dash-frame {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(64, 18, 104, 0.12);
    overflow: hidden;
    max-width: 860px;
    margin: 0 auto;
    box-shadow: 0 8px 40px rgba(64, 18, 104, 0.12);
}

.dash-topbar {
    background: #1a0d2e;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-logo {
    color: #c084fc;
    font-size: 20px;
    font-weight: 800;
    font-family: monospace;
}

.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #401268;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.dash-username-wrap .dash-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.dash-username-wrap .dash-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.dash-logout {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 16px;
}

.dash-body {
    display: flex;
}

.dash-sidebar {
    width: 52px;
    background: #faf8ff;
    border-right: 1px solid rgba(64, 18, 104, 0.07);
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.dash-side-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.dash-side-icon.active {
    background: #ede9ff;
    color: #401268;
}

.dash-main {
    flex: 1;
    padding: 20px;
    background: #f9fafb;
    overflow: hidden;
}

/* Stats row */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid rgba(64, 18, 104, 0.07);
}

.stat-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.stat-card-lbl {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.stat-card-val {
    font-size: 18px;
    font-weight: 700;
    color: #1a0d2e;
    margin-bottom: 2px;
}

.stat-card-sub {
    font-size: 10px;
    color: #a78bfa;
}

/* Chart */
.dash-chart-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(64, 18, 104, 0.07);
    margin-bottom: 14px;
}

.dash-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dash-chart-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.dash-chart-tabs {
    display: flex;
    gap: 4px;
}

.chart-tab {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border: 1px solid transparent;
}

.chart-tab.active {
    border-color: rgba(64, 18, 104, 0.3);
    color: #401268;
}

.dash-chart-svg {
    width: 100%;
    height: 90px;
}

.chart-line-path {
    fill: none;
    stroke: #401268;
    stroke-width: 2.5;
    stroke-linecap: round;
}

.chart-fill-path {
    fill: rgba(64, 18, 104, 0.07);
}

/* Activity + pending split */
.dash-bottom {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 12px;
}

.dash-activity-box,
.dash-pending-box {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(64, 18, 104, 0.07);
    overflow: hidden;
}

.dash-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(64, 18, 104, 0.06);
}

.dash-box-title {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.dash-box-link {
    font-size: 11px;
    color: #401268;
    text-decoration: none;
}

.act-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(64, 18, 104, 0.04);
    font-size: 11px;
}

.act-row:last-child { border-bottom: none; }

.act-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.act-name { color: #374151; flex: 1; }

.act-badge {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.badge-paid { background: #dcfce7; color: #166534; }
.badge-pend { background: #fef3c7; color: #92400e; }

.act-amt { color: #6b7280; font-size: 10px; white-space: nowrap; }

.pend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(64, 18, 104, 0.04);
}

.pend-row:last-child { border-bottom: none; }

.pend-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ede9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #401268;
    flex-shrink: 0;
}

.pend-info { flex: 1; }
.pend-name { font-size: 11px; font-weight: 600; color: #1a0d2e; }
.pend-ref { font-size: 10px; color: #9ca3af; }
.pend-amt { font-size: 11px; font-weight: 600; color: #374151; }
.pend-date { font-size: 10px; color: #a78bfa; }

/* ========================================
   PHONE MOCKUP
   ======================================== */

.phone-wrap {
    display: flex;
    justify-content: center;
}

.phone {
    width: 380px;
    background: #ffffff;
    border-radius: 44px;
    border: 10px solid #1a1a2e;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 20px 50px rgba(64,18,104,0.2);
}

.phone-notch-bar {
    background: #401268;
    padding: 10px 20px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.phone-time { color: #ffffff; font-size: 13px; font-weight: 700; }
.phone-status-icons { color: rgba(255,255,255,0.8); font-size: 12px; }

.phone-header {
    background: #401268;
    padding: 14px 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.phone-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.phone-header-text .ph-greeting { color: rgba(255,255,255,0.8); font-size: 12px; }
.phone-header-text .ph-name { color: #ffffff; font-size: 16px; font-weight: 700; }
.phone-bell { color: rgba(255,255,255,0.8); font-size: 20px; margin-left: auto; }

.phone-body {
    background: #f3f4f6;
    padding: 16px;
    height: 540px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}
.phone-body::-webkit-scrollbar {
    display: none;
}

.ph-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ph-see-all { font-size: 12px; color: #401268; font-weight: 600; }

.ph-plans-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.ph-plan-chip {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 10px;
    border: 1px solid rgba(64,18,104,0.08);
}

.ph-plan-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ede9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    color: #401268;
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
}

.ph-plan-name { font-size: 11px; font-weight: 600; color: #111827; margin-bottom: 4px; }

.ph-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
}

.ph-dot-green { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; display: inline-block; }
.ph-dot-red   { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; display: inline-block; }
.ph-status-ok  { color: #16a34a; }
.ph-status-bad { color: #dc2626; }

.ph-action-big {
    background: #401268;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    cursor: pointer;
}

.ph-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    flex-shrink: 0;
}

.ph-action-title { color: #ffffff; font-size: 14px; font-weight: 700; }
.ph-action-sub   { color: rgba(255,255,255,0.7); font-size: 11px; }
.ph-action-arrow { color: #ffffff; margin-left: auto; font-size: 20px; }

.ph-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.ph-quick-chip {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(64,18,104,0.08);
}

.ph-quick-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ede9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #401268;
    font-size: 16px;
}

.ph-quick-label { font-size: 10px; color: #6b7280; text-align: center; }

.ph-summary-box {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(64,18,104,0.08);
    overflow: hidden;
}

.ph-sum-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(64,18,104,0.05);
}

.ph-sum-row:last-child { border-bottom: none; }

.ph-sum-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ede9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #401268;
    font-size: 13px;
    flex-shrink: 0;
}

.ph-sum-label { font-size: 12px; color: #6b7280; flex: 1; }
.ph-sum-last-title { font-size: 10px; color: #9ca3af; }
.ph-sum-last-val   { font-size: 12px; font-weight: 600; color: #111827; }

.ph-count {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #401268;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ph-chip-abierto {
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
}

.phone-nav {
    background: #ffffff;
    border-top: 1px solid rgba(64,18,104,0.08);
    padding: 10px 0 8px;
    display: flex;
    justify-content: space-around;
}

.ph-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #9ca3af;
}

.ph-nav-item.active { color: #401268; }

.ph-nav-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #401268;
}

@media (max-width: 768px) {
    .phone { width: 300px; }
    .phone-body { height: 360px; }
}

/* ========================================
   PORTFOLIO INFO STRIP (debajo del device)
   ======================================== */

.portfolio-info-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 32px;
    border: 1px solid rgba(64, 18, 104, 0.12);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(64, 18, 104, 0.06);
}

.port-info-item {
    background: #ffffff;
    padding: 24px 22px;
    border-right: 1px solid rgba(64, 18, 104, 0.1);
    transition: background 0.2s;
}

.port-info-item:last-child { border-right: none; }
.port-info-item:hover { background: #faf5ff; }

.port-info-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #401268;
    margin-bottom: 6px;
    display: block;
}

.port-info-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0a0020;
    margin-bottom: 6px;
}

.port-info-desc {
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 12px;
}

.port-info-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.port-tech-pill {
    background: #ede9ff;
    color: #401268;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
    .dash-bottom { grid-template-columns: 1fr; }
    .dash-pending-box { display: none; }
}

@media (max-width: 768px) {
    .portfolio { padding: 60px 0; }
    .portfolio-device-area { min-height: 600px; }
    .dash-stats { grid-template-columns: 1fr 1fr; }
    .portfolio-info-strip { grid-template-columns: 1fr; }
    .port-info-item { border-right: none; border-bottom: 1px solid rgba(64,18,104,0.1); }
    .port-info-item:last-child { border-bottom: none; }
    .portfolio-sw-btn { padding: 8px 18px; font-size: 0.85rem; }
    .phone { width: 300px; }
.phone-body { height: 360px; }
}