/* ============================================
   RaceManager
   Charte Graphique: Noir & Blanc
   Police: Fugaz One
   ============================================ */

:root {
    --primary: #FFFFFF;
    --primary-dark: #D4D4D4;
    --primary-light: rgba(255, 255, 255, 0.1);
    --primary-glow: rgba(255, 255, 255, 0.2);
    --accent: #E0E0E0;
    --success: #00E676;
    --success-light: rgba(0, 230, 118, 0.15);
    --danger: #FF5252;
    --danger-light: rgba(255, 82, 82, 0.15);
    --warning: #FFD740;
    --warning-light: rgba(255, 215, 64, 0.15);
    --bg-dark: #0A0A0A;
    --bg-card: #161616;
    --bg-card-hover: #1E1E1E;
    --bg-sidebar: #111111;
    --bg-input: #1A1A1A;
    --border: rgba(255, 255, 255, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.08);
    --sidebar-width: 380px;
    --header-height: 56px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-dark);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #666; }

/* ===== VIEWS ===== */
.view { display: none; height: 100vh; height: 100dvh; }
.view.active { display: flex; flex-direction: column; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border: none; border-radius: var(--radius);
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease; text-decoration: none;
    letter-spacing: 0.3px;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
    background: #FFFFFF;
    color: #0A0A0A;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}
.btn-primary:hover {
    background: #E0E0E0;
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}
.btn-success { background: var(--success); color: #0D0D1A; font-weight: 700; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
    background: transparent; border: 2px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-icon {
    background: none; border: none; font-size: 20px;
    cursor: pointer; padding: 6px 10px; border-radius: var(--radius);
    transition: all 0.2s; color: var(--text-secondary);
}
.btn-icon:hover { background: var(--bg-card-hover); color: var(--primary); }
.btn-navigate {
    background: #FFFFFF; color: #0A0A0A;
    padding: 14px 28px; font-size: 16px; font-weight: 700;
    border: none; border-radius: var(--radius); cursor: pointer; width: 100%;
}
.btn-navigate:hover { box-shadow: 0 6px 25px rgba(255, 255, 255, 0.15); }
.btn-google {
    background: #fff; border: 2px solid rgba(255,255,255,0.2); color: #333;
    font-weight: 600;
}
.btn-google:hover { background: #f5f5f5; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-group label {
    display: block; margin-bottom: 6px;
    font-size: 12px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px;
}
input[type="text"], input[type="date"], input[type="tel"],
input[type="email"], input[type="password"],
input[type="number"], select, textarea {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border-subtle);
    border-radius: var(--radius); font-family: inherit; font-size: 14px;
    transition: all 0.2s; background: var(--bg-input); color: var(--text-primary);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
textarea { resize: vertical; min-height: 80px; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 28px; box-shadow: var(--shadow);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}
.card h2 {
    font-family: 'Fugaz One', 'Inter', sans-serif;
    font-size: 20px; margin-bottom: 20px; color: var(--text-primary);
    letter-spacing: 0.5px;
}

/* ===== AUTH ===== */
.auth-card { max-width: 440px; margin: 0 auto; }
.auth-divider {
    text-align: center; position: relative; margin: 24px 0;
}
.auth-divider::before {
    content: ''; position: absolute; left: 0; right: 0; top: 50%;
    border-top: 1px solid var(--border-subtle);
}
.auth-divider span {
    background: var(--bg-card); padding: 0 16px; color: var(--text-muted);
    position: relative; z-index: 1; font-size: 13px; text-transform: uppercase;
    letter-spacing: 1px;
}
.auth-switch {
    text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted);
}
.auth-switch a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.auth-forgot { text-align: right; margin-top: 8px; font-size: 12px; }
.auth-forgot a { color: var(--text-muted); text-decoration: none; }
.auth-forgot a:hover { color: var(--primary); }

.user-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; background: var(--bg-card); border-radius: var(--radius);
    margin-bottom: 24px; box-shadow: var(--shadow); font-size: 14px;
    border: 1px solid var(--border-subtle);
}

/* ===== HOME VIEW ===== */
.home-container {
    max-width: 840px; margin: 0 auto; padding: 40px 24px;
    overflow-y: auto; height: 100%;
}
.home-header { text-align: center; margin-bottom: 48px; }
.logo {
    display: flex; align-items: center; justify-content: center;
}
.logo img { height: 100px; width: auto; max-width: 300px; object-fit: contain; }
.logo-small {
    display: flex; align-items: center;
}
.logo-small img { height: 32px; width: auto; }
.subtitle {
    color: var(--text-secondary); margin-top: 12px; font-size: 16px;
    max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.6;
}
/* Contact card */
.contact-card {
    max-width: 840px; margin: 0 auto 24px;
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 20px 24px; border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow);
}
.contact-card h3 {
    font-family: 'Fugaz One', cursive; font-size: 16px; font-weight: 400;
    margin-bottom: 12px; color: var(--text-primary);
}
.contact-card-content {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
}
.contact-card-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--text-secondary);
}
.contact-card-item a {
    color: var(--primary); text-decoration: none; font-weight: 500;
}
.contact-card-item a:hover { text-decoration: underline; }

/* Buy credits card — attractive, colorful */
.buy-credits-card {
    position: relative; margin-bottom: 24px; padding: 2px;
    border-radius: var(--radius-lg); overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #7c3aed, #ec4899, #2563eb);
    background-size: 300% 300%;
    animation: creditsBorderShift 4s ease-in-out infinite;
}
@keyframes creditsBorderShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.credits-glow {
    position: absolute; inset: -2px; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #2563eb44, #7c3aed44, #ec489944);
    filter: blur(16px); z-index: 0;
    animation: creditsBorderShift 4s ease-in-out infinite;
    background-size: 300% 300%;
}
.credits-card-inner {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 18px 20px;
    background: var(--bg-card); border-radius: calc(var(--radius-lg) - 2px);
}
.credits-card-left {
    display: flex; align-items: center; gap: 12px;
}
.credits-icon {
    font-size: 28px; filter: drop-shadow(0 0 8px rgba(37,99,235,0.5));
    animation: creditsIconPulse 2s ease-in-out infinite;
}
@keyframes creditsIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.credits-card-title {
    font-family: 'Fugaz One', cursive;
    font-weight: 700; font-size: 16px; color: var(--text-primary);
}
.credits-card-sub {
    font-size: 12px; color: var(--text-muted);
}
.credits-card-right {
    display: flex; align-items: center; gap: 12px;
}
.credits-qty-wrap {
    display: flex; align-items: center; gap: 0;
    border: 1px solid var(--border-subtle); border-radius: 8px;
    overflow: hidden;
}
.credits-qty-btn {
    background: rgba(255,255,255,0.05); border: none; color: var(--text-primary);
    width: 32px; height: 32px; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.credits-qty-btn:hover { background: rgba(255,255,255,0.12); }
.credits-qty-value {
    width: 32px; text-align: center; font-weight: 700; font-size: 16px;
    color: var(--text-primary);
}
.credits-buy-btn {
    white-space: nowrap; font-weight: 700; font-size: 14px;
    padding: 8px 18px; min-height: 36px;
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    border: none; transition: transform 0.15s, box-shadow 0.15s;
}
.credits-buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(37,99,235,0.4);
}

/* Checkout popup */
.checkout-popup { padding: 4px 0; }
.checkout-summary {
    background: var(--bg-input); border-radius: var(--radius);
    padding: 12px 16px; margin-bottom: 12px;
}
.checkout-line {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 15px;
}
.checkout-price { font-weight: 700; color: var(--text-primary); }
.checkout-total {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 18px; font-weight: 700; padding: 12px 0;
    border-top: 1px solid var(--border-subtle);
    margin-bottom: 16px;
}
.checkout-trust {
    text-align: center; font-size: 12px; color: var(--text-muted);
    margin-top: 8px;
}

.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.event-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    margin-bottom: 8px; transition: all 0.2s; cursor: pointer;
    background: var(--bg-input);
}
.event-item:hover {
    background: var(--bg-card-hover); border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}
.event-item-name { font-weight: 600; font-size: 14px; }
.event-item-date { font-size: 12px; color: var(--text-muted); }
.event-item-actions { display: flex; gap: 4px; }
.event-item-actions button { font-size: 16px; }

/* ===== ALREADY REGISTERED ===== */
.already-registered-content { text-align: center; padding: 20px 0; }
.already-registered-content p:first-child {
    font-size: 18px; font-weight: 600; margin-bottom: 16px;
    color: var(--success);
}

/* ===== BOOKMARK BANNER ===== */
.bookmark-banner {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 12px 16px; background: var(--primary-light);
    color: var(--primary); font-size: 13px; font-weight: 500;
    border-bottom: 1px solid var(--border);
}
.bookmark-banner.hidden { display: none; }

.not-owner-banner {
    padding: 12px 16px; background: rgba(230,57,70,0.1);
    border-bottom: 1px solid rgba(230,57,70,0.2);
    text-align: center;
}
.not-owner-banner p {
    margin: 0 0 8px; font-size: 13px; color: #f87171; font-weight: 500;
}

/* ===== ADMIN VIEW ===== */
.admin-header {
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px; height: var(--header-height);
    background: var(--bg-card); border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
}
.admin-header h1 {
    flex: 1; font-family: 'Fugaz One', cursive; font-size: 18px; font-weight: 400;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--text-primary);
}
.admin-actions { display: flex; gap: 4px; }

.admin-body {
    flex: 1; display: flex; position: relative;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width); background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; z-index: 500; overflow: hidden;
}
.sidebar.hidden { display: none; }

