/* ============================================
   ENTREPRENEUR DASHBOARD PAGE - MOBILE-FIRST STYLES
   ============================================ */

/* Role Context Banner */
.role-context-banner {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border-bottom: 1px solid rgba(34, 197, 94, 0.3);
    padding: 0.75rem 5vw;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.switch-link {
    margin-left: auto;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.switch-link:hover {
    text-decoration: underline;
}

/* Role Badge Icons */
.role-badge-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.role-badge-icon.investor { background: rgba(59, 130, 246, 0.3); }
.role-badge-icon.entrepreneur { background: rgba(34, 197, 94, 0.3); }
.role-badge-icon.originator { background: rgba(168, 85, 247, 0.3); }
.role-badge-icon.partner { background: rgba(251, 191, 36, 0.3); }

/* Card Grid for Stats - Default 4 columns */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* Deal Buttons */
.deal-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Page Header Flex */
.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Badge variants */
.badge-muted {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Lifecycle Tracker */
.lifecycle-tracker {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.lifecycle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.lifecycle-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.lifecycle-current {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-weight: 600;
}

.lifecycle-current.pending {
    background: rgba(235, 209, 161, 0.2);
    color: var(--gold);
}

.lifecycle-stages {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.lifecycle-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
    position: relative;
}

.lifecycle-dot-container {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.lifecycle-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

.lifecycle-stage.completed .lifecycle-dot {
    background: var(--success, #22c55e);
    border-color: var(--success, #22c55e);
}

.lifecycle-stage.current .lifecycle-dot {
    background: var(--gold, #ebd1a1);
    border-color: var(--gold, #ebd1a1);
    box-shadow: 0 0 8px rgba(235, 209, 161, 0.5);
    width: 14px;
    height: 14px;
}

.lifecycle-stage.pending .lifecycle-dot {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
}

.lifecycle-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
}

.lifecycle-stage.completed .lifecycle-line {
    background: var(--success, #22c55e);
}

.lifecycle-label {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.4rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 2px;
}

.lifecycle-stage.completed .lifecycle-label {
    color: rgba(34, 197, 94, 0.8);
}

.lifecycle-stage.current .lifecycle-label {
    color: var(--gold, #ebd1a1);
    font-weight: 600;
}

/* ========================================
   MOBILE RESPONSIVE - 768px and below
   ======================================== */
@media (max-width: 768px) {
    /* CRITICAL: Hide desktop header elements on mobile */
    .entrepreneur-layout .header-nav,
    .entrepreneur-layout .role-switcher,
    .entrepreneur-layout .header-user {
        display: none !important;
    }

    /* SHOW mobile menu toggle */
    .entrepreneur-layout .mobile-menu-toggle {
        display: block !important;
    }

    /* CRITICAL: Constrain main content to viewport */
    .entrepreneur-layout .main-wide {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding: 1.5rem 4vw !important;
        box-sizing: border-box !important;
    }

    /* Role context banner */
    .role-context-banner {
        padding: 0.5rem 4vw;
    }

    /* Page header - stack */
    .page-header-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .page-header-flex .btn {
        width: 100%;
        text-align: center;
    }

    /* Hero title */
    .hero-title {
        font-size: 1.5rem !important;
        text-align: center;
        width: 100%;
    }

    .muted {
        text-align: center;
    }

    /* Metrics cards mobile - 2 column grid */
    .card-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    .card-grid .card {
        padding: 0.75rem !important;
        margin-bottom: 0 !important;
        text-align: center;
    }

    .card-grid .card .stat-icon {
        width: 32px !important;
        height: 32px !important;
        margin: 0 auto 0.5rem auto !important;
    }

    .card-grid .card .stat-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .card-grid .card .muted,
    .card-grid .card .stat-label {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }

    .card-grid .card .stat-value,
    .card-grid .card > div:nth-child(2) {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem !important;
    }

    .card-grid .card .stat-sublabel,
    .card-grid .card > div:last-child {
        font-size: 0.7rem !important;
    }

    /* Deal buttons - stack */
    .deal-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .deal-buttons .btn {
        width: 100% !important;
        text-align: center;
    }

    /* Lifecycle tracker mobile */
    .lifecycle-tracker {
        padding: 0.75rem;
    }

    .lifecycle-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .lifecycle-title {
        font-size: 0.75rem;
    }

    .lifecycle-current {
        font-size: 0.7rem;
        padding: 0.35rem 0.75rem;
    }

    .lifecycle-stages {
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(96, 165, 250, 0.3) transparent;
    }

    .lifecycle-stage {
        flex: 0 0 auto;
        min-width: 70px;
        max-width: 70px;
    }

    .lifecycle-label {
        font-size: 0.5rem;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
        max-width: 70px;
        height: auto;
        min-height: 2.4em;
    }

    .lifecycle-dot {
        width: 10px;
        height: 10px;
    }

    .lifecycle-stage.current .lifecycle-dot {
        width: 12px;
        height: 12px;
    }

    /* Cards */
    .card {
        padding: 1rem;
        max-width: 100% !important;
        overflow: hidden;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .card-header h2 {
        font-size: 1rem;
    }

    /* Deal cards */
    .deal-card {
        padding: 1rem;
    }

    .deal-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .deal-title {
        font-size: 1.1rem;
    }

    .deal-amount {
        text-align: left;
    }

    .deal-amount-value {
        font-size: 1.25rem;
    }

    /* Deal stats grid */
    .deal-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    /* Alerts */
    .alert {
        padding: 0.875rem;
        font-size: 0.875rem;
    }

    .alert ul {
        margin-left: 1rem !important;
        padding-left: 0;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .entrepreneur-layout .main-wide {
        padding: 1rem 3vw !important;
    }

    .card-grid {
        gap: 0.375rem !important;
    }

    .hero-title {
        font-size: 1.25rem !important;
    }

    .stat-value {
        font-size: 1.25rem !important;
    }
}
