/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-dark: #0f1016;
    --sidebar-bg: #161722;
    --card-bg: #1f202e;
    --primary: #00f2ff;
    --primary-dim: rgba(0, 242, 255, 0.1);
    --gold: #ffd700;
    --green: #00e676;
    --red: #ff4757;
    --text-white: #ffffff;
    --text-grey: #a0a0b0;
    --border: rgba(255, 255, 255, 0.08);
    --header-height: 70px;
}

* { box-sizing: border-box; outline: none; }

body { 
    margin: 0; padding: 0; 
    font-family: 'Outfit', sans-serif; 
    background-color: var(--bg-dark); 
    color: var(--text-white); 
    overflow: hidden; 
}

/* Global Scrollbar Styling (Main Body) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Buttons & Links */
button { cursor: pointer; font-family: inherit; transition: 0.3s; }
a { text-decoration: none; color: inherit; }


/* =========================================
   2. LAYOUT STRUCTURE (UPDATED WITH FIXES)
   ========================================= */
   
.portal-wrapper { 
    /* Grid removed in favor of Fixed Sidebar approach */
    display: block;
    height: 100vh; 
    overflow: hidden; 
}

/* --- SIDEBAR FIXES (SCROLL & LAYOUT) - UPDATED --- */
.portal-sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 20px 15px;
    
    /* Layout */
    display: flex;
    flex-direction: column;
    
    /* Position & Size */
    width: 320px;
    height: 100vh; /* Full Height */
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    
    /* 🔥 FORCING SCROLL (Desktop & Mouse) */
    overflow-y: auto !important; /* Force Vertical Scroll */
    overflow-x: hidden;
    
    /* Interaction Fixes */
    cursor: default;
    pointer-events: auto; /* Ensure mouse events work */
    
    /* Padding for bottom content */
    padding-bottom: 50px; 
}

/* 🔥 CRITICAL FIX: Prevent Content Squishing */
/* This forces the scrollbar to appear if content is tall */
.portal-sidebar > * {
    flex-shrink: 0 !important; 
}

/* Scrollbar Design */
.portal-sidebar::-webkit-scrollbar { width: 6px; }
.portal-sidebar::-webkit-scrollbar-track { background: transparent; }
.portal-sidebar::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
.portal-sidebar::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Main Content Shifted */
.portal-main { 
    margin-left: 320px; /* Shifted for sidebar */
    width: calc(100% - 320px);
    height: 100vh;
    position: relative;
    z-index: 1;
    
    /* Preserving Layout & Background properties */
    display: flex; 
    flex-direction: column; 
    overflow: hidden; /* Main keeps hidden, inner views scroll */
    background: radial-gradient(circle at top right, #1a1c29 0%, #0f1016 60%); 
}

/* Admin Inspector Mode Visual Cue */
body.admin-inspecting .portal-main {
    border: 2px solid var(--red); /* Red border indicates Admin is watching */
}
body.admin-inspecting .chat-header {
    background: linear-gradient(to right, #2c0b0e, #161722);
}


/* =========================================
   3. SIDEBAR COMPONENTS
   ========================================= */
.brand-logo { 
    display: flex; align-items: center; gap: 10px; 
    margin-bottom: 30px; color: var(--gold); 
    font-weight: 800; letter-spacing: 1px; 
}
.brand-logo img { height: 35px; }

.project-card { 
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); 
    padding: 20px; border-radius: 15px; 
    border: 1px solid var(--border); 
    text-align: center; margin-bottom: auto; 
}

.p-status {
    font-size: 0.65rem; background: var(--green); color: #000;
    padding: 2px 8px; border-radius: 10px; display: inline-block;
    margin-bottom: 10px; font-weight: bold;
}

.p-meta h3 { margin: 10px 0 5px; font-size: 1.1rem; }
.p-meta span { font-size: 0.85rem; color: var(--text-grey); display: block; margin-bottom: 15px; }

.mini-progress-bar { 
    width: 100%; height: 6px; 
    background: rgba(255,255,255,0.1); 
    border-radius: 3px; margin: 10px 0 5px; overflow: hidden; 
}
#sidebar-progress-fill { 
    height: 100%; background: var(--primary); transition: width 0.5s; 
}

/* Logout Button (Updated Small) */
.btn-back-home {
    margin-top: 15px;
    padding: 8px;
    font-size: 0.8rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: var(--red);
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-back-home:hover { background: rgba(255, 71, 87, 0.1); }


/* =========================================
   4. HEADER & TABS
   ========================================= */
.chat-header { 
    height: var(--header-height); 
    border-bottom: 1px solid var(--border); 
    display: flex; justify-content: space-between; 
    align-items: center; padding: 0 30px; 
    
    /* 🔥 Sticky Header Logic */
    position: sticky; 
    top: 0; 
    z-index: 500; /* Ensure it stays above all content */
    
    /* Glass Effect for Modern Look */
    background: rgba(22, 23, 34, 0.95); 
    backdrop-filter: blur(10px); 
    width: 100%;
}


.header-info h2 { font-size: 1.2rem; margin: 0; }
.status-dot { font-size: 0.7rem; color: var(--green); display: flex; align-items: center; gap: 5px; }
.status-dot::before { content: ''; width: 8px; height: 8px; background: var(--green); border-radius: 50%; }

.workspace-tabs { 
    display: flex; gap: 5px; 
    overflow-x: auto; 
    max-width: 60%; 
    padding-bottom: 5px;
}
.workspace-tabs::-webkit-scrollbar { height: 0; width: 0; } /* Hide scrollbar */

.tab-btn { 
    background: none; border: none; 
    color: var(--text-grey); 
    padding: 8px 16px; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    font-weight: 500; 
    white-space: nowrap; 
}
.tab-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.tab-btn.active { 
    background: var(--primary); color: #000; 
    font-weight: 700; 
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4); 
}

