/* Fénelon Notre-Dame brand */
:root {
    --fenelon-blue: #003d58;
    --fenelon-blue-dark: #00263a;
    --fenelon-green: #4cb181;
    --fenelon-green-dark: #3a9668;
    --fenelon-lime: #b7c329;
    --fenelon-dark: #202020;
    --fenelon-light: #f8f9fa;
    --color-muted: #666;
    --color-muted-light: #888;
    --color-muted-lighter: #95a5a6;
    --color-success: #27ae60;
    --color-danger: #d9534f;
    --color-danger-bright: #e74c3c;
    --color-warning: #f39c12;
    --color-warning-orange: #e67e22;
    --color-warning-orange-dark: #d35400;
    --color-border: #ddd;
    --color-border-light: #eee;
    --bg-row-alt: #f8f9fa;
    --bg-row-warning: #fff3cd;
    --bg-row-danger: #f8d7da;
    --bg-table-header: #e6f2f5;
    --bg-info: #eaf6ff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 -4px 12px rgba(0, 0, 0, 0.2);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-pill: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--fenelon-light);
    color: var(--fenelon-dark);
}

/* ----- Header / navigation ----- */
.header {
    background: var(--fenelon-blue);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 61, 88, 0.2);
}

.header-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.header-logo {
    height: 60px;
    width: auto;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 400;
    color: white;
}

.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--fenelon-lime);
}

.nav-spacer { margin-left: auto; }

.nav-user {
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: bold;
}

/* ----- Navigation dropdown groups ----- */
.nav-group {
    position: relative;
    display: inline-flex;
}

.nav-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.nav-group-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--fenelon-lime);
}

.nav-caret {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.nav-group.is-open .nav-caret { transform: rotate(180deg); }

.nav-group-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    min-width: 220px;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 0.35rem;
    z-index: 100;
}

.nav-group.is-open .nav-group-menu { display: block; }

