/* =================================================================== */
/* DASHBOARD - MODERN, COMPACT & FULLY RESPONSIVE                      */
/* =================================================================== */
/* Designed for: Mobile → Tablet → Desktop with no viewport issues     */
/* Features: Fluid scaling, touch-friendly, no body overflow           */
/* =================================================================== */

/* ==================== BASE DASHBOARD STYLES ==================== */
.dashboard {
    padding: clamp(40px, 5vw, 60px) 0; /* Fluid padding */
    background: linear-gradient(135deg, #f5f7ff 0%, #f0f2ff 100%);
    min-height: auto;
    overflow: hidden; /* Prevent horizontal scroll */
    position: relative;
}

.dashboard .container {
    width: min(100%, 1200px); /* Modern width constraint */
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 20px); /* Fluid padding */
    position: relative;
}

/* ==================== DASHBOARD HEADER ==================== */
.dashboard-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: clamp(24px, 3vw, 30px);
    padding-bottom: clamp(12px, 2vw, 15px);
    border-bottom: 1px solid var(--gray-light);
    gap: clamp(12px, 2vw, 15px);
}

.dashboard-title h2 {
    font-size: clamp(1.6rem, 4vw, 1.8rem);
    margin-bottom: clamp(6px, 1vw, 8px);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    font-weight: 700;
}

.dashboard-title p {
    color: var(--gray);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    max-width: min(100%, 500px);
    margin: 0 auto;
    line-height: 1.5;
    opacity: 0.9;
}

/* Desktop: Header side by side */
@media (min-width: 768px) {
    .dashboard-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }
    
    .dashboard-title {
        flex: 1;
    }
    
    .dashboard-title p {
        margin-left: 0;
        margin-right: 0;
    }
}

/* ==================== STATS CARDS ==================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: clamp(12px, 2vw, 15px);
    margin-bottom: clamp(24px, 3vw, 30px);
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: white;
    border-radius: clamp(10px, 2vw, 12px);
    padding: clamp(16px, 3vw, 18px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 15px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: clamp(80px, 12vw, 90px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    container-type: inline-size;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(121, 105, 210, 0.2);
}

.stat-icon {
    width: clamp(42px, 8vw, 48px);
    height: clamp(42px, 8vw, 48px);
    background: var(--gradient);
    border-radius: clamp(10px, 2vw, 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
}

.stat-info h3 {
    font-size: clamp(1.3rem, 3.5vw, 1.5rem);
    color: var(--dark);
    margin-bottom: 2px;
    line-height: 1;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-info p {
    color: var(--gray);
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    opacity: 0.85;
}

.stat-trend {
    font-size: clamp(0.7rem, 1.6vw, 0.8rem);
    font-weight: 600;
    padding: clamp(3px, 1vw, 4px) clamp(8px, 2vw, 10px);
    border-radius: 20px;
    margin-left: auto;
    white-space: nowrap;
}

.stat-trend.positive {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    color: #28a745;
}

/* ==================== LIVE PROJECTS GRID ==================== */
.live-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: clamp(16px, 2.5vw, 20px);
    margin: 0 auto;
}

@media (max-width: 768px) {
    .live-projects-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 500px;
        gap: 16px;
    }
}

.live-project-card {
    background: white;
    border-radius: clamp(10px, 2vw, 12px);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.live-project-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: rgba(121, 105, 210, 0.2);
}

