/* Common Styles - Shared across all public-facing pages */

/* ========================================
   CSS Custom Properties (Variables)
   ======================================== */
:root {
    /* Colors */
    --color-primary: #667eea;
    --color-primary-hover: #5568d3;
    --color-bg: #f5f5f5;
    --color-text: #333;
    --color-text-secondary: #666;
    --color-text-tertiary: #999;
    --color-border: #e0e0e0;
    --color-border-light: #ddd;
    --color-white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 40px;
    --spacing-4xl: 60px;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.07);

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    --font-size-4xl: 42px;
}

/* ========================================
   Base Styles
   ======================================== */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
}

/* ========================================
   Typography
   ======================================== */
h1 {
    margin: 0 0 12px 0;
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

h2 {
    margin: 0 0 15px 0;
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.subtitle {
    font-size: var(--font-size-md);
    margin-top: 12px;
    opacity: 0.95;
    color: var(--color-text-secondary);
}

/* ========================================
   Layout Containers
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

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

/* ========================================
   Navigation & Links
   ======================================== */
.home-link,
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-base);
}

.home-link:hover,
.back-link:hover {
    text-decoration: underline;
}

.footer-links {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.footer-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-base);
}

.footer-link:hover {
    text-decoration: underline;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background: #e0e0e0;
    color: var(--color-text);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 12px 28px;
    font-size: var(--font-size-md);
}

/* ========================================
   Cards & Containers
   ======================================== */
.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.card-lg {
    padding: var(--spacing-3xl);
}

/* ========================================
   Gradient Header
   ======================================== */
.gradient-header {
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-4xl) var(--spacing-lg);
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    border-radius: var(--radius-lg);
}

/* ========================================
   Stats Display
   ======================================== */
.stat-label {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-tertiary);
    margin-bottom: 4px;
    font-weight: 600;
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
}

/* ========================================
   Empty States
   ======================================== */
.empty-state {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
    color: var(--color-text-tertiary);
    font-size: var(--font-size-md);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   Forms
   ======================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.form-group label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-light);
    font-size: var(--font-size-base);
    font-family: inherit;
    background: #f9f9f9;
    color: var(--color-text);
    transition: all 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="url"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #bbb;
    background: var(--color-white);
}

.form-group input[type="text"]:hover,
.form-group input[type="number"]:hover,
.form-group select:hover {
    background: var(--color-white);
    border-color: #bbb;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
    display: none;
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .container,
    .container-narrow,
    .container-wide {
        padding: var(--spacing-sm);
    }

    h1 {
        font-size: var(--font-size-2xl);
    }

    h2 {
        font-size: var(--font-size-lg);
    }

    .gradient-header {
        padding: 30px var(--spacing-md);
        margin-bottom: var(--spacing-lg);
        border-radius: var(--radius-md);
    }

    .home-link,
    .back-link {
        margin-bottom: var(--spacing-md);
        font-size: var(--font-size-sm);
    }
}