/* Dashboard Styles - Modern & Beautiful */

.dashboard-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: linear-gradient(135deg, white 0%, var(--card-bg) 100%);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-accent);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-color-light));
    box-shadow: 0 2px 8px var(--accent-shadow);
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    transform: translateY(-50%);
    opacity: 0.15;
    pointer-events: none;
}

.metric-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.18),
        0 6px 16px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    background: linear-gradient(135deg, white 0%, var(--card-bg-hover) 100%);
}

.metric-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--icon-bg), var(--icon-bg-dark));
    color: var(--icon-color);
    flex-shrink: 0;
    box-shadow: 
        0 4px 12px var(--icon-shadow),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    position: relative;
}

.metric-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-color-light));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.metric-card:hover .metric-icon::before {
    opacity: 0.3;
}

.metric-icon svg {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--value-color);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.metric-sublabel {
    font-size: 0.85rem;
    color: #999;
}

/* Metric Card Variants */
.metric-users {
    --accent-color: #001F54;
    --accent-color-light: #003B8E;
    --icon-bg: rgba(0, 31, 84, 0.15);
    --icon-bg-dark: rgba(0, 31, 84, 0.25);
    --icon-color: #001F54;
    --value-color: #001F54;
    --card-bg: rgba(0, 31, 84, 0.03);
    --card-bg-hover: rgba(0, 31, 84, 0.06);
    --border-accent: rgba(0, 31, 84, 0.1);
    --accent-shadow: rgba(0, 31, 84, 0.3);
    --accent-glow: rgba(0, 31, 84, 0.3);
    --icon-shadow: rgba(0, 31, 84, 0.2);
}

.metric-products {
    --accent-color: #FF7103;
    --accent-color-light: #FFA347;
    --icon-bg: rgba(255, 113, 3, 0.15);
    --icon-bg-dark: rgba(255, 113, 3, 0.25);
    --icon-color: #FF7103;
    --value-color: #FF7103;
    --card-bg: rgba(255, 113, 3, 0.03);
    --card-bg-hover: rgba(255, 113, 3, 0.06);
    --border-accent: rgba(255, 113, 3, 0.1);
    --accent-shadow: rgba(255, 113, 3, 0.3);
    --accent-glow: rgba(255, 113, 3, 0.3);
    --icon-shadow: rgba(255, 113, 3, 0.2);
}

.metric-warehouses {
    --accent-color: #008080;
    --accent-color-light: #00B3B3;
    --icon-bg: rgba(0, 128, 128, 0.15);
    --icon-bg-dark: rgba(0, 128, 128, 0.25);
    --icon-color: #008080;
    --value-color: #008080;
    --card-bg: rgba(0, 128, 128, 0.03);
    --card-bg-hover: rgba(0, 128, 128, 0.06);
    --border-accent: rgba(0, 128, 128, 0.1);
    --accent-shadow: rgba(0, 128, 128, 0.3);
    --accent-glow: rgba(0, 128, 128, 0.3);
    --icon-shadow: rgba(0, 128, 128, 0.2);
}

.metric-stores {
    --accent-color: #6366F1;
    --accent-color-light: #8B8FFF;
    --icon-bg: rgba(99, 102, 241, 0.15);
    --icon-bg-dark: rgba(99, 102, 241, 0.25);
    --icon-color: #6366F1;
    --value-color: #6366F1;
    --card-bg: rgba(99, 102, 241, 0.03);
    --card-bg-hover: rgba(99, 102, 241, 0.06);
    --border-accent: rgba(99, 102, 241, 0.1);
    --accent-shadow: rgba(99, 102, 241, 0.3);
    --accent-glow: rgba(99, 102, 241, 0.3);
    --icon-shadow: rgba(99, 102, 241, 0.2);
}

/* Two Column Grid */
.two-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Panel Styles */
.panel {
    background: white;
    border-radius: 16px;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 3px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s, transform 0.3s;
}

.panel:hover {
    box-shadow: 
        0 10px 32px rgba(0, 0, 0, 0.15),
        0 5px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(0, 31, 84, 0.01) 0%, transparent 100%);
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #001F54;
}

.panel-body {
    padding: 1.5rem;
}

/* Badge */
.badge {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-blue {
    background: rgba(0, 31, 84, 0.1);
    color: #001F54;
}

.badge-green {
    background: rgba(0, 128, 128, 0.1);
    color: #008080;
}

.badge-orange {
    background: rgba(255, 113, 3, 0.1);
    color: #FF7103;
}

/* Inventory Panel */
.inventory-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.stat-circle {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 31, 84, 0.08) 0%, rgba(255, 113, 3, 0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.12),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.stat-circle::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #001F54;
    border-right-color: #FF7103;
    animation: rotate 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.stat-circle-inner {
    text-align: center;
    z-index: 1;
}

.stat-circle .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #001F54;
    margin-bottom: 0.25rem;
}

.stat-circle .stat-label {
    font-size: 0.8rem;
    color: #666;
}