.sidebar-tabs {
    display: flex; border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-dark); flex-shrink: 0;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sidebar-tabs::-webkit-scrollbar { display: none; }
.sidebar-tab {
    flex: 1 1 0; padding: 8px 2px 6px; border: none; background: none;
    font-family: inherit; color: var(--text-muted); cursor: pointer;
    border-bottom: 3px solid transparent; transition: all 0.2s;
    min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.sidebar-tab .tab-icon { font-size: 16px; line-height: 1; }
.sidebar-tab .tab-label {
    font-size: 8px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0; line-height: 1.1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 100%;
}
.sidebar-tab:hover { color: var(--text-secondary); }
.sidebar-tab.active {
    color: var(--primary); border-bottom-color: var(--primary);
    background: var(--bg-sidebar);
}

.sidebar-content { flex: 1; overflow-y: auto; }
.sidebar-panel { display: none; padding: 20px; }
.sidebar-panel.active { display: block; }
.sidebar-panel h3 {
    font-family: 'Fugaz One', cursive;
    font-size: 13px; font-weight: 400; color: var(--primary);
    text-transform: uppercase; letter-spacing: 1px; margin: 20px 0 10px;
}
.sidebar-panel h3:first-child { margin-top: 0; }
.section-divider { height: 1px; background: var(--border-subtle); margin: 20px 0; }

/* File upload */
.file-upload {
    display: block; padding: 20px; border: 2px dashed var(--border);
    border-radius: var(--radius); text-align: center; cursor: pointer;
    transition: all 0.2s; color: var(--text-secondary); font-size: 14px;
    background: var(--bg-input);
}
.file-upload:hover {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-light);
}
.file-upload input { display: none; }

.info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: 13px;
}
.info-row span:first-child { color: var(--text-muted); }
.info-row span:last-child { font-weight: 600; color: var(--text-primary); }

/* Layer controls */
.layer-controls { display: flex; flex-direction: column; gap: 6px; }
.radio-label, .checkbox-label {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius);
    font-size: 13px; cursor: pointer; transition: all 0.2s;
    color: var(--text-secondary);
}
.radio-label:hover, .checkbox-label:hover {
    background: var(--bg-card-hover); color: var(--text-primary);
}
.assign-vol-row .assign-vol-name { flex: 1; }
.assign-vol-row .affect-search-count { margin-left: auto; }

/* Object type grid */
.object-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); gap: 8px;
}
.object-type-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 10px 4px; border: 2px solid var(--border-subtle); border-radius: var(--radius);
    background: var(--bg-input); cursor: pointer; font-size: 11px; font-family: inherit;
    color: var(--text-secondary); transition: all 0.2s;
}
.object-type-btn:hover { border-color: var(--primary); color: var(--primary); }
.object-type-btn.active {
    border-color: var(--primary); background: var(--primary-light);
    color: var(--primary); box-shadow: var(--shadow-glow);
}
.object-type-btn .icon { font-size: 24px; }
.object-type-btn { position: relative; }
.delete-type-btn {
    position: absolute; top: 2px; right: 2px;
    width: 18px; height: 18px; line-height: 16px; text-align: center;
    font-size: 14px; font-weight: 700; color: var(--danger);
    background: var(--danger-light); border-radius: 50%;
    cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.object-type-btn:hover .delete-type-btn { opacity: 1; }

.placing-text {
    background: var(--warning-light); color: var(--warning);
    padding: 12px; border-radius: var(--radius); font-size: 13px;
    text-align: center; margin-bottom: 8px; font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.7; } }

/* Share link */
.share-link-container { display: flex; gap: 6px; }
.share-link-container input {
    flex: 1; font-size: 12px; background: var(--bg-input);
    padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius);
    color: var(--text-primary);
}

/* Items list */
.items-list { max-height: 300px; overflow-y: auto; }
.empty-state {
    color: var(--text-muted); font-size: 13px; text-align: center;
    padding: 24px 10px; font-style: italic;
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapsible-section {
    border: 1px solid var(--border-subtle); border-radius: var(--radius);
    margin-bottom: 6px; background: var(--bg-input); overflow: hidden;
}
.collapsible-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; cursor: pointer; user-select: none;
    transition: background 0.2s;
}
.collapsible-header:hover { background: var(--bg-card-hover); }
.collapsible-title { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.collapsible-count {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.1); color: var(--text-secondary);
    font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px;
    margin-left: 6px;
}
.collapsible-arrow {
    font-size: 12px; color: var(--text-muted); transition: transform 0.2s;
}
.collapsible-section.open .collapsible-arrow { transform: rotate(90deg); }
.collapsible-body {
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
}
.collapsible-section.open .collapsible-body {
    max-height: 2000px;
}

.marker-item, .volunteer-item {
    padding: 8px 12px; font-size: 13px; transition: all 0.2s;
    border-top: 1px solid var(--border-subtle);
}
.marker-item:hover, .volunteer-item:hover {
    background: var(--bg-card-hover);
}
.marker-item-header, .volunteer-item-header {
    display: flex; justify-content: space-between; align-items: center;
}
.marker-item-type { font-weight: 600; color: var(--text-primary); font-size: 12px; }
.marker-item-label { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.marker-item-actions, .volunteer-item-actions { display: flex; gap: 4px; }
.marker-item-actions button, .volunteer-item-actions button {
    background: none; border: none; cursor: pointer; font-size: 14px;
    padding: 4px 6px; border-radius: 4px; transition: background 0.2s;
}
.marker-item-actions button:hover, .volunteer-item-actions button:hover {
    background: var(--bg-card-hover);
}

/* Volunteer header compact */
.vol-header-info { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.vol-header-name { font-weight: 600; font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vol-header-badges { display: flex; gap: 3px; font-size: 12px; flex-shrink: 0; }
.badge-present, .badge-live { font-size: 12px; }
.vol-header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.vol-header-call {
    font-size: 16px; text-decoration: none; padding: 4px;
    border-radius: 6px; transition: background 0.2s;
}
.vol-header-call:hover { background: rgba(255,255,255,0.1); }

.volunteer-item-name { font-weight: 600; color: var(--text-primary); }
.volunteer-item-phone { font-size: 12px; color: var(--text-muted); }
.volunteer-item-role {
    display: inline-block; font-size: 11px; padding: 3px 10px;
    border-radius: 20px; font-weight: 700; margin-top: 4px;
}
.role-circulation { background: var(--primary-light); color: var(--primary); }
.role-itinerant { background: var(--warning-light); color: var(--warning); }
.role-ravitaillement { background: var(--success-light); color: var(--success); }

.volunteer-detail-row {
    display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px;
}
.volunteer-detail-row select {
    padding: 6px 10px; font-size: 12px; width: auto; flex: 1;
    background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

/* Badge */
.badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #0A0A0A; font-size: 11px;
    padding: 2px 10px; border-radius: 20px; font-weight: 700; min-width: 22px;
}

/* ===== RECAP TABLE ===== */
.recap-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.recap-table th {
    text-align: left; padding: 10px 14px; background: var(--bg-dark);
    border-bottom: 2px solid var(--border); font-weight: 700; color: var(--primary);
    font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
}
.recap-table td {
    padding: 12px 14px; border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}
.recap-table tr:hover td { background: var(--bg-card-hover); }
.recap-table .recap-icon { font-size: 20px; text-align: center; width: 40px; }
.recap-table .recap-qty {
    text-align: center; font-weight: 700; font-size: 16px; width: 60px;
    color: var(--primary);
}
.recap-table tfoot td {
    font-weight: 700; border-top: 2px solid var(--border);
    background: var(--bg-dark);
}
.recap-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ===== PARCOURS LIST ===== */
.parcours-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-bottom: 1px solid var(--border-subtle);
}
.parcours-item:last-child { border-bottom: none; }
.parcours-color {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.parcours-info { flex: 1; min-width: 0; }
.parcours-name { display: block; font-weight: 600; font-size: 13px; color: var(--text-primary); }
.parcours-dist { font-size: 11px; color: var(--text-muted); }

/* Color picker swatches */
.color-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
    width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent;
    cursor: pointer; transition: border-color 0.15s;
}
.color-swatch:hover { border-color: rgba(255,255,255,0.4); }
.color-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--primary); }

/* ===== MAP ===== */
.map-container { flex: 1; position: relative; z-index: 1; }

