/* Heritage Ecosystem — Global Styles (source — edit this) */
:root {
    --primary: #2c3e50;
    --accent: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --bg: #f8f9fa;
    --text: #2c3e50;
    --border: #dee2e6;
    --radius: 8px;
}

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

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

a { color: #1a5276; text-decoration: none; }
a:hover { text-decoration: underline; }

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}
.flash-info { background: #d1ecf1; color: #0c5460; }
.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }

.env-banner {
    background: var(--danger);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-weight: bold;
}
.env-staging { background: var(--warning); color: #000; }
.env-development { background: #9b59b6; color: white; }

.site-main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

.card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
}

.form-stacked label { display: block; margin-bottom: 0.75rem; }
.form-stacked input, .form-stacked select, .form-stacked textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

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

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.photo-card img { width: 100%; border-radius: var(--radius); }
.photo-attribution { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.9rem; }
.profile-icon { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.photo-caption { color: #555; font-size: 0.9rem; margin-top: 0.25rem; }

.restricted-badge { background: #9b59b6; color: white; padding: 0.15rem 0.5rem; border-radius: 1rem; font-size: 0.8rem; }

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

/* Phones: less side padding, and log-in / register forms stack the label above the box instead of beside it */
@media (max-width: 640px) {
    .site-main { padding: 1rem 0.75rem; }
    .site-main .site-main { padding: 0; }              /* login/register pages nest a second .site-main */
    .card { padding: 1rem; }
    .auth-form table, .auth-form tbody, .auth-form tr, .auth-form td { display: block; width: 100% !important; }
    .auth-form table { border-spacing: 0 !important; }
    .auth-form tr { margin-bottom: 0.9rem; }
    .auth-form td { padding: 0 !important; white-space: normal !important; }
    .auth-form td:empty { display: none; }
    .auth-form label { display: block; margin-bottom: 0.25rem; }
}
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
