:root {
    --white: #ffffff;
    --purple-900: #3b0066;
    --purple-700: #6f00b3;
    --purple-500: #9D00FF;
    --accent: #9D00FF;
    --red-500: #e53935;
    --black: #0b0b0f;
    --gray-100: #f4f4f7;
    --gray-300: #d8d8e2;
    --gray-500: #6b7280;
    --gray-600: #353542;
    --gray-900: #111118;
    --shadow: 0 24px 60px rgba(10, 10, 30, 0.14);
    --radius: 18px;
}

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

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background: radial-gradient(circle at top, rgba(157, 0, 255, 0.08), transparent 60%), var(--white);
    color: var(--black);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--purple-500);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.scrolled {
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(11, 27, 51, 0.12);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}

.logo {
    font-weight: 700;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
}

.logo span {
    font-size: 1.2rem;
}

.logo small {
    color: var(--purple-500);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

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

.nav a {
    font-weight: 500;
    position: relative;
    color: var(--black);
}

.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--purple-500);
    transition: width .3s ease;
}

.nav a:hover::after,
.nav a:focus::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--black);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.78rem 1.5rem;
    border-radius: 999px;
    border: none;
    background: var(--purple-500);
    color: var(--white);
    font-weight: 700;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
    box-shadow: 0 12px 24px rgba(157, 0, 255, 0.35);
}

.btn:hover,
.btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(157, 0, 255, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(61, 0, 102, 0.35);
    color: var(--black);
    box-shadow: none;
}

.btn-soft {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--white);
    box-shadow: none;
}

.member-cta {
    background: var(--purple-500);
    color: var(--white) !important;
}

.member-cta::after {
    display: none;
}

.hero {
    background: radial-gradient(circle at top, rgba(157, 0, 255, 0.25), transparent 48%),
        linear-gradient(135deg, rgba(8, 3, 20, 0.97), rgba(61, 0, 102, 0.96));
    color: var(--white);
    padding: 6rem 0 4.5rem;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.3rem, 4.6vw, 4rem);
    line-height: 1.1;
    margin: 1rem 0 1rem;
    font-family: 'Poppins', sans-serif;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.8rem;
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.card .hero-actions {
    margin-top: 1.5rem;
}

.hero-visual {
    min-height: 320px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 22px;
    padding: 1.4rem;
}

.hero-kicker {
    color: #ffd6ff;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-size: .8rem;
    margin-bottom: .4rem;
}

.hero-panel h3 {
    font-size: 1.35rem;
    margin-bottom: .5rem;
}

.hero-slider {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    padding: 0 52px;
    box-sizing: border-box;
}

.hero-slides {
    position: relative;
    transition: height .45s cubic-bezier(.4, 0, .2, 1);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 22px;
    padding: 1.4rem;
    opacity: 0;
    transform: translateX(24px) scale(.985);
    transition: opacity .55s ease, transform .55s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-slide h3 {
    font-size: 1.35rem;
    margin-bottom: .35rem;
    font-family: 'Poppins', sans-serif;
}

.hero-slide .hero-term {
    color: rgba(255, 255, 255, 0.7);
    font-size: .78rem;
    letter-spacing: .04em;
    margin-bottom: .65rem;
}

.hero-slide p:last-child {
    color: rgba(255, 255, 255, 0.88);
    font-size: .9rem;
    margin: 0;
}

.hero-slider-arrow {
    position: absolute;
    top: calc(50% - 18px);
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(11, 11, 15, 0.45);
    color: #fff;
    cursor: pointer;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.hero-slider-arrow svg {
    display: block;
}

.hero-slider-arrow:hover,
.hero-slider-arrow:focus-visible {
    background: rgba(157, 0, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.6);
    outline: none;
    transform: translateY(-50%) scale(1.05);
}

.hero-slider-arrow.prev { left: 4px; }
.hero-slider-arrow.next { right: 4px; }

.hero-slider-dots {
    display: flex;
    justify-content: center;
    gap: .45rem;
    margin-top: .9rem;
}

.hero-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    transition: background .25s ease, transform .25s ease, width .25s ease;
}

.hero-slider-dot:hover {
    background: rgba(255, 255, 255, 0.55);
}

.hero-slider-dot.is-active {
    background: #fff;
    width: 22px;
    border-radius: 999px;
}

@media (max-width: 720px) {
    .hero-slider {
        padding: 0;
    }

    .hero-slider-arrow {
        top: auto;
        bottom: 0;
        transform: none;
        width: 36px;
        height: 36px;
        background: rgba(11, 11, 15, 0.55);
    }

    .hero-slider-arrow:hover,
    .hero-slider-arrow:focus-visible {
        transform: scale(1.05);
    }

    .hero-slider-arrow.prev { left: 0; }
    .hero-slider-arrow.next { right: 0; }

    .hero-slider-dots {
        margin: 1rem 50px 0;
        min-height: 34px;
        align-items: center;
    }
}

.section {
    padding: 4rem 0;
}

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

.section-title h2 {
    font-size: 2rem;
    font-family: 'Poppins', sans-serif;
}

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

.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
    overflow: hidden;
}