/* ===== DIRECTION ARROWS ===== */
.direction-arrow {
    display: flex; align-items: center; justify-content: center;
    color: #e63946; font-size: 12px; opacity: 0.85;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

/* ===== KM MARKERS ===== */
.km-marker {
    background: #0A0A0A; border: 2px solid #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800; color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.km-marker span { line-height: 1; }

/* ===== START/END MARKERS ===== */
.start-marker, .end-marker {
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

/* ===== JOIN VIEW ===== */
.join-container {
    display: flex; align-items: center; justify-content: center;
    min-height: 100%; padding: 20px;
    background: linear-gradient(135deg, #0A0A0A 0%, #161616 50%, #1E1E1E 100%);
}
.join-container .card { max-width: 440px; width: 100%; }
.join-header { text-align: center; margin-bottom: 24px; }
.join-header h2 {
    font-family: 'Fugaz One', cursive;
    margin-bottom: 6px; color: var(--text-primary);
}
.join-header p { color: var(--text-muted); font-size: 14px; }

/* ===== VOLUNTEER VIEW ===== */
.volunteer-header {
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px; height: var(--header-height);
    background: var(--bg-card); border-bottom: 1px solid var(--border-subtle);
}
.volunteer-header h1 {
    flex: 1; font-family: 'Fugaz One', cursive; font-size: 16px; font-weight: 400;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.volunteer-body {
    flex: 1; display: flex; flex-direction: column;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    position: relative;
}
.volunteer-body .map-container { flex: 1; min-height: 0; height: 100%; }

/* Floating "Mes consignes" button - always visible */
.vol-consignes-fab {
    display: block;
    position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%;
    transform: translateX(-50%); z-index: 800;
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: 30px;
    padding: 12px 24px; font-size: 15px; font-weight: 600;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5); cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}
.vol-consignes-fab:active { transform: translateX(-50%) scale(0.95); }
.vol-consignes-fab.hidden { display: none !important; }

/* Drawer overlay */
.vol-drawer-overlay {
    display: none;
    position: absolute; inset: 0; z-index: 899;
    background: rgba(0,0,0,0.5);
}
.vol-drawer-overlay.active { display: block; }

/* Drawer handle */
.vol-drawer-handle {
    display: flex; align-items: center; justify-content: center; padding: 8px 0 4px; cursor: grab;
    position: relative;
}
.vol-drawer-bar {
    display: inline-block; width: 40px; height: 4px;
    background: var(--text-muted); border-radius: 2px;
}
.btn-close-drawer {
    position: absolute; right: 0; top: 4px;
    background: var(--bg-input); border: 1px solid var(--border-subtle);
    color: var(--text-secondary); font-size: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s;
}
.btn-close-drawer:active { background: var(--border); }

/* Panel is always a drawer overlay - map takes full height */
#volunteer-panel {
    position: absolute; bottom: 0; left: 0; right: 0;
    z-index: 900; max-height: 80vh;
    background: var(--bg-card); padding: 8px 20px 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    border-radius: 16px 16px 0 0; border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 30px rgba(0,0,0,0.5);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
#volunteer-panel.open { transform: translateY(0); }

/* Organizer contact card */
.vol-organizer-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; margin-bottom: 16px;
    background: var(--bg-input); border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
}
.vol-organizer-card .vol-org-icon { font-size: 20px; flex-shrink: 0; }
.vol-organizer-card .vol-org-info { flex: 1; min-width: 0; }
.vol-organizer-card .vol-org-name { font-weight: 600; font-size: 14px; }
.vol-organizer-card .vol-org-label { font-size: 11px; color: var(--text-muted); }
.vol-organizer-card .btn-call {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--success); color: #fff; font-weight: 600; font-size: 13px;
    text-decoration: none; padding: 8px 14px; border-radius: 20px;
    white-space: nowrap; transition: opacity 0.2s;
}
.vol-organizer-card .btn-call:active { opacity: 0.8; }

.vol-identity { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.vol-identity h2 { font-family: 'Fugaz One', cursive; font-size: 18px; }
.role-badge {
    display: inline-block; font-size: 12px; padding: 4px 12px;
    border-radius: 20px; font-weight: 700;
}

#vol-positions h3, #vol-missions h3, #vol-timeslots h3, #vol-announcements h3, #vol-teammates h3 {
    font-family: 'Fugaz One', cursive;
    font-size: 14px; font-weight: 400; margin: 16px 0 10px; color: var(--primary);
}

.position-card {
    padding: 14px; border: 1px solid var(--border-subtle);
    border-radius: var(--radius); margin-bottom: 8px;
    background: var(--bg-input);
}
.position-card-name { font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.position-card-instructions { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.position-card-actions { display: flex; gap: 8px; }
.position-card-actions .btn-show-map {
    flex: 1; padding: 8px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--primary); background: transparent; color: var(--primary);
    border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
}
.position-card-actions .btn-show-map:active { background: var(--primary); color: #fff; }

.mission-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px; font-size: 14px;
    border-left: 3px solid var(--primary); margin-bottom: 8px;
    background: var(--bg-input); border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
}
.mission-item .mission-number {
    background: var(--primary); color: #fff; width: 24px; height: 24px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}

/* ===== RACE NAVIGATION BUTTONS ===== */
#vol-race-nav { margin-top: 8px; }
#vol-race-nav-list { display: flex; gap: 8px; }
.btn-race-nav {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px; border-radius: var(--radius); font-size: 13px; font-weight: 600;
    cursor: pointer; border: none; font-family: inherit;
}
.btn-race-start {
    background: var(--success); color: #0a0a0a;
}
.btn-race-finish {
    background: var(--warning); color: #0a0a0a;
}

/* ===== TEAMMATES LIST ===== */
#vol-teammates { margin-top: 4px; }
.teammate-card {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 10px 12px; margin-bottom: 8px;
    border: 1px solid var(--border-subtle);
    display: flex; align-items: center; gap: 10px;
}
.teammate-card.teammate-me {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}
.teammate-order {
    min-width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
    background: rgba(255,255,255,0.1); color: var(--text-muted);
    flex-shrink: 0;
}
.teammate-me .teammate-order {
    background: var(--primary); color: #fff;
}
.teammate-info { flex: 1; min-width: 0; }
.teammate-name {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.teammate-me .teammate-name::after {
    content: " (Vous)"; font-weight: 400; color: var(--primary); font-size: 11px;
}
.teammate-position {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.teammate-actions { display: flex; gap: 6px; flex-shrink: 0; }
.teammate-btn-call {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--success); color: #0a0a0a;
    text-decoration: none; font-size: 16px;
}
.teammate-btn-locate {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.1); color: var(--text-primary);
    border: none; cursor: pointer; font-size: 16px; font-family: inherit;
}
.teammate-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-muted); margin: 10px 0 4px;
    padding-left: 4px;
}

/* ===== VOLUNTEER LIVE ACTIONS ===== */
#vol-live-actions h3 {
    font-family: 'Fugaz One', cursive;
    font-size: 14px; font-weight: 400; margin: 16px 0 10px; color: var(--primary);
}
.vol-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; margin-bottom: 8px; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--border-subtle); background: var(--bg-input);
    color: var(--text-primary); transition: all 0.2s;
}
.vol-action-btn:active { transform: scale(0.97); }
.vol-action-btn.active-signal {
    background: var(--success); color: #fff; border-color: var(--success);
}
.vol-action-btn.active-location {
    background: #2563eb; color: #fff; border-color: #2563eb;
}

/* ===== BALISEUR / DEBALISEUR PALETTE ===== */
.baliseur-section {
    padding: 0 0 8px; margin-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}
