* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 24px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
}

.nav-links .btn-primary {
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
}

.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    min-width: 160px;
    display: none;
    z-index: 10;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #334155;
}

.notification-badge {
    background: #ef4444;
    color: white;
    border-radius: 9999px;
    padding: 0 6px;
    font-size: 0.7rem;
    margin-left: 4px;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.search-form {
    max-width: 600px;
    margin: 2rem auto 0;
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 9999px;
    font-size: 1rem;
}

.search-form button {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
}

/* Categories */
.categories {
    padding: 4rem 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    text-align: center;
    border-radius: 1rem;
    text-decoration: none;
    color: #1e293b;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.category-card i {
    font-size: 2rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

/* Grants Grid */
.grants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.grant-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.grant-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.category-badge {
    background: #e2e8f0;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.grant-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
    margin: 1rem 0;
}

.btn-primary, .btn-outline, .btn-sm {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-outline {
    border: 1px solid #3b82f6;
    color: #3b82f6;
    background: transparent;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.text-center {
    text-align: center;
    margin-top: 1.5rem;
}

/* Auth Forms */
.auth-form {
    padding: 4rem 0;
    min-height: 60vh;
}

.form-card {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
}

.checkbox-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: normal;
}

.alert {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dashboard-list {
    list-style: none;
    margin: 1rem 0;
}

.dashboard-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}
.badge.warning { background: #fef3c7; color: #92400e; }
.badge.success { background: #dcfce7; color: #166534; }
.badge.danger { background: #fee2e2; color: #991b1b; }

/* Admin */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: #3b82f6;
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    font-weight: bold;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.data-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 1rem;
    overflow: hidden;
    margin: 1rem 0;
}

.data-table th, .data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    margin: 0.5rem 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .hero h1 { font-size: 1.8rem; }
    .grants-grid { grid-template-columns: 1fr; }
}


/* Two-column layout */
.grants-listing .container {
    max-width: 1280px;
}

.listing-header {
    margin-bottom: 2rem;
}

.listing-main {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Filters sidebar */
.filters-sidebar {
    flex: 0 0 280px;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 90px;
}

.filters-sidebar form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.reset-link {
    display: inline-block;
    text-align: center;
    font-size: 0.85rem;
    color: #3b82f6;
    text-decoration: none;
    margin-top: 0.5rem;
}

/* Grants grid */
.grants-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* No results */
.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 1rem;
}

/* Pagination */
.pagination {
    width: 100%;
    text-align: center;
    margin-top: 2.5rem;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    margin: 0 0.2rem;
    border-radius: 0.5rem;
    background: white;
    color: #1e293b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
}

.pagination a.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
    .listing-main {
        flex-direction: column;
    }
    .filters-sidebar {
        flex: auto;
        position: static;
        width: 100%;
    }
    .grants-grid {
        grid-template-columns: 1fr;
    }
}


/* Contact Page Styles */
.contact-page {
    padding: 2rem 0 4rem;
    background: #f8fafc;
    min-height: 60vh;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h1 {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.contact-header p {
    font-size: 1.1rem;
    color: #64748b;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-form-wrapper .form-card {
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.contact-form-wrapper h2 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.contact-form-wrapper h2 i {
    color: #3b82f6;
    margin-right: 0.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.info-card h3 {
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card h3 i {
    color: #3b82f6;
    width: 1.4rem;
}

.info-card p {
    color: #475569;
    line-height: 1.5;
    margin: 0.3rem 0;
}

.social-links {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.social-links h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.social-links a {
    display: inline-block;
    margin: 0 0.5rem;
    color: #3b82f6;
    font-size: 1.6rem;
    transition: transform 0.2s;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: #1e3a8a;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-info {
        order: -1;
    }
}

/* Admin Dashboard Styles */
.admin-dashboard {
    padding: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.admin-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.popular-grants {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.popular-grants h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.popular-grants ul {
    list-style: none;
    padding: 0;
}

.popular-grants li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popular-grants li:last-child {
    border-bottom: none;
}

/* ============================================= */
/* ADMIN DASHBOARD STYLES - External CSS */
/* ============================================= */

.admin-dashboard {
    padding: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.admin-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.popular-grants {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.popular-grants h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #0f172a;
}

.popular-grants ul {
    list-style: none;
    padding: 0;
}

.popular-grants li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #334155;
}

.popular-grants li:last-child {
    border-bottom: none;
}

.popular-grants li span.count {
    background: #e2e8f0;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}