button.card {
    border: none;
    cursor: pointer;
    text-align: left;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(11, 27, 51, 0.17);
}

.card .tag {
    display: inline-flex;
    font-size: 0.78rem;
    color: var(--purple-500);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

.chapter-card {
    border: 1px solid rgba(157, 0, 255, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f9f4ff 100%);
    box-shadow: 0 20px 40px rgba(61, 0, 102, 0.12);
}

.chapter-card {
    position: relative;
}

.chapter-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 1px solid rgba(157, 0, 255, 0.25);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.chapter-card:hover::after {
    opacity: 1;
}

.chapter-card .chapter-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .9rem;
}

.chapter-crest {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, #c27bff 0%, #5b1dba 45%, #21083f 100%);
    color: var(--white);
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 18px 30px rgba(74, 28, 143, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

.chapter-crest img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Large variant used on detail pages (capitulo, priorado, regiao) */
.chapter-crest-lg {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
    box-shadow: 0 12px 32px rgba(74, 28, 143, 0.35);
}

.chapter-card .leader-name {
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    margin-top: .4rem;
}

.chapter-card .leader-term {
    color: var(--gray-600);
    font-size: .95rem;
    margin-bottom: .9rem;
}

.news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.news-card {
    padding-top: 0;
}

.news-thumb {
    height: 120px;
    border-radius: 12px;
    margin-bottom: .9rem;
    background: linear-gradient(135deg, rgba(26, 5, 64, 0.95), rgba(74, 28, 143, 0.92));
    position: relative;
    overflow: hidden;
}

.news-thumb::before,
.news-thumb::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    opacity: .35;
}

.news-thumb::before {
    width: 140px;
    height: 140px;
    background: var(--red-500);
    right: -30px;
    top: -50px;
}

.news-thumb::after {
    width: 120px;
    height: 120px;
    background: #5f8ceb;
    left: -30px;
    bottom: -45px;
}

.post-badge {
    display: inline-flex;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .75rem;
    margin-bottom: .6rem;
}

.cat-filantropia {
    background: #e8f6ef;
    color: #1f7a4d;
}

.cat-noticia {
    background: #e6eefc;
    color: #224caa;
}

.cat-aviso {
    background: #fff4d9;
    color: #8f5a00;
}

.cat-comunicado {
    background: #efe8ff;
    color: #5b2ca0;
}

p.badge {
    max-width: fit-content;
}

.badge {
    background: rgba(157, 0, 255, .18);
    color: #3b0066;
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.filter-bar>input,
.filter-bar>select,
.form-control input,
.form-control textarea,
.form-control select {
    padding: .75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--gray-300);
    min-height: 48px;
}

.filter-bar>input,
.filter-bar>select {
    flex: 1 1 170px;
    min-width: 160px;
    max-width: 240px;
}

.filter-bar .btn {
    min-height: 48px;
    padding: 0 1.25rem;
    flex: 0 0 auto;
}

.form-control {
    display: grid;
    gap: .5rem;
    margin-bottom: 1rem;
}

.list-grid {
    display: grid;
    gap: 1rem;
}

.notice {
    background: rgba(23, 49, 93, .08);
    border-left: 4px solid var(--purple-500);
    padding: 1rem 1.5rem;
    border-radius: 12px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

.table th,
.table td {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--gray-300);
    text-align: left;
}

.table th {
    background: var(--gray-100);
    font-size: .85rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.site-footer {
    background: var(--black);
    color: var(--white);
}

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

.footer-grid p,
.footer-grid a {
    color: #d9d9e8;
}

.footer-grid a {
    display: block;
    margin: .32rem 0;
}

.social-links {
    display: flex;
    gap: .5rem;
    margin-top: .9rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 1.4rem 0;
    text-align: center;
    color: #d7e1f2;
}

/* ═══════════════════════════════════════════════
   ADMIN PANEL: PROFESSIONAL DASHBOARD
   ═══════════════════════════════════════════════ */

.admin-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────── */
.admin-sidebar {
    grid-row: 1 / -1;
    background: linear-gradient(180deg, #0d0d14 0%, #12121c 100%);
    color: var(--white);
    padding: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 30;
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(157, 0, 255, 0.3);
    border-radius: 4px;
}

.sidebar-brand {
    padding: 1.75rem 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-brand h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sidebar-brand h2 .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(157, 0, 255, 0.35);
}

.sidebar-brand small {
    display: block;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.35rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav .nav-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.3);
    padding: 1.25rem 1.5rem 0.5rem;
    font-weight: 600;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
    position: relative;
}

.sidebar-nav a:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(157, 0, 255, 0.08);
    border-left-color: rgba(157, 0, 255, 0.4);
}

.sidebar-nav a.active {
    color: #fff;
    background: rgba(157, 0, 255, 0.12);
    border-left-color: var(--purple-500);
    font-weight: 600;
}

.sidebar-nav a.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--purple-500);
    border-radius: 4px 0 0 4px;
}