.baliseur-hint {
    font-size: 12px; color: var(--text-muted); margin: 0 0 10px;
}
.baliseur-session-badge {
    font-size: 13px; color: var(--text-muted);
    background: rgba(255,255,255,0.08); padding: 4px 10px;
    border-radius: 12px; font-weight: 500;
}
.baliseur-session-badge strong { color: #10b981; font-size: 16px; }
.baliseur-palette {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.baliseur-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 6px; border-radius: var(--radius);
    background: var(--bg-input); border: 2px solid var(--border-subtle);
    cursor: pointer; transition: all 0.15s; position: relative;
    color: var(--text-primary); font-family: inherit;
}
.baliseur-item:active { transform: scale(0.93); }
.baliseur-item .baliseur-item-icon { font-size: 28px; line-height: 1; }
.baliseur-item .baliseur-item-name {
    font-size: 10px; font-weight: 600; text-align: center;
    max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.baliseur-item.baliseur-placing {
    opacity: 0.5; pointer-events: none;
}
.baliseur-item.baliseur-placed {
    border-color: var(--success); background: rgba(0,230,118,0.1);
}
/* Debaliseur count badge */
.debaliseur-count {
    position: absolute; top: 4px; right: 4px;
    background: #e63946; color: #fff;
    font-size: 12px; font-weight: 700;
    min-width: 22px; height: 22px;
    border-radius: 11px; display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.debaliseur-item:active .debaliseur-count {
    background: var(--success);
}

/* Role badge colors for baliseur/debaliseur */
.role-baliseur { background: rgba(255,152,0,0.15); color: #FF9800; }
.role-debaliseur { background: rgba(156,39,176,0.15); color: #CE93D8; }

/* Badge dernier passé dans la liste admin */
.badge-runner-passed {
    display: inline-block; font-size: 11px; padding: 2px 8px;
    border-radius: 10px; background: var(--success); color: #fff; font-weight: 600;
    margin-left: 6px;
}

/* ===== VOLUNTEER LOCATION MARKER (admin map) ===== */
.vol-location-marker {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    background: #10b981; border: 2px solid #fff;
    border-radius: 50%; color: #fff;
    font-size: 11px; font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    text-transform: uppercase;
}
.vol-location-label {
    position: absolute; bottom: -18px; left: 50%;
    transform: translateX(-50%); white-space: nowrap;
    font-size: 10px; font-weight: 600; color: #fff;
    background: rgba(0,0,0,0.7); padding: 1px 6px;
    border-radius: 4px;
}

/* ===== LEAFLET CUSTOM ===== */
/* Tooltip for circleMarker hover */
.marker-tooltip {
    background: #1a1a1a !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    font-weight: 600;
    white-space: pre-line !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}
.marker-tooltip::before {
    border-top-color: #1a1a1a !important;
}

/* Permanent name label under assigned volunteer markers */
.marker-name-label {
    background: rgba(0,0,0,0.7) !important;
    color: #e2e8f0 !important;
    border: none !important;
    border-radius: 3px !important;
    padding: 1px 5px !important;
    font-size: 9px !important;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: none !important;
    white-space: nowrap !important;
}
.marker-name-label::before {
    border-bottom-color: rgba(0,0,0,0.7) !important;
}

.custom-marker {
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    position: relative;
}
.custom-marker:hover { filter: drop-shadow(0 0 6px rgba(255,255,255,0.5)); }
.custom-marker.highlight {
    animation: glowPulse 1.5s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(255,255,255,0.4)); }
    50% { filter: drop-shadow(0 0 14px rgba(255,255,255,0.9)); }
}
.custom-marker.marker-runner-passed {
    filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.6));
}
.custom-marker .marker-check {
    position: absolute; bottom: -4px; right: -4px;
    font-size: 12px; line-height: 1;
    filter: none;
}

/* Highlight pin when "Voir sur la carte" is clicked */
.highlight-pin {
    font-size: 36px; display: flex; align-items: flex-end; justify-content: center;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
    animation: pinDrop 0.4s ease-out;
}
@keyframes pinDrop {
    0% { transform: translateY(-30px); opacity: 0; }
    60% { transform: translateY(4px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

.location-dot {
    width: 16px; height: 16px; background: #fff;
    border: 3px solid #333; border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), var(--shadow);
}
.location-accuracy {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05); border-radius: 50%;
}

/* Dark-themed Leaflet popups */
.leaflet-popup-content-wrapper {
    background: #1a1a1a !important;
    color: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip { background: #1a1a1a !important; }
.leaflet-popup-close-button { color: #aaa !important; font-size: 20px !important; }
.leaflet-popup-close-button:hover { color: #fff !important; }

.marker-popup { color: #fff; }
.marker-popup .popup-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; color: #fff; }
.marker-popup .popup-type { font-size: 12px; color: #999; margin-bottom: 6px; }
.marker-popup .popup-instructions { font-size: 13px; margin-bottom: 6px; color: #ccc; }
.marker-popup .popup-actions { display: flex; gap: 6px; margin-top: 8px; }
.marker-popup .popup-actions button {
    padding: 6px 12px; font-size: 12px; border: none; border-radius: 6px;
    cursor: pointer; font-family: inherit; font-weight: 600;
}
.marker-popup .popup-btn-edit { background: rgba(255,255,255,0.12); color: #fff; }
.marker-popup .popup-btn-move { background: rgba(37,99,235,0.15); color: #60a5fa; }
.marker-popup .popup-btn-delete { background: rgba(255,82,82,0.15); color: #FF5252; }
.marker-popup .popup-btn-navigate { background: #00E676; color: #0D0D1A; }
.marker-popup .popup-runner-passed {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600; color: #00E676;
    margin-top: 6px; padding: 4px 8px;
    background: rgba(0,230,118,0.15); border-radius: 6px;
}

/* Presence badge in popup */
.popup-presence-badge {
    font-size: 10px; font-weight: 600; padding: 1px 6px;
    border-radius: 6px; white-space: nowrap;
}
.popup-presence-badge.present { background: rgba(0,230,118,0.15); color: #00E676; }
.popup-presence-badge.absent { background: rgba(255,255,255,0.08); color: #999; }

/* Popup assigned volunteers with call button */
.popup-assigned-list {
    margin: 8px 0; padding: 6px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.popup-assigned-vol {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; margin-bottom: 4px;
    background: rgba(255,255,255,0.08); border-radius: 8px;
    font-size: 13px; color: #fff;
}
.popup-assigned-vol span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.popup-btn-call {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 6px 12px; font-size: 12px; font-weight: 700;
    background: #00E676; color: #0D0D1A;
    border-radius: 8px; text-decoration: none;
    white-space: nowrap; flex-shrink: 0;
}
.popup-btn-assign {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 6px 12px; font-size: 12px; font-weight: 600;
    background: #fff; color: #1a1a1a;
    border: none; border-radius: 8px; cursor: pointer;
    font-family: inherit; white-space: nowrap;
    width: 100%; justify-content: center; margin-top: 4px;
}

/* ===== MODAL ===== */
#modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.7); z-index: 9999;
    align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(4px);
}
#modal-overlay.active { display: flex; }
#modal {
    background: var(--bg-card); border-radius: var(--radius-lg);
    width: 100%; max-width: 500px; max-height: 80vh;
    box-shadow: var(--shadow-lg); overflow: hidden;
    display: flex; flex-direction: column;
    border: 1px solid var(--border-subtle);
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px; border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 {
    font-family: 'Fugaz One', cursive;
    font-size: 18px; font-weight: 400; color: var(--text-primary);
}
.modal-close { font-size: 24px; color: var(--text-muted); }
#modal-body { padding: 24px; overflow-y: auto; }
#modal-body .form-group:last-child { margin-bottom: 0; }
#modal-body .btn { margin-top: 12px; }

/* ===== TOAST ===== */
#toast-container {
    position: fixed; top: 16px; right: 16px; z-index: 99999;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: var(--bg-card); color: var(--text-primary);
    padding: 14px 20px; border-radius: var(--radius);
    font-size: 14px; box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease; max-width: 380px;
    border: 1px solid var(--border-subtle);
    display: flex; align-items: center; gap: 10px;
}
.toast-msg { flex: 1; }
.toast-close {
    background: none; border: none; color: inherit; font-size: 18px;
    cursor: pointer; opacity: 0.6; padding: 0 2px; line-height: 1;
    flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }
.toast.toast-success {
    border-color: var(--success); background: #0a2e1a;
    color: var(--success);
}
.toast.toast-error {
    border-color: var(--danger); background: #2e0a0a;
    color: var(--danger);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

/* ===== VOLUNTEERS LIST VIEW ===== */
.volunteers-list-header {
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px; height: var(--header-height);
    background: var(--bg-card); border-bottom: 1px solid var(--border-subtle);
}
.volunteers-list-header h1 {
    flex: 1; font-family: 'Fugaz One', cursive; font-size: 16px; font-weight: 400;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.volunteers-list-body {
    flex: 1; overflow-y: auto;
    background: linear-gradient(135deg, #0A0A0A 0%, #161616 50%, #1E1E1E 100%);
}

.volunteers-list-container {
    max-width: 620px; margin: 0 auto; padding: 24px 16px;
}

.vlist-event-info {
    text-align: center; margin-bottom: 20px; color: var(--text-secondary); font-size: 15px;
}

.vlist-registered-banner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px 20px; background: var(--success-light);
    border-radius: var(--radius); margin-bottom: 16px;
    font-weight: 600; font-size: 14px; color: var(--success);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.vlist-grid { display: flex; flex-direction: column; gap: 8px; }

.vlist-volunteer-card {
    display: flex; flex-direction: column; gap: 6px;
    padding: 16px 18px; border: 1px solid var(--border-subtle);
    border-radius: var(--radius); cursor: pointer;
    transition: all 0.2s; background: var(--bg-input);
}
.vlist-volunteer-card:hover {
    background: var(--bg-card-hover); border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}
.vlist-volunteer-card.vlist-me {
    border-color: var(--primary); background: var(--primary-light);
}

.vlist-vol-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vlist-vol-name { font-weight: 600; font-size: 15px; color: var(--text-primary); }

.vlist-me-badge {
    display: inline-block; font-size: 11px; padding: 3px 10px;
    border-radius: 20px; font-weight: 700;
    background: #fff; color: #0A0A0A;
}

.vlist-vol-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }

/* ===== ADMIN CODE ===== */
.admin-code-container {
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.admin-code-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px; font-weight: 700; letter-spacing: 4px;
    color: #fff; background: rgba(255, 255, 255, 0.08);
    padding: 8px 16px; border-radius: var(--radius); flex: 1;
    text-align: center; border: 1px solid var(--border);
}
.admin-code-hint { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.admin-invite-actions { display: flex; gap: 6px; margin-bottom: 6px; }

/* Undo toast */
.toast-undo {
    display: flex; align-items: center; gap: 12px; justify-content: space-between;
    background: #1a1a2e !important; color: #fff; padding: 12px 16px;
    border: 1px solid var(--border);
}
.btn-undo {
    background: #2563eb; color: #fff; border: none; border-radius: 6px;
    padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
    white-space: nowrap;
}
.btn-undo:hover { background: #1d4ed8; }

/* Offline banner */
.offline-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 99998;
    background: #e63946; color: #fff; text-align: center;
    padding: 8px 16px; font-size: 13px; font-weight: 600;
    animation: slideDown 0.3s ease;
}
.offline-banner.hidden { display: none; }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* Bulk delete groups */
.bulk-delete-group { margin-bottom: 8px; }
.bulk-group-header { font-size: 14px; }
.bulk-group-items { margin-top: 4px; }

/* ===== RESPONSIVE - MOBILE FIRST ===== */

/* --- Prevent iOS zoom on input focus (font-size >= 16px) --- */
@media (max-width: 768px) {
    input[type="text"], input[type="date"], input[type="tel"],
    input[type="email"], input[type="password"],
    input[type="number"], select, textarea {
        font-size: 16px;
    }
}

/* --- SMALL PHONES (up to 380px) --- */
@media (max-width: 380px) {
    :root { --sidebar-width: 100%; --header-height: 50px; }
    .admin-header h1 { font-size: 11px; }
    .admin-header img { display: none; }
    .admin-actions .btn { padding: 2px 3px; font-size: 12px; min-height: 32px; min-width: 32px; max-width: 32px; }
    .sidebar-tab { padding: 5px 2px; }
    .sidebar-tab .tab-icon { font-size: 16px; }
    .sidebar-tab .tab-label { font-size: 8px; letter-spacing: 0; }
    .sidebar-panel { padding: 14px 12px; }
    .home-header .logo img { height: 60px; }
    .subtitle { font-size: 13px; }
    .card { padding: 18px 14px; }
    .card h2 { font-size: 17px; margin-bottom: 14px; }
    .user-bar { padding: 10px 12px; font-size: 12px; }
    .volunteer-header h1 { font-size: 13px; }
    .volunteers-list-header h1 { font-size: 13px; }
    .pricing-card { padding: 24px 16px; }
    .report-container { padding: 12px 8px; }
}

/* --- MOBILE (up to 768px) --- */
@media (max-width: 768px) {
    /* == Global mobile == */
    .btn { min-height: 44px; }
    .btn-sm { min-height: 40px; padding: 8px 12px; }
    .btn-icon { min-height: 40px; min-width: 40px; padding: 8px; }

    /* == Home view == */
    .home-grid { grid-template-columns: 1fr; }
    .home-events-card { order: -1; } /* Events first on mobile */
    .home-create-card { order: 1; }
    .home-container { padding: 20px 14px; }
    .credits-card-inner { flex-direction: column; text-align: center; gap: 12px; }
    .credits-card-left { justify-content: center; }
    .credits-card-right { justify-content: center; }
    .home-header { margin-bottom: 24px; }
    .home-header .logo img { height: 70px; }
    .subtitle { font-size: 14px; margin-top: 8px; }

    /* User bar - stack on mobile */
    .user-bar {
        flex-wrap: wrap; gap: 8px;
        padding: 12px 14px; font-size: 13px;
    }
    .user-bar > span:first-child {
        width: 100%; text-align: center;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .credits-badge {
        font-size: 12px; flex: 1;
        justify-content: center;
    }
    .user-bar-actions {
        display: flex; gap: 6px;
    }

    /* Event items */
    .event-item { padding: 12px; }
    .event-item-name { font-size: 13px; }
    .event-item-actions button { min-height: 36px; min-width: 36px; }

    /* == Admin view == */
    .admin-header {
        flex-wrap: nowrap;
        padding: 0 6px; gap: 4px;
        overflow: hidden;
    }
    .admin-header h1 {
        font-size: 12px; flex: 1; min-width: 0;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .admin-header img { height: 20px; flex-shrink: 0; }
    .admin-actions { flex-shrink: 0; gap: 1px; }
    .admin-actions .btn { padding: 2px 4px; font-size: 13px; min-height: 36px; min-width: 36px; max-width: 36px; }

    /* Sidebar - slide-in panel */
    .sidebar {
        position: absolute; top: 0; left: 0; bottom: 0;
        width: 88%; max-width: 380px; box-shadow: var(--shadow-lg);
        transform: translateX(-100%); transition: transform 0.3s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay {
        position: absolute; inset: 0; background: rgba(0,0,0,0.5);
        z-index: 400; display: none;
    }
    .sidebar-overlay.active { display: block; }

    /* Sidebar tabs - grid layout on mobile for many tabs */
    .sidebar-tabs {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2px; padding: 0;
    }
    .sidebar-tab {
        padding: 6px 2px; min-width: 0;
        font-size: 11px;
    }
    .sidebar-tab .tab-icon { font-size: 18px; }
    .sidebar-tab .tab-label { font-size: 9px; }

    /* Sidebar panels */
    .sidebar-panel { padding: 16px 14px; }
    .sidebar-panel h3 { font-size: 12px; margin: 16px 0 8px; }

    /* Object grid - bigger touch targets */
    .object-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px;
    }
    .object-type-btn { padding: 10px 4px; font-size: 11px; min-height: 64px; }
    .object-type-btn .icon { font-size: 22px; }

    /* Share link */
    .share-link-container { flex-wrap: nowrap; }
    .share-link-container input { font-size: 11px; padding: 8px 10px; min-width: 0; }

    /* Admin code */
    .admin-code-container { flex-wrap: wrap; }
    .admin-code-value { font-size: 16px; letter-spacing: 3px; padding: 6px 10px; }

    /* Collapsible + items - bigger touch targets */
    .collapsible-header { padding: 12px; min-height: 44px; }
    .marker-item, .volunteer-item { padding: 10px 12px; }
    .marker-item-actions button, .volunteer-item-actions button {
        padding: 6px 8px; font-size: 16px; min-height: 36px; min-width: 36px;
    }

    /* Volunteer detail row */
    .volunteer-detail-row { flex-wrap: wrap; gap: 6px; }
    .volunteer-detail-row select { width: 100%; flex: none; min-height: 40px; font-size: 14px; }

    /* Checkin controls */
    .checkin-controls { flex-wrap: wrap; gap: 6px; }
    .checkin-controls .btn { flex: 1; min-width: 0; }
    .attendance-label { width: 100%; justify-content: center; }

    /* Parcours items */
    .parcours-item { padding: 10px 8px; gap: 8px; }

    /* Placing indicator */
    .placing-text { font-size: 12px; padding: 10px; }

    /* Recap table */
    .recap-table { font-size: 13px; }
    .recap-table th, .recap-table td { padding: 8px 6px; }
    .recap-actions { flex-wrap: wrap; }
    .recap-actions .btn { flex: 1; min-width: 0; }

    /* == Volunteer view == */
    .volunteer-header { padding: 0 10px; gap: 8px; }
    .volunteer-header h1 { font-size: 14px; }
    .volunteer-header .btn { min-height: 40px; min-width: 40px; }

    .volunteer-body { flex-direction: column; }
    .volunteer-body .map-container { flex: 1; min-height: 0; height: 100%; }

    /* Drawer panel mobile overrides */
    #volunteer-panel {
        padding: 8px 16px 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .vol-identity { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
    .vol-identity h2 { font-size: 16px; }
    .role-badge { font-size: 11px; padding: 4px 10px; }

    /* Position cards */
    .position-card { padding: 12px; }
    .position-card-name { font-size: 13px; }
    .position-card-instructions { font-size: 12px; }
    .btn-navigate { padding: 12px 20px; font-size: 14px; min-height: 44px; }

    /* Mission items */
    .mission-item { padding: 10px 8px; font-size: 13px; gap: 8px; }

    /* Vol notification/data actions */
    .vol-notif-actions .btn, .vol-data-actions .btn { min-height: 44px; font-size: 14px; }

    /* Bookmark banner */
    .bookmark-banner { font-size: 12px; padding: 10px 12px; gap: 8px; }

    /* == Join view == */
    .join-container { padding: 16px 14px; align-items: flex-start; padding-top: 40px; }
    .join-container .card { padding: 24px 18px; }
    .join-header h2 { font-size: 18px; }

    /* == Volunteers list view == */
    .volunteers-list-header { padding: 0 10px; }
    .volunteers-list-header h1 { font-size: 14px; }
    .volunteers-list-container { padding: 14px 10px; }

    .vlist-volunteer-card { padding: 12px 14px; }
    .vlist-vol-name { font-size: 14px; }
    .vlist-vol-meta { font-size: 11px; gap: 8px; }
    .vlist-vol-info { gap: 8px; }
    .vlist-registered-banner { padding: 12px 14px; font-size: 13px; gap: 8px; flex-wrap: wrap; }

    /* == Report view == */
    .report-container { padding: 14px 10px; }
    .report-header h1 { font-size: 17px; }
    #btn-export-report-pdf { width: 100%; min-height: 48px; font-size: 15px; }

    /* == Legal view == */
    .legal-container { padding: 16px 12px; }
    .legal-body { padding: 20px 16px; }
    .legal-header { gap: 10px; }
    .legal-footer-links { flex-wrap: wrap; gap: 16px; }

    /* == Modals == */
    #modal { max-width: 95vw; max-height: 85vh; }
    #modal-body { padding: 18px 16px; }
    .modal-header { padding: 14px 16px; }
    .modal-header h3 { font-size: 16px; }

    /* == Toast == */
    #toast-container { top: 10px; right: 10px; left: 10px; }
    .toast { max-width: 100%; font-size: 13px; padding: 12px 16px; }

    /* == Cookie banner == */
    .cookie-banner { padding: 12px 14px; }
    .cookie-banner-content { gap: 10px; }
    .cookie-banner-content p { font-size: 12px; min-width: 0; }
    .cookie-banner-actions { width: 100%; }
    .cookie-banner-actions .btn { flex: 1; }

    /* == PWA banner == */
    .pwa-banner { padding: 10px 14px; font-size: 13px; gap: 8px; flex-wrap: wrap; justify-content: center; }

    /* == Time slots == */
    .slot-item { padding: 10px 8px; }
    .slot-header { flex-wrap: wrap; gap: 4px; }
    .slot-actions { gap: 4px; flex-wrap: wrap; }
    .slot-actions .btn { font-size: 12px; min-height: 36px; padding: 6px 10px; }

    /* == Payment success == */
    .payment-success-card { padding: 28px 20px; }
    .payment-success-card h2 { font-size: 20px; }
    .payment-success-icon { width: 56px; height: 56px; font-size: 28px; }

    /* == Leaflet popup mobile == */
    .leaflet-popup-content { max-width: 260px !important; }
    .marker-popup .popup-actions { flex-wrap: wrap; gap: 4px; }
    .marker-popup .popup-actions button { min-height: 40px; flex: 1; font-size: 13px; padding: 8px 10px; }

    /* == Color picker (modal) == */
    .color-picker { gap: 6px; }
    .color-swatch { width: 36px; height: 36px; }
}

/* --- DESKTOP --- */
@media (min-width: 769px) {
    .sidebar-overlay { display: none !important; }
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 10000;
    background: var(--bg-card); border-top: 1px solid var(--border);
    padding: 16px 24px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.cookie-banner-content {
    max-width: 900px; margin: 0 auto;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.cookie-banner-content p { flex: 1; font-size: 13px; color: var(--text-muted); margin: 0; min-width: 200px; }
.cookie-banner-actions { display: flex; gap: 8px; }
.cookie-link { color: var(--primary); text-decoration: underline; }

/* ===== LEGAL VIEW ===== */
.legal-container { max-width: 800px; margin: 0 auto; padding: 24px 16px; }
.legal-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.legal-body { padding: 32px; }
.legal-text h3 { margin-top: 24px; margin-bottom: 8px; font-size: 16px; color: var(--text); }
.legal-text p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.legal-text ul { margin: 8px 0 16px 24px; }
.legal-text li { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 4px; }
.legal-footer-links {
    display: flex; gap: 24px; justify-content: center;
    margin-top: 32px; padding: 16px 0;
}
.legal-footer-links a { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.legal-footer-links a:hover { color: var(--primary); }

/* ===== CONSENT LABEL ===== */
.consent-label { margin: 12px 0; }
.consent-label span { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.consent-label a { color: var(--primary); text-decoration: underline; }

/* ===== USER BAR ACTIONS ===== */
.user-bar-actions { display: flex; gap: 8px; }

/* ===== CREDITS BADGE ===== */
.credits-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 20px;
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 12px; color: var(--text-muted);
}
.credits-badge #user-credits {
    font-weight: 700; color: var(--primary); font-size: 14px;
}
.btn-xs {
    padding: 2px 8px; font-size: 11px; border-radius: 4px;
}

/* ===== VOLUNTEER DATA ACTIONS ===== */
.vol-data-actions { padding: 8px 0; text-align: center; }
.vol-notif-actions { text-align: center; }

/* ===== PWA INSTALL BANNER ===== */
.pwa-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 12px 20px; padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: var(--bg-card); border-top: 1px solid var(--border);
    font-size: 14px; color: var(--text);
}
.pwa-banner.hidden { display: none; }

/* ===== ANNOUNCEMENTS ===== */
.announcement-form textarea {
    width: 100%; resize: vertical; min-height: 60px; margin-bottom: 8px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
    color: var(--text); padding: 8px; font-family: inherit; font-size: 13px;
}
.announcement-item {
    position: relative; padding: 10px 28px 10px 10px;
    border-bottom: 1px solid var(--border); font-size: 13px;
}
.announcement-item.unread { border-left: 3px solid var(--primary); background: rgba(37, 99, 235, 0.05); }
.announcement-time { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.announcement-message { white-space: pre-wrap; word-break: break-word; }
.announcement-delete {
    position: absolute; top: 8px; right: 6px; background: none; border: none;
    color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1;
}
.announcement-delete:hover { color: var(--danger); }
.badge-notif {
    background: var(--danger); color: #fff; font-size: 11px;
    padding: 1px 6px; border-radius: 10px; font-weight: 600;
}

/* ===== VOLUNTEER PRESENCE ===== */
.vol-presence { margin-bottom: 12px; }
.vol-presence-confirmed {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px; border-radius: var(--radius);
    background: var(--success-light); color: var(--success);
    font-size: 16px; font-weight: 700;
    border: 2px solid rgba(0, 230, 118, 0.3);
}
.vol-presence-icon { font-size: 22px; }

/* ===== QR CODE ===== */
.vol-qrcode { text-align: center; padding: 12px 0; }
.qr-wrapper img { border-radius: 8px; background: #fff; padding: 8px; }
.qr-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.badge-success { background: var(--success); color: #fff; }

/* ===== CHECK-IN ===== */
.checkin-controls { display: flex; align-items: center; gap: 8px; }
.attendance-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.checkin-checkbox { cursor: pointer; }
.checkin-checkbox input { width: 16px; height: 16px; cursor: pointer; }
#qr-scanner-area { text-align: center; }
#qr-video { border-radius: 8px; }

/* ===== TIME SLOTS ===== */
.slot-date-group { margin-bottom: 12px; }
.slot-date-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; }
.slot-item {
    padding: 8px 10px; margin-bottom: 4px; background: var(--bg-card);
    border-radius: 6px; font-size: 13px;
}
.slot-item.slot-full { opacity: 0.7; }
.slot-header { display: flex; justify-content: space-between; align-items: center; }
.slot-time { font-weight: 600; }
.slot-fill { font-size: 11px; color: var(--text-muted); }
.slot-name { margin: 2px 0 4px; }
.slot-actions { display: flex; gap: 4px; }
.slot-card {
    padding: 10px; margin-bottom: 6px; background: var(--bg-card);
    border-radius: 6px;
}
.slot-card-time { font-weight: 600; font-size: 14px; }
.slot-card-name { font-size: 13px; margin: 2px 0; }
.slot-card-date { font-size: 11px; color: var(--text-muted); }
.slot-availability { cursor: default; }
.badge-avail {
    display: inline-block; font-size: 10px; padding: 2px 6px;
    border-radius: 10px; background: #10b981; color: #fff;
    font-weight: 600; margin-left: 4px; vertical-align: middle;
}
.badge-avail-small {
    display: inline-block; font-size: 10px; padding: 1px 5px;
    border-radius: 8px; background: rgba(16, 185, 129, 0.2); color: #10b981;
    font-weight: 600; margin-left: 4px;
}
#btn-enable-notif.active { background: var(--success); color: #fff; border-color: var(--success); opacity: 0.7; }

/* ===== REPORT ===== */
.report-container { max-width: 900px; margin: 0 auto; padding: 20px; }
.report-header { text-align: center; margin-bottom: 24px; }
.report-header h1 { font-size: 22px; margin-top: 8px; font-family: 'Fugaz One', cursive; }
.report-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px;
}
@media (min-width: 600px) {
    .report-grid { grid-template-columns: repeat(4, 1fr); }
}
.report-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px 16px; text-align: center;
    border-left: 4px solid var(--card-accent, var(--border));
    position: relative; overflow: hidden;
}
.report-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--card-accent, transparent) 0%, transparent 60%);
    opacity: 0.08; pointer-events: none;
}
.report-card--blue { --card-accent: #2563eb; }
.report-card--green { --card-accent: #00E676; }
.report-card--amber { --card-accent: #f59e0b; }
.report-card--purple { --card-accent: #8b5cf6; }
.report-icon { font-size: 28px; margin-bottom: 4px; }
.report-metric {
    font-size: 36px; font-weight: 700; font-family: 'Fugaz One', cursive;
    color: var(--card-accent, #fff); line-height: 1.1;
}
@media (min-width: 600px) { .report-metric { font-size: 42px; } }
.report-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.report-charts { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) {
    .report-charts { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}
.report-chart-box { padding: 20px; min-height: 280px; }
.report-chart-box h3 { font-size: 14px; margin-bottom: 12px; color: #e5e7eb; font-weight: 600; }

/* ===== LANDING PAGE ===== */
#view-landing.active, #view-legal.active, #view-report.active, #view-join.active { height: 100vh; height: 100dvh; overflow-y: auto; }
#view-payment-success.active { display: flex; align-items: center; justify-content: center; }
.landing { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }

.landing-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; position: sticky; top: 0; z-index: 100;
    background: rgba(10, 10, 10, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.landing-nav.scrolled {
    background: rgba(10, 10, 10, 0.98);
    border-bottom-color: var(--border);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.landing-nav-logo { height: 28px; }
.landing-nav .btn { min-height: 44px; }

/* Hero */
.landing-hero {
    text-align: center; padding: 48px 20px 40px;
    max-width: 600px; margin: 0 auto;
    position: relative; overflow: hidden;
}
.hero-video-wrap {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
    border-radius: var(--radius-lg);
}
.hero-video {
    width: 100%; height: 100%; object-fit: cover;
}
.hero-video-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.8) 100%);
}
.hero-content { position: relative; z-index: 1; }
.landing-hero-logo { width: 90px; height: 90px; margin-bottom: 20px; }
.landing-hero h1 {
    font-family: 'Fugaz One', cursive;
    font-size: clamp(26px, 6vw, 42px);
    color: var(--text-primary); line-height: 1.15; margin-bottom: 16px;
}
.landing-hero-sub {
    font-size: clamp(14px, 3.2vw, 17px); color: var(--text-secondary); line-height: 1.6;
    margin-bottom: 28px; max-width: 480px; margin-left: auto; margin-right: auto;
}
.landing-cta-btn { min-height: 52px; font-size: 16px; }
.landing-hero-trust {
    margin-top: 14px; font-size: 12px; color: var(--text-muted); letter-spacing: 0.3px;
}

/* Social Proof Bar */
.social-proof-bar {
    display: flex; justify-content: center; align-items: center; gap: 32px;
    padding: 24px 16px;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}
.social-proof-item { text-align: center; min-width: 100px; }
.social-proof-number {
    font-family: 'Fugaz One', cursive; font-size: clamp(24px, 5vw, 36px);
    color: var(--text-primary); display: inline;
}
.social-proof-label {
    display: block; font-size: 11px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}

/* How It Works */
.how-it-works {
    padding: 48px 20px; max-width: 900px; margin: 0 auto;
}
.how-it-works h2 {
    font-family: 'Fugaz One', cursive;
    font-size: clamp(22px, 5vw, 32px);
    text-align: center; margin-bottom: 36px; color: var(--text-primary);
}
.steps-grid {
    display: grid; grid-template-columns: 1fr; gap: 20px;
}
.step-card {
    text-align: center; padding: 24px 16px; position: relative;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}
.step-number {
    width: 36px; height: 36px; border-radius: 50%;
    background: #fff; color: #0A0A0A;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px;
    margin: 0 auto 12px;
}
.step-icon { font-size: 32px; display: block; margin-bottom: 10px; }
.step-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.step-card p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Features */
.landing-features {
    padding: 48px 20px; max-width: 1000px; margin: 0 auto;
}
.landing-features h2 {
    font-family: 'Fugaz One', cursive;
    font-size: clamp(22px, 5vw, 32px);
    text-align: center; margin-bottom: 32px; color: var(--text-primary);
}
.features-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius); padding: 20px 16px; text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.feature-icon { font-size: 32px; display: block; margin-bottom: 10px; }
.feature-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.feature-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* Pricing */
.landing-pricing {
    padding: 48px 20px; text-align: center;
    background: rgba(255,255,255,0.02);
}
.landing-pricing h2 {
    font-family: 'Fugaz One', cursive;
    font-size: clamp(22px, 5vw, 32px);
    margin-bottom: 28px; color: var(--text-primary);
}
.pricing-card {
    max-width: 400px; margin: 0 auto;
    background: var(--bg-card); border: 2px solid var(--primary);
    border-radius: var(--radius-lg); padding: 32px 24px;
}
.pricing-amount {
    font-size: clamp(48px, 10vw, 72px); font-weight: 800; color: var(--text-primary);
    line-height: 1; margin-bottom: 20px;
}
.pricing-currency { font-size: clamp(24px, 5vw, 36px); vertical-align: super; }
.pricing-per { font-size: 16px; font-weight: 400; color: var(--text-muted); }
.pricing-features {
    list-style: none; padding: 0; margin: 0 0 24px;
    text-align: left;
}
.pricing-features li {
    padding: 8px 0; font-size: 14px; color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-trust {
    margin-top: 12px; font-size: 12px; color: var(--text-muted);
}

/* Final CTA */
.landing-final-cta {
    padding: 48px 20px; text-align: center;
    max-width: 600px; margin: 0 auto;
}
.landing-final-cta h2 {
    font-family: 'Fugaz One', cursive;
    font-size: clamp(22px, 5vw, 32px);
    margin-bottom: 12px; color: var(--text-primary);
}
.landing-final-cta p {
    font-size: 15px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.5;
}

/* Footer */
.landing-footer {
    padding: 32px 20px 80px; border-top: 1px solid var(--border-subtle);
}
.landing-footer-content {
    max-width: 600px; margin: 0 auto; text-align: center;
}
.landing-footer-logo { height: 24px; margin-bottom: 16px; }
.landing-footer-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.landing-footer-links a { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.landing-footer-links a:hover { color: var(--primary); }
.landing-footer-copy { font-size: 11px; color: var(--text-muted); }

.btn-lg { padding: 14px 32px; font-size: 16px; min-height: 48px; }

/* Sticky CTA Mobile */
.sticky-cta {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    transform: translateY(0); transition: transform 0.3s ease;
}
.sticky-cta.hidden { transform: translateY(100%); }
.sticky-cta .btn { min-height: 48px; font-size: 16px; font-weight: 700; }

/* Auth Modal Overlay */
.auth-modal-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; opacity: 1; transition: opacity 0.3s;
}
.auth-modal-overlay.hidden { display: none; }
.auth-modal {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 32px 24px; width: 100%; max-width: 400px;
    border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    position: relative; max-height: 90vh; overflow-y: auto;
}
.auth-modal-close {
    position: absolute; top: 12px; right: 12px;
    font-size: 24px; color: var(--text-muted);
}
.auth-modal-header {
    text-align: center; margin-bottom: 24px;
}
.auth-modal-logo { width: 56px; height: 56px; margin-bottom: 12px; }
.auth-modal-header h2 {
    font-family: 'Fugaz One', cursive; font-size: 20px; color: var(--text-primary);
}
.auth-modal .form-group { margin-bottom: 14px; }
.auth-modal .btn { min-height: 48px; }
.auth-modal .auth-divider { margin: 18px 0; }
.auth-modal .auth-divider span { background: var(--bg-card); }

/* PWA Overlay */
.pwa-overlay {
    position: fixed; inset: 0; z-index: 10001;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.pwa-overlay.hidden { display: none; }
.pwa-overlay-content {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 40px 28px; width: 100%; max-width: 380px;
    text-align: center; border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.pwa-overlay-logo { width: 72px; height: 72px; margin-bottom: 16px; }
.pwa-overlay-content h2 {
    font-family: 'Fugaz One', cursive; font-size: 22px;
    margin-bottom: 10px; color: var(--text-primary);
}
.pwa-overlay-content > p {
    font-size: 14px; color: var(--text-muted); line-height: 1.5;
    margin-bottom: 24px;
}
.pwa-overlay-content .btn { margin-bottom: 10px; min-height: 48px; }
.pwa-ios-instructions {
    background: rgba(255,255,255,0.05); border-radius: var(--radius);
    padding: 16px; margin-bottom: 16px; text-align: left;
}
.pwa-ios-instructions p { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.pwa-ios-instructions ol { padding-left: 20px; margin: 0; }
.pwa-ios-instructions li { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 4px; }

/* Payment Success */
.payment-success-container {
    text-align: center; padding: 24px; width: 100%;
}
.payment-success-card {
    max-width: 400px; margin: 0 auto;
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 40px 28px; border: 1px solid var(--border);
}
.payment-success-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--success); color: #0A0A0A;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 700;
    margin: 0 auto 16px; animation: successPop 0.5s ease;
}
@keyframes successPop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.payment-success-card h2 {
    font-family: 'Fugaz One', cursive; font-size: 24px;
    margin-bottom: 8px; color: var(--success);
}
.payment-success-card > p {
    font-size: 15px; color: var(--text-muted); margin-bottom: 24px;
}
.payment-success-redirect {
    margin-top: 12px; font-size: 12px; color: var(--text-muted);
}

/* Desktop landing responsive */
@media (min-width: 768px) {
    .landing-nav { padding: 16px 32px; }
    .landing-hero { padding: 80px 24px 60px; }
    .landing-hero-logo { width: 110px; height: 110px; }
    .features-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .feature-card { padding: 28px; }
    .feature-card h3 { font-size: 16px; }
    .feature-card p { font-size: 13px; }
    .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .landing-features, .landing-pricing, .how-it-works { padding: 64px 24px; }
    .sticky-cta { display: none !important; } /* hide sticky CTA on desktop */
    .social-proof-bar { gap: 64px; padding: 32px 24px; }
}

/* ===== SEARCH INPUT ===== */
.search-input {
    width: 100%; padding: 8px 12px; margin-bottom: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 8px; color: #fff; font-size: 13px;
    outline: none; transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--primary); }
.search-input::placeholder { color: var(--text-muted); }

/* ===== PROGRESS BAR (Balisage) ===== */
.progress-bar-wrap { margin-bottom: 10px; }
.progress-bar-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.progress-bar-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.4s ease; }
.progress-bar-fill.complete { background: #22c55e; }

/* (Onboarding banner and weather widget removed) */

/* ===== ANNOUNCEMENT TARGET ===== */
.announcement-target-row {
    display: flex; align-items: center; gap: 8px;
    margin: 8px 0;
}
.announcement-target-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.announcement-target-select {
    flex: 1; padding: 4px 8px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 6px;
    color: #fff; font-size: 12px;
}
.announcement-role-badge {
    display: inline-block; font-size: 10px; padding: 1px 6px;
    border-radius: 4px; background: rgba(99,102,241,0.2);
    color: var(--primary); margin-left: 6px;
}

/* ===== CHAT ===== */
.chat-select-wrap { margin-bottom: 8px; }
.chat-target-select {
    width: 100%; padding: 8px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: 8px;
    color: #fff; font-size: 13px;
}
.chat-messages {
    min-height: 120px; max-height: 300px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 6px;
    padding: 8px 0; margin-bottom: 8px;
}
.chat-msg {
    max-width: 85%; padding: 8px 12px; border-radius: 12px;
    font-size: 13px; line-height: 1.4; word-break: break-word;
}
.chat-msg.sent {
    align-self: flex-end; background: #333; color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg.received {
    align-self: flex-start; background: var(--bg-input);
    border: 1px solid var(--border); color: #fff;
    border-bottom-left-radius: 4px;
}
.chat-msg-time { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.chat-form {
    display: flex; gap: 6px;
}
.chat-form input {
    flex: 1; padding: 8px 12px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: 8px;
    color: #fff; font-size: 13px; outline: none;
}
.chat-form input:focus { border-color: var(--primary); }
.chat-form button { padding: 8px 14px; border-radius: 8px; font-size: 16px; }
.chat-unread-dot {
    width: 8px; height: 8px; background: #e63946;
    border-radius: 50%; display: inline-block; margin-left: 4px;
}

/* ===== CSV IMPORT ===== */
.csv-preview-table {
    width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0;
}
.csv-preview-table th, .csv-preview-table td {
    padding: 6px 8px; border: 1px solid var(--border); text-align: left;
}
.csv-preview-table th { background: rgba(255,255,255,0.05); font-weight: 600; }
.csv-preview-table .csv-duplicate { background: rgba(230,57,70,0.15); }

/* ===== DUPLICATE BADGE ===== */
.duplicate-warning {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; margin: 8px 0;
    background: rgba(230,57,70,0.1); border: 1px solid rgba(230,57,70,0.3);
    border-radius: 8px; font-size: 12px; color: #e63946;
}

/* ===== ACTIVITY LOG ===== */
.activity-log { max-height: 500px; overflow-y: auto; }
.activity-item {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 8px 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; color: #fff; display: block; }
.activity-meta { font-size: 11px; color: var(--text-muted); }

/* ===== Volunteer Groups ===== */
.groups-section { margin-bottom: 16px; }
.groups-section h3 { font-size: 12px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.group-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-input); border-radius: 8px;
    padding: 8px 12px; margin-bottom: 6px;
}
.group-color-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.group-name { font-weight: 600; font-size: 13px; flex: 1; }
.group-count { font-size: 11px; color: var(--text-muted); }

.color-palette { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.color-swatch {
    width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent;
    cursor: pointer; transition: all 0.2s;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.4); }

.vol-group-select {
    background: var(--bg-input); color: #fff; border: 1px solid var(--border);
    border-radius: 6px; padding: 2px 6px; font-size: 11px; cursor: pointer;
}

/* ===== Chat Mode Toggle ===== */
.chat-mode-toggle { display: flex; gap: 4px; margin-bottom: 12px; }
.chat-mode-btn {
    flex: 1; padding: 8px; border: 1px solid var(--border); background: var(--bg-input);
    color: var(--text-muted); border-radius: 8px; cursor: pointer; font-size: 12px;
    font-weight: 600; transition: all 0.2s;
}
.chat-mode-btn.active { background: #333; color: #fff; border-color: #555; }

.chat-sender { font-size: 10px; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }

#chat-group-select { margin-bottom: 8px; }
#chat-group-dropdown {
    width: 100%; background: var(--bg-input); color: #fff; border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 12px; font-size: 13px;
}

/* ===== QR CODE ===== */
.qr-container { text-align: center; padding: 16px; }
.qr-container img { border-radius: 8px; background: #fff; padding: 12px; }
.qr-url { font-size: 11px; color: var(--text-muted); word-break: break-all; margin: 12px 0; padding: 8px; background: var(--bg-input); border-radius: 6px; }
.qr-actions { display: flex; gap: 8px; margin-top: 12px; }
.qr-actions .btn { flex: 1; }

/* ===== EVENT LOGO ===== */
.logo-upload-preview { max-height: 80px; border-radius: 6px; margin-top: 8px; }
.logo-upload-area { display: flex; align-items: center; gap: 12px; margin-top: 8px; }

/* ===== DASHBOARD ===== */
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.dashboard-kpi { background: var(--bg-input); border-radius: 10px; padding: 14px; text-align: center; border-left: 3px solid var(--kpi-color, var(--border)); }
.dashboard-kpi .kpi-icon { font-size: 20px; margin-bottom: 4px; }
.dashboard-kpi .kpi-value { font-size: 24px; font-weight: 700; font-family: 'Fugaz One', cursive; color: var(--kpi-color, #fff); }
.dashboard-kpi .kpi-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.dashboard-section { margin-bottom: 16px; }
.dashboard-section h4 { font-size: 12px; text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px; letter-spacing: 0.5px; }
.dashboard-alert { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(230,57,70,0.08); border-radius: 6px; margin-bottom: 4px; font-size: 12px; color: #f87171; }
.dashboard-activity-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 12px; color: var(--text-muted); }

/* ===== ADMIN TEAM (Multi-admin) ===== */
.admin-team-list { margin: 12px 0; }
.admin-team-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-input); border-radius: 8px; margin-bottom: 6px; }
.admin-team-name { flex: 1; font-size: 13px; font-weight: 600; }
.admin-team-role { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: rgba(255,255,255,0.08); color: var(--text-muted); }
.admin-invite-code { font-family: 'DM Mono', monospace; font-size: 24px; font-weight: 700; color: #D4AF37; letter-spacing: 4px; text-align: center; padding: 12px; background: var(--bg-input); border-radius: 8px; margin: 8px 0; }

/* ===== PLANNING TIMELINE (F5) ===== */
.planning-toggle { display: flex; gap: 4px; margin-bottom: 12px; }
.planning-toggle-btn { flex: 1; padding: 6px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted); border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 600; }
.planning-toggle-btn.active { background: #333; color: #fff; border-color: #555; }
.timeline-axis { position: relative; height: 24px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.timeline-tick { position: absolute; bottom: 0; font-size: 9px; color: var(--text-muted); transform: translateX(-50%); }
.timeline-bars { position: relative; min-height: 60px; }
.timeline-bar { position: absolute; height: 28px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; padding: 0 8px; font-size: 10px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: 0.9; transition: opacity 0.2s; }
.timeline-bar:hover { opacity: 1; }
.timeline-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,0.15); border-radius: 4px 0 0 4px; }

/* ===== PUBLIC EVENT PAGE (F15) ===== */
#view-public-event { overflow-y: auto; }
.public-event-container { max-width: 600px; margin: 0 auto; padding: 24px 16px; }
.public-event-hero { text-align: center; margin-bottom: 20px; }
.public-event-logo-img { max-height: 80px; margin-bottom: 12px; }
.public-event-hero h1 { font-family: 'Fugaz One', cursive; font-size: 28px; margin: 0 0 4px; }
.public-event-date { color: var(--text-muted); font-size: 14px; }
.public-event-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.public-stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
.public-stat-value { font-size: 28px; font-weight: 700; font-family: 'Fugaz One', cursive; color: #D4AF37; }
.public-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; }
.public-event-cta { margin-bottom: 24px; }
.public-event-footer { text-align: center; color: var(--text-muted); font-size: 12px; }

/* ===== BUDDY PREFERENCE ===== */
.buddy-pref-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2); border-radius: 6px; font-size: 12px; color: #a5b4fc; margin-top: 6px; }

/* ===== AFFECTATION WORKSPACE ===== */
.affect-header { margin-bottom: 12px; }
.affect-summary { display: flex; gap: 12px; margin-top: 8px; font-size: 11px; color: var(--text-muted); }
.affect-summary .affect-progress { display: flex; align-items: center; gap: 4px; }
.affect-summary .affect-bar { width: 60px; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.affect-summary .affect-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.affect-section { margin-bottom: 16px; }
.affect-section-title { font-size: 12px; text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; letter-spacing: 0.5px; }
.affect-badge { font-size: 10px; background: rgba(255,255,255,0.1); padding: 1px 6px; border-radius: 10px; font-weight: 700; }
.affect-vol-card, .affect-post-card { background: var(--bg-input); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; }
.affect-vol-card { display: flex; flex-direction: column; gap: 6px; }
.affect-vol-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.affect-vol-missions-btn { align-self: flex-start; font-size: 10px !important; padding: 2px 8px !important; }
.affect-vol-missions { background: rgba(255,255,255,0.03); border-radius: 6px; padding: 6px 8px; }
.affect-vol-mission-item { font-size: 11px; color: var(--text-muted); padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.affect-vol-name { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.affect-vol-count { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.affect-vol-count.zero { background: rgba(239,68,68,0.15); color: #f87171; }
.affect-vol-count.ok { background: rgba(34,197,94,0.15); color: #4ade80; }
.affect-vol-buddy { font-size: 10px; width: 100%; margin-top: 2px; }
.affect-vol-buddy-wish { color: var(--text-muted); font-style: italic; }
.affect-vol-buddy-confirmed { color: #4ade80; }
.affect-vol-buddy-select { width: 100%; margin-top: 4px; }
.affect-buddy-dropdown { width: 100%; font-size: 11px; padding: 4px 8px; background: var(--bg-dark); color: var(--text); border: 1px solid var(--border); border-radius: 6px; }
.affect-vol-role { font-size: 9px; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.06); color: var(--text-muted); text-transform: uppercase; }
.affect-post-card { position: relative; transition: background 0.2s; }
.affect-post-card:hover { background: rgba(255,255,255,0.06); }
.affect-post-label { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.affect-post-instructions { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.affect-post-assigned { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.affect-assigned-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; background: rgba(34,197,94,0.12); color: #4ade80; border-radius: 10px; }
.affect-assigned-tag .affect-remove { cursor: pointer; opacity: 0.6; font-size: 14px; line-height: 1; }
.affect-assigned-tag .affect-remove:hover { opacity: 1; color: #f87171; }
.affect-post-uncovered { font-size: 11px; color: #f87171; font-weight: 600; margin-bottom: 6px; }
.affect-post-actions { position: relative; }
.affect-search-assign { position: relative; width: 100%; }
.affect-search-input { width: 100%; font-size: 12px; padding: 6px 10px; background: var(--bg-dark); color: var(--text); border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; }
.affect-search-input:focus { border-color: #D4AF37; outline: none; }
.affect-search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 100; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; margin-top: 2px; max-height: 180px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.affect-search-results:empty { display: none; }
.affect-search-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; cursor: pointer; font-size: 12px; transition: background 0.15s; }
.affect-search-item:hover { background: rgba(255,255,255,0.06); }
.affect-search-name { flex: 1; font-weight: 500; }
.affect-search-count { font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 700; margin-left: 6px; white-space: nowrap; }
.affect-search-count.ok { background: rgba(34,197,94,0.15); color: #4ade80; }
.affect-search-count.zero { background: rgba(239,68,68,0.15); color: #f87171; }
.affect-search-empty { padding: 8px 10px; font-size: 11px; color: var(--text-muted); text-align: center; }