.project-preview {
    position: relative;
    height: clamp(140px, 25vw, 160px);
    overflow: hidden;
    flex-shrink: 0;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.live-project-card:hover .project-preview img {
    transform: scale(1.05);
}

.project-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: clamp(10px, 2vw, 12px) clamp(12px, 2.5vw, 15px);
    background: linear-gradient(135deg, var(--gray-light), #f0f2f5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    gap: clamp(6px, 1.5vw, 8px);
}

@media (max-width: 480px) {
    .project-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4px;
}

.metric-label {
    font-size: clamp(0.65rem, 1.6vw, 0.75rem);
    color: var(--gray);
    margin-bottom: 2px;
    font-weight: 500;
    opacity: 0.9;
}

.metric-value {
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.metric-value.positive {
    color: #28a745;
}

.project-info {
    padding: clamp(16px, 3vw, 18px);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h4 {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: var(--dark);
    margin-bottom: clamp(6px, 1.5vw, 8px);
    line-height: 1.3;
    font-weight: 600;
}

.project-info p {
    color: var(--gray);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    margin-bottom: clamp(10px, 2vw, 12px);
    line-height: 1.4;
    opacity: 0.9;
    flex: 1;
}

.project-tech {
    display: flex;
    gap: clamp(6px, 1.5vw, 8px);
    flex-wrap: wrap;
}

.project-tech span {
    padding: clamp(3px, 1vw, 4px) clamp(8px, 2vw, 10px);
    background: linear-gradient(135deg, rgba(121, 105, 210, 0.1), rgba(121, 105, 210, 0.05));
    color: var(--primary);
    border-radius: 20px;
    font-size: clamp(0.65rem, 1.6vw, 0.75rem);
    font-weight: 500;
    border: 1px solid rgba(121, 105, 210, 0.15);
    justify-content: center;
    align-items: center;
    display: flex;
}

/* ==================== DASHBOARD CONTENT LAYOUT ==================== */
.dashboard-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(20px, 3vw, 25px);
    margin-bottom: clamp(24px, 3vw, 30px);
    container-type: inline-size;
}

@container (min-width: 768px) {
    .dashboard-content {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3vw, 25px);
    min-width: 0; /* Prevent flex overflow */
}

/* ==================== WIDGETS ==================== */
.dashboard-widget {
    background: white;
    border-radius: clamp(10px, 2vw, 12px);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: fit-content;
}

.dashboard-widget:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.widget-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(16px, 2.5vw, 18px) clamp(18px, 3vw, 20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, var(--info-light) 0%, var(--info) 100%);
    color: white;
    gap: clamp(10px, 2vw, 12px);
}

@media (min-width: 576px) {
    .widget-header {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.widget-header h3 {
    color: white;
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 8px);
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    font-weight: 600;
    line-height: 1.3;
}

.widget-body {
    padding: clamp(18px, 3vw, 20px);
    min-height: auto;
}

/* ==================== ANALYTICS CONTROLS ==================== */
.analytics-controls {
    display: flex;
    gap: clamp(6px, 1.5vw, 8px);
    flex-wrap: wrap;
    justify-content: center;
}

@container (min-width: 576px) {
    .analytics-controls {
        justify-content: flex-end;
    }
}

.analytics-controls .btn-icon {
    padding: clamp(5px, 1.2vw, 6px) clamp(10px, 2vw, 12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: clamp(4px, 1vw, 6px);
    cursor: pointer;
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    transition: all 0.25s ease;
    min-width: clamp(50px, 10vw, 60px);
    text-align: center;
    font-weight: 500;
}

.analytics-controls .btn-icon:hover,
.analytics-controls .btn-icon.active {
    background: white;
    color: var(--info);
    border-color: white;
    transform: translateY(-1px);
}

/* ==================== SUCCESS STORIES ==================== */
.success-stories {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vw, 15px);
}

.story-card {
    display: flex;
    gap: clamp(10px, 2vw, 12px);
    padding: clamp(14px, 2.5vw, 16px);
    background: linear-gradient(135deg, var(--gray-light), #f5f7fa);
    border-radius: clamp(8px, 1.8vw, 10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    align-items: flex-start;
}

.story-card:hover {
    background: linear-gradient(135deg, rgba(121, 105, 210, 0.08), rgba(121, 105, 210, 0.04));
    transform: translateX(4px);
    border-color: rgba(121, 105, 210, 0.2);
    box-shadow: 0 4px 12px rgba(121, 105, 210, 0.1);
}

.story-icon {
    width: clamp(38px, 8vw, 42px);
    height: clamp(38px, 8vw, 42px);
    background: var(--gradient);
    border-radius: clamp(8px, 1.8vw, 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(0.9rem, 2vw, 1rem);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.story-card:hover .story-icon {
    transform: scale(1.05) rotate(5deg);
}

.story-content {
    flex: 1;
    min-width: 0; /* Prevent text overflow */
}

.story-content h4 {
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    color: var(--dark);
    margin-bottom: clamp(4px, 1vw, 5px);
    font-weight: 600;
    line-height: 1.3;
}

.story-content p {
    color: var(--gray);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    margin-bottom: clamp(6px, 1.5vw, 8px);
    line-height: 1.4;
    opacity: 0.9;
}

.story-content strong {
    color: var(--primary);
    font-weight: 600;
}

.story-date {
    font-size: clamp(0.7rem, 1.6vw, 0.8rem);
    color: var(--gray);
    opacity: 0.7;
    font-weight: 500;
}

/* ==================== TESTIMONIAL SLIDER ==================== */
.testimonial-slider {
    position: relative;
    min-height: clamp(160px, 25vw, 180px);
    container-type: inline-size;
}

.testimonial {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.testimonial-content {
    background: linear-gradient(135deg, var(--gray-light), #f5f7fa);
    padding: clamp(16px, 2.5vw, 18px);
    border-radius: clamp(8px, 1.8vw, 10px);
    margin-bottom: clamp(12px, 2vw, 15px);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.testimonial-content:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: clamp(24px, 5vw, 30px);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #f5f7fa;
}

.testimonial-content p {
    font-style: italic;
    color: var(--dark);
    line-height: 1.5;
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    margin: 0;
    opacity: 0.95;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 12px);
    padding-left: clamp(8px, 2vw, 10px);
}

.testimonial-author img {
    width: clamp(40px, 8vw, 45px);
    height: clamp(40px, 8vw, 45px);
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-info h5 {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: var(--dark);
    margin-bottom: 2px;
    font-weight: 600;
}

.author-info span {
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    color: var(--gray);
    opacity: 0.8;
}

.testimonial-nav {
    display: flex;
    gap: clamp(6px, 1.5vw, 8px);
    justify-content: center;
    margin-top: clamp(12px, 2vw, 15px);
}

.testimonial-nav .btn-icon {
    width: clamp(32px, 6vw, 36px);
    height: clamp(32px, 6vw, 36px);
    border: 1px solid var(--gray-light);
    background: white;
    border-radius: 50%;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
}

.testimonial-nav .btn-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

/* Mobile testimonial adjustments */
@media (max-width: 768px) {
    .testimonial-content:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        padding-left: 0;
        gap: 8px;
    }
    
    .testimonial-author img {
        width: 48px;
        height: 48px;
    }
}

/* ==================== PROCESS TIMELINE ==================== */
.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: clamp(16px, 2.5vw, 20px);
    padding: clamp(12px, 2vw, 15px) 0;
    position: relative;
}

@media (min-width: 768px) {
    .process-timeline {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: clamp(8px, 1.5vw, 12px);
    }
    
    .process-timeline:before {
        content: '';
        position: absolute;
        top: 30px;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, 
            var(--gray-light) 0%, 
            var(--primary) 50%, 
            var(--gray-light) 100%);
        z-index: 1;
    }
}

.process-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
    padding: 0 clamp(6px, 1.5vw, 8px);
}

.step-number {
    width: clamp(30px, 6vw, 35px);
    height: clamp(30px, 6vw, 35px);
    background: var(--gradient);
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: clamp(0.9rem, 2vw, 1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(12px, 2vw, 15px);
    position: relative;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(121, 105, 210, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(121, 105, 210, 0.4);
}

.step-content {
    background: white;
    padding: clamp(14px, 2.5vw, 16px);
    border-radius: clamp(8px, 1.8vw, 10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.process-step:hover .step-content {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(121, 105, 210, 0.2);
}

.step-content h4 {
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    color: var(--dark);
    margin-bottom: clamp(6px, 1.5vw, 8px);
    font-weight: 600;
    line-height: 1.3;
}

.step-content p {
    color: var(--gray);
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    margin-bottom: clamp(6px, 1.5vw, 8px);
    line-height: 1.4;
    opacity: 0.9;
}

.step-duration {
    font-size: clamp(0.7rem, 1.6vw, 0.8rem);
    color: var(--primary);
    font-weight: 600;
    display: inline-block;
    padding: 3px 10px;
    background: rgba(121, 105, 210, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(121, 105, 210, 0.2);
}

/* ==================== CTA SECTION ==================== */
.dashboard-cta {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
    border-radius: clamp(10px, 2vw, 12px);
    padding: clamp(30px, 5vw, 35px) clamp(20px, 4vw, 25px);
    text-align: center;
    margin-top: clamp(24px, 3vw, 30px);
    box-shadow: 
        0 8px 32px rgba(121, 105, 210, 0.1),
        inset 0 0 0 1px rgba(121, 105, 210, 0.1);
    border: 1px solid rgba(121, 105, 210, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.dashboard-cta:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.dashboard-cta h3 {
    font-size: clamp(1.3rem, 3.5vw, 1.5rem);
    margin-bottom: clamp(10px, 2vw, 12px);
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-cta p {
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    opacity: 0.9;
    margin-bottom: clamp(20px, 3vw, 25px);
    color: var(--gray);
    max-width: min(100%, 500px);
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2vw, 12px);
    width: 100%;
}

@media (min-width: 576px) {
    .cta-actions {
        flex-direction: row;
        justify-content: center;
        gap: clamp(12px, 2.5vw, 15px);
    }
}

.btn-lg {
    padding: clamp(12px, 2.5vw, 14px) clamp(24px, 4vw, 28px);
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    border-radius: clamp(8px, 1.8vw, 10px);
    width: 100%;
    max-width: min(100%, 250px);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 576px) {
    .btn-lg {
        width: auto;
        min-width: 180px;
    }
}

.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(121, 105, 210, 0.3);
}

/* ==================== MODAL FORMS ==================== */
#strategyForm .form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(14px, 2.5vw, 16px);
}

@media (min-width: 768px) {
    #strategyForm .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==================== CHART CONTAINER ==================== */
#performanceChart {
    width: 100% !important;
    height: clamp(220px, 35vw, 250px) !important;
    max-height: 300px;
}

/* ==================== PROJECT FILTER ==================== */
.project-filter select {
    padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2vw, 12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: clamp(4px, 1vw, 6px);
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    cursor: pointer;
    max-width: clamp(140px, 20vw, 160px);
    transition: all 0.25s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.project-filter select:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.project-filter select:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.25);
    border-color: white;
}

.project-filter select option {
    color: var(--dark);
    background: white;
    padding: 10px;
}

/* ==================== TOUCH OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
    .dashboard {
        padding: clamp(32px, 4vw, 40px) 0;
    }
    
    .dashboard-header {
        margin-bottom: clamp(20px, 2.5vw, 25px);
    }
    
    .widget-header {
        padding: clamp(14px, 2.2vw, 16px) clamp(16px, 2.5vw, 18px);
    }
    
    .widget-body {
        padding: clamp(16px, 2.5vw, 18px);
    }
    
    .btn, button, .btn-icon {
        min-height: 44px;
        min-width: 44px;
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    input, select, textarea {
        font-size: 16px !important; /* Prevent iOS zoom */
    }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .live-project-card,
    .story-card,
    .process-step,
    .btn,
    .btn-icon {
        transition: none !important;
        animation: none !important;
    }
}

/* ==================== HIGH CONTRAST SUPPORT ==================== */
@media (prefers-contrast: high) {
    .stat-card,
    .live-project-card,
    .dashboard-widget,
    .story-card,
    .step-content {
        border: 2px solid var(--dark) !important;
    }
    
    .btn-primary {
        border: 2px solid var(--dark) !important;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .dashboard {
        background: white !important;
        padding: 20px 0 !important;
    }
    
    .dashboard-widget {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .stat-card,
    .live-project-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .cta-actions,
    .testimonial-nav,
    .analytics-controls,
    .project-filter {
        display: none !important;
    }
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */
@media (prefers-reduced-transparency: reduce) {
    .dashboard-cta {
        backdrop-filter: none;
        background: white;
    }
}

/* ==================== FIX BODY/VIEWPORT ISSUES ==================== */
/* These fixes prevent elements from extending beyond viewport */
.dashboard * {
    max-width: 100%; /* Prevent horizontal overflow */
}

.dashboard img,
.dashboard video,
.dashboard iframe {
    max-width: 100%;
    height: auto;
}

.dashboard .container > *:last-child {
    margin-bottom: 0; /* Remove bottom margin from last child */
}

/* Ensure dashboard doesn't cause body overflow */
.dashboard {
    box-sizing: border-box;
}

/* Fix for iOS Safari viewport issues */
@supports (-webkit-touch-callout: none) {
    .dashboard {
        min-height: -webkit-fill-available;
    }
}

/* ==================== SCALE UTILITY CLASSES ==================== */
/* Add these to scale elements up/down as needed */
.scale-sm { transform: scale(0.95); }
.scale-md { transform: scale(0.9); }
.scale-lg { transform: scale(0.85); }

.scale-up-sm { transform: scale(1.05); }
.scale-up-md { transform: scale(1.1); }
.scale-up-lg { transform: scale(1.15); }

@media (max-width: 768px) {
    .mobile-scale-sm { transform: scale(0.95); }
    .mobile-scale-md { transform: scale(0.9); }
}

/* ==================== FLUID SPACING UTILITIES ==================== */
/* Use these for consistent fluid spacing */
.space-xs { margin-bottom: clamp(8px, 1.5vw, 12px); }
.space-sm { margin-bottom: clamp(12px, 2vw, 16px); }
.space-md { margin-bottom: clamp(16px, 2.5vw, 20px); }
.space-lg { margin-bottom: clamp(20px, 3vw, 24px); }
.space-xl { margin-bottom: clamp(24px, 3.5vw, 28px); }

.gap-xs { gap: clamp(8px, 1.5vw, 12px); }
.gap-sm { gap: clamp(12px, 2vw, 16px); }
.gap-md { gap: clamp(16px, 2.5vw, 20px); }
.gap-lg { gap: clamp(20px, 3vw, 24px); }
.gap-xl { gap: clamp(24px, 3.5vw, 28px); }

/* ==================== END OF DASHBOARD CSS ==================== */