@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-gradient: linear-gradient(135deg, #f0fdfa 0%, #e0e7ff 100%);
    --surface: rgba(255, 255, 255, 0.85);
    --surface-border: rgba(255, 255, 255, 0.4);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-lg: 16px;
    --radius-md: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.premium-container {
    max-w: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.premium-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease;
}

.premium-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #1e3a8a, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.premium-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

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

/* Form Styles */
.premium-form-group {
    margin-bottom: 1.5rem;
}

.premium-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.premium-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid #cbd5e1;
    background: rgba(255,255,255,0.9);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.2s;
}

.premium-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.premium-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.premium-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Category Grid (4 columns desktop, 1 mobile) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.category-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}

.category-card.disabled:hover {
    transform: none;
    border-color: var(--surface-border);
}

.category-card svg {
    width: 32px;
    height: 32px;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Application List Styles */
.app-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.app-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.app-item:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.app-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: capitalize;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.app-actions-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-badge {
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-badge.approved { background: #dcfce7; color: #166534; }
.app-badge.rejected { background: #fee2e2; color: #991b1b; }
.app-badge.pending { background: #fef9c3; color: #854d0e; }

@media (max-width: 768px) {
    .app-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .app-actions-group {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

/* Admin Layout Styles */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--surface-border);
    padding: 2rem 1rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
}

.admin-nav-link {
    padding: 0.75rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

            <!-- Responsive Form Grid -->
            .premium-form-grid {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 1.5rem;
            }
            
            .premium-form-grid-full {
                grid-column: span 2;
            }
            
            @media (max-width: 768px) {
                .premium-form-grid {
                    grid-template-columns: 1fr;
                    gap: 1rem;
                }
                .premium-form-grid-full {
                    grid-column: span 1;
                }
            }

            /* Enhanced Metrics Cards */
            .dashboard-metrics-grid {
                display: grid;
                grid-template-columns: repeat(4, 1fr);
                gap: 1.25rem;
                margin-top: 1.5rem;
            }

            @media (max-width: 1024px) {
                .dashboard-metrics-grid {
                    grid-template-columns: repeat(2, 1fr);
                }
            }

            @media (max-width: 480px) {
                .dashboard-metrics-grid {
                    grid-template-columns: 1fr;
                }
            }

            .metric-card {
                background: var(--surface);
                backdrop-filter: blur(12px);
                -webkit-backdrop-filter: blur(12px);
                border: 1px solid var(--surface-border);
                border-radius: var(--radius-md);
                padding: 1.25rem;
                box-shadow: var(--shadow-sm);
                transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                position: relative;
                overflow: hidden;
                display: flex;
                align-items: center;
                gap: 1rem;
                text-decoration: none;
                color: inherit;
            }

            .metric-card:hover {
                transform: translateY(-4px) scale(1.02);
                box-shadow: var(--shadow-md);
                border-color: rgba(37, 99, 235, 0.4);
            }

            .metric-icon-box {
                width: 48px;
                height: 48px;
                border-radius: 10px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 1.5rem;
                flex-shrink: 0;
                transition: transform 0.3s ease;
            }

            .metric-card:hover .metric-icon-box {
                transform: scale(1.1) rotate(3deg);
            }

            .metric-content {
                flex: 1;
                min-width: 0;
            }

            .metric-title {
                color: var(--text-muted);
                font-size: 0.8rem;
                font-weight: 600;
                text-transform: uppercase;
                letter-spacing: 0.05em;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .metric-value {
                font-size: 1.75rem;
                font-weight: 700;
                color: var(--text-main);
                margin-top: 0.15rem;
                line-height: 1.2;
            }

            /* Collapsible and Responsive Admin Sidebar */
            .admin-layout {
                display: flex;
                min-height: 100vh;
                overflow: hidden;
                position: relative;
            }

            .admin-sidebar {
                width: 260px;
                background: var(--surface);
                backdrop-filter: blur(16px);
                -webkit-backdrop-filter: blur(16px);
                border-right: 1px solid var(--surface-border);
                padding: 1.5rem 1rem;
                box-shadow: var(--shadow-md);
                display: flex;
                flex-direction: column;
                transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                z-index: 50;
                position: relative;
            }

            .admin-sidebar.collapsed {
                width: 80px;
            }

            .admin-sidebar-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 2rem;
                padding: 0 0.5rem;
                height: 40px;
            }

            .admin-brand {
                font-weight: 800;
                font-size: 1.25rem;
                background: linear-gradient(to right, #1e3a8a, #3b82f6);
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                transition: opacity 0.2s;
                white-space: nowrap;
            }

            .admin-sidebar.collapsed .admin-brand {
                opacity: 0;
                pointer-events: none;
                width: 0;
            }

            .sidebar-toggle-btn {
                background: rgba(37, 99, 235, 0.08);
                border: none;
                color: var(--primary);
                width: 28px;
                height: 28px;
                border-radius: 6px;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                transition: all 0.2s;
            }

            .sidebar-toggle-btn:hover {
                background: var(--primary);
                color: white;
            }

            .admin-sidebar-nav {
                display: flex;
                flex-direction: column;
                gap: 0.35rem;
                margin-top: 1rem;
                flex: 1;
            }

            .admin-nav-link {
                display: flex;
                align-items: center;
                gap: 0.85rem;
                padding: 0.75rem 0.85rem;
                color: var(--text-main);
                text-decoration: none;
                font-weight: 600;
                font-size: 0.95rem;
                border-radius: var(--radius-md);
                transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
                white-space: nowrap;
            }

            .admin-nav-link svg {
                width: 20px;
                height: 20px;
                color: var(--text-muted);
                transition: color 0.2s;
                flex-shrink: 0;
            }

            .admin-nav-link:hover, .admin-nav-link.active {
                background: rgba(37, 99, 235, 0.08);
                color: var(--primary);
            }

            .admin-nav-link:hover svg, .admin-nav-link.active svg {
                color: var(--primary);
            }

            .nav-label {
                transition: opacity 0.2s;
            }

            .admin-sidebar.collapsed .nav-label {
                opacity: 0;
                pointer-events: none;
                width: 0;
            }

            .admin-sidebar.collapsed .admin-nav-link {
                justify-content: center;
                padding: 0.75rem;
            }

            /* Mobile Sidebar Drawer */
            @media (max-width: 768px) {
                .admin-sidebar {
                    position: fixed;
                    left: 0;
                    top: 0;
                    bottom: 0;
                    transform: translateX(-100%);
                    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                    width: 260px;
                }
                
                .admin-sidebar.mobile-open {
                    transform: translateX(0);
                }
                
                .sidebar-overlay {
                    position: fixed;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    background: rgba(15, 23, 42, 0.3);
                    backdrop-filter: blur(4px);
                    z-index: 40;
                    display: none;
                }
                
                .sidebar-overlay.active {
                    display: block;
                }
                
                .admin-content {
                    padding: 1.5rem 1rem;
                }
            }

            .mobile-topbar {
                display: none;
                background: var(--surface);
                backdrop-filter: blur(12px);
                border-bottom: 1px solid var(--surface-border);
                padding: 1rem 1.5rem;
                align-items: center;
                justify-content: space-between;
                position: sticky;
                top: 0;
                z-index: 30;
                box-shadow: var(--shadow-sm);
                width: 100%;
            }

            @media (max-width: 768px) {
                .mobile-topbar {
                    display: flex;
                }
            }

            /* Responsive Data Tables */
            .table-responsive {
                width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .premium-table {
                width: 100%;
                border-collapse: separate;
                border-spacing: 0;
                text-align: left;
                min-width: 600px;
            }

            .premium-table th {
                background: rgba(241, 245, 249, 0.7);
                color: var(--text-muted);
                font-weight: 600;
                font-size: 0.75rem;
                text-transform: uppercase;
                letter-spacing: 0.05em;
                padding: 1rem 1.25rem;
                border-bottom: 1px solid #e2e8f0;
                white-space: nowrap;
            }

            .premium-table td {
                padding: 1rem 1.25rem;
                border-bottom: 1px solid #f1f5f9;
                color: var(--text-main);
                font-size: 0.9rem;
                vertical-align: middle;
            }

            .premium-table tbody tr {
                transition: background-color 0.2s ease;
            }

            .premium-table tbody tr:hover {
                background-color: rgba(248, 250, 252, 0.8);
            }

            .premium-table tbody tr:last-child td {
                border-bottom: none;
            }

            /* Complex Form/Table Layout */
            .admin-split-layout {
                display: grid;
                grid-template-columns: 350px 1fr;
                gap: 2rem;
            }

            @media (max-width: 1024px) {
                .admin-split-layout {
                    grid-template-columns: 1fr;
                }
            }
