@charset "UTF-8";
/* ============================================================
   District Manager — Global Stylesheet
   Rotary Brand Colors from .claude/skills/rotary.md
   ============================================================ */

:root {
    --rotary-blue:  #0067c8;
    --rotary-gold:  #f7a81b;
    --azure:        #0067c8;
    --sky-blue:     #00a2e0;
    --cranberry:    #d41367;
    --cardinal:     #e02927;
    --turquoise:    #00adbb;
    --slate:        #657f99;
    --charcoal:     #54565a;
    --silver:       #d0cfcd;
    --rotary-dark:  #0d2d5e;
    --bg-light:     #f5f6fa;
}

/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--charcoal);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Navbar ────────────────────────────────────────────────── */
.district-navbar,
.bg-body-tertiary {
    background: #fff !important;
    border-bottom: 1px solid rgba(23, 69, 143, 0.1);
    box-shadow: 0 8px 24px rgba(13, 45, 94, 0.08) !important;
    min-height: 58px;
    padding: 5px 0;
}

.district-navbar .container-fluid {
    gap: 12px;
}

.district-logo-crop {
    display: inline-flex;
    overflow: hidden;
}


.navbar-logo {
    display: block;
    height: 48px;
    object-fit: contain;
    width: auto;
}

.district-logo-number {
    align-items: center;
    background-color: #ffffff;
    display: inline-flex;
    font-family: Frutiger, "Open Sans";
    font-size: 1.1rem;
    line-height: 1;
    transform: translateY(1px);
}

.district-logo-number.is-rotary {
    color: #17458f;
}

.district-logo-number.is-rotaract {
    color: var(--cranberry);
}

@media (max-width: 575px) {

    .navbar-logo {
        height: 40px;
    }

    .district-logo-number {
        font-size: 0.96rem;
        padding-left: 0;
    }
}

.district-separator {
    background: rgba(13, 45, 94, 0.22);
    display: inline-block;
    height: 30px;
    margin-left: 10px;
    width: 1px;
}

.district-text {
    color: var(--rotary-dark) !important;
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    margin-left: 8px;
    vertical-align: middle;
}

.navbar-brand,
.district-brand {
    color: var(--rotary-dark) !important;
    display: flex;
    align-items: center;
    min-width: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* ── Global Search (nav autocomplete) ───────────────────────── */
.navbar-search-shell {
    position: relative;
    flex: 1;
    max-width: 420px;
    min-width: 0;
}

@media (max-width: 767px) {
    .district-navbar .container-fluid {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .navbar-search-shell {
        order: 3;
        flex: 0 0 100%;
        max-width: none;
        margin: 0 !important;
    }
}

.navbar-search-form {
    display: flex;
    gap: 6px;
    align-items: stretch;
    width: 100%;
}

.navbar-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.navbar-search-field .navbar-search-icon {
    position: absolute;
    left: 14px;
    color: var(--slate);
    pointer-events: none;
    font-size: 0.95rem;
    transition: color 0.18s ease;
}

.navbar-search-shell.is-open .navbar-search-field .navbar-search-icon {
    color: var(--rotary-blue);
}

.navbar-search-input {
    width: 100%;
    padding: 0.55rem 2.6rem 0.55rem 2.4rem !important;
    height: 40px;
    border-radius: 999px !important;
    border: 1px solid rgba(0, 103, 200, 0.16) !important;
    background: #f3f7fb !important;
    font-size: 0.9rem !important;
    box-shadow: inset 0 1px 2px rgba(13, 45, 94, 0.04);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease;
}

.navbar-search-input:focus {
    background: #fff !important;
    border-color: rgba(0, 103, 200, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(0, 103, 200, 0.12), 0 6px 22px -10px rgba(13, 45, 94, 0.25) !important;
    outline: none;
}

.navbar-search-input::-webkit-search-cancel-button,
.navbar-search-input::-webkit-search-decoration,
.navbar-search-input::-ms-clear {
    appearance: none;
    -webkit-appearance: none;
    display: none;
}

.navbar-search-clear {
    position: absolute;
    right: 10px;
    width: 22px;
    height: 22px;
    background: rgba(13, 45, 94, 0.06);
    border: 0;
    border-radius: 50%;
    color: var(--slate);
    padding: 0;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: background 0.16s ease, color 0.16s ease;
}

.navbar-search-clear:hover {
    background: rgba(212, 19, 103, 0.12);
    color: var(--cranberry);
}

.navbar-search-clear[hidden] { display: none; }

.navbar-search-hint {
    position: absolute;
    right: 10px;
    font-family: 'Open Sans', monospace;
    font-size: 0.7rem;
    background: #fff;
    border: 1px solid rgba(0, 103, 200, 0.18);
    color: var(--slate);
    border-radius: 6px;
    padding: 1px 7px;
    line-height: 1.4;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(13, 45, 94, 0.05);
}

.navbar-search-shell:focus-within .navbar-search-hint,
.navbar-search-clear:not([hidden]) ~ .navbar-search-hint { display: none; }

.navbar-search-button {
    border-radius: 999px !important;
    background: #f3f7fb !important;
    color: var(--rotary-blue) !important;
    border: 1px solid rgba(0, 103, 200, 0.16) !important;
    height: 40px;
    padding: 0 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.navbar-search-button:hover {
    background: #fff !important;
    border-color: rgba(0, 103, 200, 0.45) !important;
    color: var(--rotary-dark) !important;
}

.navbar-search-button:active,
.navbar-search-button:focus-visible {
    background: rgba(0, 103, 200, 0.08) !important;
    border-color: rgba(0, 103, 200, 0.55) !important;
    color: var(--rotary-blue) !important;
    outline: none;
}

.navbar-search-button-label { line-height: 1; }

@media (max-width: 575px) {
    .navbar-search-button-label { display: none; }
    .navbar-search-button { padding: 0 !important; width: 40px; }
}

.navbar-search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(13, 45, 94, 0.08);
    box-shadow: 0 24px 60px -20px rgba(13, 45, 94, 0.28), 0 8px 20px -10px rgba(13, 45, 94, 0.15);
    overflow: hidden;
    z-index: 1080;
    animation: navbarSearchDropIn 0.16s ease-out;
}

@keyframes navbarSearchDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
    .navbar-search-dropdown {
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        max-height: 70vh;
        border-radius: 12px;
    }

    .navbar-search-dropdown-body {
        max-height: calc(70vh - 60px);
    }

    .navbar-search-dropdown-footer {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 0.7rem;
    }

    .navbar-search-dropdown-link {
        margin-left: auto;
    }
}

@media (max-width: 575px) {
    .navbar-search-form {
        gap: 4px;
    }

    .navbar-search-input {
        padding-right: 2.2rem !important;
        font-size: 0.88rem !important;
    }

    .navbar-search-hint {
        display: none;
    }
}

.navbar-search-dropdown-body {
    max-height: 56vh;
    overflow-y: auto;
    padding: 6px 0;
}

.navbar-search-dropdown-body::-webkit-scrollbar { width: 8px; }
.navbar-search-dropdown-body::-webkit-scrollbar-thumb {
    background: rgba(13, 45, 94, 0.15);
    border-radius: 999px;
}

.navbar-search-hint-state {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 18px;
}

.navbar-search-hint-icon {
    color: var(--rotary-blue);
    font-size: 0.95rem;
    opacity: 0.7;
    flex: 0 0 auto;
}

.navbar-search-hint-copy {
    color: var(--slate);
    font-size: 0.82rem;
    line-height: 1.4;
}

.navbar-search-loading {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 22px 18px;
    color: var(--slate);
    font-size: 0.9rem;
}

.navbar-search-loading .spinner-border { color: var(--rotary-blue); }

.navbar-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 26px 18px;
    text-align: center;
    color: var(--slate);
}

.navbar-search-empty i {
    font-size: 1.6rem;
    color: var(--silver);
    margin-bottom: 4px;
}

.navbar-search-empty strong { color: var(--rotary-dark); font-size: 0.95rem; }
.navbar-search-empty span   { font-size: 0.82rem; }

.navbar-search-group { padding: 4px 0; }

.navbar-search-group + .navbar-search-group {
    border-top: 1px dashed rgba(13, 45, 94, 0.08);
    margin-top: 4px;
    padding-top: 8px;
}

.navbar-search-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 18px 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
    color: var(--slate);
    font-weight: 700;
}

.navbar-search-group-head i { color: var(--rotary-blue); margin-right: 4px; }
.navbar-search-group-count { font-weight: 600; color: var(--rotary-blue); }

.navbar-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 18px;
    text-decoration: none;
    color: inherit;
    transition: background 0.14s ease;
    position: relative;
}

.navbar-search-item:hover,
.navbar-search-item.is-active {
    background: linear-gradient(90deg, rgba(0, 103, 200, 0.06), rgba(247, 168, 27, 0.04));
    color: inherit;
}

.navbar-search-item.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--rotary-gold);
}

.navbar-search-item-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 38px;
    background: #f3f7fb;
    box-shadow: inset 0 0 0 1px rgba(13, 45, 94, 0.08);
}

.navbar-search-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-search-item-avatar.is-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf3f8;
    color: #91a5b8;
}

.navbar-search-item-avatar.is-placeholder i {
    font-size: 1.65rem;
    line-height: 1;
}

.navbar-search-item-thumb {
    position: relative;
    width: 56px;
    height: 42px;
    flex: 0 0 56px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #eaf2fb;
    box-shadow: inset 0 0 0 1px rgba(13, 45, 94, 0.08);
    overflow: hidden;
}

.navbar-search-item-thumb-date {
    position: absolute;
    left: 4px;
    bottom: 4px;
    background: rgba(13, 45, 94, 0.82);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 4px;
}