.inventory-details {
    flex: 1;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.detail-label {
    font-size: 0.95rem;
    color: #666;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #001F54;
}

.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin: 0.5rem 0;
}

/* Operations Panel */
.operation-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.operation-item:last-child {
    margin-bottom: 0;
}

.operation-item:hover {
    background: rgba(0, 31, 84, 0.03);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(0, 31, 84, 0.1);
    transform: translateX(4px);
}

.operation-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.operation-item:hover .operation-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.operation-icon svg {
    width: 24px;
    height: 24px;
}

.icon-inbound {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.icon-transfer {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.icon-outbound {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.icon-returns {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.operation-content {
    flex: 1;
}

.operation-title {
    font-weight: 600;
    color: #001F54;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.operation-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    background: #f5f5f5;
    color: #666;
}

.stat-badge strong {
    color: #001F54;
    font-weight: 600;
}

.badge-created { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.badge-created strong { color: #3B82F6; }

.badge-partial { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.badge-partial strong { color: #F59E0B; }

.badge-draft { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.badge-draft strong { color: #8B5CF6; }

.badge-dispatched { background: rgba(236, 72, 153, 0.1); color: #EC4899; }
.badge-dispatched strong { color: #EC4899; }

.badge-ready { background: rgba(34, 197, 94, 0.1); color: #22C55E; }
.badge-ready strong { color: #22C55E; }

.badge-shipped { background: rgba(6, 182, 212, 0.1); color: #06B6D4; }
.badge-shipped strong { color: #06B6D4; }

.badge-pending { background: rgba(251, 146, 60, 0.1); color: #FB923C; }
.badge-pending strong { color: #FB923C; }

.badge-done { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.badge-done strong { color: #10B981; }

/* User Distribution Panel */
.user-distribution-panel {
    margin-bottom: 2rem;
}

.role-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.role-stat-card {
    padding: 1.25rem;
    border-radius: 10px;
    background: white;
    border-left: 5px solid #001F54;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 5px solid;
    box-shadow: 
        0 3px 12px rgba(0, 0, 0, 0.1),
        0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.role-stat-card:hover {
    transform: translateX(6px) translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.role-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.role-name {
    font-weight: 600;
    color: #001F54;
    font-size: 0.95rem;
}

.role-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-progress {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.role-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.role-percentage {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
}

/* Activity Panel */
.activity-panel {
    margin-bottom: 2rem;
}

.view-all-link {
    font-size: 0.9rem;
    color: #001F54;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.view-all-link:hover {
    color: #FF7103;
}

.activity-list {
    max-height: 450px;
    overflow-y: auto;
}

.activity-empty {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
    margin-bottom: 0.5rem;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(0, 31, 84, 0.04);
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(0, 31, 84, 0.08);
    transform: translateX(4px);
}

.activity-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    transition: transform 0.3s;
}

.activity-item:hover .activity-icon {
    transform: scale(1.1);
}

.activity-icon-user-add { background: linear-gradient(135deg, #001F54, #003B8E); }
.activity-icon-inbound { background: linear-gradient(135deg, #3B82F6, #60A5FA); }
.activity-icon-transfer { background: linear-gradient(135deg, #10B981, #34D399); }
.activity-icon-returns { background: linear-gradient(135deg, #EF4444, #F87171); }

.activity-content {
    flex: 1;
}

.activity-main {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.activity-main strong {
    color: #001F54;
    font-weight: 600;
}

.activity-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.activity-module {
    padding: 0.2rem 0.6rem;
    background: rgba(0, 31, 84, 0.08);
    color: #001F54;
    border-radius: 4px;
    font-weight: 500;
}

.activity-detail {
    color: #666;
}

.activity-time {
    font-size: 0.85rem;
    color: #999;
    white-space: nowrap;
}

/* Quick Actions */
.quick-actions-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 3px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s, transform 0.3s;
}

.quick-actions-container:hover {
    box-shadow: 
        0 10px 32px rgba(0, 0, 0, 0.15),
        0 5px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.quick-actions-header {
    margin-bottom: 1.5rem;
}

.quick-actions-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #001F54;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.3s, box-shadow 0.3s, filter 0.3s;
    border: 2px solid transparent;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    pointer-events: none;
}

.action-btn:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.25),
        0 6px 16px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.action-btn svg {
    width: 32px;
    height: 32px;
}

.action-btn-primary {
    background: linear-gradient(135deg, #001F54, #003B8E);
    color: white;
}

.action-btn-secondary {
    background: linear-gradient(135deg, #6B7280, #9CA3AF);
    color: white;
}

.action-btn-accent {
    background: linear-gradient(135deg, #FF7103, #FFA347);
    color: white;
}

.action-btn-success {
    background: linear-gradient(135deg, #10B981, #34D399);
    color: white;
}

.action-btn-warning {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    color: white;
}

.action-btn-info {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .two-column-grid {
        grid-template-columns: 1fr;
    }
    
    .inventory-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stat-circle {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .role-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .operation-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

