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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --admin-color: #7c3aed;
    --admin-hover: #6d28d9;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-admin {
    background-color: var(--admin-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-display {
    color: white;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Buttons */
.btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

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

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

.btn-secondary:hover {
    background-color: #475569;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-google {
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-google:hover {
    background-color: var(--bg-light);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* About Section */
.about {
    padding: 4rem 0;
}

.about h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.about-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* CTA Section */
.cta {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin: 0.25rem 0;
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    position: relative;
}

.modal-large {
    max-width: 800px;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
}

.close:hover {
    color: var(--text-color);
}

/* Forms */
.input,
.textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

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

.textarea {
    resize: vertical;
}

.divider {
    text-align: center;
    margin: 1rem 0;
    color: var(--text-light);
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: var(--border-color);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Dashboard */
.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quick-link-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
}

.quick-link-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.quick-link-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.quick-link-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.quick-link-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Announcements */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.announcement-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.announcement-header h3 {
    font-size: 1.25rem;
    color: var(--text-color);
}

.announcement-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.announcement-card p {
    color: var(--text-light);
}

/* Discussions */
.discussions-actions {
    margin-bottom: 2rem;
}

.discussions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.discussion-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.discussion-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.discussion-preview-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.discussion-preview-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.discussion-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.pin-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Documents */
.filter-section {
    margin-bottom: 2rem;
}

.filter-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.document-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Admin Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--admin-color);
}

.admin-section {
    margin-bottom: 3rem;
}

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

.admin-section h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.admin-actions {
    margin-bottom: 2rem;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.admin-item-content {
    flex: 1;
}

.admin-item-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.admin-item-content p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

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

.admin-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.section-footer {
    margin-top: 1.5rem;
    text-align: center;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-info a {
    color: #1e40af;
    font-weight: 500;
}

/* Utility Classes */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.error-message {
    color: var(--danger-color);
    padding: 1rem;
    background-color: #fee2e2;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-item {
        flex-direction: column;
        gap: 1rem;
    }

    .admin-item-actions {
        width: 100%;
    }
}

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