/* InfoFest2026 - UC-Inspired Styling */

/* CSS Custom Properties */
:root {
    --primary-blue: #004494;
    --secondary-blue: #1647ba;
    --light-bg: #f4f4f4;
    --text-dark: #32373c;
    --white: #ffffff;
    --error-red: #dc3545;
    --success-green: #28a745;
    --border-gray: #ddd;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero Section with Background */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 68, 148, 0.88), rgba(0, 68, 148, 0.88)),
                url('/static/images/background.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 2rem 1rem;
}

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

/* Header */
.site-header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    max-width: 300px;
    height: auto;
}

/* Main Content */
.main-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Form Container */
.form-container {
    background: var(--white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 20px var(--shadow);
    max-width: 700px;
    width: 100%;
}

.form-container h1 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
}

.form-section h2 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

.section-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

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

.required {
    color: var(--error-red);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 68, 148, 0.1);
}

.form-group input.error {
    border-color: var(--error-red);
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    border-color: var(--secondary-blue);
    background-color: rgba(0, 68, 148, 0.03);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.checkbox-text {
    font-size: 1rem;
    color: var(--text-dark);
}

/* Error Messages */
.error-message {
    display: none;
    color: var(--error-red);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.error-message.show {
    display: block;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    max-width: 400px;
}

.flash-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px var(--shadow);
    animation: slideIn 0.3s ease;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--error-red);
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-green);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Buttons */
.form-actions {
    margin-top: 2rem;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 68, 148, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

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

/* Success Page */
.success-page {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

.success-container {
    background: var(--white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 20px var(--shadow);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.success-icon {
    margin-bottom: 2rem;
}

.success-container h1 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.success-details {
    color: #666;
    margin-bottom: 2rem;
}

.success-actions {
    margin: 2rem 0;
}

.event-info {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light-bg);
    text-align: left;
}

.event-info h2 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.event-info p {
    color: #666;
    line-height: 1.8;
}

/* Footer */
.site-footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--white);
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 1rem;
    }

    .form-container,
    .success-container {
        padding: 2rem 1.5rem;
    }

    .form-container h1,
    .success-container h1 {
        font-size: 2rem;
    }

    .logo {
        max-width: 200px;
    }

    .flash-messages {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .btn {
        width: 100%;
        padding: 0.875rem 2rem;
    }

    .checkbox-label {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .form-container h1,
    .success-container h1 {
        font-size: 1.75rem;
    }

    .subtitle,
    .success-message {
        font-size: 1rem;
    }

    .form-section h2 {
        font-size: 1.25rem;
    }
}

/* Dashboard Styles */
.dashboard-page {
    min-height: 100vh;
    background: var(--light-bg);
    padding: 2rem 1rem;
}

.dashboard-header {
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-small {
    max-width: 150px;
    height: auto;
}

.dashboard-header h1 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin: 0;
}

.btn-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
}

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

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    text-align: center;
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
}

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

.stat-value {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
}

.chart-card h2 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

/* Bar Charts */
.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bar-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.bar-wrapper {
    background: var(--light-bg);
    border-radius: 8px;
    height: 40px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    background: var(--primary-blue);
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    transition: width 0.6s ease;
    min-width: 50px;
}

.bar-fill.bar-green {
    background: #28a745;
}

.bar-fill.bar-purple {
    background: #6f42c1;
}

.bar-value {
    color: var(--white);
    font-weight: bold;
    font-size: 1rem;
}

/* Recent Section */
.recent-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 2rem;
}

.recent-section h2 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

/* Data Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light-bg);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-gray);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.data-table tbody tr:hover {
    background: rgba(0, 68, 148, 0.05);
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.dashboard-footer {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-gray);
}

/* Dashboard Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

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

    .logo-small {
        max-width: 120px;
    }

    .stat-value {
        font-size: 2rem;
    }
}
