/* Modern Admin Design System */
:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --info-gradient: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f5576c;
    --success-color: #4facfe;
    --warning-color: #ffa726;
    --danger-color: #ef5350;
    --info-color: #42a5f5;
    
    /* Neutral Colors */
    --bg-primary: #f8f9fe;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f3f4f6;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 8px 16px rgba(102, 126, 234, 0.1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Card Styles */
.modern-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(102, 126, 234, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.modern-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.modern-card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modern-card-body {
    padding: 0;
}

/* Gradient Cards */
.gradient-card {
    background: var(--primary-gradient);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.gradient-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

/* Stat Cards */
.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: var(--spacing-md);
    position: relative;
}

.stat-icon.primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary-color);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    color: var(--success-color);
}

.stat-icon.warning {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.1) 0%, rgba(254, 225, 64, 0.1) 100%);
    color: var(--warning-color);
}

.stat-icon.danger {
    background: linear-gradient(135deg, rgba(239, 83, 80, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    color: var(--danger-color);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: var(--spacing-sm) 0;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-top: var(--spacing-sm);
}

.stat-change.positive {
    background: rgba(79, 172, 254, 0.1);
    color: var(--success-color);
}

.stat-change.negative {
    background: rgba(239, 83, 80, 0.1);
    color: var(--danger-color);
}

/* Modern Buttons */
.btn-modern {
    font-family: var(--font-primary);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-gradient-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-gradient-secondary {
    background: var(--secondary-gradient);
    color: white;
}

.btn-gradient-success {
    background: var(--success-gradient);
    color: white;
}

.btn-outline-modern {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-modern:hover {
    background: var(--primary-color);
    color: white;
}

/* Modern Table */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
    text-align: left;
    border: none;
}

.modern-table thead th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.modern-table thead th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.modern-table tbody tr {
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
    background: var(--bg-tertiary);
    transform: scale(1.01);
}

.modern-table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
}

.modern-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 var(--radius-md);
}

.modern-table tbody tr:last-child td:last-child {
    border-radius: 0 0 var(--radius-md) 0;
}

/* Modern Badges */
.badge-modern {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-modern.primary {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
}

.badge-modern.success {
    background: rgba(79, 172, 254, 0.15);
    color: var(--success-color);
}

.badge-modern.warning {
    background: rgba(255, 167, 38, 0.15);
    color: var(--warning-color);
}

.badge-modern.danger {
    background: rgba(239, 83, 80, 0.15);
    color: var(--danger-color);
}

.badge-modern.info {
    background: rgba(66, 165, 245, 0.15);
    color: var(--info-color);
}

/* Modern Form Controls */
.form-control-modern {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-label-modern {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

/* Sidebar Styles */
.modern-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.sidebar-brand-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sidebar-nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-nav-item.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.sidebar-nav-item i {
    width: 20px;
    font-size: 18px;
}

/* Topbar Styles */
.modern-topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-search {
    position: relative;
    width: 400px;
}

.topbar-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 14px;
    transition: all 0.3s ease;
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.topbar-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.topbar-icon-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.topbar-icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Page Header */
.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: var(--spacing-sm);
}

.page-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.page-breadcrumb a:hover {
    text-decoration: underline;
}

/* Progress Bar */
.progress-modern {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar-modern {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Alert Modern */
.alert-modern {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: var(--spacing-md);
}

.alert-modern.success {
    background: rgba(79, 172, 254, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-modern.warning {
    background: rgba(255, 167, 38, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-modern.danger {
    background: rgba(239, 83, 80, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-modern.info {
    background: rgba(66, 165, 245, 0.1);
    border-color: var(--info-color);
    color: var(--info-color);
}

/* Utility Classes */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-card { box-shadow: var(--shadow-card); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Responsive */
@media (max-width: 768px) {
    .modern-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .modern-sidebar.active {
        transform: translateX(0);
    }
    
    .topbar-search {
        width: 200px;
    }
    
    .stat-card {
        padding: var(--spacing-lg);
    }
    
    .stat-value {
        font-size: 24px;
    }
}