.btn-meet {
    background: linear-gradient(135deg, #7b1fa2, #e91e63);
    color: #fff; border: none; padding: 8px 15px; 
    border-radius: 20px; font-weight: bold; margin-left: 15px;
    display: flex; align-items: center; gap: 5px;
}

.user-profile-pill img {
    width: 35px; height: 35px; border-radius: 50%; border: 2px solid var(--border);
}

/* =========================================
   5. GENERAL VIEW CONTAINER
   ========================================= */
.view-container { 
    flex: 1; 
    overflow-y: auto; 
    padding: 20px 30px; 
    display: none; /* Controlled by JS */
}
.view-container.active-view { display: block; }

.section-title {
    font-size: 1.1rem; color: var(--gold); 
    margin-bottom: 20px; border-bottom: 1px solid var(--border);
    padding-bottom: 10px; display: flex; justify-content: space-between; align-items: center;
}

/* Admin Action Button (Generic) */
.btn-action {
    background: transparent; border: 1px solid var(--primary);
    color: var(--primary); padding: 5px 12px; border-radius: 5px;
    font-size: 0.8rem;
}
.btn-action:hover { background: var(--primary); color: #000; }


/* =========================================
   6. CHAT VIEW
   ========================================= */
#view-chat { display: flex; flex-direction: column; padding: 0; height: calc(100vh - 70px); }

.feed-container { 
    flex: 1; overflow-y: auto; 
    padding: 20px 30px; 
    display: flex; flex-direction: column; gap: 20px; 
}

.msg-row { display: flex; max-width: 70%; }
.msg-row.admin { align-self: flex-start; } /* Admin on Left */
.msg-row.client { align-self: flex-end; justify-content: flex-end; } /* Client/Me on Right */

.msg-bubble { 
    padding: 12px 18px; border-radius: 12px; 
    background: var(--card-bg); border: 1px solid var(--border); 
    position: relative; color: #eee; font-size: 0.95rem; line-height: 1.5;
}
.msg-row.client .msg-bubble { 
    background: var(--primary-dim); border-color: var(--primary); 
    border-radius: 12px 12px 0 12px;
}
.msg-row.admin .msg-bubble { border-radius: 12px 12px 12px 0; }

.msg-time { display: block; font-size: 0.65rem; color: #777; margin-top: 5px; text-align: right; }

.feed-img { max-width: 250px; border-radius: 8px; margin-top: 5px; cursor: pointer; transition: 0.2s; }
.feed-img:hover { opacity: 0.9; }

/* Quote Card inside Chat */
.quote-card {
    background: rgba(255, 215, 0, 0.05); border: 1px solid var(--gold);
    padding: 10px; border-radius: 8px; margin-top: 5px;
}
.btn-approve {
    background: var(--green); color: #000; border: none;
    padding: 5px 10px; border-radius: 4px; font-weight: bold;
    margin-top: 5px; font-size: 0.8rem;
}

/* Input Area */
.input-area { 
    padding: 20px; background: var(--sidebar-bg); 
    border-top: 1px solid var(--border); 
}
.input-wrapper { 
    display: flex; gap: 10px; background: #000; 
    padding: 8px; border-radius: 15px; border: 1px solid var(--border); 
    align-items: center; 
}
#message-input { 
    flex: 1; background: transparent; border: none; 
    color: #fff; padding: 10px; resize: none; 
}
.icon-btn { background: none; border: none; color: var(--text-grey); font-size: 1.2rem; }
.btn-send { 
    background: var(--primary); color: #000; border: none; 
    width: 40px; height: 40px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
}


/* =========================================
   7. TIMELINE VIEW
   ========================================= */
.timeline-wrapper { max-width: 800px; margin: 0 auto; }
.timeline-track { 
    position: relative; padding-left: 30px; 
    border-left: 2px solid var(--border); 
}
.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-dot { 
    position: absolute; left: -37px; top: 0; 
    width: 16px; height: 16px; border-radius: 50%; 
    background: var(--card-bg); border: 2px solid var(--text-grey); 
}
.timeline-item.completed .timeline-dot { 
    background: var(--green); border-color: var(--green); 
    box-shadow: 0 0 10px var(--green); 
}
.timeline-item.active .timeline-dot { 
    background: var(--primary); border-color: var(--primary); 
    box-shadow: 0 0 10px var(--primary); 
}
.t-content { 
    background: var(--card-bg); padding: 15px; 
    border-radius: 10px; border: 1px solid var(--border); 
}
.t-date { font-size: 0.75rem; color: var(--text-grey); display: block; margin-bottom: 5px; }
.t-title { margin: 0; font-size: 1rem; color: #fff; }


/* =========================================
   8. LOGS & GALLERY
   ========================================= */
.logs-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 15px; 
}
.log-card { 
    background: var(--card-bg); border-radius: 10px; 
    overflow: hidden; border: 1px solid var(--border); 
}
.log-media { 
    width: 100%; height: 140px; object-fit: cover; 
    cursor: pointer; transition: 0.3s;
}
.log-media:hover { transform: scale(1.05); }
.log-info { padding: 10px; }
.log-date { font-size: 0.7rem; color: var(--primary); margin-bottom: 3px; }
.log-text { font-size: 0.85rem; color: #ddd; }


/* =========================================
   9. FINANCIALS
   ========================================= */
.finance-summary-cards { 
    display: grid; grid-template-columns: repeat(3, 1fr); 
    gap: 15px; margin-bottom: 20px; 
}
.f-card { 
    background: var(--card-bg); padding: 20px; 
    border-radius: 15px; border: 1px solid var(--border); 
    text-align: center; 
}
.f-card span { font-size: 0.8rem; color: var(--text-grey); text-transform: uppercase; }
.f-card h2 { font-size: 1.5rem; margin: 5px 0 0; }
.f-card.total h2 { color: var(--primary); }
.f-card.paid h2 { color: var(--green); }
.f-card.pending h2 { color: var(--red); }

.chart-container {
    background: var(--card-bg); padding: 20px;
    border-radius: 15px; border: 1px solid var(--border);
    margin-bottom: 20px; display: flex; 
    flex-direction: column; align-items: center;
}

.payment-list { display: flex; flex-direction: column; gap: 10px; }
.pay-item { 
    display: flex; justify-content: space-between; align-items: center; 
    background: rgba(255,255,255,0.03); padding: 15px; 
    border-radius: 10px; border-left: 4px solid var(--border); 
}
.pay-item.paid { border-left-color: var(--green); }
.pay-item.pending { border-left-color: var(--red); }
.pay-amount { font-weight: bold; font-size: 1.1rem; }
.status-badge { 
    font-size: 0.7rem; padding: 3px 8px; border-radius: 4px; 
    margin-left: 10px; 
}
.status-badge.paid { background: rgba(0,230,118,0.2); color: var(--green); }
.status-badge.pending { background: rgba(255,71,87,0.2); color: var(--red); }


/* =========================================
   10. DOCS, MATERIALS, STORE
   ========================================= */
/* ECR & Docs */
.ecr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.ecr-card {
    background: #1a1b26; border: 1px solid var(--gold);
    padding: 15px; border-radius: 10px; position: relative;
}
.ecr-badge {
    position: absolute; top: 10px; right: 10px;
    font-size: 0.65rem; background: var(--gold); color: #000;
    padding: 2px 6px; border-radius: 4px; font-weight: bold;
}
.doc-item {
    background: var(--card-bg); padding: 15px; border-radius: 8px;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; border: 1px solid var(--border);
}
.btn-sign {
    background: var(--gold); color: #000; border: none;
    padding: 5px 10px; font-size: 0.8rem; border-radius: 4px; font-weight: bold;
}

/* Materials */
.materials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }
.mat-card {
    background: var(--card-bg); padding: 10px; border-radius: 10px; border: 1px solid var(--border);
}
.mat-color-box {
    height: 80px; border-radius: 6px; margin-bottom: 10px; border: 1px solid #fff;
    background-size: cover !important; background-position: center !important;
}
.mat-info h4 { margin: 0; font-size: 0.9rem; }
.mat-info p { margin: 2px 0 0; font-size: 0.75rem; color: var(--text-grey); }

/* Store */
.store-header-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px; border-radius: 15px; margin-bottom: 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }
.prod-card {
    background: var(--card-bg); border-radius: 10px; overflow: hidden;
    cursor: pointer; transition: 0.3s;
}
.prod-card:hover { transform: translateY(-3px); border: 1px solid var(--primary); }
.prod-img { width: 100%; height: 150px; object-fit: cover; }
.prod-info { padding: 10px; }
.prod-title { margin: 0; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-price { color: var(--gold); font-weight: bold; margin-top: 5px; }


/* =========================================
   11. MOODBOARD, VR, CAM, MANUAL
   ========================================= */
/* Moodboard */
.moodboard-layout { display: flex; gap: 20px; height: 75vh; }
.mb-sidebar {
    width: 200px; background: #000; padding: 10px; border-radius: 10px;
    border: 1px solid var(--border); overflow-y: auto;
}
.mb-assets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.mb-canvas {
    flex: 1; background: #222; border-radius: 10px; position: relative;
    border: 2px dashed #444; overflow: hidden;
}
.mb-placeholder {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: #555; pointer-events: none;
}

/* VR */
.panorama-box {
    width: 100%; height: 500px; border-radius: 15px; overflow: hidden;
    border: 2px solid var(--border);
}
#panorama { width: 100%; height: 100%; }

/* Live Cam */
.live-cam-wrapper {
    background: #000; border-radius: 10px; overflow: hidden; max-width: 800px; margin: 0 auto;
}
.cam-header {
    background: rgba(255,255,255,0.1); padding: 10px; display: flex; justify-content: space-between;
}
#live-feed-player { height: 450px; display: flex; align-items: center; justify-content: center; }

/* Manual */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.info-card {
    background: var(--card-bg); padding: 15px; border-radius: 10px; border: 1px solid var(--border);
}
.color-swatch { height: 40px; border-radius: 4px; margin-bottom: 10px; border: 1px solid #fff; }


/* =========================================
   12. MODALS & OVERLAYS
   ========================================= */
.portal-modal {
    position: fixed; inset: 0; 
    background: rgba(0,0,0,0.8); z-index: 2000;
    display: none; align-items: center; justify-content: center;
}
.anno-container, .product-popup, .meeting-box {
    background: #151515; padding: 20px; border-radius: 15px;
    border: 1px solid var(--border); max-width: 90%; max-height: 90vh;
    overflow-y: auto; position: relative;
}

/* Annotation */
.anno-container { width: 90vw; height: 90vh; display: flex; flex-direction: column; }
.anno-body { flex: 1; display: flex; align-items: center; justify-content: center; background: #000; overflow: auto; }
.anno-image-wrapper { position: relative; display: inline-block; }
#anno-target-img { max-height: 80vh; max-width: 100%; }

/* Product Popup */
.product-popup { width: 400px; text-align: center; }
.popup-price { font-size: 2rem; color: var(--gold); margin: 20px 0; font-weight: bold; }
.btn-primary { background: var(--primary); color: #000; padding: 10px 20px; border: none; border-radius: 8px; font-weight: bold; width: 100%; }

/* Loader */
.portal-loader {
    position: fixed; inset: 0; background: #0f1016; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.spinner {
    width: 40px; height: 40px; border: 4px solid var(--primary-dim);
    border-top: 4px solid var(--primary); border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* =========================================
   13. MOBILE RESPONSIVENESS (UPDATED SMART UX)
   ========================================= */
.mobile-only { display: none; }
.sidebar-overlay { display: none; }

/* --- MOBILE FIXES --- */
@media (max-width: 992px) {
    
    /* A. SIDEBAR SCROLL FIX (100% Working) */
    .portal-sidebar {
        width: 280px;
        left: -280px; /* Hidden initially */
        z-index: 2000; /* Highest priority over everything */
        
        /* 🔥 MOBILE SCROLL ENGINE */
        position: fixed;
        top: 0;
        bottom: 0; /* Ensures full vertical stretch */
        height: 100%; 
        
        /* Touch Scrolling Enablers */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important; /* Smooth iOS Scroll */
        touch-action: pan-y; /* Allow vertical finger drag */
        
        /* Spacing */
        padding-bottom: 120px !important; /* Space for mobile browser bars */
        transition: left 0.3s ease; /* Smooth open animation */
    }
    
    /* Ensure content doesn't shrink on mobile too */
    .portal-sidebar > * {
        flex-shrink: 0 !important;
    }
    
    .portal-sidebar.active { left: 0; box-shadow: 100px 0 0 rgba(0,0,0,0.5); }
    
    .portal-main {
        margin-left: 0;
        width: 100%;
        padding-top: 120px; /* Default gap for header */
    }
    
    .sidebar-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.8);
        z-index: 1900; display: none; /* Just below sidebar */
    }
    .sidebar-overlay.active { display: block; }

    /* B. 🚀 SMART HEADER (Auto Hide) */
    .chat-header { 
        position: fixed !important;
        top: 0; 
        left: 0;
        width: 100%;
        height: 60px; /* Reduced Height */
        padding: 0 15px; 
        z-index: 1000;
        background: rgba(22, 23, 34, 0.98);
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: transform 0.3s ease; /* Smooth Hide Animation */
    }

    /* Logic: Class added by JS on Scroll */
    .chat-header.hide-on-scroll {
        transform: translateY(-100%); /* Slide Up fully */
    }

    .mobile-only { 
        display: block; background: none; border: none; 
        color: #fff; font-size: 1.2rem; margin-right: 15px; 
    }

    /* C. 🚀 STICKY TABS (Always Visible) */
    .workspace-tabs { 
        position: fixed !important;
        top: 60px; /* Initially below header */
        left: 0; 
        width: 100%; 
        background: #0f1016; /* Dark Contrast BG */
        padding: 8px 10px; /* Slimmer Padding */
        height: 50px; /* Fixed Height */
        border-bottom: 1px solid #333;
        z-index: 999; 
        overflow-x: auto; 
        white-space: nowrap;
        display: flex;
        gap: 8px;
        align-items: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        transition: top 0.3s ease; /* Smooth Movement */
    }

    /* Hide scrollbar visually but keep functionality */
    .workspace-tabs::-webkit-scrollbar { display: none; }

    /* Logic: When Header Hides, Tabs Move Up */
    .chat-header.hide-on-scroll + .workspace-tabs, 
    body.scroll-down .workspace-tabs {
        top: 0 !important; /* Sticks to very top */
    }

    /* Slim Buttons for Mobile */
    .tab-btn {
        padding: 5px 12px;
        font-size: 0.75rem;
        height: 32px;
        border-radius: 16px;
    }

    /* D. INPUT & CHAT FIXES */
    .input-area {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1001; /* Above everything */
        background: #161722;
        padding: 10px;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    }
    
    #view-chat {
        padding-bottom: 80px !important; /* Space for input bar */
    }

    /* Grids */
    .finance-summary-cards { grid-template-columns: 1fr; }
    .moodboard-layout { flex-direction: column; height: auto; }
    .mb-sidebar { width: 100%; height: 150px; display: flex; }
    .mb-canvas { height: 300px; }
    
    /* Chat Bubble Fix */
    .msg-row { max-width: 90%; }
    
    /* Stats Grid Mobile Fix */
    .passport-stats { grid-template-columns: 1fr 1fr 1fr !important; gap: 2px; }
    .p-stat-box strong { font-size: 0.75rem; }
    
    /* AI Bot Position Fix */
    .ai-bot-trigger { bottom: 90px !important; right: 20px !important; }
}

/* =========================================
   🚀 ULTRA-MODERN DASHBOARD UI
   ========================================= */

/* 1. Welcome Header Section */
.dashboard-hero {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.8), rgba(20, 20, 30, 0.9)), 
                url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?q=80&w=2053&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

/* Glass Shine Effect */
.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0; left: -50%;
    width: 100%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-25deg);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { left: -50%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

.hero-greeting h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, #a0a0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.hero-greeting p {
    color: #a0a0b0;
    font-size: 1rem;
    margin-top: 10px;
    max-width: 600px;
}

/* 2. Progress Stepper (Timeline) */
.progress-card {
    background: #161722;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 30px;
}

.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 20px;
}