.navbar-search-item-desc {
    color: var(--charcoal);
    font-size: 0.75rem;
    line-height: 1.35;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-search-item-desc mark { background: rgba(247, 168, 27, 0.32); color: inherit; padding: 0 1px; border-radius: 3px; }

.navbar-search-item-datechip {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(0, 103, 200, 0.06);
    color: var(--rotary-dark);
    flex: 0 0 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.navbar-search-item-datechip-day {
    margin-top: 1px;
    font-size: 1.05rem;
    font-weight: 800;
}

.navbar-search-item-datechip-month {
    color: var(--rotary-blue);
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

.navbar-search-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.navbar-search-item-title {
    color: var(--rotary-dark);
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-search-item-title mark {
    background: rgba(247, 168, 27, 0.32);
    color: inherit;
    padding: 0 1px;
    border-radius: 3px;
}

.navbar-search-item-meta {
    color: var(--slate);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-search-item-meta em { font-style: normal; color: var(--rotary-blue); font-weight: 600; }
.navbar-search-item-meta mark { background: rgba(0, 103, 200, 0.14); color: inherit; padding: 0 1px; border-radius: 3px; }

.navbar-search-item-badge {
    flex: 0 0 auto;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 700;
}

.navbar-search-badge-rotary   { background: rgba(0, 103, 200, 0.12); color: var(--rotary-blue); }
.navbar-search-badge-rotaract { background: rgba(212, 19, 103, 0.12); color: var(--cranberry); }
.navbar-search-badge-paid     { background: rgba(247, 168, 27, 0.16); color: #b6730c; }
.navbar-search-badge-free     { background: rgba(0, 173, 187, 0.14); color: var(--turquoise); }

.navbar-search-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 18px;
    font-size: 0.8rem;
    color: var(--rotary-blue);
    text-decoration: none;
    font-weight: 600;
    border-top: 1px dashed rgba(13, 45, 94, 0.06);
    margin-top: 4px;
}

.navbar-search-more:hover { background: rgba(0, 103, 200, 0.06); }

.navbar-search-dropdown-footer {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 8px 14px;
    background: #fafbff;
    border-top: 1px solid rgba(13, 45, 94, 0.06);
    font-size: 0.74rem;
    color: var(--slate);
}

.navbar-search-dropdown-footer kbd {
    background: #fff;
    border: 1px solid rgba(13, 45, 94, 0.14);
    color: var(--rotary-dark);
    border-radius: 4px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-family: 'Open Sans', monospace;
}

.navbar-search-dropdown-link {
    color: var(--rotary-blue);
    text-decoration: none;
    font-weight: 600;
    margin-left: auto;
}

.navbar-search-dropdown-link:hover { color: var(--rotary-dark); }

/* Legacy mobile panel/backdrop classes (no longer rendered) */
.navbar-search-backdrop,
.navbar-search-panel { display: none; }

@media (max-width: 767px) {
    body.search-overlay-open {
        overflow: hidden;
    }

    .navbar-search-backdrop {
        background: rgba(13, 45, 94, 0.46);
        bottom: 0;
        display: block;
        left: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 0;
        transition: opacity 0.2s ease;
        z-index: 1050;
    }

    .navbar-search-panel {
        align-items: center;
        background: #fff;
        border: 1px solid rgba(13, 45, 94, 0.18);
        border-radius: 8px;
        box-shadow: 0 18px 48px rgba(13, 45, 94, 0.2);
        display: flex;
        gap: 8px;
        left: 18px;
        min-height: 54px;
        opacity: 0;
        padding: 8px 10px;
        pointer-events: none;
        position: fixed;
        right: 18px;
        top: 16px;
        transform: translateY(-10px) scale(0.98);
        transition: opacity 0.18s ease, transform 0.22s ease;
        z-index: 1060;
    }

    body.search-overlay-open .navbar-search-backdrop,
    body.search-overlay-open .navbar-search-panel {
        opacity: 1;
        pointer-events: auto;
    }

    body.search-overlay-open .navbar-search-panel {
        transform: translateY(0) scale(1);
    }

    .navbar-search-panel-close,
    .navbar-search-panel-submit {
        align-items: center;
        background: transparent;
        border: 0;
        border-radius: 8px;
        color: var(--rotary-dark);
        display: inline-flex;
        flex: 0 0 38px;
        height: 38px;
        justify-content: center;
        padding: 0;
        transition: background 0.16s ease, color 0.16s ease;
    }

    .navbar-search-panel-submit:hover,
    .navbar-search-panel-submit:focus-visible {
        background: #eef6ff;
        color: var(--rotary-blue);
        outline: none;
    }

    .navbar-search-panel-close:hover,
    .navbar-search-panel-close:focus-visible {
        background: transparent;
        color: var(--rotary-blue);
        outline: none;
    }

    .navbar-search-panel-input {
        border: 0;
        color: var(--charcoal);
        flex: 1;
        font-size: 0.95rem;
        min-width: 0;
        outline: none;
    }

    .navbar-search-panel-input::placeholder {
        color: var(--slate);
    }

    .navbar-search-panel-input::-webkit-search-cancel-button,
    .navbar-search-panel-input::-webkit-search-decoration {
        appearance: none;
        display: none;
    }
}

.navbar .form-control {
    border-radius: 20px;
    border: 1px solid rgba(23, 69, 143, 0.1);
    background: #f3f7fb;
    color: var(--charcoal);
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 0.875rem;
    min-width: 0;
}

.navbar .form-control::placeholder { color: var(--slate); }

.navbar .form-control:focus {
    background: #fff;
    border-color: rgba(0, 103, 200, 0.45);
    box-shadow: 0 0 0 3px rgba(0, 103, 200, 0.1);
    color: var(--charcoal);
    outline: none;
}

.navbar .btn-outline-success {
    border-color: rgba(0, 103, 200, 0.35);
    color: var(--rotary-blue);
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 42px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(13, 45, 94, 0.05);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.navbar .btn-outline-success:hover {
    background: #eef6ff;
    border-color: rgba(0, 103, 200, 0.65);
    box-shadow: 0 0 0 3px rgba(0, 103, 200, 0.08), 0 8px 18px rgba(13, 45, 94, 0.1);
    color: var(--rotary-blue);
}

.navbar .btn-outline-success:active,
.navbar .btn-outline-success:focus-visible {
    background: var(--rotary-blue);
    border-color: var(--rotary-blue);
    box-shadow: 0 0 0 3px rgba(0, 103, 200, 0.14);
    color: #fff;
}

.navbar-toggler {
    border-color: rgba(0, 103, 200, 0.35);
    border-radius: 8px;
    flex-shrink: 0;
    width: 54px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(13, 45, 94, 0.06);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.navbar-toggler:hover {
    background: #eef6ff;
    border-color: rgba(0, 103, 200, 0.6);
    box-shadow: 0 8px 18px rgba(0, 103, 200, 0.14);
}

.navbar-toggler:active {
    background: #e2f0ff;
    box-shadow: 0 0 0 3px rgba(0, 103, 200, 0.1);
}

.navbar-toggler:has(+ #offcanvasNavbar.show) {
    background: var(--rotary-blue);
    border-color: var(--rotary-blue);
    box-shadow: 0 10px 22px rgba(0, 103, 200, 0.24);
}

.navbar-toggler-icon {
    width: 24px;
    height: 18px;
    position: relative;
    background-image: none;
    filter: none;
    transition: transform 0.22s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    border-radius: 8px;
    background: var(--charcoal);
    transition: top 0.22s ease, transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.navbar-toggler-icon::before {
    top: 0;
    box-shadow: 0 8px 0 var(--charcoal);
}

.navbar-toggler-icon::after {
    top: 16px;
}

.navbar-toggler:hover .navbar-toggler-icon::before,
.navbar-toggler:hover .navbar-toggler-icon::after {
    background: var(--rotary-blue);
}

.navbar-toggler:hover .navbar-toggler-icon::before {
    box-shadow: 0 8px 0 var(--rotary-blue);
}

.navbar-toggler:has(+ #offcanvasNavbar.show) .navbar-toggler-icon {
    transform: rotate(180deg);
}

.navbar-toggler:has(+ #offcanvasNavbar.show) .navbar-toggler-icon::before {
    top: 8px;
    transform: rotate(45deg);
    background: #fff;
    box-shadow: 0 0 0 transparent;
}

.navbar-toggler:has(+ #offcanvasNavbar.show) .navbar-toggler-icon::after {
    top: 8px;
    transform: rotate(-45deg);
    background: #fff;
}

/* Responsive main offset */
main {
    flex: 1 0 auto;
    margin-top: 80px !important;
    width: 100%;
}

/* On mobile the navbar wraps (search drops to its own full-width row), so it
   grows to ~106px. Bump the main offset so page content clears it instead of
   sliding underneath the fixed navbar. */
@media (max-width: 767px) {
    main { margin-top: 110px !important; }

    /* The 110px offset only clears the wrapped navbar, leaving content flush
       against it. Restore a top gap on standard pages. Documents
       (body:has(.docs-layout)) and Campaigns (.campaigns-page) bring their own
       top spacing, so exclude them to avoid doubling it. */
    body:not(:has(.docs-layout)) main > section:not(.campaigns-page) > .container-fluid,
    body:not(:has(.docs-layout)) main > .container-fluid {
        padding-top: 10px;
    }
    .mb-0-responsive {
        margin-bottom: 0 !important;
    }
}

/* ── Offcanvas nav links ────────────────────────────────────── */
.nav-link {
    color: var(--charcoal);
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-link:hover, .nav-link:focus {
    color: var(--azure);
}

.dropdown-item:hover {
    background: #eef4ff;
    color: var(--rotary-blue);
}

/* ── Logged user panel ──────────────────────────────────────── */
.logged_user {
    background: linear-gradient(135deg, #f0f4ff, #e8f4fb);
    border: 1px solid rgba(23, 69, 143, 0.12);
    padding: 12px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--charcoal);
}

.logged_user .btn { margin-top: 5px; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
    background: #fff;
    height: 100%;
}

.card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.card-title {
    color: var(--rotary-blue);
    font-weight: 600;
}

.card-special {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* ── Tables ─────────────────────────────────────────────────── */

/* Wrapper: clip children to rounded corners */
.table-responsive {
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Tables directly in a card body still get clipped */
.card-body .table-responsive {
    box-shadow: none;
}

/* card with p-0 needs its body to clip the table */
.card .card-body.p-0 {
    border-radius: inherit;
    overflow: hidden;
}

/* Standalone tables (not inside a card) get their own border + radius */
.table-rounded {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8eaf0;
}

.table {
    font-size: 0.88rem;
    color: var(--charcoal);
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

/* Round the first/last header cells */
.table thead th:first-child { border-radius: 12px 0 0 0; }
.table thead th:last-child  { border-radius: 0 12px 0 0; }

.table thead th {
    background: var(--rotary-blue);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 12px;
}

.table tbody tr td {
    vertical-align: middle;
    border-color: #f0f0f0;
}

/* Round the last row's first/last cells */
.table tbody tr:last-child td:first-child { border-radius: 0 0 0 12px; }
.table tbody tr:last-child td:last-child  { border-radius: 0 0 12px 0; }

/* When tfoot is present, round its last cells instead */
.table tfoot tr:last-child td:first-child { border-radius: 0 0 0 12px; }
.table tfoot tr:last-child td:last-child  { border-radius: 0 0 12px 0; }

.table tfoot td {
    background: #f5f6fa;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--slate);
    border-top: 2px solid #e8eaf0;
}

.table-striped tbody tr:nth-child(odd)  { background-color: #f8f9fc; }
.table-striped tbody tr:nth-child(even) { background-color: #ffffff; }

.table tbody tr:hover {
    background: #eef4ff !important;
}

/* ── Buttons (Bootstrap overrides using brand palette) ──────── */
.btn {
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--azure);
    border-color: var(--azure);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--rotary-blue);
    border-color: var(--rotary-blue);
}

.btn-secondary {
    background: var(--slate);
    border-color: var(--slate);
    color: #fff;
}

.btn-secondary:hover, .btn-secondary:focus {
    background: var(--charcoal);
    border-color: var(--charcoal);
    color: #fff;
}

.btn-success {
    background: #009739;
    border-color: #009739;
}

.btn-success:hover {
    background: #007a2e;
    border-color: #007a2e;
}

.btn-danger {
    background: var(--cardinal);
    border-color: var(--cardinal);
}

.btn-danger:hover {
    background: #b82020;
    border-color: #b82020;
}

.btn:focus:not(:focus-visible),
.btn-close:focus:not(:focus-visible),
.navbar-toggler:focus:not(:focus-visible) {
    box-shadow: none;
    outline: 0;
}

.btn:focus-visible,
.btn-close:focus-visible,
.navbar-toggler:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
    outline: 0;
}

/* ── Form controls (global) ─────────────────────────────────── */
.form-control, .form-select {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 0.875rem;
    border-color: var(--silver);
    border-radius: 8px;
    color: var(--charcoal);
}

.form-control:focus, .form-select:focus {
    border-color: var(--azure);
    box-shadow: 0 0 0 3px rgba(0, 103, 200, 0.09);
}

.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--slate);
}

.enhanced-select {
    position: relative;
}

.enhanced-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.enhanced-select-toggle {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--silver);
    border-radius: 8px;
    background: #fff;
    color: var(--charcoal);
    font: 500 0.875rem 'Open Sans', Arial, sans-serif;
    padding: 7px 12px;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.enhanced-select-toggle:hover {
    border-color: rgba(0, 103, 200, 0.45);
    background: #f8fbff;
}

.enhanced-select-toggle:disabled {
    background: #f1f3f6;
    color: var(--slate);
    cursor: not-allowed;
}
.enhanced-select.form-select-sm {
    padding: 0 !important;
}
.enhanced-select.form-select-sm .enhanced-select-toggle {
    min-height: 31px !important;
    font-size: 0.8rem;
    padding: 5px 10px;
}

.enhanced-select-toggle:focus-visible,
.enhanced-select.is-open .enhanced-select-toggle {
    border-color: var(--azure);
    box-shadow: 0 0 0 3px rgba(0, 103, 200, 0.09);
    outline: 0;
}

.enhanced-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enhanced-select-arrow {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 1.5px solid var(--charcoal);
    border-bottom: 1.5px solid var(--charcoal);
    transform: rotate(45deg);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.enhanced-select.is-open .enhanced-select-arrow {
    border-color: var(--rotary-blue);
    transform: translateY(3px) rotate(225deg);
}

.enhanced-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1060;
    max-height: 260px;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid rgba(0, 103, 200, 0.18);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(13, 45, 94, 0.16);
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    visibility: hidden;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.enhanced-select.is-dropup .enhanced-select-menu {
    top: auto;
    bottom: calc(100% + 6px);
    transform: translateY(6px) scale(0.98);
    transform-origin: bottom center;
}

.enhanced-select.is-open .enhanced-select-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.enhanced-select-option {
    min-height: 34px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    color: var(--charcoal);
    cursor: pointer;
    font-size: 0.86rem;
    padding: 8px 10px;
    transition: background 0.14s ease, color 0.14s ease, padding-left 0.14s ease;
}

.enhanced-select-option:hover,
.enhanced-select-option.is-active {
    background: #eef6ff;
    color: var(--rotary-blue);
}

.enhanced-select-option.is-selected {
    background: var(--rotary-blue);
    color: #fff;
}

.variable-picker-panel {
    background: #fff;
    border: 1px solid #e4e8ef;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px;
}

.variable-picker-panel[hidden] {
    display: none !important;
}

.variable-picker-chip {
    background: #edf7fb;
    border: 1px solid rgba(0, 103, 200, 0.12);
    border-radius: 8px;
    color: #17458f;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 5px 8px;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.variable-picker-chip:hover,
.variable-picker-chip:focus {
    background: #dff0fb;
    border-color: rgba(0, 103, 200, 0.26);
    color: var(--rotary-blue);
}

/* ── Footer ─────────────────────────────────────────────────── */
footer.footer {
    background: #fff !important;
    border-top: 1px solid #e9ecef;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: var(--slate);
    margin-top: 24px;
}

/* ── Badges / Tags ──────────────────────────────────────────── */
.year-badge {
    display: inline-block;
    background: #e8f4fb;
    color: var(--azure);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

/* ── Profile images ─────────────────────────────────────────── */
.rotarian-pic {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.rotarian-thumbnail-pic {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
}

table tbody tr td:has(img.rotarian-thumbnail-pic) {
    padding: 1px;
}

/* ── Socio form inputs ──────────────────────────────────────── */
.socio-input {
    padding: 7px 12px;
    width: 300px;
    height: 36px;
}

.socio-dropdown {
    padding: 0 5px;
    width: 300px;
    margin-left: 4px;
    margin-right: 4px;
}

.socio-dropdown.dia-dropdown { width: 62px; }
.socio-dropdown.mes-dropdown { width: 140px; }
.socio-dropdown.ano-dropdown { width: 80px; }

.socio-notes { width: 100%; }

.socio-message-history-table {
    min-width: 860px;
}

.message-origin-badge {
    display: inline-flex;
    align-items: center;
    max-width: 180px;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-origin-campaign {
    background: #fff4df;
    color: #8a5a00;
}

.message-origin-direct {
    background: #e8f4fb;
    color: var(--azure);
}

.socio-message-preview {
    max-height: 96px;
    overflow: auto;
    white-space: normal;
}

/* ── Member search results ──────────────────────────────────── */
.member-section {
    background: #ffffff;
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    padding: 16px 20px;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 4px;
}

.member-section:hover {
    box-shadow: 0 4px 16px rgba(23, 69, 143, 0.08);
    position: relative;
    z-index: 99;
    border-color: transparent;
}

.member-section .member-section-image {
    margin-right: 20px;
    flex: 0 0 72px;
    border: none;
}

.member-section .member-section-image img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
}

.member-section-title { margin-bottom: 4px; }

.member-section-details ul {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.member-section-details ul li {
    margin: 4px 10px 4px 0;
    font-size: 0.8rem;
    color: var(--slate);
}

.member-section .member-section-favourite-time {
    margin-left: auto;
    text-align: center;
    font-size: 13px;
    flex: 0 0 90px;
}

.member-section .member-section-favourite-time span { display: block; margin: 0 auto; }

/* ── Photo upload modal preview ─────────────────────────────── */
.photo-upload-preview-wrap {
    position: relative;
    display: block;
    cursor: pointer;
    width: 148px;
    height: 148px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--bs-border-color, #dee2e6);
    box-shadow: 0 2px 14px rgba(0,0,0,.13);
    transition: box-shadow .2s, border-color .2s;
}
.photo-upload-preview-wrap:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.22);
    border-color: #adb5bd;
}
.photo-upload-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter .2s;
}
.photo-upload-preview-wrap:hover .photo-upload-preview-img {
    filter: brightness(.6);
}
.photo-upload-preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.photo-upload-preview-overlay i {
    font-size: 1.75rem;
    line-height: 1;
}
.photo-upload-preview-wrap:hover .photo-upload-preview-overlay {
    opacity: 1;
}
.photo-upload-has-new .photo-upload-preview-wrap {
    border-color: #17458f;
    box-shadow: 0 0 0 3px rgba(23,69,143,.18);
}
.photo-upload-filename {
    font-size: .82rem;
    font-weight: 500;
    color: #17458f;
    min-height: 1.3em;
}

.member-section .member-section-favourite-time .member-section-favourite {
    display: inline-block;
    position: relative;
    height: 40px;
    width: 40px;
    line-height: 40px;
    border: 1px solid #e9ecef;
    border-radius: 50%;
    text-align: center;
    transition: all 0.2s;
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--slate);
}

.member-section .member-section-favourite-time .member-section-favourite:hover {
    background: #fff5f5;
    color: var(--cardinal);
    border-color: var(--cardinal);
}

/* ── Member grid layout ─────────────────────────────────────── */
.member-section.candidate-grid {
    padding: 0;
    display: block;
    border-bottom: none;
}

.candidate-grid .member-section-image {
    text-align: center;
    margin-right: 0;
}

.candidate-grid .member-section-image img {
    height: 150px;
    width: 100%;
    border-radius: 0;
}

.candidate-grid .member-section-details {
    text-align: center;
    padding: 16px 20px 0;
    border: 1px solid #f0f0f0;
    border-top: none;
}

.candidate-grid .member-section-details ul { justify-content: center; }
.candidate-grid .member-section-details ul li { margin: 2px 5px; }

.candidate-grid .member-section-favourite-time {
    display: flex;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    padding: 10px 0;
}

.candidate-grid .member-section-favourite-time a { margin-bottom: 0; margin-left: auto; }
.candidate-grid .member-section-favourite-time span { display: inline-block; margin: 0; align-self: center; }
.member-section.candidate-grid .member-section-favourite-time .member-section-favourite { margin-bottom: 0; }

/* ── Login page ─────────────────────────────────────────────── */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

.brand-panel {
    flex: 1;
    background-color: var(--rotary-dark);
    background-image:
        radial-gradient(circle at 18% 22%, rgba(0, 162, 224, 0.32), transparent 42%),
        radial-gradient(circle at 84% 80%, rgba(247, 168, 27, 0.14), transparent 46%),
        radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(145deg, var(--rotary-dark) 0%, var(--rotary-blue) 55%, var(--azure) 100%);
    background-size: auto, auto, 27px 27px, auto;
    box-shadow: inset 0 0 220px rgba(8, 24, 52, 0.45);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.brand-panel .circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(247, 168, 27, 0.12);
}

.brand-panel .circle-1 { width: 480px; height: 480px; top: -140px; right: -140px; }
.brand-panel .circle-2 { width: 340px; height: 340px; bottom: -100px; left: -100px; }
.brand-panel .circle-3 { width: 220px; height: 220px; bottom: 120px; right: -60px; opacity: 0.6; }

.brand-gear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 156px;
    height: 156px;
    margin: 0 auto 30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 168, 27, 0.22) 0%, rgba(247, 168, 27, 0.07) 46%, transparent 70%);
    filter: drop-shadow(0 8px 24px rgba(247, 168, 27, 0.32));
}

.brand-gear img {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.brand-title {
    color: #fff;
    font-size: 2.05rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 14px rgba(4, 18, 42, 0.35);
}

.brand-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 14px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--rotary-gold), transparent);
}

.brand-subtitle {
    color: var(--sky-blue);
    font-size: 0.8rem;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.brand-district {
    margin-top: 34px;
    background: linear-gradient(135deg, rgba(247, 168, 27, 0.20), rgba(247, 168, 27, 0.07));
    border: 1px solid rgba(247, 168, 27, 0.42);
    border-radius: 14px;
    padding: 12px 34px;
    color: var(--rotary-gold);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.brand-motto {
    margin-top: 52px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
    font-style: italic;
    text-align: center;
}

.form-panel {
    width: 480px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 56px;
    background: #fff;
}

.form-header { margin-bottom: 40px; }

.form-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--rotary-blue);
    margin-bottom: 6px;
}

.form-header p {
    color: var(--slate);
    font-size: 0.875rem;
    margin: 0;
}

.field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
    margin-bottom: 22px;
}

.input-wrap .field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrap:focus-within .field-icon { color: var(--azure); }

.input-wrap .form-control {
    padding: 13px 16px 13px 42px;
    border: 1.5px solid var(--silver);
    border-radius: 12px;
    font-size: 0.9rem;
    background: #f8fafc;
    color: var(--charcoal);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.input-wrap .form-control:focus {
    border-color: var(--azure);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 103, 200, 0.09);
    outline: none;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s;
}

.toggle-password:hover { color: var(--azure); }

.btn-login {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--rotary-blue) 0%, var(--azure) 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 4px 16px rgba(0, 103, 200, 0.28);
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 103, 200, 0.35);
}

.btn-login:hover .btn-login__arrow { transform: translateX(3px); }

.btn-login:active { transform: translateY(0); }

.btn-login__label {
    line-height: 1;
}

.btn-login__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-size: 1.05rem;
    line-height: 1;
    transform: translateX(0);
    transition: transform 0.2s;
}

.btn-login__arrow::before {
    display: block;
    line-height: 1;
}

/* Loading spinner (hidden until .is-loading) */
.btn-login__spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-login-spin 0.7s linear infinite;
}

