/* ==========================================================================
   MAISHA SUITES - FOUNDER PORTAL DESIGN SYSTEM
   ========================================================================== */

:root {
    --primary-emerald: #083B2E;
    --primary-emerald-hover: #0d4d3d;
    --primary-emerald-light: #f1f6f4;
    
    --accent-gold: #C5A880;
    --accent-gold-dark: #a88a62;
    --accent-gold-light: #f7f3ed;
    --accent-gold-raw: #D4AF37;
    
    --bg-ivory: #FAF8F5;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-dark: #1A2E28;
    --text-muted: #5E716B;
    --text-light: #FFFFFF;
    
    --border-color: rgba(8, 59, 46, 0.08);
    --shadow-soft: 0 4px 20px rgba(8, 59, 46, 0.02);
    --shadow-hover: 0 10px 30px rgba(8, 59, 46, 0.05);
    
    --font-serif: "Playfair Display", Georgia, serif;
    --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.15s ease-out;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-ivory);
    color: var(--text-dark);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* 1. TOP NAVBAR HEADER */
.founder-header {
    background-color: var(--primary-emerald);
    color: var(--text-light);
    height: 75px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(3, 30, 23, 0.2);
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
    padding: 2px;
    background-color: rgba(255, 255, 255, 0.05);
}

.brand-details {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.brand-slogan {
    font-size: 0.65rem;
    color: var(--accent-gold);
    letter-spacing: 1px;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Horizontal Nav Tabs */
.header-tabs {
    display: flex;
    list-style: none;
    height: 100%;
    gap: 24px;
}

.header-tab-item {
    height: 100%;
}

.header-tab-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.header-tab-link:hover {
    color: var(--text-light);
}

.header-tab-link.active {
    color: var(--text-light);
    font-weight: 700;
}

.header-tab-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-gold);
    border-radius: 4px 4px 0 0;
}

/* Header Right-Side Actions & User Profile */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.back-pms-btn {
    border-color: var(--accent-gold);
    color: var(--text-light);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    border: 1px solid var(--accent-gold);
}

.back-pms-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-gold-dark);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 20px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--accent-gold);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.user-welcome {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

/* 2. MAIN CONTAINER WORKSPACE */
.workspace-container {
    max-width: 1300px;
    width: 100%;
    margin: 32px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    flex-grow: 1;
}

/* 3. TIMELINE STEPS WIDGET */
.roadmap-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.roadmap-intro-title {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 600;
}

.roadmap-progress-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-pct {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-emerald);
}

.progress-bar-bg {
    width: 150px;
    height: 8px;
    background-color: rgba(8, 59, 46, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-emerald);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

/* 7 Numbered steps timeline widget */
.timeline-widget {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 32px;
    overflow-x: auto;
}

.timeline-steps-row {
    display: flex;
    justify-content: space-between;
    position: relative;
    min-width: 800px;
    padding-bottom: 12px;
}

/* Timeline connecting line behind nodes */
.timeline-connect-line {
    position: absolute;
    top: 20px;
    left: 7.14%;
    right: 7.14%;
    height: 3px;
    background-color: rgba(8, 59, 46, 0.08);
    z-index: 1;
}

.timeline-connect-fill {
    height: 100%;
    background-color: var(--primary-emerald);
    width: 38%; /* Dynamic based on progress */
    transition: var(--transition-smooth);
}

.step-node-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    flex: 1;
    min-width: 100px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-white);
    border: 3px solid rgba(8, 59, 46, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    margin-bottom: 12px;
    position: relative;
}

.step-circle.completed {
    background-color: var(--primary-emerald);
    border-color: var(--primary-emerald);
    color: var(--text-light);
}

.step-circle.in_progress {
    border-color: rgba(8, 59, 46, 0.25);
    color: var(--text-muted);
}

.step-circle.active {
    border-color: var(--accent-gold-dark);
    color: var(--accent-gold-dark);
    animation: gold-pulse 2s infinite ease-in-out;
}

@keyframes gold-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(197, 168, 128, 0.6);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(197, 168, 128, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(197, 168, 128, 0);
    }
}

.step-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-muted);
    max-width: 120px;
    line-height: 1.3;
}

.step-node-wrapper:hover .step-circle {
    border-color: var(--accent-gold-dark);
}

.step-node-wrapper.active .step-label {
    color: var(--primary-emerald-dark);
}

/* 4. ACTIVE STEP DETAILED WORKSPACE PANEL */
.active-milestone-panel {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.milestone-meta-pane {
    border-right: 1px solid var(--border-color);
    padding-right: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.milestone-num-badge {
    background-color: var(--accent-gold-light);
    color: var(--accent-gold-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    align-self: flex-start;
    text-transform: uppercase;
}

.milestone-title-text {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.25;
}

.milestone-desc-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* 5. COLLAPSED MILESTONES ACCORDION */
.collapsed-milestones-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.collapsed-milestone-row {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-fast);
}

.collapsed-milestone-row:hover {
    border-color: var(--accent-gold);
    transform: translateY(-1px);
}

.milestone-row-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.milestone-row-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-ivory);
    border: 1.5px solid rgba(8, 59, 46, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.milestone-row-num.completed {
    background-color: var(--primary-emerald);
    color: var(--text-light);
    border-color: var(--primary-emerald);
}

.milestone-row-num.in_progress {
    border-color: var(--accent-gold-dark);
    color: var(--accent-gold-dark);
    background-color: var(--accent-gold-light);
}

.milestone-row-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
}

.milestone-row-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.owner-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.owner-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
}

