:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e2e8f0;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --border-color: #4a5568;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Premium Card */
.premium-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

/* Drawer */
.drawer {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
    transition: all 0.3s;
}

.drawer-header {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.drawer-menu {
    list-style: none;
}

.drawer-menu-item {
    margin-bottom: 5px;
}

.drawer-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.drawer-menu-link i {
    width: 20px;
    margin-right: 10px;
}

.drawer-menu-link:hover,
.drawer-menu-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 15px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 40px;
    opacity: 0.3;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Tables */
.premium-table {
    width: 100%;
    border-collapse: collapse;
}

.premium-table th {
    text-align: left;
    padding: 15px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid var(--border-color);
}

.premium-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.premium-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid #28a745;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid #ffc107;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

/* Actions */
.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 2px;
    transition: all 0.3s;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn.edit { background: #17a2b8; color: white; }
.action-btn.delete { background: #dc3545; color: white; }
.action-btn.copy { background: #6c757d; color: white; }
.action-btn.approve { background: #28a745; color: white; }
.action-btn.reject { background: #dc3545; color: white; }

/* Responsive */
@media (max-width: 768px) {
    .drawer {
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .drawer.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}