.btn-login.is-loading {
    cursor: progress;
    filter: saturate(0.85);
}

.btn-login.is-loading:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 103, 200, 0.28);
}

.btn-login.is-loading .btn-login__spinner { display: inline-block; }
.btn-login.is-loading .btn-login__arrow   { display: none; }

.btn-login:disabled {
    opacity: 0.85;
    cursor: progress;
}

@keyframes btn-login-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .btn-login__spinner { animation-duration: 1.4s; }
    .btn-login:hover { transform: none; }
}

.alert-login {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff5f5;
    border-left: 4px solid var(--cardinal);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #b91c1c;
    margin-bottom: 24px;
}

/* ── Language pill switcher ──────────────────────────────────── */
.lang-switch-pill {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    font-family: 'Open Sans', Arial, sans-serif;
}
.lang-switch-pill a,
.lang-switch-pill button {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #40414269;
    border-radius: 999px;
    text-decoration: none;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.lang-switch-pill a:hover,
.lang-switch-pill button:hover {
    color: var(--rotary-blue);
}
.lang-switch-pill a.is-active,
.lang-switch-pill button.is-active,
.lang-switch-pill [aria-pressed="true"] {
    background: var(--rotary-blue);
    color: #fff;
    box-shadow: 0 2px 6px rgba(23, 69, 143, 0.25);
}
.lang-switch-pill a.is-active:hover,
.lang-switch-pill button.is-active:hover,
.lang-switch-pill [aria-pressed="true"]:hover {
    color: #fff;
}

.login-lang-switch {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.menu-lang-dropdown .dropdown-item {
    color: #d1d6dd;
    font-weight: 500;
}
.menu-lang-dropdown .dropdown-item:hover,
.menu-lang-dropdown .dropdown-item:focus {
    background: rgb(229, 230, 233);
    color: var(--rotary-blue);
}
.menu-lang-dropdown .dropdown-item.active,
.menu-lang-dropdown .dropdown-item.active:hover,
.menu-lang-dropdown .dropdown-item.active:focus {
    background: var(--rotary-blue);
    color: #fff;
    font-weight: 700;
}

/* Language menu floats (override offcanvas inline-render rule) so the
   user card keeps a fixed height instead of growing when it opens. */
.offcanvas .menu-lang-dropdown .dropdown-menu {
    position: absolute !important;
    bottom: 80% !important;
    top: auto !important;
    left: 0 !important;
    margin-bottom: 4px !important;
    margin-top: 0 !important;
    min-width: 150px;
    border: 1px solid rgba(23, 69, 143, 0.12);
    border-radius: 8px;
    padding: 4px 4px 0 4px;
    box-shadow: 0 8px 24px rgba(23, 69, 143, 0.18);
}

.offcanvas .menu-lang-dropdown .dropdown-menu .dropdown-item {
    border-radius: 6px;
}

/* ── Breadcrumbs ─────────────────────────────────────────────── */
nav[aria-label="breadcrumb"] {
    --bs-breadcrumb-divider: '›';
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(23, 69, 143, 0.05) 0%, rgba(0, 103, 200, 0.04) 100%);
    border: 1px solid rgba(23, 69, 143, 0.1);
    border-radius: 50px;
    padding: 6px 18px;
    margin-bottom: 20px;
}

.breadcrumb {
    margin-bottom: 0;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb-item {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--azure);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb-item a:hover {
    color: var(--rotary-blue);
    text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--rotary-gold);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    padding: 0 6px;
}

.breadcrumb-item.active {
    color: var(--charcoal);
    font-weight: 600;
}

/* ── Nav Tabs ────────────────────────────────────────────────── */
.nav-tabs {
    border-bottom: 2px solid rgba(23, 69, 143, 0.12);
    gap: 2px;
}

.nav-tabs .nav-link {
    color: var(--slate);
    font-weight: 600;
    font-size: 0.8rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 10px 18px;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    letter-spacing: 0.03em;
}

.nav-tabs .nav-link:hover {
    color: var(--azure);
    border-bottom-color: rgba(0, 103, 200, 0.35);
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--rotary-blue);
    border-bottom: 2px solid var(--rotary-blue);
    background: transparent;
    font-weight: 700;
}