/* 6. SIDEBAR WIDGETS */
.founder-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-panel-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.sidebar-card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

/* Summary stats list */
.stat-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(8, 59, 46, 0.03);
}

.stat-summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* Recent Activity list */
.activity-log-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
}

.activity-log-item {
    position: relative;
    padding-left: 28px;
    font-size: 0.8rem;
}

.activity-log-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 14px;
    bottom: -22px;
    width: 2px;
    background-color: rgba(8, 59, 46, 0.05);
}

.activity-log-item:last-child::before {
    display: none;
}

.activity-log-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-ivory);
    border: 1px solid var(--border-color);
    font-size: 0.65rem;
}

.activity-log-icon.completed {
    background-color: #2FA882;
    color: var(--text-light);
    border-color: #2FA882;
}

.activity-log-icon.comment {
    background-color: var(--accent-gold-light);
    color: var(--accent-gold-dark);
    border-color: var(--accent-gold-dark);
}

.activity-log-icon.added {
    background-color: var(--primary-emerald-light);
    color: var(--primary-emerald);
    border-color: var(--primary-emerald);
}

.activity-log-title {
    font-weight: 700;
    color: var(--text-dark);
}

.activity-log-user {
    color: var(--text-muted);
}

/* 7. DISCUSSIONS & GENERAL CHAT */
.discussion-board {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.discussion-msg-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.discussion-msg-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.discussion-msg-author {
    font-weight: 700;
    color: var(--primary-emerald);
}

.discussion-msg-date {
    color: var(--text-muted);
}

.discussion-msg-body {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 8. GENERAL STYLING & BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary-emerald);
    color: var(--text-light);
    border: 1px solid var(--primary-emerald);
}

.btn-primary:hover {
    background-color: var(--primary-emerald-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-emerald);
    border: 1px solid var(--primary-emerald);
}

.btn-secondary:hover {
    background-color: var(--primary-emerald-light);
}

.btn-accent {
    background-color: var(--accent-gold);
    color: var(--primary-emerald-dark);
}

.btn-accent:hover {
    background-color: var(--accent-gold-dark);
    color: var(--text-light);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.completed {
    background-color: rgba(47, 168, 130, 0.1);
    color: #2FA882;
}

.status-badge.in_progress {
    background-color: rgba(212, 175, 55, 0.1);
    color: #A07F00;
}

.status-badge.pending {
    background-color: rgba(8, 59, 46, 0.05);
    color: var(--text-muted);
}

/* 9. RESPONSIVENESS AND TABLET COLLAPSING */
@media (max-width: 1150px) {
    .brand-slogan {
        display: none;
    }
    
    .founder-header {
        padding: 0 16px;
    }
    
    .header-tabs {
        gap: 12px;
    }
    
    .header-actions {
        gap: 12px;
    }
    
    .user-profile {
        padding-left: 12px;
        gap: 8px;
    }
}

@media (max-width: 1100px) {
    /* Make header tabs scroll inline under tight spacing */
    .header-tabs {
        flex: 1;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        margin: 0 16px;
        height: 100%;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .header-tabs::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Opera */
    }
    
    .header-tab-item {
        flex-shrink: 0;
    }
    
    .header-tab-link {
        padding: 0 6px;
        font-size: 0.85rem;
    }
}

@media (max-width: 1000px) {
    .back-pms-btn .btn-text {
        display: none;
    }
    
    .back-pms-btn {
        padding: 0;
        border-radius: 50%;
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
    
    .back-pms-btn .material-symbols-outlined {
        margin: 0;
        font-size: 1.25rem;
    }

    .user-info {
        display: none;
    }
}

@media (max-width: 992px) {
    .workspace-container {
        grid-template-columns: 1fr;
        padding: 0 16px;
        margin: 20px auto;
    }
    
    .active-milestone-panel {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .milestone-meta-pane {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
    }

    .roadmap-intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .founder-header {
        height: auto;
        padding: 16px;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        text-align: center;
    }
    
    .logo-block {
        justify-content: center;
    }

    .header-tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        height: 45px;
        gap: 12px;
        padding-bottom: 6px;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        -webkit-overflow-scrolling: touch;
        margin: 0; /* Reset margins from 1100px */
    }

    /* hide scrollbar for tabs */
    .header-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .header-tab-item {
        flex-shrink: 0;
    }
    
    .header-tab-link {
        font-size: 0.85rem;
        padding: 0 4px;
    }
    
    .header-tab-link.active::after {
        height: 3px;
    }

    /* Restore details on mobile stack */
    .back-pms-btn .btn-text {
        display: inline;
    }
    
    .back-pms-btn {
        padding: 8px 16px;
        border-radius: 6px;
        width: auto;
        height: auto;
    }
    
    .user-info {
        display: flex;
    }

    .header-actions {
        justify-content: center;
        gap: 16px;
    }
}