.stepper-wrapper::before {
    content: '';
    position: absolute;
    top: 15px; left: 0; width: 100%; height: 4px;
    background: #333;
    z-index: 0;
}

.stepper-wrapper::after {
    content: '';
    position: absolute;
    top: 15px; left: 0; height: 4px;
    background: var(--primary); /* Cyan Color */
    z-index: 0;
    width: var(--progress-width, 0%); /* JS will set this */
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px var(--primary);
}

.step-item {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.step-circle {
    width: 35px; height: 35px;
    background: #1f202e;
    border: 3px solid #555;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: #fff;
    transition: 0.3s;
}

.step-item.active .step-circle {
    border-color: var(--primary);
    background: #000;
    color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
    transform: scale(1.2);
}

.step-item.completed .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.step-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.step-item.active .step-label { color: #fff; font-weight: bold; }

/* 3. Action Grid (Bento Box Style) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.dash-card {
    background: linear-gradient(145deg, #1f202e, #161722);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dash-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.card-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card-title { font-size: 1.2rem; font-weight: 700; color: #fff; margin: 0 0 5px; }
.card-desc { font-size: 0.85rem; color: #a0a0b0; line-height: 1.4; }

/* Card Variations */
.card-chat .card-icon { background: rgba(0, 242, 255, 0.1); color: var(--primary); }
.card-meet .card-icon { background: rgba(255, 71, 87, 0.1); color: var(--red); }
.card-doc .card-icon { background: rgba(255, 215, 0, 0.1); color: var(--gold); }

/* Badge inside Card */
.notif-badge {
    position: absolute; top: 15px; right: 15px;
    background: var(--red); color: white;
    font-size: 0.7rem; padding: 2px 8px; border-radius: 10px;
    animation: pulse 2s infinite;
}

/* 4. Requirements Box */
.modern-textarea {
    width: 100%; height: 150px;
    background: #0f1016; border: 1px solid #333;
    border-radius: 10px; padding: 15px;
    color: #fff; font-family: inherit;
    margin-bottom: 15px; resize: none;
}
.modern-textarea:focus { border-color: var(--primary); }

.btn-primary-gradient {
    background: linear-gradient(90deg, var(--primary), #0099ff);
    color: #000; border: none; padding: 12px 25px;
    border-radius: 8px; font-weight: bold; width: 100%;
    cursor: pointer; box-shadow: 0 5px 15px rgba(0, 242, 255, 0.3);
}

@media (max-width: 768px) {
    .dashboard-hero { padding: 25px; }
    .hero-greeting h1 { font-size: 1.5rem; }
    .step-label { font-size: 0.6rem; display: none; } /* Hide labels on very small screens */
    .step-item.active .step-label { display: block; }
}

/* --- SMART ACTION CARDS (LOCKED / READY / PENDING) --- */

/* 1. Status Badges on Cards */
.status-pill {
    position: absolute; top: 15px; right: 15px;
    font-size: 0.65rem; padding: 3px 10px; border-radius: 20px;
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

.status-locked { background: #333; color: #777; border: 1px solid #444; }
.status-pending { background: rgba(255, 159, 67, 0.2); color: #ff9f43; border: 1px solid #ff9f43; animation: pulse-orange 2s infinite; }
.status-ready { background: rgba(0, 230, 118, 0.2); color: #00e676; border: 1px solid #00e676; box-shadow: 0 0 10px rgba(0, 230, 118, 0.2); }

/* 2. Card States */
.dash-card.locked {
    opacity: 0.6;
    filter: grayscale(1);
    cursor: not-allowed;
    border-style: dashed;
}
.dash-card.locked:hover { transform: none; box-shadow: none; border-color: rgba(255,255,255,0.05); }

.dash-card.ready {
    border: 1px solid var(--primary);
    background: linear-gradient(145deg, rgba(0, 242, 255, 0.05), #161722);
}

/* 3. New Icons & Colors */
.card-2d .card-icon { background: rgba(156, 39, 176, 0.2); color: #e040fb; }
.card-3d .card-icon { background: rgba(63, 81, 181, 0.2); color: #536dfe; }
.card-quote .card-icon { background: rgba(0, 150, 136, 0.2); color: #64ffda; }

/* 4. Animations */
@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(255, 159, 67, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 159, 67, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 159, 67, 0); }
}

/* --- 🚀 NEW FEATURES: SQUAD, FEED, QUIZ & MOODBOARD --- */

/* 1. Dashboard Layout (2 Columns) */
.dashboard-layout-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Main Content : Sidebar */
    gap: 25px;
}

/* 2. Live Activity Feed */
.activity-card {
    background: #161722; border: 1px solid rgba(255,255,255,0.05);
    border-radius: 15px; padding: 20px; height: 100%;
}
.feed-item {
    display: flex; gap: 15px; margin-bottom: 20px;
    position: relative;
}
.feed-item::before {
    content: ''; position: absolute; left: 14px; top: 30px; bottom: -20px;
    width: 2px; background: #333; z-index: 0;
}
.feed-item:last-child::before { display: none; }
.feed-icon {
    width: 30px; height: 30px; background: #1f202e; border: 1px solid #444;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: var(--primary); z-index: 1;
}
.feed-content h5 { margin: 0 0 2px; font-size: 0.9rem; color: #fff; }
.feed-content span { font-size: 0.75rem; color: #777; }

/* 3. Design Squad Card */
.squad-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid var(--primary); padding: 20px;
    border-radius: 15px; text-align: center; margin-bottom: 25px;
    position: relative; overflow: hidden;
}
.squad-card::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,242,255,0.1) 0%, transparent 60%);
    animation: rotate 10s linear infinite;
}
.squad-img {
    width: 70px; height: 70px; border-radius: 50%; border: 2px solid var(--primary);
    object-fit: cover; margin-bottom: 10px; position: relative; z-index: 1;
}
.squad-info { position: relative; z-index: 1; }
.btn-contact-squad {
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    padding: 5px 15px; border-radius: 20px; font-size: 0.75rem; margin-top: 10px;
    cursor: pointer; transition: 0.3s;
}
.btn-contact-squad:hover { background: var(--primary); color: #000; }

/* 4. Style Quiz Modal Grid */
.quiz-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px;
}
.quiz-option {
    border: 2px solid transparent; border-radius: 8px; overflow: hidden;
    cursor: pointer; transition: 0.3s; opacity: 0.7;
}
.quiz-option:hover { opacity: 1; }
.quiz-option.selected { border-color: var(--primary); opacity: 1; transform: scale(1.05); }
.quiz-option img { width: 100%; height: 120px; object-fit: cover; display: block; }

/* Mobile Fix */
@media (max-width: 992px) {
    .dashboard-layout-wrapper { grid-template-columns: 1fr; }
}

/* --- 🚀 PHASE 3 FEATURES: NOTIFICATIONS & CALCULATOR --- */

/* 1. Notification Center Styling */
.notification-wrapper { display: inline-block; }
.notif-dot {
    position: absolute; top: 5px; right: 5px;
    width: 8px; height: 8px; background: var(--red);
    border-radius: 50%; box-shadow: 0 0 5px var(--red);
    animation: pulse-red 2s infinite;
}

.notif-dropdown {
    position: absolute; top: 50px; right: -10px;
    width: 320px; background: rgba(22, 23, 34, 0.95);
    backdrop-filter: blur(15px); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none; z-index: 1000; overflow: hidden;
    transform-origin: top right; animation: scaleIn 0.2s ease;
}
.notif-dropdown.active { display: block; }

.notif-header {
    padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
}
.notif-header h4 { margin: 0; font-size: 0.9rem; color: #fff; }

.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item {
    padding: 12px 15px; border-bottom: 1px solid rgba(255,255,255,0.02);
    display: flex; gap: 10px; transition: 0.2s; cursor: pointer;
}
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(0, 242, 255, 0.05); border-left: 3px solid var(--primary); }
.notif-icon { color: var(--primary); margin-top: 3px; }
.notif-text p { margin: 0; font-size: 0.8rem; color: #ddd; }
.notif-text span { font-size: 0.65rem; color: #777; }
.empty-notif { padding: 20px; text-align: center; color: #666; font-size: 0.8rem; }

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* 2. Smart Calculator Range Sliders */
.calc-range-wrapper { margin-bottom: 20px; text-align: left; }
.calc-label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.85rem; color: #a0a0b0; }
.calc-val-display { color: var(--primary); font-weight: bold; }

input[type=range] {
    -webkit-appearance: none; width: 100%; background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 16px; width: 16px;
    border-radius: 50%; background: var(--primary);
    cursor: pointer; margin-top: -6px; box-shadow: 0 0 10px var(--primary);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; cursor: pointer;
    background: #333; border-radius: 2px;
}
.calc-total-box {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.1), rgba(0, 242, 255, 0.02));
    border: 1px solid var(--primary); padding: 15px; border-radius: 10px;
    margin-top: 15px; text-align: center;
}

/* --- 🚀 PHASE 4 & 5: FINANCE, MATERIALS & DOCS --- */

/* 7. Milestone Payment Tracker */
.milestone-track-container {
    display: flex; justify-content: space-between; align-items: center;
    position: relative; margin: 40px 0; padding: 0 20px;
}
.milestone-track-container::before {
    content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 4px;
    background: #333; z-index: 0; transform: translateY(-50%);
}
.milestone-step {
    position: relative; z-index: 1; text-align: center;
    background: #161722; padding: 10px; border-radius: 10px;
    border: 1px solid #333; width: 180px; transition: 0.3s;
}
.milestone-step.paid { border-color: var(--green); box-shadow: 0 0 15px rgba(0,230,118,0.2); }
.milestone-step.due { border-color: var(--red); animation: pulse-red 2s infinite; }
.milestone-step.locked { opacity: 0.5; filter: grayscale(1); }

.ms-icon {
    width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; background: #222; color: #777;
}
.paid .ms-icon { background: var(--green); color: #000; }
.due .ms-icon { background: var(--red); color: #fff; }

.ms-amount { font-size: 1.1rem; font-weight: bold; color: #fff; margin: 5px 0; }
.ms-label { font-size: 0.75rem; color: #aaa; text-transform: uppercase; }

/* 8. Digital Material Palette */
.material-swatch-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px; margin-top: 20px;
}
.swatch-card {
    background: #1f202e; border-radius: 10px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; cursor: pointer;
}
.swatch-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.swatch-img { height: 100px; width: 100%; object-fit: cover; }
.swatch-info { padding: 10px; }
.swatch-name { font-size: 0.85rem; color: #fff; margin: 0; }
.swatch-code { font-size: 0.7rem; color: #777; }

/* 9. Smart Document Vault */
.vault-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.vault-file {
    background: linear-gradient(145deg, #1f202e, #161722);
    padding: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05);
    display: flex; align-items: center; gap: 15px; position: relative;
}
.vault-icon {
    font-size: 2rem; color: var(--gold);
}
.vault-meta h4 { margin: 0; font-size: 0.95rem; color: #fff; }
.vault-meta span { font-size: 0.7rem; color: #777; }
.btn-esign {
    position: absolute; right: 15px; top: 20px;
    background: var(--primary); color: #000; border: none;
    padding: 5px 10px; border-radius: 4px; font-weight: bold; font-size: 0.7rem;
    cursor: pointer; animation: pulse-green 2s infinite;
}

/* 10. Guided Tour Tooltip (Simple Implementation) */
.tour-tooltip {
    position: absolute; background: #fff; color: #000;
    padding: 15px; border-radius: 8px; width: 250px;
    box-shadow: 0 0 20px rgba(0,242,255,0.5); z-index: 9999;
    font-size: 0.9rem; text-align: center;
}
.tour-tooltip::after {
    content: ''; position: absolute; top: -10px; left: 50%;
    border-width: 5px; border-style: solid;
    border-color: transparent transparent #fff transparent;
    transform: translateX(-50%);
}
.tour-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 9998;
}

/* Premium Card Styles */
.card-3d-premium {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.05), #161722) !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
}
.card-3d-premium .card-icon {
    background: rgba(255, 215, 0, 0.1) !important;
    color: #ffd700 !important;
}
.card-3d-premium .card-title {
    color: #ffd700 !important;
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* --- 🚀 PHASE 6: LEDGER & APPROVAL SYSTEM --- */

/* 1. Transaction Ledger Table */
.ledger-wrapper { background: #161722; padding: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }
.ledger-table { width: 100%; border-collapse: collapse; color: #fff; font-size: 0.9rem; }
.ledger-table th { text-align: left; padding: 12px; color: #777; font-weight: 600; border-bottom: 1px solid #333; }
.ledger-table td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.02); }
.ledger-table tr:hover { background: rgba(255,255,255,0.02); }

.badge-paid { background: rgba(0, 230, 118, 0.1); color: #00e676; padding: 3px 8px; border-radius: 4px; font-size: 0.75rem; }
.btn-receipt { color: var(--primary); background: transparent; border: 1px solid var(--primary); padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; cursor: pointer; transition: 0.2s; }
.btn-receipt:hover { background: var(--primary); color: #000; }

/* 2. Design Approval Actions */
.file-actions {
    display: flex; gap: 10px; margin-top: 15px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1);
}
.btn-approve { flex: 1; background: #00e676; color: #000; border: none; padding: 8px; border-radius: 6px; font-weight: bold; cursor: pointer; }
.btn-revise { flex: 1; background: transparent; color: #ff4757; border: 1px solid #ff4757; padding: 8px; border-radius: 6px; font-weight: bold; cursor: pointer; }
.btn-revise:hover { background: #ff4757; color: #fff; }

.status-tag-approved { width: 100%; text-align: center; background: rgba(0, 230, 118, 0.1); color: #00e676; padding: 8px; border-radius: 6px; margin-top: 10px; font-weight: bold; border: 1px solid #00e676; }
.status-tag-revision { width: 100%; text-align: center; background: rgba(255, 71, 87, 0.1); color: #ff4757; padding: 8px; border-radius: 6px; margin-top: 10px; font-weight: bold; border: 1px solid #ff4757; }

/* --- 🚀 UPGRADES: TIMELINE ETA, VOICE, CHECKLIST --- */

/* A. Timeline ETA */
.step-date {
    display: block; font-size: 0.65rem; color: #a0a0b0;
    margin-top: 5px; font-family: monospace; letter-spacing: 0.5px;
}
.step-item.active .step-date { color: var(--primary); font-weight: bold; }

/* C. Voice Note Recorder */
.voice-btn {
    background: #1f202e; border: 1px solid #444; color: #fff;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
}
.voice-btn.recording {
    background: var(--red); border-color: var(--red);
    animation: pulse-red 1s infinite;
}
.voice-preview {
    display: none; align-items: center; gap: 10px;
    background: #1f202e; padding: 5px 10px; border-radius: 20px;
    margin-right: 10px; border: 1px solid var(--primary);
}
.voice-preview.show { display: flex; }

/* D. Interactive Checklist */
.checklist-group { margin-bottom: 20px; background: #161722; padding: 15px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05); }
.checklist-title { color: var(--primary); font-size: 0.9rem; margin-bottom: 10px; text-transform: uppercase; font-weight: bold; border-bottom: 1px solid #333; padding-bottom: 5px; }
.check-item {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
    cursor: pointer; padding: 8px; border-radius: 6px; transition: 0.2s;
}
.check-item:hover { background: rgba(255,255,255,0.03); }
.check-item input[type="checkbox"] {
    accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer;
}
.check-item label { color: #ddd; font-size: 0.85rem; cursor: pointer; flex: 1; }

/* --- 🚀 NEW FEATURES: MEETING, TRUST & REFERRAL --- */

/* E. Virtual Coffee Meet (Booking System) */
.booking-calendar {
    background: #161722; padding: 20px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05); text-align: center;
}
.calendar-slots {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px; margin-top: 15px;
}
.time-slot {
    background: #1f202e; border: 1px solid #444; padding: 10px;
    border-radius: 8px; cursor: pointer; transition: 0.3s; color: #fff;
    font-size: 0.8rem;
}
.time-slot:hover { border-color: var(--primary); background: rgba(0, 242, 255, 0.1); }
.time-slot.selected { background: var(--primary); color: #000; border-color: var(--primary); font-weight: bold; }

/* --- SIDEBAR FOOTER COMPACT DESIGN (UPDATED) --- */

/* 1. Trust Badges (Compact) */
.trust-badge-container {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    margin-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.trust-item {
    text-align: center;
    transform: scale(0.9); /* Size reduced */
}
.trust-item i {
    font-size: 1rem; /* Smaller icon */
    color: var(--gold);
    margin-bottom: 2px;
}
.trust-item span {
    font-size: 0.55rem; /* Tiny text */
    color: #888;
    display: block;
}

/* 2. Referral Card (Slim Banner Style) */
.referral-card {
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    padding: 8px 12px; /* Padding reduced */
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.2);
}
.referral-card:hover { transform: translateY(-2px); }

.ref-left h4 { margin: 0; font-size: 0.75rem; color: #fff; }
.ref-left p { margin: 0; font-size: 0.55rem; color: rgba(255,255,255,0.8); }

.ref-code-box {
    background: rgba(0,0,0,0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #fff;
    border: 1px dashed rgba(255,255,255,0.4);
    margin: 0; 
}

/* --- 🚀 NEW MICRO-FEATURES: ALERTS, CHIPS, CALENDAR, UPLOAD --- */

/* 1. Timeline Action Dot */
.action-dot {
    position: absolute; top: -5px; right: -5px;
    width: 10px; height: 10px; background: var(--red);
    border-radius: 50%; border: 2px solid #161722;
    animation: pulse-red 1.5s infinite; z-index: 10;
}

/* 2. Quick Replies (Smart Chips) */
.quick-replies-wrapper {
    display: flex; gap: 8px; overflow-x: auto; padding: 10px 0;
    margin-bottom: 5px; scrollbar-width: none; /* Hide scrollbar */
}
.quick-replies-wrapper::-webkit-scrollbar { display: none; }

.smart-chip {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: #a0a0b0; padding: 5px 12px; border-radius: 20px;
    font-size: 0.75rem; white-space: nowrap; cursor: pointer; transition: 0.2s;
}
.smart-chip:hover {
    background: var(--primary); color: #000; border-color: var(--primary);
    transform: translateY(-2px);
}

/* 3. Google Calendar Button */
.btn-gcal {
    background: #fff; color: #333; font-weight: bold;
    display: flex; align-items: center; gap: 8px; margin-top: 15px;
    padding: 10px 20px; border-radius: 8px; border: 1px solid #ddd;
    width: 100%; justify-content: center; transition: 0.2s;
}
.btn-gcal:hover { background: #f1f1f1; }
.gcal-icon { width: 18px; }

/* 4. Checklist Image Upload */
.check-item { position: relative; padding-right: 35px; } /* Space for icon */
.item-upload-btn {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    color: #666; font-size: 0.9rem; cursor: pointer; transition: 0.2s;
    background: none; border: none;
}
.item-upload-btn:hover { color: var(--primary); }
.item-upload-btn.has-file { color: var(--green); }

/* --- 🚀 NEW FEATURES: AI BOT & CANVAS MOODBOARD --- */

/* 1. AI Chatbot Widget (Floating) */
.ai-bot-trigger {
    position: fixed; bottom: 20px; right: 20px;
    width: 60px; height: 60px; background: linear-gradient(135deg, #00f2ff, #0099ff);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.4); cursor: pointer;
    z-index: 1000; animation: float 3s ease-in-out infinite;
}
.ai-bot-trigger i { font-size: 1.8rem; color: #fff; }

.ai-chat-window {
    position: fixed; bottom: 90px; right: 20px; width: 350px; height: 500px;
    background: #161722; border-radius: 15px; border: 1px solid rgba(255,255,255,0.1);
    display: none; flex-direction: column; overflow: hidden; z-index: 1000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.ai-chat-window.active { display: flex; animation: slideUp 0.3s ease; }

.ai-header {
    background: linear-gradient(90deg, #00f2ff, #0099ff); padding: 15px;
    display: flex; align-items: center; gap: 10px; color: #fff; font-weight: bold;
}
.ai-body {
    flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px;
}
.ai-msg {
    padding: 10px 15px; border-radius: 15px; max-width: 80%; font-size: 0.9rem;
}
.ai-msg.bot { background: #1f202e; color: #fff; align-self: flex-start; border-bottom-left-radius: 2px; }
.ai-msg.user { background: rgba(0, 242, 255, 0.1); color: var(--primary); align-self: flex-end; border-bottom-right-radius: 2px; text-align: right; }

.ai-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.ai-btn {
    background: transparent; border: 1px solid var(--primary); color: var(--primary);
    padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; cursor: pointer; transition: 0.2s;
}
.ai-btn:hover { background: var(--primary); color: #000; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 2. Interactive Moodboard Canvas */
.canvas-wrapper {
    position: relative; background: #fff; border-radius: 10px; overflow: hidden;
    height: 500px; border: 2px solid #333; margin-top: 20px;
}
.canvas-toolbar {
    position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.8);
    padding: 10px; border-radius: 8px; display: flex; flex-direction: column; gap: 10px; z-index: 10;
}
.tool-btn {
    width: 40px; height: 40px; background: #333; border: 1px solid #555;
    color: #fff; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.tool-btn:hover { background: var(--primary); color: #000; }

.canvas-item {
    position: absolute; cursor: move; border: 2px solid transparent;
}
.canvas-item:hover, .canvas-item.active { border-color: var(--primary); }
.canvas-item img { width: 100px; height: auto; pointer-events: none; }

/* --- 🚀 NEW SIDEBAR PROJECT PASSPORT --- */

.project-passport {
    background: #1f202e;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* Header */
.passport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.passport-id {
    font-family: monospace;
    font-size: 0.75rem;
    color: #777;
    background: #161722;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #333;
}
.passport-badge {
    background: rgba(0, 242, 255, 0.1);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

/* Main Title */
.passport-main h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
}
.passport-main p {
    margin: 2px 0 15px;
    font-size: 0.8rem;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

/* --- STATS GRID FIXES (UPDATED) --- */
.passport-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr !important; /* Force 3 columns */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px 5px;
    margin-bottom: 15px;
    gap: 0;
}

.p-stat-box {
    text-align: center;
    padding: 0 5px;
    overflow: hidden; /* Prevent overflow */
}

.p-stat-box small {
    display: block;
    font-size: 0.65rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.p-stat-box strong {
    font-size: 0.85rem;
    color: #fff;
    display: block;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-stat-box.right-border { border-right: 1px solid rgba(255,255,255,0.1); }
.p-stat-box.left-border { border-left: 1px solid rgba(255,255,255,0.1); }

/* Details List */
.passport-details {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}
.passport-details li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}
.passport-details li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.icon-box {
    width: 32px;
    height: 32px;
    background: #161722;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.detail-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.detail-text small {
    font-size: 0.65rem;
    color: #666;
}
.detail-text span {
    font-size: 0.85rem;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress */
.passport-progress {
    margin-top: 10px;
}
.progress-label {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: #777;
}

/* --- 🚀 SIDEBAR POWER WIDGETS --- */

.sidebar-widget-group {
    display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px;
}

/* 1. Health Pulse Widget */
.health-card {
    background: #1f202e; border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; padding: 12px; display: flex; align-items: center; justify-content: space-between;
}
.health-status { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: #fff; font-weight: bold; }
.pulse-indicator {
    width: 10px; height: 10px; border-radius: 50%;
    box-shadow: 0 0 10px currentColor; animation: pulse-health 2s infinite;
}
.health-good { color: #00e676; } .health-warn { color: #ffa502; } .health-bad { color: #ff4757; }

/* 2. Milestone Countdown */
.milestone-mini {
    background: #161722; padding: 15px; border-radius: 10px;
    border-left: 3px solid var(--primary);
}
.ms-title { font-size: 0.75rem; color: #aaa; text-transform: uppercase; margin-bottom: 5px; }
.ms-name { font-size: 0.9rem; color: #fff; font-weight: bold; display: block; }
.ms-time { font-size: 0.8rem; color: var(--primary); font-weight: 600; display: block; margin-top: 3px; }

/* 3. Team Squad (Overlapping Avatars) */
.team-squad-box {
    background: #1f202e; padding: 15px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}
.squad-label { font-size: 0.7rem; color: #777; display: block; margin-bottom: 10px; }
.avatar-stack { display: flex; align-items: center; }
.squad-member {
    width: 35px; height: 35px; border-radius: 50%; border: 2px solid #1f202e;
    overflow: hidden; margin-right: -10px; cursor: pointer; transition: 0.3s; position: relative;
}
.squad-member:hover { transform: translateY(-3px); z-index: 10; border-color: var(--primary); }
.squad-member img { width: 100%; height: 100%; object-fit: cover; }
.squad-member.add-btn {
    background: #333; color: #aaa; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
}

/* 4. Quick Actions Grid */
.quick-actions {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px;
}
.qa-btn {
    background: #161722; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 10px; text-align: center; cursor: pointer; transition: 0.2s;
}
.qa-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); }
.qa-btn i { font-size: 1.2rem; margin-bottom: 5px; display: block; }
.qa-btn span { font-size: 0.6rem; display: block; }

@keyframes pulse-health { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* ============================================================
   🚀 FINAL FIXES: LAYOUT, CURSOR, ICON OVERLAP & INPUT AREA
   ============================================================ */

/* FIX 1: মাউস কার্সর সমস্যা সমাধান (Global Cursor Fix) */
* {
    cursor: default !important; /* ডিফল্ট কার্সর সেট করা হলো */
}
/* বাটন, লিংক এবং কার্ডের জন্য পয়েন্টার কার্সর */
button, a, .dash-card, .menu-item, .clickable, .step-item, .pkg-card, .swatch-card, .vault-file, .icon-btn {
    cursor: pointer !important;
}
input, textarea {
    cursor: text !important;
}

/* FIX 2: চ্যাট ইনপুট এবং কার্ড লেআউট (Home Page Chat) */
.input-area {
    display: block !important; /* সব পেজেই দেখাবে */
    position: fixed;
    bottom: 0;
    left: 340px; /* সাইডবারের উইডথ (340px) অনুযায়ী */
    width: calc(100% - 340px);
    z-index: 900; /* কন্টেন্টের উপরে কিন্তু মডালের নিচে */
    background: #161722;
    border-top: 1px solid #333;
    padding: 15px 30px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

/* মোবাইল রেসপন্সিভ ইনপুট */
@media (max-width: 992px) {
    .input-area {
        left: 0;
        width: 100%;
        bottom: 0; /* মোবাইলে বটম ফিক্সড */
    }
}

/* FIX 3: কার্ড যাতে চাপা না পড়ে (Padding Fix) */
.view-container {
    height: auto !important;
    overflow-y: visible !important; /* কন্টেইনার স্ক্রল হবে না, মেইন বডি স্ক্রল হবে */
    padding-bottom: 120px !important; /* ইনপুট বারের জন্য নিচে প্রচুর জায়গা ছাড়া হলো */
}

/* মেইন স্ক্রল এরিয়া */
.portal-main {
    height: 100vh;
    overflow-y: auto; /* এখানে স্ক্রল হবে */
    scroll-behavior: smooth;
}

/* FIX 4: আইকন ওভারল্যাপ (AI Bot Icon Shift) */
.ai-bot-trigger {
    bottom: 110px !important; /* ইনপুট বারের উপরে তোলা হলো */
    right: 30px !important;
    z-index: 1000 !important; /* ইনপুট বারের উপরে */
    transform: scale(1);
    transition: 0.3s;
}
/* চ্যাট উইন্ডো পজিশন */
.ai-chat-window {
    bottom: 180px !important;
    right: 30px !important;
    z-index: 1001 !important;
}

/* --- 🚀 RIGHT SIDEBAR WIDGETS (POLLS, TIPS, SCHEDULE) --- */

.widget-box {
    background: #161722; border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 15px; margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* 1. Quick Polls */
.poll-question { font-size: 0.85rem; color: #fff; margin-bottom: 10px; font-weight: 600; }
.poll-options { display: flex; gap: 10px; }
.poll-btn {
    flex: 1; background: rgba(255,255,255,0.05); border: 1px solid #444;
    color: #aaa; padding: 8px; border-radius: 6px; font-size: 0.75rem;
    cursor: pointer; transition: 0.2s;
}
.poll-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); }

/* 2. Daily Tip (Nugget) */
.tip-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.02));
    border: 1px dashed var(--gold); padding: 12px; border-radius: 8px;
    display: flex; gap: 10px; align-items: flex-start;
}
.tip-icon { font-size: 1.2rem; color: var(--gold); }
.tip-text { font-size: 0.8rem; color: #ddd; line-height: 1.4; }

/* 3. Upcoming Schedule */
.schedule-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.schedule-item {
    display: flex; align-items: center; gap: 10px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.schedule-item:last-child { border-bottom: none; }
.sch-date {
    background: #1f202e; padding: 5px 8px; border-radius: 6px;
    text-align: center; border: 1px solid #333;
}
.sch-date strong { display: block; font-size: 0.9rem; color: #fff; }
.sch-date span { display: block; font-size: 0.6rem; color: #777; text-transform: uppercase; }
.sch-info h5 { margin: 0; font-size: 0.85rem; color: #ddd; }
.sch-info p { margin: 2px 0 0; font-size: 0.7rem; color: #777; }

/* 4. Action Center (Alert) */
.action-alert {
    background: rgba(255, 71, 87, 0.1); border: 1px solid var(--red);
    padding: 12px; border-radius: 8px; display: flex; align-items: center; gap: 10px;
    cursor: pointer; transition: 0.2s; animation: pulse-red-border 2s infinite;
}
.action-alert:hover { background: var(--red); }
.action-alert:hover h5, .action-alert:hover p { color: #fff; }
.action-icon { font-size: 1.2rem; color: var(--red); }
.action-alert:hover .action-icon { color: #fff; }
.action-text h5 { margin: 0; font-size: 0.85rem; color: var(--red); }
.action-text p { margin: 0; font-size: 0.7rem; color: #aaa; }

@keyframes pulse-red-border {
    0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4); }
    70% { box-shadow: 0 0 0 5px rgba(255, 71, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

/* 5. Downloads & Feedback */
.downloads-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.dl-btn {
    background: #1f202e; border: 1px solid #333; color: #aaa;
    padding: 8px; border-radius: 6px; font-size: 0.7rem; text-align: center;
    cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 5px;
}
.dl-btn:hover { background: #fff; color: #000; }

.feedback-emojis { display: flex; justify-content: space-around; margin-top: 10px; font-size: 1.5rem; cursor: pointer; }
.emoji-btn:hover { transform: scale(1.2); }

/* --- 🚀 SMART REQUIREMENTS HUB STYLES --- */

/* 1. Room Cards Grid */
.req-room-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; margin-bottom: 30px;
}

.req-card {
    background: #161722; border-radius: 15px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05); transition: 0.3s;
}
.req-card:hover { border-color: var(--primary); box-shadow: 0 5px 20px rgba(0,0,0,0.3); }

/* Room Header with Colors */
.req-header {
    padding: 15px; display: flex; align-items: center; justify-content: space-between;
    color: #fff; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.req-header i { font-size: 1.2rem; opacity: 0.8; }

/* Custom Room Colors */
.room-living .req-header { background: linear-gradient(90deg, rgba(0,242,255,0.2), transparent); color: #00f2ff; }
.room-kitchen .req-header { background: linear-gradient(90deg, rgba(255,159,67,0.2), transparent); color: #ff9f43; }
.room-bedroom .req-header { background: linear-gradient(90deg, rgba(165,94,234,0.2), transparent); color: #a55eea; }

/* 2. Visual Checkbox List */
.req-body { padding: 15px; }
.visual-check {
    display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
    padding: 8px; border-radius: 8px; cursor: pointer; transition: 0.2s;
    border: 1px solid transparent; background: #1f202e;
}
.visual-check:hover { background: rgba(255,255,255,0.05); }
.visual-check.checked { border-color: var(--green); background: rgba(0,230,118,0.1); }

.visual-thumb {
    width: 40px; height: 40px; border-radius: 6px; object-fit: cover;
    background: #333;
}
.check-circle {
    width: 20px; height: 20px; border-radius: 50%; border: 2px solid #555;
    margin-left: auto; display: flex; align-items: center; justify-content: center;
}
.checked .check-circle { background: var(--green); border-color: var(--green); color: #000; }

/* 3. Media Input Zone (Voice & Upload) */
.req-footer {
    padding: 10px 15px; border-top: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
}
.voice-note-btn {
    display: flex; align-items: center; gap: 5px; color: #aaa;
    font-size: 0.75rem; cursor: pointer; transition: 0.2s;
}
.voice-note-btn:hover { color: var(--red); }
.voice-recording { color: var(--red); animation: pulse-red 1s infinite; }

.mini-upload-zone {
    width: 30px; height: 30px; border-radius: 50%; background: #333;
    display: flex; align-items: center; justify-content: center; color: #fff;
    cursor: pointer; border: 1px dashed #777;
}

/* 4. Activity Log Section */
.activity-log-wrapper {
    background: #1f202e; padding: 20px; border-radius: 12px; margin-top: 30px;
    border: 1px solid rgba(255,255,255,0.05);
}
.log-item {
    display: flex; gap: 15px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.log-icon {
    width: 35px; height: 35px; background: rgba(255,255,255,0.05);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; color: var(--primary);
}
.log-content h5 { margin: 0; color: #ddd; font-size: 0.9rem; }
.log-content small { color: #777; font-size: 0.7rem; }
.admin-status {
    margin-left: auto; font-size: 0.75rem; color: var(--green);
    background: rgba(0,230,118,0.1); padding: 4px 10px; border-radius: 20px;
}

/* --- 🚀 NEW REQUIREMENT FEATURES --- */

.req-section-box {
    background: #1f202e; border: 1px solid rgba(255,255,255,0.05);
    padding: 20px; border-radius: 12px; margin-bottom: 20px;
}
.req-sub-title {
    margin: 0 0 15px 0; color: var(--gold); font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 1px;
}

/* 1. Chips (Tags) */
.tags-wrapper { display: flex; flex-wrap: wrap; gap: 10px; }
.req-chip {
    background: rgba(255,255,255,0.05); border: 1px solid #444;
    padding: 8px 15px; border-radius: 20px; font-size: 0.8rem;
    color: #aaa; cursor: pointer; transition: 0.2s;
}
.req-chip:hover { border-color: var(--primary); color: #fff; }
.req-chip.active { background: var(--primary); color: #000; border-color: var(--primary); font-weight: bold; }

/* 2. Color Palette */
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; }
.palette-card {
    background: #161722; border: 2px solid transparent; border-radius: 10px;
    padding: 10px; cursor: pointer; position: relative; text-align: center;
}
.palette-card:hover { transform: translateY(-3px); }
.palette-card.selected { border-color: var(--green); background: rgba(0,230,118,0.05); }
.palette-card.selected .check-icon { display: block; }

.color-strips { display: flex; height: 30px; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.color-strips div { flex: 1; height: 100%; }
.palette-card span { font-size: 0.75rem; color: #ddd; }
.check-icon {
    position: absolute; top: -8px; right: -8px; color: var(--green);
    font-size: 1.2rem; background: #161722; border-radius: 50%; display: none;
}

/* 3. Mini Note Input */
.mini-note {
    background: transparent; border: none; border-bottom: 1px solid #444;
    color: #fff; font-size: 0.8rem; width: 60%; resize: none; height: 30px;
    padding: 5px; outline: none; transition: 0.3s;
}
.mini-note:focus { border-color: var(--primary); }

/* ============================================================
   🚀 ULTRA-MODERN REQUIREMENT STYLES (DNA, PRIORITY, GALLERY)
   ============================================================ */

/* Container & Header */
.req-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}
.section-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Common Glass Box Style */
.req-box-glass {
    background: linear-gradient(145deg, rgba(30,30,40,0.6), rgba(20,20,30,0.8));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}
/* Glass Shine Effect */
.req-box-glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.req-box-title {
    color: #fff;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.req-box-title i { color: var(--primary); }

.req-hint {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 20px;
    display: block;
}

/* 1. Design DNA Sliders */
.dna-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.dna-slider-row {
    display: flex;
    align-items: center;
    gap: 15px;
}
.dna-label {
    font-size: 0.75rem;
    color: #aaa;
    width: 100px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Custom Range Slider */
.dna-range {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
}
.dna-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary);
    transition: transform 0.2s;
}
.dna-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* 2. Priority Matrix */
.priority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}
.priority-item {
    background: #161722;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    transition: 0.3s;
}
.priority-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}
.priority-item span {
    display: block;
    font-size: 0.85rem;
    color: #ddd;
    margin-bottom: 10px;
    font-weight: 600;
}
.priority-select {
    width: 100%;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
}
.priority-select:focus {
    border-color: var(--primary);
}

/* 3. Inspiration Gallery */
.inspo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}
.inspo-card {
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
}
.inspo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}
.inspo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}
.inspo-overlay i {
    font-size: 2rem;
    color: #fff;
    transform: scale(0);
    transition: 0.3s;
}

/* Active State (Liked) */
.inspo-card:hover img {
    transform: scale(1.1);
}
.inspo-card.liked {
    border-color: var(--red);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}
.inspo-card.liked .inspo-overlay {
    opacity: 1;
    background: rgba(255, 71, 87, 0.2);
}
.inspo-card.liked i {
    color: var(--red);
    transform: scale(1);
    animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dna-grid {
        grid-template-columns: 1fr;
    }
    .dna-slider-row {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    .dna-label {
        text-align: center;
        width: 100%;
    }
    .priority-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- 🏗️ MATERIAL SPECS STYLES --- */

/* Tabs */
.spec-tabs {
    display: flex; gap: 10px; margin-bottom: 20px;
    background: #161722; padding: 5px; border-radius: 30px;
    width: fit-content; border: 1px solid #333;
}
.spec-tab-btn {
    background: transparent; border: none; color: #888;
    padding: 8px 20px; border-radius: 20px; font-weight: bold;
    cursor: pointer; transition: 0.3s; font-size: 0.85rem;
}
.spec-tab-btn:hover { color: #fff; }
.spec-tab-btn.active {
    background: var(--primary); color: #000;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

/* Card & Banner */
.spec-card {
    background: #1f202e; border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}
.spec-banner { padding: 20px; }
.spec-tag {
    background: rgba(255,255,255,0.1); padding: 2px 8px;
    border-radius: 4px; font-size: 0.7rem; color: #fff;
    margin-left: 10px; text-transform: uppercase;
}

/* Table */
.spec-table {
    width: 100%; border-collapse: collapse; text-align: left;
}
.spec-table th {
    background: #161722; color: #888; font-size: 0.8rem;
    padding: 12px 20px; text-transform: uppercase;
    border-bottom: 1px solid #333;
}
.spec-table td {
    padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem; color: #ddd;
}
.spec-table tr:hover { background: rgba(255,255,255,0.02); }

.spec-label { font-weight: bold; color: var(--primary) !important; }
.spec-brand { font-size: 0.85rem; color: #bbb !important; }

/* Footer */
.spec-footer {
    padding: 15px 20px; background: #161722;
    color: #666; font-size: 0.75rem; text-align: center;
}

/* Responsive Table */
@media (max-width: 768px) {
    .spec-table thead { display: none; }
    .spec-table tr { display: block; margin-bottom: 15px; border: 1px solid #333; border-radius: 8px; }
    .spec-table td { display: block; padding: 10px; text-align: right; position: relative; padding-left: 120px; }
    .spec-table td::before {
        content: attr(class); /* Fallback */
        position: absolute; left: 10px; top: 10px; font-weight: bold; color: #888; text-transform: capitalize;
    }
    /* Manual labels for mobile */
    .spec-table td:nth-of-type(1)::before { content: "Component"; }
    .spec-table td:nth-of-type(2)::before { content: "Spec"; }
    .spec-table td:nth-of-type(3)::before { content: "Brand"; }
}

/* --- 🚀 MATERIAL TAB UPGRADES (FINAL) --- */

/* 1. Image Tooltip (Touch & Feel) */
.tooltip-container {
    position: relative; cursor: help;
}
.info-icon { color: var(--primary); font-size: 0.8rem; margin-left: 5px; opacity: 0.7; }

.img-tooltip {
    position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%) translateY(10px);
    width: 200px; background: #fff; padding: 5px; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 100;
    opacity: 0; visibility: hidden; transition: 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: none; text-align: center; border: 2px solid var(--primary);
}
.img-tooltip img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; display: block; }
.img-tooltip span { display: block; font-size: 0.75rem; color: #333; margin-top: 5px; font-weight: bold; }

/* Tooltip Arrow */
.img-tooltip::after {
    content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px;
    border-width: 6px; border-style: solid; border-color: #fff transparent transparent transparent;
}

/* Show on Hover */
.tooltip-container:hover .img-tooltip {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}

/* 2. Brand Logo Pill */
.brand-pill {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.05); padding: 6px 12px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1); width: fit-content; max-width: 100%;
}
.brand-pill img {
    height: 20px; width: auto; max-width: 60px; object-fit: contain;
    filter: brightness(0) invert(1); /* White Logo */
    opacity: 0.9;
}

/* 3. Why This Widget */
.why-this-box {
    margin: 20px; background: linear-gradient(135deg, #1f202e, #161722);
    border: 1px dashed var(--gold); border-radius: 10px; padding: 20px;
    display: flex; gap: 15px; align-items: center;
}
.why-icon {
    width: 45px; height: 45px; background: rgba(255,215,0,0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 1.4rem; flex-shrink: 0;
}
.why-this-box strong { color: var(--gold); display: block; margin-bottom: 5px; font-size: 0.95rem; }
.why-this-box p { margin: 0; color: #ccc; font-size: 0.9rem; line-height: 1.5; }

/* Table Responsiveness */
.table-responsive { overflow-x: auto; }

/* --- 🚀 FEATURE 4: UPGRADE CALCULATOR STYLES --- */

/* Footer Grid Layout */
.spec-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    background: #161722;
}

/* Why This Box Update (Fit in grid) */
.why-this-box {
    margin: 0 !important; /* Reset margin */
    background: #1f202e;
}

/* Upgrade Box Design */
.upgrade-box {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.05), rgba(0,0,0,0));
    border: 1px dashed #444; /* Default border */
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}
.upgrade-box:hover {
    background: rgba(255,255,255,0.02);
    transform: translateY(-2px);
}

.upgrade-info { display: flex; gap: 12px; align-items: center; }
.up-icon {
    width: 40px; height: 40px; background: rgba(255,255,255,0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem;
}

.upgrade-action { text-align: right; }
.cost-impact {
    font-size: 1.1rem; color: var(--green); font-weight: bold; margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}
.btn-upgrade {
    background: var(--primary); color: #000; border: none;
    padding: 6px 12px; border-radius: 6px; font-weight: bold;
    font-size: 0.75rem; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; gap: 5px; margin-left: auto;
}
.btn-upgrade:hover { transform: scale(1.05); box-shadow: 0 0 10px var(--primary); }

/* Package Cost Display in Banner */
.pkg-cost-display {
    text-align: right; background: rgba(0,0,0,0.3);
    padding: 8px 15px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
}
.pkg-cost-display small { display: block; font-size: 0.65rem; color: #aaa; text-transform: uppercase; }
.pkg-cost-display span { font-size: 1.2rem; font-weight: bold; color: #fff; }

/* Mobile Responsive */
@media (max-width: 992px) {
    .spec-footer-grid { grid-template-columns: 1fr; }
    .upgrade-box { flex-direction: column; text-align: center; gap: 15px; }
    .upgrade-action { text-align: center; width: 100%; }
    .btn-upgrade { margin: 0 auto; width: 100%; justify-content: center; }
    .spec-banner > div { flex-direction: column; gap: 15px; }
    .pkg-cost-display { text-align: left; width: 100%; }
}

/* --- 🚀 NEW MATERIALS TAB: VISUAL GRID --- */

.mat-view-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    gap: 10px;
}

.view-toggle-btn {
    background: #161722;
    border: 1px solid #333;
    color: #888;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}
.view-toggle-btn.active {
    background: var(--primary);
    color: #000;
    font-weight: bold;
}

/* Material Card Grid */
.mat-visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.mat-visual-card {
    background: linear-gradient(145deg, #1f202e, #161722);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease;
    group: item;
}

.mat-visual-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.15);
}

/* Texture Zoom Effect */
.mat-img-wrapper {
    height: 160px;
    overflow: hidden;
    position: relative;
}
.mat-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.mat-visual-card:hover .mat-img-wrapper img {
    transform: scale(1.1); /* Zoom In */
}

/* Brand Badge */
.mat-brand-badge {
    position: absolute;
    bottom: -15px;
    right: 15px;
    background: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid #1f202e;
}
.mat-brand-badge img {
    height: 18px;
    width: auto;
    display: block;
}

.mat-content {
    padding: 20px 15px 15px;
}

.mat-cat-title {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.mat-spec-title {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.mat-desc {
    font-size: 0.8rem;
    color: #a0a0b0;
    display: block;
    margin-bottom: 15px;
}

/* Granular Upgrade Button */
.mat-upgrade-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed #444;
    color: #888;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mat-upgrade-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(255, 215, 0, 0.05);
}

/* Upgrade Badge */
.upgrade-tag {
    font-size: 0.65rem;
    background: var(--gold);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

/* --- 🚀 NEW FEATURES CSS: COMPARISON & TAGS --- */

/* 1. Comparison Modal Styles */
.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}
.comp-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    text-align: left;
}
.comp-table th, .comp-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.comp-table th {
    background: #1f202e;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    position: sticky; top: 0;
}
.comp-col-current { background: rgba(0, 242, 255, 0.05); border-right: 1px solid rgba(255,255,255,0.05); }
.comp-col-upgrade { background: rgba(255, 215, 0, 0.05); }
.comp-highlight { color: var(--gold); font-weight: bold; }

/* 2. Smart Feature Tags */
.feature-tags-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.f-tag {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    color: #aaa;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 4px;
}
.f-tag.best-seller { border-color: var(--gold); color: var(--gold); background: rgba(255, 215, 0, 0.1); }
.f-tag.durable { border-color: var(--green); color: var(--green); }

/* 3. Request Sample Button */
.btn-sample-req {
    font-size: 0.75rem;
    background: transparent;
    border: 1px dashed #666;
    color: #888;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
    width: 100%;
}
.btn-sample-req:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 242, 255, 0.05);
}

/* 4. Durability Meter */
.durability-bar {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin-top: 8px;
    position: relative;
}
.durability-fill {
    height: 100%;
    border-radius: 2px;
}
.durability-label {
    font-size: 0.65rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
}

/* --- 🚀 NEW FEATURES: VIDEO & REAL LOOK --- */

/* 1. Video Play Button Overlay */
.mat-video-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0; /* Initially hidden */
    z-index: 10;
}
.mat-img-wrapper:hover .mat-video-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.mat-video-btn:hover {
    background: var(--red);
    border-color: var(--red);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.5);
}

/* 2. Real Look / Finished Project Button */
.btn-real-look {
    font-size: 0.7rem;
    color: var(--primary);
    background: transparent;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 5px;
    display: block;
    text-align: left;
}
.btn-real-look:hover {
    color: #fff;
}

/* 3. Safety Badges Row */
.safety-badges {
    display: flex;
    gap: 10px;
    margin: 8px 0;
    padding-top: 8px;
    border-top: 1px dashed rgba(255,255,255,0.1);
}
.safety-icon {
    font-size: 1rem;
    color: #888;
    position: relative;
    cursor: help;
}
/* Tooltip for safety icons */
.safety-icon:hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 4px 8px;
    font-size: 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid #333;
}
.safe-fire { color: #ff9f43; } /* Orange */
.safe-water { color: #00f2ff; } /* Blue */
.safe-termite { color: #8c7ae6; } /* Purple */
.safe-eco { color: #00e676; } /* Green */

/* --- 🚀 SIDEBAR TOTAL COST HIGHLIGHT --- */
.total-cost-box {
    background: linear-gradient(135deg, var(--primary), #00c6ff); /* Primary Gradient */
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.3);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

/* Shine Effect */
.total-cost-box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    transform: rotate(45deg);
    pointer-events: none;
}

.total-cost-box h2 {
    margin: 5px 0 0 0;
    font-size: 1.6rem;
    color: #000;
    font-weight: 800;
    letter-spacing: 0.5px;
}