/* ── Page Header ─────────────────────────────────────────────── */
.page-header_no-bottom-border {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid rgba(23, 69, 143, 0.1);
}

.page-header-left  { flex: 1; min-width: 0; }

.page-header-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--rotary-blue);
    margin: 0 0 4px;
    line-height: 1.2;
}

.page-header-subtitle {
    font-size: 0.82rem;
    color: var(--slate);
    margin: 0;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Stat Pills ──────────────────────────────────────────────── */
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f4ff;
    border: 1px solid rgba(23, 69, 143, 0.12);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rotary-blue);
    white-space: nowrap;
}

.stat-pill i { color: var(--azure); font-size: 0.88rem; }

.stat-pill.danger  { background: #fff0f0; border-color: rgba(228,41,39,0.15); color: var(--cardinal); }
.stat-pill.danger i { color: var(--cardinal); }
.stat-pill.success { background: #f0faf3; border-color: rgba(0,151,57,0.15); color: #007a2e; }
.stat-pill.success i { color: #009739; }
.stat-pill.gold    { background: #fffbf0; border-color: rgba(247,168,27,0.2); color: #b87d00; }
.stat-pill.gold i  { color: var(--rotary-gold); }

.club-report-metric {
    background: #fff;
    border: 1px solid rgba(13, 45, 94, 0.12);
    border-radius: 8px;
    min-height: 82px;
    padding: 14px 16px;
}

.club-report-metric span {
    color: var(--slate);
    display: block;
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.club-report-metric strong {
    color: var(--rotary-dark);
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
}

.club-docs-panel {
    background: #fff;
    border: 1px solid rgba(13, 45, 94, 0.12);
    border-radius: 8px;
    padding: 14px 16px;
}

.card .card-body.p-0.club-detail-card-body,
.club-detail-card-body .tab-content,
.club-documents-tab,
.club-documents-tab > .p-3 {
    overflow: visible;
}

.club-template-dropdown {
    position: relative;
}

.club-template-menu {
    max-height: min(420px, calc(100vh - 160px));
    min-width: 360px;
    overflow-y: auto;
    z-index: 1030;
}

.club-template-menu .dropdown-item {
    align-items: center;
    display: flex;
    gap: 4px;
    white-space: normal;
}

@media (max-width: 575px) {
    .club-template-menu {
        min-width: min(92vw, 360px);
    }
}

.club-doc-row {
    align-items: center;
    border-top: 1px solid #eef2f7;
    display: flex;
    gap: 12px;
    padding: 10px 0;
}

.club-doc-row:first-child {
    border-top: 0;
}

.club-doc-row-main {
    flex: 1;
    min-width: 0;
}

.club-doc-row-title {
    color: var(--rotary-dark);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.club-doc-row-meta {
    color: var(--slate);
    font-size: 0.78rem;
}

.club-doc-actions {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 6px;
}

.club-doc-icon-btn {
    align-items: center;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.club-doc-share {
    position: relative;
}

.club-doc-share-toggle {
    align-items: center;
    display: inline-flex;
    height: 32px;
    font-weight: 700;
    min-width: 122px;
    justify-content: center;
}

.club-doc-share-menu {
    min-width: 180px;
}

.club-doc-share-menu .dropdown-item {
    align-items: center;
    display: flex;
    font-weight: 600;
}

/* ── Search page ─────────────────────────────────────────────── */
.search-header {
    background: linear-gradient(135deg, rgba(23,69,143,0.04) 0%, rgba(0,103,200,0.03) 100%);
    border: 1px solid rgba(23,69,143,0.1);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.search-header h4 { color: var(--rotary-blue); font-weight: 700; margin: 0 0 4px; }
.search-header p  { color: var(--slate); font-size: 0.85rem; margin: 0; }

.search-context-label {
    color: var(--rotary-blue);
    display: inline-block;
    font-weight: 700;
    margin-left: 6px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .brand-panel { display: none; }
    .form-panel  { width: 100%; padding: 48px 28px; }
    .club-doc-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .club-doc-actions {
        flex-wrap: wrap;
        margin-left: 36px;
        width: calc(100% - 36px);
    }
    .club-doc-share {
        flex: 1 1 180px;
    }
    .club-doc-share-toggle {
        width: 100%;
    }
}

/* ── Empty state ── */
.empty-search-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--slate);
}
.empty-search-state i  { font-size: 3rem; color: var(--silver); display: block; margin-bottom: 16px; }
.empty-search-state h4,
.empty-search-state h5 { color: var(--charcoal); font-weight: 600; }
.empty-search-state p  { font-size: .88rem; }

/* ── Search results header ── */
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.search-selection-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.search-selection-count {
    background: #eef6ff;
    border: 1px solid rgba(23,69,143,.12);
    border-radius: 999px;
    color: var(--rotary-blue);
    font-size: .78rem;
    font-weight: 700;
    padding: 6px 12px;
}

.search-query-label {
    font-weight: 700;
    color: var(--rotary-blue);
    font-size: .95rem;
}
.search-count {
    font-size: .78rem;
    color: var(--slate);
    background: #f0f4ff;
    border: 1px solid rgba(23,69,143,.1);
    border-radius: 50px;
    padding: 3px 12px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .search-selection-summary {
        justify-content: flex-start;
        width: 100%;
    }
}

.search-selection-switch-wrap {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin-right: 10px;
    padding: 4px 10px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(23,69,143,.12);
    border-radius: 999px;
}

.search-selection-switch-wrap .form-check-input {
    cursor: pointer;
    margin: 0;
}

.search-selection-switch-wrap .form-check-label {
    color: var(--charcoal);
    cursor: pointer;
    font-size: .76rem;
    font-weight: 700;
    margin: 0;
}

@media (min-width: 768px) {
    .search-layout.filters-collapsed .search-results-col {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
}

/* ── Filter sidebar ── */
.filter-sidebar {
    background: #fff;
    border: 1px solid rgba(23,69,143,.1);
    border-radius: 14px;
    overflow: hidden;
    position: sticky;
    top: 90px;
}
.filter-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--rotary-blue), var(--azure));
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
    font-size: .85rem;
}

.filter-sidebar-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.btn-close-filters {
    align-items: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 8px;
    color: #fff;
    display: none;
    height: 30px;
    justify-content: center;
    padding: 0;
    transition: background 0.16s ease, border-color 0.16s ease;
    width: 30px;
}

.btn-close-filters:hover,
.btn-close-filters:focus-visible {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.58);
    outline: none;
}

.search-filter-backdrop {
    display: none;
}

@media (max-width: 767px) {
    body.filter-modal-open {
        overflow: hidden;
    }

    .search-filter-backdrop {
        background: rgba(13,45,94,0.48);
        bottom: 0;
        display: block;
        left: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 0;
        transition: opacity 0.2s ease;
        z-index: 1040;
    }

    body.filter-modal-open .search-filter-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .search-scope-panel:not([hidden]) .filter-sidebar-wrap {
        bottom: auto;
        box-sizing: border-box;
        display: block !important;
        left: 50%;
        max-height: min(720px, calc(100vh - 110px));
        max-width: 420px;
        opacity: 0;
        padding: 0;
        pointer-events: none;
        position: fixed;
        right: auto;
        top: 86px;
        transform: translate(-50%, 16px) scale(0.98);
        transition: opacity 0.18s ease, transform 0.22s ease;
        width: calc(100vw - 28px);
        z-index: 1050;
    }

    body.filter-modal-open .search-scope-panel:not([hidden]) .filter-sidebar-wrap {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, 0) scale(1);
    }

    .filter-sidebar-wrap .filter-sidebar {
        border-radius: 8px;
        box-shadow: 0 24px 60px rgba(13,45,94,0.24);
        display: flex;
        flex-direction: column;
        max-height: inherit;
        overflow: hidden;
        position: relative;
        top: auto;
    }

    .filter-sidebar-wrap .filter-sidebar::after {
        background: linear-gradient(to top, #fff, rgba(255,255,255,0));
        bottom: 0;
        content: "";
        height: 24px;
        left: 0;
        pointer-events: none;
        position: absolute;
        right: 0;
    }

    .filter-sidebar-header {
        padding: 14px 16px;
    }

    .btn-close-filters {
        display: inline-flex;
    }

    .filter-sidebar .filter-group:last-child {
        margin-bottom: 18px;
    }

    .filter-result-count,
    .filter-group {
        background: #fff;
    }

    .filter-sidebar-wrap .filter-sidebar {
        overflow-y: auto;
    }

    .filter-sidebar-wrap .filter-sidebar-header {
        flex: 0 0 auto;
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

.btn-reset-filters {
    background: none;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50px;
    color: rgba(255,255,255,.85);
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 10px;
    cursor: pointer;
    transition: background .15s;
}
.btn-reset-filters:hover { background: rgba(255,255,255,.15); }

.filter-result-count {
    padding: 8px 16px;
    font-size: .75rem;
    color: var(--slate);
    background: #f8f9fc;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    text-align: center;
}
.filter-result-count .filter-visible-count { color: var(--rotary-blue); font-size: .95rem; }

.filter-group {
    border-bottom: 1px solid #f0f0f0;
}
.filter-group-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    font-size: .78rem;
    font-weight: 600;
    color: var(--charcoal);
    cursor: pointer;
    text-align: left;
    gap: 4px;
    transition: background .15s;
}
.filter-group-toggle:hover { background: #f8f9fc; }
.filter-group-toggle .chevron { font-size: .65rem; transition: transform .2s; }
.filter-group-toggle[aria-expanded="false"] .chevron { transform: rotate(-90deg); }

.filter-group .collapse,
.filter-group .collapsing {
    padding: 2px 16px 10px;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    color: var(--charcoal);
    padding: 5px 0;
    cursor: pointer;
    border-radius: 6px;
    transition: color .15s;
}
.filter-check:hover { color: var(--azure); }
.filter-check:has(input:disabled) {
    color: var(--slate);
    cursor: not-allowed;
    opacity: 0.52;
}
.filter-check input[type=checkbox] {
    accent-color: var(--rotary-blue);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Amount slider revealed under a numeric custom-field checkbox */
.filter-campo-slider {
    padding: 2px 4px 8px 22px;
}
.filter-campo-slider[hidden] { display: none; }
.filter-campo-slider-input {
    width: 100%;
    accent-color: var(--rotary-blue);
    cursor: pointer;
}
.filter-campo-slider-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin-top: 2px;
    font-size: .72rem;
    color: var(--slate);
}
.filter-campo-slider-value {
    font-weight: 600;
    color: var(--rotary-blue);
}

.filter-search-input {
    width: 100%;
    border: 1px solid var(--silver);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: .75rem;
    color: var(--charcoal);
    margin-bottom: 6px;
    outline: none;
}
.filter-search-input:focus { border-color: var(--azure); }

/* Cap long facet lists (e.g. clubs) so the sidebar never towers over the table */
.filter-search-list {
    max-height: 240px;
    overflow-y: auto;
    margin-right: -6px;
    padding-right: 6px;
}

/* Free-text query box pinned at the top of the filter sidebar */
.filter-query {
    padding: 12px 16px 4px;
}
.filter-query-input {
    width: 100%;
    border: 1px solid var(--silver);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .8rem;
    color: var(--charcoal);
    outline: none;
}
.filter-query-input::placeholder { color: var(--slate); opacity: .8; }
.filter-query-input:focus {
    border-color: var(--azure);
    box-shadow: 0 0 0 3px rgba(23,69,143,.08);
}

#cargoList { max-height: 200px; overflow-y: auto; }

/* ── Member cards ── */
.member-search-img {
    aspect-ratio: 1 / 1;
    background:
        radial-gradient(circle at top, rgba(255,255,255,.42), transparent 48%),
        linear-gradient(180deg, #eef4fb 0%, #e4edf8 100%);
    display: block;
    height: auto;
    width: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 18px 18px 0 0;
}
.member-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid rgba(23,69,143,.12);
    position: relative;
    border-radius: 18px;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    cursor: pointer;
    overflow: hidden;
}

.member-card.is-selected {
    border-color: rgba(0,151,57,.38);
    box-shadow: 0 0 0 3px rgba(0,151,57,.1), 0 16px 30px rgba(0,151,57,.12);
}

.member-card:hover {
    border-color: rgba(23,69,143,.24);
    box-shadow: 0 16px 34px rgba(23,69,143,.14);
    transform: translateY(-4px);
}

.member-card-select {
    align-items: center;
    background: #fbfdff;
    border-bottom: 1px solid rgba(23,69,143,.08);
    display: flex;
    justify-content: flex-end;
    min-height: 42px;
    padding: 7px 10px;
    position: relative;
    z-index: 6;
}

#resultsGrid.selection-ui-hidden .member-card-select {
    display: none;
}

#resultsGrid:not(.selection-ui-hidden) .member-search-img {
    border-radius: 0;
}

.member-select-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(23,69,143,.1);
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(13,45,94,.08);
    color: var(--rotary-blue);
    cursor: pointer;
    display: inline-flex;
    font-size: .7rem;
    font-weight: 700;
    gap: 6px;
    margin: 0;
    padding: 7px 11px;
    position: relative;
    z-index: 5;
    user-select: none;
}

.member-select-toggle input {
    accent-color: #009739;
    cursor: pointer;
    margin: 0;
}

.member-select-toggle.is-disabled {
    background: rgba(255,255,255,.88);
    border-color: rgba(127,143,166,.18);
    color: var(--slate);
    cursor: not-allowed;
}

.member-card .card-body,
.member-card .card-footer {
    position: relative;
    z-index: 1;
}

.member-card .card-body {
    padding: 12px 12px 10px !important;
}

.member-name {
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--rotary-blue);
    min-height: 2.1em;
}
.member-club {
    color: #456c9a;
    font-size: .66rem;
    font-weight: 600;
}
.member-cargo {
    font-size: .63rem;
    color: var(--slate);
    overflow: hidden;
    padding-top: 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.member-footer {
    background: linear-gradient(180deg, rgba(248,251,255,0) 0%, rgba(244,248,252,.98) 100%);
    border-top: 1px solid rgba(23,69,143,.08);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: .65rem;
}
.member-tipo-badge {
    background: rgba(23,69,143,.08);
    color: var(--rotary-blue);
    border: 1px solid rgba(23,69,143,.08);
    font-weight: 600;
    border-radius: 50px;
    padding: 2px 8px;
    font-size: .62rem;
}

.search-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 22px 0 8px;
}

.search-page-btn {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0,103,200,0.28);
    border-radius: 8px;
    color: var(--rotary-blue);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 10px;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.search-page-btn:hover:not(:disabled),
.search-page-btn:focus-visible:not(:disabled) {
    background: #eef6ff;
    border-color: rgba(0,103,200,0.62);
    box-shadow: 0 0 0 3px rgba(0,103,200,0.08);
    color: var(--rotary-blue);
    outline: none;
}

.search-page-btn.is-active {
    background: var(--rotary-blue);
    border-color: var(--rotary-blue);
    color: #fff;
}

.search-page-btn:disabled {
    color: var(--slate);
    cursor: not-allowed;
    opacity: 0.5;
}

.search-page-btn.is-disabled {
    color: var(--slate);
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.search-page-ellipsis {
    align-items: center;
    color: var(--slate);
    display: inline-flex;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    min-width: 20px;
}

@media (max-width: 767px) {
    .search-header {
        padding: 18px;
    }

    /* Buscar: stack breadcrumb + action buttons instead of cramming one row */
    .page-header_no-bottom-border {
        flex-direction: column;
        align-items: stretch;
    }

    nav[aria-label="breadcrumb"] {
        margin-bottom: 10px;   
    }

    .page-header_no-bottom-border .page-header-left {
        flex: 0 0 auto;
        width: 100%;
    }

    .page-header_no-bottom-border .page-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-header_no-bottom-border .page-header-actions .btn,
    .page-header_no-bottom-border .page-header-actions .search-selection-switch-wrap {
        flex: 1 1 auto;
        justify-content: center;
        margin-right: 0;
    }

    /* Scope tabs: scroll horizontally rather than overflow the viewport */
    .search-scope-tabs {
        display: flex;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 12px 0 !important;
    }

    .search-scope-tabs::-webkit-scrollbar {
        display: none;
    }

    .search-scope-tab {
        flex: 1 0 auto;
        justify-content: center;
        padding: 9px 14px;
        white-space: nowrap;
    }

}


/* ── Chart containers ─────────────────────────────────────────── */
.chart-container {
    position: relative;
    width: 100%;
    height: 220px;
}

.chart-container-tall {
    height: 320px;
}

.chart-scroll-x {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.chart-container-mobile-wide {
    min-width: 100%;
}

@media (max-width: 576px) {
    .chart-container      { height: 200px; }
    .chart-container-tall { height: 260px; }
    .chart-scroll-x {
        padding-bottom: 6px;
    }
}

/* ── Offcanvas (right-side collapsible menu) ───────────────── */
.offcanvas {
    max-width: 300px;
    border-left: none;
    box-shadow: -8px 0 32px rgba(13, 45, 94, 0.18);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.34s ease, box-shadow 0.28s ease;
}

.offcanvas.hiding {
    box-shadow: -4px 0 18px rgba(13, 45, 94, 0.08);
}

.offcanvas-backdrop {
    background-color: rgba(13, 45, 94, 0.42);
    transition: opacity 0.28s ease;
}

.offcanvas-backdrop.show {
    opacity: 0.42;
}

.offcanvas-header {
    background: var(--rotary-blue);
    padding: 18px 20px;
    border-bottom: none;
}

.offcanvas-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.offcanvas-header .btn-close {
    filter: invert(1) brightness(2);
    opacity: 0.75;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.offcanvas-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.offcanvas-body {
    padding: 14px;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.offcanvas-body > .logged_user:last-child {
    margin-top: auto;
}

.offcanvas-body > * {
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.24s ease, transform 0.28s ease;
}

.offcanvas.show .offcanvas-body > *,
.offcanvas.showing .offcanvas-body > * {
    opacity: 1;
    transform: translateX(0);
}

.offcanvas.show .offcanvas-body > *:nth-child(1),
.offcanvas.showing .offcanvas-body > *:nth-child(1) {
    transition-delay: 0.06s;
}

.offcanvas.show .offcanvas-body > *:nth-child(2),
.offcanvas.showing .offcanvas-body > *:nth-child(2) {
    transition-delay: 0.1s;
}

.offcanvas.show .offcanvas-body > *:nth-child(3),
.offcanvas.showing .offcanvas-body > *:nth-child(3) {
    transition-delay: 0.14s;
}

.offcanvas.show .offcanvas-body > *:nth-child(4),
.offcanvas.showing .offcanvas-body > *:nth-child(4) {
    transition-delay: 0.18s;
}

/* User info panel inside offcanvas */
.offcanvas .logged_user {
    background: #fff;
    border: 1px solid rgba(23, 69, 143, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin: 0;
}

.offcanvas .logged_user b {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate);
}

.offcanvas .logged_user > div:nth-child(2) {
    font-weight: 700;
    color: var(--rotary-blue);
    font-size: 0.9rem;
    margin: 3px 0 1px;
}

.offcanvas .logged_user > div:nth-child(3) {
    font-size: 0.73rem;
    color: var(--azure);
    font-weight: 600;
    margin-bottom: 4px;
}

.offcanvas .logged_user a:not(.btn) {
    font-size: 0.73rem;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}

.offcanvas .logged_user .btn {
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Nav section inside offcanvas */
.offcanvas .navbar-nav {
    background: #fff;
    border: 1px solid rgba(23, 69, 143, 0.1);
    border-radius: 12px;
    flex-grow: 0 !important;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin: 0;
}

.offcanvas .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.offcanvas .navbar-nav .nav-item:last-child {
    border-bottom: none;
}

.offcanvas .navbar-nav .nav-link {
    padding: 11px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
    border-bottom: none;
}

.offcanvas .navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 8px;
    width: 3px;
    border-radius: 8px;
    background: var(--rotary-blue);
    opacity: 0;
    transform: scaleY(0.35);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.offcanvas .navbar-nav .nav-link::after {
    /* Bootstrap caret — keep but make it match brand */
    color: var(--slate);
    opacity: 0.6;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.offcanvas .navbar-nav .nav-link:hover,
.offcanvas .navbar-nav .nav-link:focus,
.offcanvas .navbar-nav .nav-link[aria-expanded="true"] {
    background: #f0f4ff;
    color: var(--rotary-blue);
    padding-left: 22px;
    border-bottom: none;
}

.offcanvas .navbar-nav .nav-link:hover::before,
.offcanvas .navbar-nav .nav-link:focus::before,
.offcanvas .navbar-nav .nav-link[aria-expanded="true"]::before {
    opacity: 1;
    transform: scaleY(1);
}

.offcanvas .navbar-nav .dropdown-toggle[aria-expanded="true"]::after {
    color: var(--rotary-blue);
    opacity: 1;
    transform: rotate(180deg);
}

/* Dropdowns inside offcanvas render inline (static) */
.offcanvas .dropdown-menu {
    border: none;
    background: #f5f7fd;
    border-radius: 0;
    padding: 0;
    margin: 0;
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border-top: 1px solid rgba(23, 69, 143, 0.07);
}

.offcanvas .dropdown-menu.show {
    animation: menuDropdownIn 0.22s ease both;
    transform-origin: top right;
}

.offcanvas .dropdown-menu.show .dropdown-item {
    animation: menuItemIn 0.2s ease both;
}

.offcanvas .dropdown-menu.show li:nth-child(1) .dropdown-item {
    animation-delay: 0.03s;
}

.offcanvas .dropdown-menu.show li:nth-child(2) .dropdown-item {
    animation-delay: 0.06s;
}

.offcanvas .dropdown-menu.show li:nth-child(3) .dropdown-item {
    animation-delay: 0.09s;
}

.offcanvas .dropdown-menu.show li:nth-child(4) .dropdown-item {
    animation-delay: 0.12s;
}

.offcanvas .dropdown-item {
    padding: 9px 16px 9px 30px;
    font-size: 0.8rem;
    color: var(--slate);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.16s ease, color 0.16s ease, padding-left 0.16s ease;
}

.offcanvas .dropdown-item:last-child {
    border-bottom: none;
}

.offcanvas .dropdown-item::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--azure);
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.15s;
}

.offcanvas .dropdown-item:hover {
    background: #e8f0ff;
    color: var(--rotary-blue);
    padding-left: 34px;
}

.offcanvas .dropdown-item:hover::before {
    opacity: 1;
}

@keyframes menuDropdownIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes menuItemIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Gestión / tipo selects panel inside offcanvas */
.offcanvas .logged_user .d-flex {
    gap: 6px;
}

.offcanvas .logged_user .form-select {
    font-size: 0.78rem;
    border-radius: 8px;
    border-color: rgba(23, 69, 143, 0.15);
    color: var(--charcoal);
    padding: 6px 10px;
    background-color: #f8f9fc;
}

.offcanvas .logged_user .form-select:focus {
    border-color: var(--azure);
    box-shadow: 0 0 0 2px rgba(0, 103, 200, 0.08);
}

/* ── Modals ────────────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(13, 45, 94, 0.22);
    overflow: hidden;
}
.modal-content:has(.enhanced-select.is-open) {
    overflow: visible;
}

.modal-header {
    background:  var(--rotary-blue);
    border-bottom: none;
    padding: 18px 24px;
}

.modal-title {
    color: #fff !important;
    font-weight: 700;
    font-size: 0.95rem !important;
    letter-spacing: 0.02em;
}

.modal-header .btn-close {
    filter: invert(1) brightness(2);
    opacity: 0.75;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 18px 20px;
    color: var(--charcoal);
}

.modal-body .form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-body label {
    font-size: 0.8rem;
    color: var(--slate);
    font-weight: 500;
    line-height: 1.55;
    margin-bottom: 0;
    display: block;
}

.modal-body .form-select {
    font-size: 0.85rem;
    border-radius: 8px;
    border-color: rgba(23, 69, 143, 0.15);
    background-color: #f8f9fc;
}

/* File upload input — styled as a dashed drop zone */
.modal-body input[type="file"],
.modal-body .form-control-file {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 2px dashed rgba(23, 69, 143, 0.22);
    border-radius: 10px;
    font-size: 0.82rem;
    background: #f8f9fc;
    color: var(--charcoal);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.modal-body input[type="file"]:hover,
.modal-body .form-control-file:hover {
    border-color: var(--azure);
    background: #f0f4ff;
}

.modal-footer {
    border-top: 1px solid rgba(23, 69, 143, 0.08);
    padding: 14px 24px;
    background: #f8f9fc;
    gap: 8px;
}

.modal-footer .btn {
    min-width: 90px;
}

/* Alert states inside modals */
.modal-body .alert {
    border-radius: 10px;
    font-size: 0.8rem;
    border: none;
    padding: 10px 14px;
}

.modal-body .alert-warning {
    background: #fff8e6;
    color: #92640a;
    border-left: 3px solid var(--rotary-gold);
}

.modal-body .alert-success {
    background: #f0faf3;
    color: #007a2e;
    border-left: 3px solid #009739;
}

.modal-body .alert-info {
    background: #f0f7ff;
    color: #0067c8;
    border-left: 3px solid var(--azure);
}

/* Global toast */
.toast-container {
    z-index: 1095;
}

#RotaryToast {
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(23, 69, 143, 0.12);
    border-left: 4px solid var(--azure);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(13, 45, 94, 0.18);
    color: var(--charcoal);
    overflow: hidden;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}

#RotaryToast.show {
    filter: blur(0);
    transform: translateY(0) scale(1);
}

#RotaryToast.showing,
#RotaryToast.hide {
    filter: blur(2px);
}

#RotaryToast.toast-success {
    border-left-color: #009739;
}

#RotaryToast.toast-error {
    border-left-color: var(--rotary-gold);
}

#RotaryToast .toast-header {
    background: rgba(255, 255, 255, 0.68);
    border-bottom: 1px solid rgba(23, 69, 143, 0.08);
    color: var(--charcoal);
}