.sidebar-nav a svg,
.sidebar-nav a .nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    flex-shrink: 0;
}

.sidebar-nav a.active svg,
.sidebar-nav a.active .nav-icon {
    opacity: 1;
}

.sidebar-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--purple-700), var(--purple-500));
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-info strong {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info span {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: capitalize;
}

.sidebar-nav a.nav-logout {
    color: rgba(229, 57, 53, 0.7);
    margin-top: 0.5rem;
}

.sidebar-nav a.nav-logout:hover {
    color: #e53935;
    background: rgba(229, 57, 53, 0.08);
    border-left-color: rgba(229, 57, 53, 0.5);
}

/* ── Activity card as link ──────────────────── */
a:has(> .activity-card) .activity-card:hover,
.activity-card-link:hover .activity-card {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.09);
}

/* ═══════════════════════════════════════════════
   RSVP COMPONENTS
   ═══════════════════════════════════════════════ */
.rsvp-list {
    display: grid;
    gap: 1.25rem;
}

.rsvp-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform .25s ease, box-shadow .25s ease;
}

.rsvp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.rsvp-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.rsvp-event-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.rsvp-date-badge {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(157, 0, 255, 0.08), rgba(157, 0, 255, 0.15));
    border: 1px solid rgba(157, 0, 255, 0.18);
}

.rsvp-date-month {
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--purple-500);
    line-height: 1;
}

.rsvp-date-day {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--black);
    line-height: 1.1;
    font-family: 'Poppins', sans-serif;
}

.rsvp-event-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .3rem;
}