.nav-group-menu a {
    display: block;
    color: var(--fenelon-blue);
    text-decoration: none;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-group-menu a:hover {
    background: var(--fenelon-light);
    color: var(--fenelon-blue-dark);
}

.school-year-filter {
    margin: 0;
    display: flex;
    align-items: center;
}

.school-year-filter select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.school-year-filter select option {
    color: var(--fenelon-dark);
    background: white;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.9rem;
    font-size: 1rem;
    cursor: pointer;
    margin-left: auto;
}

/* ----- Layout ----- */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.flex-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.flex-row > * { flex: 1; min-width: 0; }

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.flex-1 { flex: 1; }

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

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

.divider-top {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* ----- Alerts ----- */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-danger {
    background: #fff0f0;
    border-left-color: var(--color-danger);
    color: #a94442;
}

.alert-success {
    background: #f0faf5;
    border-left-color: var(--fenelon-green);
    color: #2d6d4a;
}

.alert-warning {
    background: #fffdf0;
    border-left-color: var(--fenelon-lime);
    color: #8a6d3b;
}

.alert-info {
    background: #e8f4f8;
    border-left-color: var(--fenelon-blue);
    color: var(--fenelon-blue);
    text-align: center;
    font-size: 1.1rem;
}

/* ----- Buttons ----- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

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

.btn-primary:hover { background: var(--fenelon-blue-dark); }

.btn-success {
    background: var(--fenelon-green);
    color: white;
}

.btn-success:hover { background: var(--fenelon-green-dark); }

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

.btn-warning:hover { background: #d68910; }

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

.btn-danger:hover { background: #c9302c; }

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

.btn-link {
    background: none;
    color: var(--fenelon-blue);
    text-decoration: underline;
    padding: 0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-xs {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn-xxs {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-full {
    width: 100%;
    text-align: center;
}

.btn-stack { display: block; margin-bottom: 1rem; }
.btn-stack:last-child { margin-bottom: 0; }

.btn-large {
    display: block;
    width: 100%;
    padding: 1.25rem;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    border-radius: var(--radius-md);
}

.btn-medium {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    border-radius: var(--radius-md);
}

.btn-form { padding: 0.75rem 1.5rem; }

.inline-form {
    display: inline-block;
    margin: 0;
}

.actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.actions-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ----- Tables ----- */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

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

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

table th {
    background: var(--bg-table-header);
    color: var(--fenelon-blue);
    font-weight: 600;
}

table tr:hover { background: var(--bg-row-alt); }

.row-warning { background: var(--bg-row-warning); }
.row-warning:hover { background: var(--bg-row-warning); }
.row-danger { background: var(--bg-row-danger); }
.row-danger:hover { background: var(--bg-row-danger); }
.row-total { font-weight: bold; border-top: 2px solid #333; }

.col-actions { white-space: nowrap; }
.col-date { white-space: nowrap; }
.th-narrow { width: 30px; }
.th-label { width: 200px; }
.sort-handle { cursor: grab; color: #999; }

/* Compact table: smaller rows for dense lists */
.table-compact th,
.table-compact td {
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
}

/* Truncated cell with ellipsis, sized for responsive layouts */
.cell-truncate {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8em;
}
@media (max-width: 768px) {
    .cell-truncate { max-width: 90px; }
}

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

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

.form-group-tight { margin-bottom: 1rem; }
.form-group-flat { margin-bottom: 0; }

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--fenelon-blue);
    box-shadow: 0 0 0 3px rgba(0, 61, 88, 0.1);
}

.form-control-inline {
    display: inline-block;
    width: auto;
    margin-right: 0.3rem;
}

.form-hint {
    color: var(--color-muted);
    font-size: 0.9rem;
    display: block;
    margin-top: 0.25rem;
}

.form-errors {
    color: #c0392b;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-errors ul { margin: 0; padding-left: 1.2rem; }

.field-width-sm { width: 150px; flex: none; }

/* ----- Status badges ----- */
.badge {
    display: inline-block;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    line-height: 1.4;
}

.badge-success { background: var(--color-success); }
.badge-warning { background: var(--color-warning); }
.badge-danger { background: var(--color-danger-bright); }
.badge-muted { background: var(--color-muted-lighter); }
.badge-orange { background: var(--color-warning-orange); }
.badge-blue { background: var(--fenelon-blue); }

/* ----- Status banners (cart) ----- */
.status-banner {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.status-banner .status-label {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.25rem;
}

.status-banner .status-detail {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

.status-unpaid { background: #fdecea; color: #c0392b; border: 2px solid var(--color-danger-bright); }
.status-paid { background: #fef9e7; color: #b8860b; border: 2px solid var(--color-warning); }
.status-delivered { background: #eafaf1; color: #1e8449; border: 2px solid var(--color-success); }
.status-refunded { background: #fdf2e9; color: var(--color-warning-orange-dark); border: 2px solid var(--color-warning-orange); }

.btn-deliver {
    display: block;
    width: 100%;
    padding: 1.25rem;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    background: var(--fenelon-green);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.btn-deliver:hover { background: var(--fenelon-green-dark); }

.btn-undeliver {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin-top: 0.75rem;
}

.btn-refund {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    background: var(--color-warning-orange);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.btn-refund:hover { background: var(--color-warning-orange-dark); }

/* ----- Dashboard accents ----- */
.heading-brand { color: var(--fenelon-blue); }
.card-title { color: var(--fenelon-blue); margin-top: 0; }

.row-highlighted { background-color: #f0f8ff; }
.row-highlighted:hover { background-color: #f0f8ff; }

.role-tag { font-weight: bold; }
.role-tag-green { color: var(--fenelon-green); font-weight: bold; }

/* ----- Stat values ----- */
.stat-label {
    margin: 0;
    color: var(--color-muted);
}

.stat-value {
    margin: 0;
    font-size: 1.4rem;
    font-weight: bold;
}

.stat-value-lg {
    margin: 0;
    font-size: 1.6rem;
    font-weight: bold;
}

.amount-display {
    font-size: 1.2rem;
    font-weight: bold;
}

/* ----- Notes / list items ----- */
.note-card {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-row-alt);
    border-radius: var(--radius-sm);
    border-left: 3px solid #3498db;
}

.note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.note-content {
    margin: 0;
    white-space: pre-wrap;
}

.budget-entry {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-row-alt);
    border-radius: var(--radius-sm);
}

.stand-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stand-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.stand-meta {
    margin: 0.5rem 0 0 0;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.stand-description {
    margin: 0.5rem 0 0 0;
    color: var(--color-muted);
    white-space: pre-line;
}

.signups-list {
    margin: 0;
    padding-left: 1.2rem;
}

.signup-meta {
    color: var(--color-muted-light);
    font-size: 0.8rem;
}

.empty-state-italic {
    color: #999;
    font-style: italic;
}

.danger-zone-title { color: var(--color-danger-bright); }

/* ----- File / receipt blocks ----- */
.file-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg-row-alt);
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-entry-large {
    padding: 0.75rem;
}

.file-meta {
    color: var(--color-muted);
    display: block;
    font-size: 0.85rem;
}

/* ----- Drop zone (upload) ----- */
.drop-zone {
    border: 2px dashed #ccc;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.drop-zone.dragover {
    border-color: var(--color-success);
    background-color: #e8f5e9;
}

.drop-zone-hint {
    margin: 0;
    color: var(--color-muted);
}

.file-info {
    padding: 1rem;
    background-color: #e8f5e9;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.file-info p {
    margin: 0;
    color: var(--color-success);
}

/* ----- Bank account transaction comment ----- */
.tx-comment {
    margin-top: 0.3rem;
    color: var(--color-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.tx-project {
    margin-top: 0.4rem;
    font-size: 0.9rem;
}

.tx-receipt {
    margin-top: 0.3rem;
    font-size: 0.9rem;
}

.tx-wrap {
    max-width: 400px;
    white-space: normal;
}

/* ----- Auth card ----- */
.auth-card {
    max-width: 450px;
    margin: 4rem auto;
    text-align: center;
}

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

.auth-logo-wrap {
    margin-bottom: 2rem;
}

.auth-title {
    margin: 0 0 0.5rem 0;
    color: var(--fenelon-blue);
    font-weight: 400;
}

.auth-subtitle {
    color: var(--color-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-form { text-align: left; }

.auth-link {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-link a { color: var(--fenelon-blue); font-size: 0.95rem; }

.auth-btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
}

.auth-alert { text-align: left; }
.auth-help { color: var(--color-muted); font-size: 0.9rem; }

/* ----- QR Code ----- */
.qr-wrap { text-align: center; }
.qr-image { max-width: 200px; }
.qr-image-lg { max-width: 250px; }

/* ----- Project details ----- */
.cell-amount-right { text-align: right; }

/* ----- Recap box (sale show) ----- */
.recap-grid {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ----- Utility classes ----- */
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }

.text-muted { color: var(--color-muted); }
.text-muted-light { color: var(--color-muted-light); }
.text-success { color: var(--color-success); }
.text-success-strong { color: var(--color-success); font-weight: bold; }
.text-danger { color: var(--color-danger-bright); }
.text-danger-strong { color: var(--color-danger-bright); font-weight: bold; }
.text-warning { color: var(--color-warning); }
.text-warning-strong { color: var(--color-warning); font-weight: bold; }
.text-orange { color: var(--color-warning-orange); }
.text-brand { color: var(--fenelon-blue); }
.text-brand-green { color: var(--fenelon-green); }

.font-bold { font-weight: bold; }
.font-medium { font-weight: 500; }
.font-italic { font-style: italic; }

.fs-sm { font-size: 0.9rem; }
.fs-xs { font-size: 0.85rem; }
.fs-xxs { font-size: 0.8rem; }
.fs-lg { font-size: 1.1rem; }
.fs-xl { font-size: 1.2rem; }
.fs-xxl { font-size: 1.4rem; }

.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mr-1 { margin-right: 0.3rem; }
.ml-1 { margin-left: 0.5rem; }

.p-0 { padding: 0; }
.pl-0 { padding-left: 0; }

.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; }
.preline { white-space: pre-line; }

.balance-neutral { font-weight: bold; }
.balance-positive { color: var(--color-success); font-weight: bold; }
.balance-negative { color: var(--color-danger-bright); font-weight: bold; }
.amount-positive { color: var(--color-success); }
.amount-negative { color: var(--color-danger-bright); }

.text-link-underline { text-decoration: underline; }
.text-link-brand { color: var(--fenelon-blue); text-decoration: underline; }

/* ----- Footer ----- */
.public-footer {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    padding: 2rem 1rem;
}

/* =========================================
   Public layouts (shop, volunteer signup)
   ========================================= */
.public-page {
    padding-bottom: 120px;
}

.public-header {
    background: var(--fenelon-blue);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
}

.public-header h1 { margin: 0; font-size: 1.5rem; }
.public-header p { margin: 0.5rem 0 0; opacity: 0.85; }

.public-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.public-container-narrow {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.intro {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    white-space: pre-line;
}

/* ----- Volunteer public listing ----- */
.stand {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.stand h2 {
    margin: 0 0 0.5rem 0;
    color: var(--fenelon-blue);
}

.slots-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.slots-table th,
.slots-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.slots-table th {
    background: var(--bg-row-alt);
    font-weight: bold;
    color: var(--fenelon-blue);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.slots-table td.time {
    font-weight: bold;
    color: var(--fenelon-blue);
    white-space: nowrap;
}

.slots-table td.action {
    text-align: right;
    white-space: nowrap;
}

.slots-table tr.full { background: #fafafa; color: var(--color-muted-light); }
.slots-table tr.full td.time { color: var(--color-muted-light); }

.capacity-bar {
    display: inline-block;
    width: 80px;
    height: 8px;
    background: var(--color-border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.capacity-bar-fill {
    display: block;
    height: 100%;
    background: var(--fenelon-green);
}

.capacity-bar-fill.full { background: var(--color-danger-bright); }

.public-btn {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: var(--fenelon-green);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: bold;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
}

.public-btn:hover { background: #3d9870; }

.badge-full {
    background: var(--color-danger-bright);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
}

.flash {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.flash-error { background: #fff0f0; border-color: var(--color-danger-bright); color: #c0392b; }
.flash-success { background: #f0fff4; border-color: var(--color-success); color: #1e8449; }

/* ----- Volunteer signup ----- */
.recap-box {
    background: var(--bg-info);
    border-left: 4px solid var(--fenelon-blue);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-sm);
}

.success-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--fenelon-green);
    text-align: center;
}

.check-icon {
    font-size: 3rem;
    color: var(--fenelon-green);
    line-height: 1;
    margin-bottom: 1rem;
}

.success-icon {
    font-size: 4rem;
    color: var(--fenelon-green);
    margin-bottom: 1rem;
}

.error-icon {
    font-size: 4rem;
    color: var(--color-danger);
    margin-bottom: 1rem;
}

.recap-list {
    background: var(--bg-row-alt);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    text-align: left;
}

/* ----- Shop ----- */
.shop-header {
    background: var(--fenelon-blue);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
}

.shop-header h1 { margin: 0; font-size: 1.5rem; }
.shop-header p { margin: 0.5rem 0 0; opacity: 0.8; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.product-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.2rem;
    color: var(--fenelon-blue);
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-card-sold-out {
    opacity: 0.7;
}

.product-sold-out-badge {
    margin-top: auto;
    align-self: flex-start;
    background: var(--color-danger-bright);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--fenelon-blue);
    background: white;
    color: var(--fenelon-blue);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: var(--fenelon-blue);
    color: white;
}

.quantity-btn:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

.quantity-btn:disabled:hover {
    background: white;
    color: #ccc;
}

.quantity-display {
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--fenelon-blue);
    color: white;
    padding: 1rem 2rem;
    display: none;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-card);
    z-index: 100;
    gap: 1rem;
    flex-wrap: wrap;
}

.cart-bar.visible { display: flex; }

.cart-bar .total {
    font-size: 1.2rem;
    font-weight: bold;
}

.cart-bar .checkout-btn {
    background: var(--fenelon-green);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
}

.cart-bar .checkout-btn:hover { background: var(--fenelon-green-dark); }

.total-row { font-size: 1.2rem; font-weight: bold; }

.mismatch-box {
    background: #fdf2f2;
    padding: 1rem;
    border-radius: 5px;
    margin: 1.5rem 0;
    text-align: left;
}

/* ----- Landing page ----- */
.landing-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-body img {
    max-width: 80vw;
    max-height: 80vh;
    width: auto;
    height: auto;
}

/* ----- Board reports (comptes rendus de CA) ----- */
.board-report-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.board-report-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 0.5rem;
    border-bottom: 1px solid var(--color-border-light);
}

.board-report-item:last-child { border-bottom: none; }

.board-report-main {
    flex: 1 1 260px;
    min-width: 0;
}

.board-report-date {
    font-weight: bold;
    color: var(--fenelon-blue);
    margin-right: 0.5rem;
}

.board-report-note {
    margin: 0.4rem 0 0;
    color: var(--color-muted);
    overflow-wrap: break-word;
}

.board-report-meta {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.board-report-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.board-report-delete-form {
    display: inline;
    margin: 0;
}

/* ----- Wiki ----- */
.wiki-page-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wiki-page-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--color-border-light);
}

.wiki-page-item:last-child { border-bottom: none; }

.wiki-drag-handle {
    cursor: grab;
    color: var(--color-muted-light);
    font-size: 1.1rem;
    user-select: none;
}

.wiki-page-link {
    flex: 1;
    color: var(--fenelon-blue);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
}

.wiki-page-link:hover { text-decoration: underline; }

.wiki-page-meta {
    color: var(--color-muted);
    font-size: 0.85rem;
}

/* Rendered Markdown content */
.wiki-content {
    line-height: 1.65;
    overflow-wrap: break-word;
}

.wiki-content h1,
.wiki-content h2,
.wiki-content h3 {
    color: var(--fenelon-blue);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.wiki-content h1:first-child,
.wiki-content h2:first-child,
.wiki-content h3:first-child { margin-top: 0; }

.wiki-content p { margin: 0 0 1rem; }
.wiki-content ul,
.wiki-content ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.wiki-content li { margin-bottom: 0.35rem; }

.wiki-content a {
    color: var(--fenelon-green-dark);
    text-decoration: underline;
}

.wiki-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 0.5rem 0;
}

.wiki-content blockquote {
    margin: 0 0 1rem;
    padding: 0.5rem 1rem;
    border-left: 4px solid var(--fenelon-green);
    background: var(--fenelon-light);
    color: var(--color-muted);
}

.wiki-content pre {
    background: var(--fenelon-light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

.wiki-content code {
    background: var(--fenelon-light);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

.wiki-content pre code { background: transparent; padding: 0; }

/* Image manager on the edit screen */
.wiki-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.wiki-image-entry {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wiki-image-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.wiki-image-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

/* Keep the EasyMDE editor within the brand look */
.EasyMDEContainer .CodeMirror {
    border-radius: var(--radius-sm);
    border-color: var(--color-border);
}

.editor-toolbar {
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
}

/* =========================================
   Responsive — mobile breakpoints
   ========================================= */
@media (max-width: 1024px) {
    .container { padding: 0 1rem; margin: 1.5rem auto; }
}

@media (max-width: 768px) {
    /* Header collapses */
    .header { padding: 0.75rem 1rem; }
    .header-top { gap: 0.75rem; margin-bottom: 0.75rem; }
    .header-logo { height: 40px; }
    .header h1 { font-size: 1.1rem; }

    .nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .nav.is-open { display: flex; }

    .nav a {
        padding: 0.75rem 0.5rem;
        border-radius: var(--radius-sm);
    }

    /* Dropdown groups expand inline on mobile (no popover) */
    .nav-group { display: block; width: 100%; }

    .nav-group-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 0.5rem;
    }

    .nav-group-menu {
        display: block;
        position: static;
        margin-top: 0;
        min-width: 0;
        background: transparent;
        box-shadow: none;
        padding: 0 0 0 0.75rem;
    }

    .nav-group-menu a {
        color: white;
        padding: 0.6rem 0.5rem;
    }

    .nav-group-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--fenelon-lime);
    }

    .nav-spacer {
        margin-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 0.25rem;
    }

    .school-year-filter { width: 100%; }
    .school-year-filter select { width: 100%; }

    .mobile-nav-toggle { display: inline-block; }

    .container {
        padding: 0 0.75rem;
        margin: 1rem auto;
    }

    .card {
        padding: 1rem;
        border-radius: var(--radius-sm);
    }

    /* Stack page/card headers vertically */
    .page-header,
    .card-header,
    .flex-between,
    .stand-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header > h1,
    .card-header > h2,
    .card-header > h3 { margin: 0; }

    .page-header-actions { width: 100%; }
    .page-header-actions .btn,
    .page-header-actions a { flex: 1; text-align: center; }

    /* Hide low-priority columns/elements on mobile */
    .hide-mobile { display: none !important; }

    /* Tables become horizontally scrollable */
    .card > table,
    .card .table-responsive table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .card > table thead,
    .card > table tbody,
    .card > table tr { display: table; width: 100%; table-layout: auto; }

    .card > table td,
    .card > table th {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* Forms become single column */
    .flex-row { flex-direction: column; align-items: stretch; }
    .field-width-sm { width: 100%; }

    /* Buttons take full width */
    .btn { width: 100%; box-sizing: border-box; text-align: center; }
    .inline-form { display: block; }
    .inline-form .btn { width: 100%; }

    /* Status banner smaller */
    .status-banner { padding: 1rem; font-size: 1.1rem; }
    .status-banner .status-label { font-size: 1.4rem; }

    /* Public pages */
    .public-header,
    .shop-header { padding: 1rem; }
    .public-container,
    .public-container-narrow { margin: 1rem auto; padding: 0 0.75rem; }
    .product-grid { grid-template-columns: 1fr; }
    .stand-card { padding: 1rem; }
    .stand { padding: 1rem; }

    .cart-bar { padding: 0.75rem 1rem; }
    .cart-bar .checkout-btn { padding: 0.6rem 1rem; }
    .cart-bar.visible { flex-direction: column; align-items: stretch; }
    .cart-bar.visible > * { width: 100%; text-align: center; }

    .auth-card { margin: 1.5rem auto; padding: 1.5rem; }

    .grid-stats { grid-template-columns: 1fr 1fr; }
    .grid-actions { grid-template-columns: 1fr; gap: 1rem; }

    .budget-entry { flex-direction: column; align-items: stretch; }
    .budget-entry .btn { width: 100%; }

    /* File / receipt rows */
    .file-entry { flex-direction: column; align-items: stretch; }
    .file-entry > div { width: 100%; }

    /* Signups list shrinks */
    .signups-list { padding-left: 1rem; }
}

@media (max-width: 480px) {
    .header h1 { font-size: 1rem; }
    .header-top { flex-wrap: wrap; }
    .container { padding: 0 0.5rem; }
    .card { padding: 0.75rem; }
    .status-banner .status-label { font-size: 1.2rem; }
    .grid-stats { grid-template-columns: 1fr; }
    .stat-value-lg { font-size: 1.3rem; }
    .auth-card { padding: 1rem; margin: 1rem auto; }
}