#RotaryToast .toast-body {
    color: var(--charcoal);
    font-size: 0.86rem;
    line-height: 1.45;
    padding: 12px 14px;
}

/* ── Módulo Movimientos Contables ─────────────────────────────────────────── */

/* Botones extra-small usados en la tabla */
.btn-xs {
    padding: 2px 6px;
    font-size: 0.72rem;
    line-height: 1.4;
    border-radius: 4px;
}

/* Tabla de movimientos: filas más compactas */
#tablaMovimientos td,
#tablaMovimientos th {
    vertical-align: middle;
    font-size: 0.82rem;
}

/* Barra de acciones masivas */
#barraAcciones {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 6px 12px;
}

/* ── Plan de cuentas (árbol) ─────────────────────────────────────────────── */
.cuentas-tree-container {
    max-height: 460px;
    overflow-y: auto;
}

.cuentas-ul {
    padding-left: 0;
}

.cuenta-item {
    list-style: none;
}

.cuenta-row {
    transition: background 0.15s;
    border-radius: 6px;
}

.hover-bg:hover {
    background: var(--bg-light);
}

.cuenta-drag-handle {
    opacity: 0.45;
    transition: opacity 0.15s;
    font-size: 1rem;
}
.cuenta-row:hover .cuenta-drag-handle {
    opacity: 1;
}