.rsvp-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .82rem;
    color: var(--gray-600);
}

.rsvp-past-badge {
    display: inline-flex;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--gray-600);
    font-size: .7rem;
    font-weight: 700;
}

.rsvp-my-status {
    padding: .35rem .85rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.rsvp-status-yes {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.rsvp-status-maybe {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.rsvp-status-no {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ═══════════════════════════════════════════════
   DOCUMENT COMPONENTS (dual view)
   ═══════════════════════════════════════════════ */

/* View toggle */
.doc-view-toggle {
    display: inline-flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.doc-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 34px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--gray-600);
    transition: all .15s ease;
}

.doc-view-btn.active {
    background: var(--purple-500);
    color: #fff;
}

.doc-view-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.04);
}

/* Grid */
.doc-grid {
    display: grid;
    gap: 1.15rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Card */
.doc-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.doc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    position: relative;
}

.doc-card-header.doc-color-red {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
}

.doc-card-header.doc-color-blue {
    background: linear-gradient(135deg, #eff6ff, #bfdbfe);
}

.doc-card-header.doc-color-green {
    background: linear-gradient(135deg, #f0fdf4, #bbf7d0);
}

.doc-card-header.doc-color-orange {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
}

.doc-card-header.doc-color-purple {
    background: linear-gradient(135deg, #faf5ff, #e9d5ff);
}

.doc-card-header.doc-color-gray {
    background: linear-gradient(135deg, #f9fafb, #e5e7eb);
}

.doc-card-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.doc-card-ext {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.35);
    letter-spacing: .05em;
}

.doc-card-body {
    padding: 1rem 1.15rem;
    flex: 1;
}

.doc-title {
    font-family: 'Poppins', sans-serif;
    font-size: .92rem;
    font-weight: 700;
    margin-bottom: .35rem;
    line-height: 1.3;
}

.doc-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .5rem;
}

.doc-tag {
    font-size: .65rem;
    font-weight: 700;
    color: var(--purple-700);
    background: rgba(157, 0, 255, 0.08);
    padding: .15rem .5rem;
    border-radius: 999px;
}

.doc-description {
    font-size: .8rem;
    color: var(--gray-600);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-card-footer {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .75rem 1.15rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.doc-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .75rem;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--purple-700);
    background: rgba(157, 0, 255, 0.06);
    text-decoration: none;
    transition: all .15s ease;
    border: none;
    cursor: pointer;
}

.doc-dl-btn:hover {
    background: rgba(157, 0, 255, 0.12);
}

.doc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    cursor: pointer;
    font-size: .78rem;
    transition: all .15s ease;
}

.doc-action-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.doc-action-danger:hover {
    background: rgba(239, 68, 68, 0.12);
}

/* ── List view ─────────────────────────────── */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.doc-list-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: .75rem 1rem;
    transition: all .15s ease;
}

.doc-list-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transform: translateX(2px);
}

.doc-list-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.doc-list-icon.doc-color-red {
    background: #fef2f2;
}

.doc-list-icon.doc-color-blue {
    background: #eff6ff;
}

.doc-list-icon.doc-color-green {
    background: #f0fdf4;
}

.doc-list-icon.doc-color-orange {
    background: #fff7ed;
}

.doc-list-icon.doc-color-purple {
    background: #faf5ff;
}

.doc-list-icon.doc-color-gray {
    background: #f9fafb;
}

.doc-list-info {
    flex: 1;
    min-width: 0;
}

