:root {
    --primary: #10b981;
    --primary-light: #34d399;
    --primary-dark: #059669;
    --secondary: #064e3b;
    --accent: #f59e0b;
    --background: #f8fafc;
    --sidebar-bg: #064e3b;
    --surface: rgba(255, 255, 255, 0.8);
    --text: #0f172a;
    --text-light: #64748b;
    --border: rgba(226, 232, 240, 0.8);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 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);
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
}

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

body {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    background-image: radial-gradient(at 0% 0%, hsla(161, 84%, 93%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(150, 76%, 95%, 1) 0, transparent 50%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Glassmorphism Utility */
.glass {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Modern */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--secondary) 0%, #022c22 100%);
    color: white;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar nav {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 2rem;
}

/* Custom Scrollbar */
.sidebar nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.sidebar nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-header {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(to right, #34d399, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin: 1.5rem 0 0.75rem 1rem;
    font-weight: 700;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.nav-link i {
    font-size: 1.25rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Main Content Modern */
.main-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

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

.header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.025em;
}

.user-profile {
    background: white;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
}

/* Modern Cards */
.card {
    background: var(--surface);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

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

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.05em;
}

.stat-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 5rem;
    opacity: 0.05;
    color: var(--primary);
    transform: rotate(-15deg);
}

/* Forms Modern */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Buttons Modern */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* Tables Modern */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    font-weight: 700;
}

.table td {
    padding: 1.25rem 1rem;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.table tr td:first-child {
    border-left: 1px solid #f3f4f6;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table tr td:last-child {
    border-right: 1px solid #f3f4f6;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.table tr:hover td {
    background: #f3f4f6;
}

.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 1rem;
    }
    
    .sidebar nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }
    
    .nav-section-label {
        display: none;
    }
    
    .nav-link {
        flex: 0 0 auto;
        margin-right: 0.5rem;
        margin-bottom: 0;
    }
    
    .main-content {
        padding: 1.25rem;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-2,
    .ziswaf-container {
        grid-template-columns: 1fr !important;
    }
    
    .table th, .table td {
        white-space: nowrap;
    }
    
    .card .card-title,
    .card > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    
    .activity-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .activity-item > div {
        flex-wrap: wrap !important;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Pagination Modern */
nav .pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
nav .page-item .page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text);
    background-color: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
}
nav .page-item.active .page-link {
    z-index: 3;
    color: white;
    background-color: var(--primary);
    border-color: var(--primary);
}
nav .page-item.disabled .page-link {
    color: #94a3b8;
    pointer-events: none;
    background-color: #f8fafc;
    border-color: var(--border);
}
nav .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}
nav .pagination p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--text-light);
}