.cuenta-edit-input {
    max-width: 220px;
}

/* Badges de estado */
.bg-success-subtle {
    background-color: #d1fae5 !important;
}
.bg-danger-subtle {
    background-color: #fee2e2 !important;
}

/* ── Balance contable ────────────────────────────────────────────────────── */
.balance-table td,
.balance-table th {
    font-size: 0.83rem;
    vertical-align: middle;
}

.balance-total-row td {
    border-top: 2px solid #dee2e6;
    font-size: 0.9rem;
}

/* Custom member fields */
.custom-fields-section-title {
    color: var(--rotary-blue);
    font-size: 0.88rem;
    font-weight: 700;
}

.custom-field-check {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin: 0;
}

.custom-field-check input {
    accent-color: var(--rotary-blue);
}

.custom-field-photo {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.custom-field-photo img {
    border: 1px solid rgba(23,69,143,0.12);
    border-radius: 8px;
    height: 58px;
    object-fit: cover;
    width: 58px;
}

.custom-field-photo-input {
    max-width: 320px;
}

/* AI integrations - help card */
.ai-howto-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-top: 1px solid #f0f0f0;
}
.ai-howto-item:first-child { border-top: none; }
.ai-howto-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.ai-howto-body { flex: 1 1 auto; min-width: 0; }
.ai-howto-body ol li { margin-bottom: 2px; }
.ai-howto-body code {
    background: #f3f4f7;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.78rem;
}

/* AI test - response output */
.ai-test-response {
    background: #f8f9fc;
    border: 1px solid #e6e8ee;
    border-radius: 8px;
    padding: 14px 16px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.92rem;
    line-height: 1.5;
    max-height: 480px;
    overflow-y: auto;
}

.ai-test-prompt {
    min-height: 190px;
    resize: vertical;
}