.doc-list-name {
    display: block;
    font-weight: 700;
    font-size: .88rem;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-list-detail {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    margin-top: .15rem;
}

.doc-ext {
    font-size: .68rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
}

.doc-list-desc {
    font-size: .75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.doc-list-actions {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .doc-grid {
        grid-template-columns: 1fr;
    }

    .doc-list-item {
        flex-wrap: wrap;
    }

    .doc-list-desc {
        display: none;
    }
}

/* RSVP Buttons */
.rsvp-buttons {
    display: flex;
    gap: .65rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.rsvp-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1.2rem;
    border-radius: 12px;
    border: 2px solid transparent;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    background: #f5f5fa;
    color: var(--gray-600);
}

.rsvp-btn:hover {
    transform: translateY(-2px);
}

.rsvp-btn:active {
    transform: scale(0.96);
}

.rsvp-btn-icon {
    font-size: .9rem;
}

.rsvp-btn-yes:hover,
.rsvp-btn-yes.rsvp-btn-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.rsvp-btn-maybe:hover,
.rsvp-btn-maybe.rsvp-btn-active {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: #f59e0b;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

.rsvp-btn-no:hover,
.rsvp-btn-no.rsvp-btn-active {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: #ef4444;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

/* Admin stats */
.rsvp-admin-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.rsvp-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: .85rem;
}

.rsvp-stat {
    text-align: center;
}

.rsvp-stat-num {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    line-height: 1.1;
}

.rsvp-stat-label {
    font-size: .7rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
}

.rsvp-stat-yes {
    color: #059669;
}

.rsvp-stat-maybe {
    color: #d97706;
}

.rsvp-stat-no {
    color: #dc2626;
}

.rsvp-progress {
    display: flex;
    height: 6px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    margin-bottom: 1rem;
}

.rsvp-progress-yes {
    background: #10b981;
    transition: width .6s ease;
}

.rsvp-progress-maybe {
    background: #f59e0b;
    transition: width .6s ease;
}

.rsvp-progress-no {
    background: #ef4444;
    transition: width .6s ease;
}

/* Attendee list */
.rsvp-details {
    margin-top: .5rem;
}

.rsvp-details-toggle {
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    color: var(--purple-700);
    padding: .5rem 0;
    list-style: none;
    user-select: none;
    transition: color .2s ease;
}

.rsvp-details-toggle:hover {
    color: var(--purple-500);
}

.rsvp-details-toggle::-webkit-details-marker {
    display: none;
}

.rsvp-details-toggle::before {
    content: '▸ ';
    transition: transform .2s ease;
}

.rsvp-details[open] .rsvp-details-toggle::before {
    content: '▾ ';
}

.rsvp-attendee-list {
    display: grid;
    gap: .35rem;
    margin-top: .75rem;
    max-height: 240px;
    overflow-y: auto;
    padding-right: .5rem;
}

.rsvp-attendee {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .75rem;
    border-radius: 8px;
    font-size: .84rem;
    transition: background .15s ease;
}

.rsvp-attendee:hover {
    background: rgba(157, 0, 255, 0.03);
}

.rsvp-attendee-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rsvp-dot-yes {
    background: #10b981;
}

.rsvp-dot-maybe {
    background: #f59e0b;
}

.rsvp-dot-no {
    background: #ef4444;
}

.rsvp-attendee-name {
    flex: 1;
    font-weight: 500;
}

.rsvp-attendee-status {
    font-size: .75rem;
    color: var(--gray-600);
    font-weight: 600;
}

@media (max-width: 600px) {
    .rsvp-card-top {
        flex-direction: column;
    }

    .rsvp-buttons {
        flex-direction: column;
    }

    .rsvp-btn {
        justify-content: center;
    }

    .rsvp-stats {
        gap: 1rem;
    }
}

/* ── Mobile toggle ──────────────────────────── */
.admin-menu-toggle {
    display: none;
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 40;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
    color: #fff;
    box-shadow: 0 8px 24px rgba(157, 0, 255, 0.4);
    cursor: pointer;
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.admin-menu-toggle:active {
    transform: scale(0.92);
}

.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 28;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-overlay.open {
    opacity: 1;
}

/* ── Top Header Bar ─────────────────────────── */
.admin-topbar {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2.5rem;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 18;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-topbar-left h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--black);
}

.admin-topbar-left .topbar-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(157, 0, 255, 0.1);
    color: var(--purple-700);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-date {
    font-size: 0.82rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* ── Content Area ───────────────────────────── */
.admin-content {
    grid-column: 2;
    padding: 2rem 2.5rem 3rem;
    background: #f5f5fa;
    min-height: 0;
}

/* ── KPI Stat Cards ─────────────────────────── */
.kpi-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 2rem;
}

.kpi-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kpi-icon.kpi-purple {
    background: rgba(157, 0, 255, 0.1);
    color: var(--purple-500);
}

.kpi-icon.kpi-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.kpi-icon.kpi-green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.kpi-icon.kpi-orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.kpi-info h3 {
    font-size: 1.65rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    line-height: 1.1;
    color: var(--black);
}

.kpi-info span {
    font-size: 0.78rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* ── Activity Section ───────────────────────── */
.activity-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.activity-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.activity-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.activity-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.activity-card-header .activity-count {
    background: rgba(157, 0, 255, 0.08);
    color: var(--purple-700);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.88rem;
    transition: background 0.15s ease;
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-list li:hover {
    background: rgba(157, 0, 255, 0.03);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--purple-500);
    flex-shrink: 0;
}

.activity-dot.dot-blue {
    background: #3b82f6;
}

.activity-dot.dot-green {
    background: #10b981;
}

.activity-dot.dot-orange {
    background: #f59e0b;
}

.activity-meta {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--gray-600);
    flex-shrink: 0;
}

/* ── Admin Cards ────────────────────────────── */
.admin-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-card-header {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Admin Forms ────────────────────────────── */
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.admin-form-grid .form-control {
    margin-bottom: 0;
}

.form-control label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-control input,
.form-control textarea,
.form-control select {
    width: 100%;
    font-size: 0.9rem;
    background: #f7f7fb;
    border-color: rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control input:focus,
.form-control textarea:focus,
.form-control select:focus {
    border-color: var(--purple-500);
    box-shadow: 0 0 0 3px rgba(157, 0, 255, 0.1);
    background: #fff;
}

/* ── Admin Tables ───────────────────────────── */
.admin-table-wrapper {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.admin-table-wrapper .table {
    margin: 0;
    border-radius: 0;
}

.admin-table-wrapper .table th {
    background: #f8f8fc;
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 700;
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.admin-table-wrapper .table td {
    padding: 0.85rem 1.25rem;
    font-size: 0.88rem;
    vertical-align: middle;
}

.admin-table-wrapper .table tbody tr {
    transition: background 0.15s ease;
}

.admin-table-wrapper .table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.015);
}

.admin-table-wrapper .table tbody tr:hover {
    background: rgba(157, 0, 255, 0.04);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.status-active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-public {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-members {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-admins {
    background: rgba(157, 0, 255, 0.1);
    color: var(--purple-700);
}

/* ── Notifications ──────────────────────────── */
.notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    animation: noticeSlide 0.3s ease;
}

@keyframes noticeSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notice-success {
    background: rgba(16, 185, 129, 0.08);
    border-left: 4px solid #10b981;
    color: #065f46;
}

.notice-error {
    background: rgba(239, 68, 68, 0.08);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.notice-info {
    background: rgba(59, 130, 246, 0.08);
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* ── Buttons: Admin variants ────────────────── */
.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    box-shadow: none;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
    border-radius: 8px;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Multi-select widget ───────────────────── */
.multi-select-wrapper {
    position: relative;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--radius);
    padding: 0.45rem;
    cursor: text;
    min-height: 44px;
}

.multi-select-wrapper:focus-within {
    border-color: var(--purple-500);
    box-shadow: 0 0 0 3px rgba(157, 0, 255, 0.1);
    background: #fff;
}

.multi-select-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.multi-select-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(157, 0, 255, 0.1);
    color: var(--purple-700);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.multi-select-tag button {
    background: none;
    border: none;
    color: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.multi-select-search {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    width: 100%;
    font-size: 0.88rem;
    padding: 0.3rem 0.25rem !important;
    box-shadow: none !important;
    color: var(--gray-900, #1a1a2e);
    margin: 0;
    min-height: 24px !important;
    border-radius: 0 !important;
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.multi-select-option {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.multi-select-option:hover {
    background: rgba(157, 0, 255, 0.06);
}

.multi-select-option.disabled {
    color: var(--gray-600);
    cursor: default;
    font-style: italic;
}

/* ── Checkbox label ────────────────────────── */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--purple-500);
}

/* ── Permission grid (admin) ───────────────── */
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f7f7fb;
    border-radius: 10px;
    font-size: 0.82rem;
}

.perm-item input[type="checkbox"] {
    accent-color: var(--purple-500);
}

.perm-category {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-600);
    margin: 1rem 0 0.5rem;
}

/* ── Gallery grid in admin ──────────────────── */
.admin-gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-gallery-item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    background: #f0f0f4;
}

.admin-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.admin-gallery-item:hover img {
    transform: scale(1.05);
}

.admin-gallery-item p {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.65rem 0.75rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Admin page section title ───────────────── */
.admin-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 2rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

/* ── Responsive Admin ───────────────────────── */
@media (max-width: 960px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 270px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 35;
    }

    .admin-sidebar.open {
        left: 0;
    }

    .admin-menu-toggle {
        display: grid;
        place-items: center;
    }

    .admin-overlay.open {
        display: block;
        opacity: 1;
    }

    .admin-topbar {
        grid-column: 1;
        padding: 1rem 1.25rem;
    }

    .admin-topbar-left h1 {
        font-size: 1.1rem;
    }

    .admin-content {
        grid-column: 1;
        padding: 1.5rem 1.25rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-table-wrapper {
        overflow-x: auto;
    }
}

@media (max-width: 520px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(11, 11, 15, .82);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    padding: 2rem;
    z-index: 25;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    max-width: 720px;
    width: 100%;
    text-align: center;
    position: relative;
}

.lightbox-content img {
    border-radius: 12px;
    margin-bottom: 1rem;
}

.lightbox-close {
    position: absolute;
    right: 1rem;
    top: .5rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        position: fixed;
        top: 72px;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1.5rem;
        width: min(280px, 100%);
        box-shadow: var(--shadow);
        transform: translateX(120%);
        transition: transform .3s ease;
        border-radius: 16px 0 0 16px;
    }

    .nav.open {
        transform: translateX(0);
    }

    .hamburger {
        display: flex;
    }
}

.fluid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.fluid-blob {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 45% 55% 60% 40%;
    filter: blur(35px);
    opacity: .55;
    mix-blend-mode: screen;
    animation: floatBlob 16s ease-in-out infinite;
}

.fluid-blob.blob-a {
    background: #9D00FF;
    top: -40px;
    left: -40px;
}

.fluid-blob.blob-b {
    background: #e53935;
    bottom: -80px;
    right: 10%;
    animation-delay: -6s;
}

.fluid-blob.blob-c {
    background: #ffffff;
    top: 30%;
    right: -60px;
    opacity: .25;
    animation-delay: -10s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(40px, -30px) scale(1.1);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.section-fluid {
    position: relative;
    overflow: hidden;
}

.section-fluid .container {
    position: relative;
    z-index: 1;
}

.calendar-wrapper {
    background: rgba(157, 0, 255, 0.06);
    border: 1px solid rgba(157, 0, 255, 0.2);
    border-radius: 18px;
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: var(--white);
    border-bottom: 1px solid rgba(157, 0, 255, 0.15);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--gray-600);
}

.calendar-header span {
    padding: 0.75rem 0.9rem;
    border-right: 1px solid rgba(157, 0, 255, 0.1);
}

.calendar-header span:last-child {
    border-right: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: rgba(157, 0, 255, 0.12);
}

.calendar-cell {
    border: 0;
    padding: 0.75rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    text-align: left;
    background: var(--white);
    transition: background .2s ease;
}

.calendar-cell:hover {
    background: rgba(157, 0, 255, 0.05);
}

.calendar-cell.is-empty {
    background: rgba(157, 0, 255, 0.02);
}

.calendar-date {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--black);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.calendar-date span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--red-500);
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.calendar-item {
    width: 100%;
    border: none;
    background: rgba(157, 0, 255, 0.08);
    color: var(--purple-700);
    border-radius: 10px;
    padding: 0.4rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.calendar-item:hover {
    background: rgba(157, 0, 255, 0.16);
    transform: translateY(-1px);
}

.calendar-item strong {
    display: block;
    color: var(--black);
    font-size: 0.8rem;
    font-weight: 700;
}

.calendar-item small {
    color: var(--gray-600);
    font-weight: 500;
}

.calendar-event-tag {
    display: inline-flex;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(157, 0, 255, 0.12);
    color: var(--purple-700);
    font-size: 0.65rem;
    font-weight: 700;
    width: fit-content;
}

.inline-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 0.9rem;
    line-height: 1;
    color: var(--black);
    padding: 0 0.95rem;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(157, 0, 255, 0.2);
    white-space: nowrap;
    flex: 0 0 auto;
}

.inline-check span {
    white-space: nowrap;
    min-width: fit-content;
    padding-left: 8px;
}

.inline-check input {
    accent-color: #9D00FF;
    width: 16px;
    height: 16px;
    margin: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    display: inline-block;
    flex: 0 0 auto;
}

.calendar-grid-events-only {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.calendar-empty-state {
    grid-column: 1 / -1;
    min-height: 180px;
    padding: 1.25rem;
    color: var(--gray-600);
    font-weight: 600;
    text-align: center;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(11, 11, 15, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    padding: 1.5rem;
    z-index: 30;
}

.modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--white);
    border-radius: 18px;
    padding: 2rem;
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.modal-content .form-control {
    min-width: 0;
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: .5rem;
    border: none;
    background: transparent;
    font-size: 2rem;
    cursor: pointer;
}



.calendar-grid {
    grid-auto-rows: minmax(150px, 1fr);
}

.calendar-cell {
    box-shadow: none;
    border-radius: 0;
}

@media (max-width: 900px) {
    .calendar-header {
        display: none;
    }

    .calendar-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        grid-auto-rows: auto;
        background: transparent;
        gap: 0.75rem;
    }

    .calendar-cell {
        min-height: auto;
        padding: 0.85rem;
        border-radius: 12px;
        background: var(--white);
        box-shadow: 0 1px 3px rgba(157, 0, 255, 0.08);
    }

    .calendar-cell.is-empty {
        display: none;
    }

    .calendar-grid:not(.calendar-grid-events-only) .calendar-cell:not(.has-events) {
        display: none;
    }

    .calendar-wrapper {
        background: transparent;
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    .filter-bar>input,
    .filter-bar>select,
    .filter-bar .btn {
        max-width: none;
        flex: 1 1 100%;
    }

    .filter-bar .inline-check {
        display: none;
    }
}

/* ═══════════════════════════════════════════════
   CHAPTER / INSTITUTION COVER PHOTOS
   ═══════════════════════════════════════════════ */

/* Chapter logo admin preview thumbnail */
.chapter-cover-preview img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* ═══════════════════════════════════════════════
   ADMIN BODY OVERRIDES
   Applied when the admin-layout is present;
   prevents the public-site radial gradient from
   leaking behind the sidebar/content grid.
   ═══════════════════════════════════════════════ */
body:has(.admin-layout) {
    background: #0d0d14;
}

.admin-content {
    background: #f5f5fa;
}

/* Ensure the admin grid never collapses height */
.admin-layout {
    isolation: isolate;
}