﻿

/* ===== MODERN DESIGN SYSTEM ===== */
:root {
    /* Primary Colors */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #818cf8;
    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --accent-teal: #14b8a6;
    --accent-orange: #f97316;
    --accent-pink: #ec4899;
    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== BASE STYLES ===== */
* {
    box-sizing: border-box;
}

.dashboard-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== HERO HEADER ===== */
.hero-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

    .hero-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08) 0%, transparent 50%);
        pointer-events: none;
    }

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-weight: 400;
}

/* ===== MODERN TABS ===== */
.k-tabstrip {
    border: none !important;
    background: transparent !important;
    margin: -1rem 0 2rem 0;
}

    .k-tabstrip .k-tabstrip-items {
        background: white !important;
        border: none !important;
        box-shadow: var(--shadow-md);
        border-radius: 12px;
        padding: 0.5rem;
        display: flex;
        gap: 0.25rem;
        max-width: 1400px;
        margin: 0 auto;
    }

    .k-tabstrip .k-item {
        border: none !important;
        background: transparent !important;
        border-radius: 8px !important;
        padding: 0.75rem 1.5rem !important;
        font-weight: 500;
        transition: all var(--transition-base);
        color: var(--gray-600);
    }

        .k-tabstrip .k-item:hover {
            background: var(--gray-100) !important;
            color: var(--gray-900);
        }

        .k-tabstrip .k-item.k-active {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
            color: white !important;
            box-shadow: var(--shadow-md);
        }

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
        opacity: 0;
        transition: opacity var(--transition-base);
    }

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
        border-color: var(--primary);
    }

        .stat-card:hover::before {
            opacity: 1;
        }

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--color-from) 0%, var(--color-to) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

    .stat-icon.blue {
        --color-from: #3b82f6;
        --color-to: #2563eb;
    }

    .stat-icon.green {
        --color-from: #10b981;
        --color-to: #059669;
    }

    .stat-icon.yellow {
        --color-from: #f59e0b;
        --color-to: #d97706;
    }

    .stat-icon.red {
        --color-from: #ef4444;
        --color-to: #dc2626;
    }

    .stat-icon.purple {
        --color-from: #8b5cf6;
        --color-to: #7c3aed;
    }

    .stat-icon.teal {
        --color-from: #14b8a6;
        --color-to: #0d9488;
    }

    .stat-icon.orange {
        --color-from: #f97316;
        --color-to: #ea580c;
    }

    .stat-icon.pink {
        --color-from: #ec4899;
        --color-to: #db2777;
    }



.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* ===== MODERN BUTTONS ===== */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

    .btn-modern::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255,255,255,0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .btn-modern:hover::before {
        width: 300px;
        height: 300px;
    }

    .btn-modern:active {
        transform: scale(0.98);
    }

    .btn-modern > * {
        position: relative;
        z-index: 1;
    }

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

    .btn-primary:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

    .btn-success:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

    .btn-info:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

    .btn-warning:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

    .btn-danger:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    color: var(--gray-700);
}

    .btn-secondary:hover {
        background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ===== QUICK ACTIONS GRID ===== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

    .action-btn:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow-lg);
        transform: translateY(-4px);
    }

.action-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all var(--transition-base);
}

.action-btn:hover .action-icon {
    transform: scale(1.1) rotate(5deg);
}

.action-label {
    font-weight: 600;
    color: var(--gray-700);
    text-align: center;
    font-size: 0.9375rem;
}

.action-sublabel {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-align: center;
}

/* ===== CARDS ===== */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.cards-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cards-row-equal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.modern-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

    .modern-card:hover {
        box-shadow: var(--shadow-xl);
    }

.card-header-modern {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title-modern {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 1rem;
}

.card-body-modern {
    padding: 1.5rem;
}

/* ===== CHART CONTAINER ===== */
.chart-wrapper {
    height: 360px;
    width: 100%;
    position: relative;
}

    .chart-wrapper.mini {
        height: 280px;
    }

.no-data-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    color: var(--gray-600);
    gap: 1rem;
}

.no-data-icon {
    font-size: 3rem;
    color: var(--gray-300);
}

.no-data-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
}

.no-data-subtext {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ===== LIST ITEMS ===== */
.modern-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-item-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

    .list-item-modern:hover {
        background: white;
        box-shadow: var(--shadow-md);
        border-color: var(--primary);
    }

.list-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.list-item-title {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.9375rem;
}

.list-item-subtitle {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.list-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
}

/* ===== LOADING STATE ===== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 4rem 2rem;
}

.spinner-modern {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* ===== NOTIFICATION TOAST ===== */
.toast-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    min-width: 360px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

@@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-content {
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

    .toast-icon.success {
        background: #d1fae5;
        color: #059669;
    }

    .toast-icon.info {
        background: #dbeafe;
        color: #2563eb;
    }

    .toast-icon.warning {
        background: #fef3c7;
        color: #d97706;
    }

    .toast-icon.danger {
        background: #fee2e2;
        color: #dc2626;
    }

.toast-body {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

    .toast-close:hover {
        background: var(--gray-100);
        color: var(--gray-600);
    }

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@@media (max-width: 1024px) {
    .cards-row {
        grid-template-columns: 1fr;
    }

    .cards-row-equal {
        grid-template-columns: 1fr;
    }
}

@@media (max-width: 768px) {
    .hero-title {
        font-size: 1.875rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .toast-notification {
        left: 1rem;
        right: 1rem;
        min-width: auto;
    }
}

/* ===== MINI CHART STYLES ===== */
.mini-chart-area {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.mini-chart {
    height: 100px;
    width: 100%;
}