/* AI provider official logos */
.ai-howto-icon img { width: 22px; height: 22px; display: block; }
.ai-provider-logo {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ai-provider-logo img { width: 16px; height: 16px; display: block; }
.ai-provider-openai { background: #10a37f; }
.ai-provider-claude { background: #cc785c; }
.ai-provider-gemini { background: #4285f4; }
.ai-integration-row .btn-group-sm .btn {
    min-width: 32px;
}
.ai-button-spinner {
    width: 0.9rem;
    height: 0.9rem;
}

.ai-howto-heading {
    min-width: 0;
}

.ai-howto-heading .fw-semibold {
    min-width: 0;
}

@media (max-width: 767.98px) {
    .ai-howto-item {
        gap: 12px;
        padding: 14px;
    }

    .ai-howto-heading {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .ai-howto-heading .btn {
        width: 100%;
    }

}

@media (max-width: 420px) {
    .ai-howto-item {
        flex-direction: column;
    }
}

/* Offcanvas dropdown - section headers and dividers */
.offcanvas .dropdown-menu .dropdown-header {
    padding: 10px 16px 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rotary-blue);
    font-weight: 700;
    background: transparent;
    margin: 0;
}
.offcanvas .dropdown-menu .dropdown-divider {
    margin: 4px 14px;
    border-color: rgba(23, 69, 143, 0.12);
    opacity: 1;
}
.offcanvas .dropdown-menu li {
    list-style: none;
}
/* Ensure all items render regardless of position (animation delays only cover 1-4) */
.offcanvas .dropdown-menu.show li:nth-child(n+5) .dropdown-item {
    animation-delay: 0.14s;
}

/* Ensure inline SVG logos size like img versions */
.ai-howto-icon svg { width: 22px; height: 22px; display: block; }
.ai-provider-logo svg { width: 16px; height: 16px; display: block; }

/* Fix: prevent offcanvas nav cards from shrinking and clipping content */
.offcanvas .navbar-nav {
    flex-shrink: 0 !important;
    overflow: visible !important;
}
.offcanvas-body { min-height: 0; }

/* Slim, modern scrollbar for offcanvas */
.offcanvas-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(23, 69, 143, 0.25) transparent;
}
.offcanvas-body::-webkit-scrollbar { width: 6px; }
.offcanvas-body::-webkit-scrollbar-track { background: transparent; }
.offcanvas-body::-webkit-scrollbar-thumb {
    background: rgba(23, 69, 143, 0.22);
    border-radius: 999px;
    transition: background 0.18s ease;
}
.offcanvas-body::-webkit-scrollbar-thumb:hover { background: rgba(23, 69, 143, 0.45); }
.offcanvas-body::-webkit-scrollbar-button { display: none; height: 0; width: 0; }

/* Compact offcanvas when menus are collapsed - no auto bottom gap */
.offcanvas-body > .logged_user:last-child { margin-top: 0 !important; }

/* Refined offcanvas menu layout */
.offcanvas {
    max-width: 316px;
}

.district-menu-body {
    height: calc(100vh - 64px);
    padding: 14px 12px 12px;
    gap: 8px;
    overflow: hidden;
}

.offcanvas-menu-sections {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: none;
}

.offcanvas-menu-sections::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.offcanvas-menu-sections:hover {
    scrollbar-width: thin;
    scrollbar-color: rgba(23, 69, 143, 0.26) transparent;
}

.offcanvas-menu-sections:hover::-webkit-scrollbar {
    width: 6px;
}

.offcanvas-menu-sections:hover::-webkit-scrollbar-thumb {
    background: rgba(23, 69, 143, 0.22);
    border-radius: 999px;
}

.offcanvas-user-card {
    flex: 0 0 auto;
}

.offcanvas-context-card {
    flex: 0 0 auto;
    margin-top: auto !important;
    border-color: rgba(23, 69, 143, 0.08) !important;
    box-shadow: 0 12px 28px rgba(13, 45, 94, 0.08) !important;
}

.offcanvas .navbar-nav {
    border-radius: 10px;
}

.offcanvas .navbar-nav .nav-link {
    min-height: 42px;
}

.offcanvas .navbar-nav .nav-link > span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.offcanvas .navbar-nav .nav-link i {
    width: 18px;
    color: var(--azure);
    font-size: 0.98rem;
    text-align: center;
}

.offcanvas .navbar-nav .nav-link:hover i,
.offcanvas .navbar-nav .nav-link:focus i,
.offcanvas .navbar-nav .nav-link[aria-expanded="true"] i {
    color: var(--rotary-blue);
}

.offcanvas .dropdown-menu {
    background: #f7f9fe;
}

.offcanvas .dropdown-menu .dropdown-header {
    padding: 12px 16px 5px;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
}

.offcanvas .dropdown-item {
    min-height: 34px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.offcanvas-context-card form {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.offcanvas-context-card .form-select {
    min-height: 38px;
    margin: 0 !important;
    background-color: #fff;
}

@media (max-height: 700px) {
    .offcanvas-user-card {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .offcanvas .logged_user a:not(.btn) {
        margin-bottom: 3px;
    }

    .offcanvas .navbar-nav .nav-link {
        min-height: 38px;
        padding-top: 9px;
        padding-bottom: 9px;
    }
}

/* AI integration modal */
.ai-modal .modal-content { border-radius: 14px; overflow: hidden; }
.ai-modal .modal-header .modal-title i {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: #fff !important;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    margin-right: 8px !important;
    opacity: 1;
    width: 26px;
}
.ai-modal-tabs { padding: 0 20px; border-bottom: none; background: #fafbfd; }
.ai-modal-tabs .nav-link {
    color: var(--slate);
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 14px;
    background: transparent;
}
.ai-modal-tabs .nav-link:hover { color: var(--rotary-blue); }
.ai-modal-tabs .nav-link.active {
    color: var(--rotary-blue);
    border-bottom-color: var(--rotary-blue);
    background: transparent;
}
.ai-modal-tab-content { padding: 22px; background: #fff; }
.ai-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: var(--rotary-blue);
    margin-bottom: 12px;
}
.ai-switch-help { margin-left: 2.6rem; margin-top: -4px; }

/* MyRotary integration modal — report-access picker as selectable cards */
.myrotary-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 575.98px) {
    .myrotary-report-grid { grid-template-columns: 1fr; }
}
.myrotary-report-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #e6e8ee;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.myrotary-report-card:hover {
    border-color: rgba(23, 69, 143, 0.3);
    box-shadow: 0 2px 8px rgba(23, 69, 143, 0.06);
}
.myrotary-report-card .form-check-input {
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}
.myrotary-report-card__icon {
    font-size: 1.05rem;
    color: #9aa1b2;
    transition: color 0.15s;
}
.myrotary-report-card__label {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    color: var(--charcoal);
}
.myrotary-report-card:has(.form-check-input:checked) {
    border-color: var(--rotary-blue);
    background: rgba(23, 69, 143, 0.05);
}
.myrotary-report-card:has(.form-check-input:checked) .myrotary-report-card__icon {
    color: var(--rotary-blue);
}

/* MyRotary sync history — tidy, separated rows */
#myrotaryHistory .list-group-item { border-color: #eef0f5; }
#myrotaryHistory .list-group-item:first-child { padding-top: 0 !important; }

/* Integrations list (cards instead of table) */
.ai-integrations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-integration-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e6e8ee;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ai-integration-row:hover {
    border-color: rgba(23, 69, 143, 0.3);
    box-shadow: 0 2px 8px rgba(23, 69, 143, 0.06);
}
.ai-integration-row-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ai-integration-row-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ai-empty-state {
    padding: 24px;
    text-align: center;
    color: #8a90a3;
    border: 1px dashed #d8dbe5;
    border-radius: 10px;
    background: #fafbfd;
}

/* Test panel inside modal */
.ai-test-active {
    padding: 10px 12px;
    background: #f3f6fc;
    border-radius: 8px;
}
.ai-test-active-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ai-test-active-model {
    margin-top: 4px;
    color: #5c6477;
}
.ai-test-empty {
    padding: 32px 16px;
    text-align: center;
    color: #8a90a3;
    border: 1px dashed #d8dbe5;
    border-radius: 10px;
    background: #fafbfd;
}
.ai-test-empty i { font-size: 2.2rem; display: block; margin-bottom: 6px; }
.ai-test-result {
    border: 1px solid #e6e8ee;
    border-radius: 10px;
    padding: 16px;
    background: #fff;
}
.ai-test-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Howto inside modal */
.ai-howto {
    border: 1px solid #e6e8ee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.ai-howto-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

/* ── Usuarios y Roles ────────────────────────────── */
.ur-perm-tree { display: flex; flex-direction: column; gap: 4px; }
.ur-perm-group { margin-bottom: 4px; }
.ur-perm-parent { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; background: #f8f9fa; }
.ur-toggle-btn { border: none; background: none; padding: 0 4px; cursor: pointer; color: #6c757d; line-height: 1; }
.ur-perm-label { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; font-size: .9rem; }
.ur-perm-children { padding-left: 32px; border-left: 2px solid #dee2e6; margin-left: 12px; overflow: hidden; display: none; }
.ur-perm-children.show { display: block; }
.ur-perm-leaf { padding: 5px 8px; display: flex; align-items: center; }
.ur-chevron { transition: transform .2s; display: inline-block; }
.ur-chevron-up { transform: rotate(-90deg); }
.ur-perm-locked > .ur-perm-parent,
.ur-perm-leaf.ur-perm-locked { opacity: .55; }
.ur-perm-locked .ur-perm-label { cursor: not-allowed; }
.ur-perm-locked input[type="checkbox"][disabled] { cursor: not-allowed; }

/* Lista de roles — estado seleccionado */
#rolesList .list-group-item-action.active small.text-muted {
    color: rgba(255, 255, 255, .85) !important;
}
#rolesList .list-group-item-action.active .badge.bg-secondary {
    background-color: rgba(255, 255, 255, .25) !important;
    color: #fff;
}

/* ───────────────────────────────────────────────────────────────────────
 * Padrón inicial — tarjeta de éxito (modal de importación de membresía)
 * y placeholder del gráfico de movimiento de socios.
 * Paleta Rotary: Royal Blue #17458f, Azure #0067c8, Powder Blue #b9d9eb,
 * Gold #f7a81b, Charcoal #54565a, Pewter #898a8d.
 * ─────────────────────────────────────────────────────────────────────── */

.import-success-card {
    display: block;
    background: linear-gradient(180deg, #f5f9fd 0%, #ffffff 100%);
    border: 1px solid #b9d9eb;
    border-radius: 14px;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(23, 69, 143, 0.05);
    animation: import-success-card-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.import-success-illustration {
    margin-bottom: 0.9rem;
    line-height: 1;
}

.import-success-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #17458f;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 0 0 0 rgba(23, 69, 143, 0.35);
    animation:
        import-success-check-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both,
        import-success-check-glow 1.6s ease-out 0.55s 1 both;
}

.import-success-check i {
    transform: translateY(1px);
    animation: import-success-check-draw 0.35s ease-out 0.45s both;
}

.import-success-headline {
    font-size: 1.2rem;
    font-weight: 600;
    color: #17458f;
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
    animation: import-success-line-in 0.5s ease-out 0.3s both;
}

.import-success-stats {
    font-size: 0.95rem;
    color: #54565a;
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto;
    animation: import-success-line-in 0.5s ease-out 0.4s both;
}

.import-success-stats strong {
    color: #17458f;
    font-weight: 600;
}

.import-success-divider {
    width: 60px;
    height: 2px;
    margin: 1rem auto;
    background: linear-gradient(90deg, transparent, #b9d9eb, transparent);
    border-radius: 1px;
    animation: import-success-line-in 0.5s ease-out 0.5s both;
}

.import-success-help {
    font-size: 0.84rem;
    color: #898a8d;
    line-height: 1.55;
    max-width: 460px;
    margin: 0 auto;
    animation: import-success-line-in 0.5s ease-out 0.6s both;
}

@keyframes import-success-card-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes import-success-check-pop {
    0%   { transform: scale(0); opacity: 0; }
    55%  { transform: scale(1.18); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes import-success-check-glow {
    0%   { box-shadow: 0 0 0 0 rgba(23, 69, 143, 0.35); }
    100% { box-shadow: 0 0 0 14px rgba(23, 69, 143, 0); }
}

@keyframes import-success-check-draw {
    from { opacity: 0; transform: translateY(1px) scale(0.6); }
    to   { opacity: 1; transform: translateY(1px) scale(1); }
}

@keyframes import-success-line-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Placeholder del gráfico de Altas/Bajas cuando aún no hay movimiento */
.chart-placeholder-card {
    background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
    border: 1px dashed #b9d9eb;
    box-shadow: none;
}

.chart-placeholder-soft {
    text-align: center;
    padding: 2.25rem 1.5rem 2rem;
    animation: chart-placeholder-in 0.5s ease-out both;
}

.chart-placeholder-icon {
    margin-bottom: 0.9rem;
    line-height: 1;
}

.chart-placeholder-icon i {
    display: inline-block;
    font-size: 2.6rem;
    color: #0067c8;
    opacity: 0.45;
    animation: chart-placeholder-pulse 2.8s ease-in-out infinite;
}

.chart-placeholder-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #17458f;
    margin-bottom: 0.6rem;
    letter-spacing: 0.01em;
}

.chart-placeholder-body {
    font-size: 0.95rem;
    color: #54565a;
    line-height: 1.55;
    max-width: 540px;
    margin: 0 auto 0.55rem;
}

.chart-placeholder-body strong {
    color: #17458f;
    font-weight: 600;
}

.chart-placeholder-hint {
    font-size: 0.82rem;
    color: #898a8d;
    line-height: 1.55;
    max-width: 540px;
    margin: 0 auto;
}

@keyframes chart-placeholder-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes chart-placeholder-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50%      { opacity: 0.7; transform: scale(1.07); }
}

/* Variante compacta para las tarjetas chicas (half-width) del dashboard */
.chart-placeholder-compact {
    padding: 1.5rem 0.5rem 1rem;
}
.chart-placeholder-compact .chart-placeholder-icon i {
    font-size: 2.1rem;
}
.chart-placeholder-compact .chart-placeholder-body {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}
.chart-placeholder-compact .chart-placeholder-hint {
    font-size: 0.78rem;
}

/* Variante "positiva" — para estados que NO son un vacío sino una buena noticia
 * (ej: "no hay pagos pendientes a RI"). Icono en verde Rotary Grass. */
.chart-placeholder-positive .chart-placeholder-icon i {
    color: #009739;
    opacity: 0.65;
}

@media (prefers-reduced-motion: reduce) {
    .import-success-card,
    .import-success-check,
    .import-success-check i,
    .import-success-headline,
    .import-success-stats,
    .import-success-divider,
    .import-success-help,
    .chart-placeholder-soft,
    .chart-placeholder-icon i {
        animation: none !important;
    }
}

/* ── Search scope tabs (Socios / Eventos) ───────────────────── */
.search-scope-tabs {
    display: inline-flex;
    gap: 2px;
    margin: 4px 0 20px;
}

.search-scope-tab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 20px;
    border: 0;
    background: transparent;
    color: var(--slate);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.search-scope-tab i {
    font-size: 0.95rem;
    opacity: 0.6;
    transition: opacity 140ms ease;
}

.search-scope-tab:hover { color: var(--rotary-dark); }
.search-scope-tab:hover i { opacity: 0.95; }

.search-scope-tab:focus-visible {
    outline: 2px solid var(--rotary-blue);
    outline-offset: 2px;
}

.search-scope-tab.is-active,
.search-scope-tab.active {
    background: linear-gradient(180deg, rgba(0, 103, 200, 0.13), rgba(0, 103, 200, 0.08));
    box-shadow: inset 0 0 0 1px rgba(0, 103, 200, 0.18);
    color: var(--rotary-blue);
}
.search-scope-tab.is-active i,
.search-scope-tab.active i { opacity: 1; }

.search-scope-panel[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .search-scope-tab,
    .search-scope-tab i { transition: none; }
}

/* Public links report */
.public-links-report {
    padding-bottom: 24px;
}

.public-links-report-header {
    align-items: flex-start;
    gap: 16px;
}

.public-links-tabs .search-scope-tab {
    text-decoration: none;
}

/* Status summary chips (compact pills that wrap, sized to content) */
.public-link-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.public-link-stat {
    align-items: center;
    background: #fff;
    border: 1px solid var(--silver);
    border-radius: 999px;
    color: var(--charcoal);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .8rem;
    gap: 6px;
    line-height: 1.15;
    padding: 6px 12px;
}

.public-link-stat i { font-size: .9rem; flex-shrink: 0; }
.public-link-stat strong { font-size: .9rem; font-weight: 700; flex-shrink: 0; }
.public-link-stat-label { color: var(--slate); }

.public-link-stat.is-link-created { background: rgba(13,202,240,.12); border-color: rgba(13,202,240,.36); }
.public-link-stat.is-link-created i { color: #087990; }
.public-link-stat.is-opened { background: rgba(255,193,7,.12); border-color: rgba(255,193,7,.42); }
.public-link-stat.is-opened i { color: #c79100; }
.public-link-stat.is-saved-complete { background: rgba(25,135,84,.10); border-color: rgba(25,135,84,.32); }
.public-link-stat.is-saved-complete i { color: #198754; }
.public-link-stat.is-saved-incomplete { background: rgba(220,53,69,.10); border-color: rgba(220,53,69,.32); }
.public-link-stat.is-saved-incomplete i { color: #dc3545; }

/* Status badges in the report table — soft tints matching the summary chips */
.public-link-badge {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 600;
    gap: .4em;
    line-height: 1.2;
    padding: .32em .72em;
}

.public-link-badge::before {
    border-radius: 50%;
    content: "";
    display: inline-block;
    height: .5em;
    width: .5em;
}

.public-link-badge.is-link-created {
    background: rgba(13,202,240,.14);
    border-color: rgba(13,202,240,.32);
    color: #0a6f86;
}
.public-link-badge.is-link-created::before { background: #0dcaf0; }

.public-link-badge.is-opened {
    background: rgba(255,193,7,.18);
    border-color: rgba(255,193,7,.40);
    color: #946c00;
}
.public-link-badge.is-opened::before { background: #ffc107; }

.public-link-badge.is-saved-complete {
    background: rgba(25,135,84,.14);
    border-color: rgba(25,135,84,.32);
    color: #146c43;
}
.public-link-badge.is-saved-complete::before { background: #198754; }

.public-link-badge.is-saved-incomplete {
    background: rgba(220,53,69,.14);
    border-color: rgba(220,53,69,.32);
    color: #b02a37;
}
.public-link-badge.is-saved-incomplete::before { background: #dc3545; }

.public-link-badge.is-no-link {
    background: rgba(108,117,125,.12);
    border-color: rgba(108,117,125,.28);
    color: var(--slate);
}
.public-link-badge.is-no-link::before { background: #adb5bd; }

.public-links-table-wrap {
    border: 1px solid rgba(23,69,143,.08);
    border-radius: 8px;
    margin-bottom: 12px;
}

.public-links-table-wrap .table {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .public-links-report {
        padding-top: 0px;
    }

    .public-links-report-header {
        flex-direction: column;
        margin-top: 4px;
    }

    .public-links-breadcrumb {
        max-width: 100%;
        overflow-x: auto;
        padding-top: 5px;
        padding-bottom: 5px;
        scrollbar-width: none;
        white-space: nowrap;
    }

    .public-links-breadcrumb::-webkit-scrollbar {
        display: none;
    }

    .public-links-report .page-header-title {
        font-size: 1.28rem;
        line-height: 1.2;
    }

    .public-links-report .page-header-subtitle {
        font-size: .86rem;
    }

    .public-links-report .page-header-actions {
        width: 100%;
    }

    .public-link-toggle-filters {
        justify-content: center;
        width: 100%;
    }

    .public-links-tabs {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        padding-bottom: 2px;
        width: 100%;
    }

    .public-links-tabs .search-scope-tab {
        flex: 0 0 auto;
    }

    .public-link-summary {
        gap: 6px;
        margin-bottom: 12px;
    }

    .public-link-stat {
        font-size: .74rem;
        gap: 5px;
        padding: 5px 10px;
    }

    .public-link-stat strong { font-size: .8rem; }

    .public-links-table-wrap {
        overflow-x: auto;
    }

    .public-links-table-wrap .table {
        min-width: 640px;
    }
}

/* ── Event search results grid ───────────────────────────────── */
.events-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(13, 45, 94, 0.06);
    box-shadow: 0 6px 18px -10px rgba(13, 45, 94, 0.18);
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.18s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -16px rgba(13, 45, 94, 0.32);
    border-color: rgba(0, 103, 200, 0.25);
    color: inherit;
}

.event-card-cover {
    height: 130px;
    background-size: cover;
    background-position: center;
    background-color: #eaf2fb;
}

.event-card-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0067c8 0%, #0d2d5e 100%);
    color: #fff;
    font-size: 2.4rem;
    opacity: 0.85;
}

.event-card-datechip {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    box-shadow: 0 6px 18px -6px rgba(13, 45, 94, 0.4);
    text-align: center;
    line-height: 1;
}

.event-card-datechip-day {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--rotary-dark);
}

.event-card-datechip-month {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--cardinal);
    font-weight: 700;
    margin-top: 2px;
    text-transform: uppercase;
}

.event-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.event-card-title {
    font-weight: 700;
    color: var(--rotary-dark);
    font-size: 1rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--slate);
    font-size: 0.78rem;
}

.event-card-meta i { color: var(--rotary-blue); margin-right: 4px; }

.event-card-desc {
    color: var(--charcoal);
    font-size: 0.82rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.85;
}

.event-card-footer {
    margin-top: auto;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.event-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.event-card-badge-paid {
    background: rgba(247, 168, 27, 0.15);
    color: #b6730c;
}

.event-card-badge-free {
    background: rgba(0, 173, 187, 0.14);
    color: var(--turquoise);
}

@media (max-width: 600px) {
    .events-search-grid {
        grid-template-columns: 1fr;
    }
}

.club-card-select {
    align-items: center;
    background: #fbfdff;
    border-bottom: 1px solid rgba(23, 69, 143, .08);
    border-top-left-radius: var(--bs-card-border-radius, .375rem);
    border-top-right-radius: var(--bs-card-border-radius, .375rem);
    display: flex;
    justify-content: flex-end;
    min-height: 42px;
    padding: 7px 10px;
    position: relative;
    z-index: 6;
}

#clubesResultsGrid.selection-ui-hidden .club-card-select {
    display: none;
}

.club-search-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(23, 69, 143, 0.10);
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
    color: inherit;
}

.club-search-card.is-selected {
    border-color: var(--rotary-blue, #17458f);
    box-shadow: 0 0 0 2px rgba(23, 69, 143, 0.28);
}

.club-search-card:hover {
    box-shadow: 0 6px 18px rgba(23, 69, 143, 0.10);
    transform: translateY(-2px);
    border-color: rgba(23, 69, 143, 0.25);
}

.club-search-card .card-title {
    color: var(--rotary-blue, #17458f);
    font-weight: 600;
}

.club-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.club-card-badge-rotary {
    background: rgba(23, 69, 143, 0.10);
    color: var(--rotary-blue, #17458f);
}

.club-card-badge-rotaract {
    background: rgba(204, 51, 102, 0.12);
    color: #cc3366;
}

.club-card-debt-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.club-card-debt-badge--warning {
    background: rgba(255, 193, 7, 0.18);
    color: #997404;
}

.club-card-debt-badge--danger {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}
