/* Dashboard Page Styles */

/* Welcome Card */
.welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #8b5cf6 100%);
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.welcome-avatar {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.welcome-text {
    color: white;
}

.welcome-greeting {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0 0 0.25rem 0;
}

.welcome-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-role {
    font-size: 0.8125rem;
    opacity: 0.85;
    margin: 0;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    display: inline-block;
}

.welcome-info {
    position: relative;
    z-index: 1;
}

.welcome-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.875rem;
    opacity: 0.9;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 640px) {
    .welcome-card {
        padding: 1.25rem;
    }
    
    .welcome-content {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }
    
    .welcome-info {
        width: 100%;
    }
    
    .welcome-date {
        justify-content: center;
    }
}

.dashboard-header {
    margin-bottom: 1.5rem;
}

.dashboard-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.dark .dashboard-title {
    color: #f1f5f9;
}

.dashboard-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.dark .stat-card {
    background: #1e293b;
    border-color: #334155;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #d1fae5; color: #059669; }
.stat-icon.yellow { background: #fef3c7; color: #d97706; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.dark .stat-value {
    color: #f1f5f9;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.stat-change.positive {
    background: #d1fae5;
    color: #059669;
}

.stat-change.negative {
    background: #fee2e2;
    color: #dc2626;
}

/* Charts Section */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 767px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
}

.dark .chart-card {
    background: #1e293b;
    border-color: #334155;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.dark .chart-title {
    color: #f1f5f9;
}

/* Recent Activities */
.recent-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.dark .section-title {
    color: #f1f5f9;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
}


/* Recent Services Card */
.recent-services-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark .recent-services-card {
    background: #1e293b;
    border-color: #334155;
}

.recent-services-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
}

.dark .recent-services-header {
    background: linear-gradient(to right, #1e293b, #0f172a);
    border-color: #334155;
}

.recent-services-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.recent-services-title h3 {
    margin: 0;
}

.dark .recent-services-title {
    color: #f1f5f9;
}

.recent-services-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0ea5e9;
    text-decoration: none;
    transition: all 0.2s ease;
}

.recent-services-link:hover {
    color: #0284c7;
    gap: 0.5rem;
}

.recent-services-list {
    padding: 0.5rem;
}

.recent-services-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #94a3b8;
    text-align: center;
}

.recent-services-empty p {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

/* Recent Service Item */
.recent-service-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin: 0.25rem 0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recent-service-item:hover {
    background: #f0f9ff;
    transform: translateX(4px);
}

.dark .recent-service-item:hover {
    background: #1e3a5f;
}

.recent-service-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

.recent-service-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.recent-service-main {
    flex: 1;
    min-width: 0;
}

.recent-service-customer {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .recent-service-customer {
    color: #f1f5f9;
}

.recent-service-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recent-service-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.recent-service-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.recent-service-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.375rem 0.625rem;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-radius: 0.5rem;
    min-width: 44px;
}

.recent-service-day {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.recent-service-month {
    font-size: 0.625rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recent-service-time {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Responsive */
@media (max-width: 640px) {
    .recent-service-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .recent-service-right {
        width: 100%;
        justify-content: space-between;
    }
}


/* ========================================
   Mobile Responsive Enhancements
   ======================================== */

/* Small Mobile (< 480px) */
@media (max-width: 479px) {
    .welcome-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .welcome-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .welcome-name {
        font-size: 1.25rem;
    }
    
    .welcome-greeting {
        font-size: 0.8125rem;
    }
    
    .welcome-role {
        font-size: 0.75rem;
        padding: 0.1875rem 0.625rem;
    }
    
    .welcome-date {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }
    
    .stats-grid {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .stat-card {
        padding: 1rem;
        border-radius: 0.875rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8125rem;
    }
    
    .stat-change {
        font-size: 0.6875rem;
    }
    
    .chart-card {
        padding: 1rem;
        border-radius: 0.875rem;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .chart-title {
        font-size: 0.9375rem;
    }
    
    .recent-services-card {
        border-radius: 0.875rem;
    }
    
    .recent-services-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .recent-services-title {
        font-size: 0.9375rem;
    }
    
    .recent-service-item {
        padding: 0.875rem;
        gap: 0.75rem;
    }
    
    .recent-service-avatar {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 0.8125rem;
    }
    
    .recent-service-customer {
        font-size: 0.875rem;
    }
    
    .recent-service-location {
        font-size: 0.75rem;
    }
    
    .recent-service-date {
        padding: 0.25rem 0.5rem;
        min-width: 40px;
    }
    
    .recent-service-day {
        font-size: 0.875rem;
    }
    
    .recent-service-month {
        font-size: 0.5625rem;
    }
    
    .recent-service-time {
        font-size: 0.75rem;
    }
    
    .quick-actions {
        gap: 0.5rem;
    }
    
    .quick-action-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
        flex: 1;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid {
        gap: 1rem;
    }
    
    .quick-actions {
        flex-wrap: wrap;
    }
}
