/**
 * Enhanced Dashboard CSS
 * Modern UI/UX improvements for Client and Admin dashboards
 */

/* ========================================
   Welcome Banner
   ======================================== */
.dm-welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.dm-welcome-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dm-welcome-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.dm-welcome-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm-welcome-text h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.dm-welcome-text p {
    margin: 0 0 4px 0;
    font-size: 14px;
    opacity: 0.9;
}

.dm-last-login {
    font-size: 12px;
    opacity: 0.7;
}

/* ========================================
   Enhanced Stat Cards
   ======================================== */
.dm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.dm-stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.dm-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.dm-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.dm-stat-icon svg {
    width: 28px;
    height: 28px;
}

.dm-stat-content {
    flex: 1;
}

.dm-stat-content h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.dm-stat-number {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1;
}

.dm-stat-change {
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dm-stat-change.positive {
    color: #10b981;
}

.dm-stat-change.negative {
    color: #ef4444;
}

/* Color variations */
.dm-stat-card.blue { border-color: #2563eb; }
.dm-stat-card.blue .dm-stat-icon { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.dm-stat-card.blue .dm-stat-number { color: #2563eb; }

.dm-stat-card.orange { border-color: #f59e0b; }
.dm-stat-card.orange .dm-stat-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.dm-stat-card.orange .dm-stat-number { color: #f59e0b; }

.dm-stat-card.green { border-color: #10b981; }
.dm-stat-card.green .dm-stat-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.dm-stat-card.green .dm-stat-number { color: #10b981; }

.dm-stat-card.purple { border-color: #8b5cf6; }
.dm-stat-card.purple .dm-stat-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.dm-stat-card.purple .dm-stat-number { color: #8b5cf6; }

.dm-stat-card.pink { border-color: #ec4899; }
.dm-stat-card.pink .dm-stat-icon { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.dm-stat-card.pink .dm-stat-number { color: #ec4899; }

.dm-stat-card.cyan { border-color: #06b6d4; }
.dm-stat-card.cyan .dm-stat-icon { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.dm-stat-card.cyan .dm-stat-number { color: #06b6d4; }

/* ========================================
   Recent Activity Section
   ======================================== */
.dm-recent-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 30px 0;
}

.dm-recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dm-recent-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.dm-view-all-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
}

.dm-view-all-link:hover {
    color: #1d4ed8;
}

.dm-activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dm-activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    transition: background 0.3s;
}

.dm-activity-item:hover {
    background: #f3f4f6;
}

.dm-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.dm-activity-content {
    flex: 1;
}

.dm-activity-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.dm-activity-content p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

/* ========================================
   Status Badges
   ======================================== */
.dm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.dm-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dm-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}
.dm-badge.pending::before { background: #f59e0b; }

.dm-badge.in-transit {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}
.dm-badge.in-transit::before { background: #2563eb; }

.dm-badge.delivered, .dm-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.dm-badge.delivered::before, .dm-badge.success::before { background: #10b981; }

.dm-badge.cancelled, .dm-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.dm-badge.cancelled::before, .dm-badge.failed::before { background: #ef4444; }

.dm-badge.awaiting {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}
.dm-badge.awaiting::before { background: #8b5cf6; }

/* ========================================
   Enhanced Buttons
   ======================================== */
.dm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.dm-btn svg {
    width: 18px;
    height: 18px;
}

.dm-btn-primary {
    background: #2563eb;
    color: white;
}

.dm-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.dm-btn-success {
    background: #10b981;
    color: white;
}

.dm-btn-success:hover {
    background: #059669;
}

.dm-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.dm-btn-secondary:hover {
    background: #e5e7eb;
}

.dm-quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0; 
}

/* ========================================
   Enhanced Tables
   ======================================== */
.dm-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.dm-table {
    width: 100%;
    border-collapse: collapse;
}

.dm-table thead {
    background: #f9fafb;
}

.dm-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.dm-table tbody td {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #1f2937;
}

.dm-table tbody tr:hover {
    background: #f9fafb;
}

.dm-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   Timeline (Admin Dashboard)
   ======================================== */
.dm-timeline {
    position: relative;
    padding-left: 30px;
}

.dm-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.dm-timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.dm-timeline-marker {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #2563eb;
}

.dm-timeline-time {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.dm-timeline-content p {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #1f2937;
}

/* ========================================
   Empty States
   ======================================== */
.dm-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.dm-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

.dm-empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.dm-empty-state p {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #6b7280;
}

/* ========================================
   Loading Skeleton
   ======================================== */
.dm-skeleton {
    background: white;
    padding: 20px;
    border-radius: 12px;
}

.dm-skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.dm-skeleton-line.short {
    width: 60%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   Toast Notifications
   ======================================== */
.dm-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: toast-slide-in 0.3s ease;
}

.dm-toast.success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.dm-toast.error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 1024px) {
    .dm-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .dm-welcome-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .dm-welcome-content {
        flex-direction: column;
    }
    
    .dm-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dm-stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .dm-quick-actions {
        flex-direction: column;
    }
    
    .dm-btn {
        width: 100%;
        justify-content: center;
    }
    
    .dm-table-container {
        overflow-x: auto;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.dm-mt-10 { margin-top: 10px; }
.dm-mt-20 { margin-top: 20px; }
.dm-mt-30 { margin-top: 30px; }
.dm-mb-10 { margin-bottom: 10px; }
.dm-mb-20 { margin-bottom: 20px; }
.dm-mb-30 { margin-bottom: 30px; }
.dm-text-center { text-align: center; }
.dm-text-muted { color: #6b7280; }
.dm-font-bold { font-weight: 700; }


.client-dashboard-sidebar{
    display: none;
}