:root {
    --navy: #0a1628;
    --navy2: #111f38;
    --blue: #1a4fd6;
    --blue-light: #3b6ef8;
    --sky: #e8f0fe;
    --accent: #f4a832;
    --green: #10b981;
    --red: #ef4444;
    --orange: #f97316;
    --white: #ffffff;
    --grey: #f5f6f8;
    --grey2: #eef0f4;
    --text: #1a1f2e;
    --muted: #6b7280;
    --border: #e5e7eb;
    --sidebar-w: 240px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 320;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.logo-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1.35rem;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.logo-text span {
    color: var(--blue);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 36px;
}

nav ul a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color .2s;
}

nav ul a:hover {
    color: var(--blue);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
}

.nav-toggle:focus {
    outline: 2px solid rgba(26, 79, 214, 0.2);
}

.nav-toggle .hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--navy);
    position: relative;
}

.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--navy);
    transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle .hamburger::before { top: -6px; }
.nav-toggle .hamburger::after { top: 6px; }

nav.open .nav-toggle .hamburger {
    background: transparent;
}

nav.open .nav-toggle .hamburger::before { transform: rotate(45deg) translate(5px, 5px); }
nav.open .nav-toggle .hamburger::after { transform: rotate(-45deg) translate(5px, -5px); }


.nav-cta {
    background: var(--blue);
    color: var(--white) !important;
    padding: 9px 22px;
    border-radius: 8px;
    transition: background .2s, color .2s !important;
}

.nav-cta:hover {
    background: var(--navy) !important;
    color: var(--white) !important;
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 120px 5% 80px;
    gap: 60px;
    background: linear-gradient(135deg, var(--white) 55%, var(--sky) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    right: -80px;
    top: 10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(26, 79, 214, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sky);
    border: 1px solid rgba(26, 79, 214, 0.2);
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
    animation: fadeUp 0.6s ease both;
}

.hero-badge::before {
    content: '●';
    font-size: 0.5rem;
}

.hero h1 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: clamp(2.6rem, 4.5vw, 4rem);
    line-height: 1.1;
    color: var(--navy);
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    animation: fadeUp 0.6s 0.1s ease both;
}

.hero h1 em {
    font-style: italic;
    color: var(--blue);
}

.hero p {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.75;
    max-width: 480px;
    margin-bottom: 40px;
    font-weight: 300;
    animation: fadeUp 0.6s 0.2s ease both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeUp 0.6s 0.3s ease both;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform .2s, box-shadow .2s, background .2s;
    box-shadow: 0 4px 20px rgba(26, 79, 214, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(26, 79, 214, 0.4);
    background: #1440bb;
}

.btn-ghost {
    color: var(--navy);
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1.5px solid var(--border);
    transition: border-color .2s, background .2s;
}

.btn-ghost:hover {
    border-color: var(--blue);
    background: var(--sky);
}

/* Hero visual */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeUp 0.8s 0.2s ease both;
}

.hero-card-main {
    background: var(--white);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 20px 60px rgba(10, 22, 40, 0.12);
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 2;
}

.hands-emoji {
    font-size: 72px;
    line-height: 1;
    margin-bottom: 20px;
    display: block;
}

.hero-card-main h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 12px;
}

.hero-card-main p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0;
    animation: none;
}

.stat-chip {
    position: absolute;
    background: var(--white);
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 8px 30px rgba(10, 22, 40, 0.12);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}

.stat-chip.a {
    top: -20px;
    right: -30px;
}

.stat-chip.b {
    bottom: 20px;
    left: -40px;
}

.stat-chip .num {
    font-size: 1.2rem;
    color: var(--blue);
}

/* ── STATS BAR ── */
.stats-bar {
    background: var(--navy);
    padding: 50px 5%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item {}

.stat-item .value {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 2.8rem;
    color: var(--white);
    letter-spacing: -0.03em;
    display: block;
}

.stat-item .value span {
    color: var(--accent);
}

.stat-item .label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    font-weight: 400;
}

/* ── SECTION GENERIC ── */
section {
    padding: 100px 5%;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 12px;
}

.section-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    color: var(--navy);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.section-sub {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.75;
    max-width: 540px;
    font-weight: 300;
    margin-bottom: 60px;
}

/* ── INCLUSÃO ── */
.inclusao {
    background: var(--grey);
}

.inclusao-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.inclusao-text {}

.pillar-list {
    display: grid;
    gap: 20px;
}

.pillar {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--white);
    border-radius: 14px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    transition: box-shadow .2s, transform .2s;
}

.pillar:hover {
    box-shadow: 0 8px 30px rgba(10, 22, 40, 0.08);
    transform: translateY(-2px);
}

.pillar-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--sky);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.pillar h4 {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy);
    margin-bottom: 5px;
}

.pillar p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.55;
}

/* Quote block */
.quote-block {
    background: var(--navy);
    border-radius: 20px;
    padding: 48px 44px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.quote-block::before {
    content: '"';
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 160px;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: -30px;
    left: 20px;
    line-height: 1;
}

.quote-block blockquote {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1.4rem;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.quote-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.author-info .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.author-info .role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ── PROJETOS ── */
.projetos {
    background: var(--white);
}

.projetos-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 20px;
}

.projetos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.projeto-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform .25s, box-shadow .25s;
    background: var(--white);
}

.projeto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(10, 22, 40, 0.1);
}

.projeto-card.featured {
    grid-column: span 2;
}

.card-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    position: relative;
    overflow: hidden;
}

.card-img.blue-bg {
    background: linear-gradient(135deg, #1a4fd6 0%, #3b6ef8 100%);
}

.card-img.navy-bg {
    background: linear-gradient(135deg, #0a1628 0%, #1a3060 100%);
}

.card-img.accent-bg {
    background: linear-gradient(135deg, #f4a832 0%, #f7c06a 100%);
}

.card-img.blue-bg .featured-text,
.card-img.navy-bg .featured-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-body {
    padding: 24px;
}

.card-tag {
    display: inline-block;
    background: var(--sky);
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.card-body h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1.15rem;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-body p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    font-size: 0.8rem;
    color: var(--muted);
}

.card-meta .progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    width: 60px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--blue);
}

/* ── NOTICIAS ── */
.noticias {
    background: var(--grey);
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.noticia-card {
    background: var(--white);
    border-radius: 14px;
    padding: 28px;
    border: 1px solid var(--border);
    transition: box-shadow .2s, transform .2s;
}

.noticia-card:hover {
    box-shadow: 0 10px 30px rgba(10, 22, 40, 0.08);
    transform: translateY(-2px);
}

.noticia-date {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.noticia-date::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--border);
    display: inline-block;
}

.noticia-card h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1.05rem;
    color: var(--navy);
    line-height: 1.4;
    margin-bottom: 12px;
}

.noticia-card p {
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap .2s;
}

.read-more:hover {
    gap: 10px;
}

/* ── EVENTOS ── */
.eventos {
    background: var(--white);
}

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

.event-card {
    background: var(--white);
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    transition: transform .18s, box-shadow .18s;
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(10, 22, 40, 0.08);
}

.event-media {
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 32px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
}

.event-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
}

.event-card h4 {
    font-size: 1.05rem;
    color: var(--navy);
    margin: 0;
}

.event-card p {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    font-size: 0.85rem;
    color: var(--muted);
}

.event-meta .date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.event-tag {
    display: inline-block;
    background: var(--sky);
    color: var(--blue);
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.75rem;
}

@media (max-width: 720px) {
    .eventos-grid {
        grid-template-columns: 1fr;
    }
    .event-media { height: 120px; }
}

/* Aliases para classes em português usadas nos templates */
.evento-card {
    background: var(--white);
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    transition: transform .18s, box-shadow .18s;
    display: flex;
    flex-direction: column;
    min-height: 220px;
}
.evento-card:hover { transform: translateY(-6px); box-shadow: 0 14px 40px rgba(10, 22, 40, 0.08); }
.evento-media { height: 140px; border-radius: 10px; overflow: hidden; margin-bottom: 12px; display:flex; align-items:center; justify-content:center; color:var(--white); font-size:32px; background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%); }
.evento-body { display:flex; flex-direction:column; gap:8px; flex:1 1 auto; }
.evento-card h3 { font-size:1.05rem; color:var(--navy); margin:0 }
.evento-card p { font-size:0.92rem; color:var(--muted); line-height:1.5; margin:0 }
.evento-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; border-top:1px solid var(--border); padding-top:12px; font-size:0.85rem; color:var(--muted); }
.evento-meta .date { display:inline-flex; align-items:center; gap:8px; }
.evento-badge { display:inline-block; background:var(--sky); color:var(--blue); padding:6px 10px; border-radius:10px; font-weight:700; font-size:0.75rem; }
.evento-badge.evento-passado { background: #fff0f0; color: var(--red); }
.evento-badge.evento-atual { background: #effaf6; color: var(--green); }
.evento-badge.evento-futuro { background: #eef6ff; color: var(--blue); }

/* ── VOLUNTEER ── */
.volunteer {
    background: var(--navy);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.volunteer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(26, 79, 214, 0.3) 0%, transparent 60%);
}

.volunteer .section-title {
    color: var(--white);
}

.volunteer .section-sub {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 auto 40px;
}

.volunteer .section-label {
    color: var(--accent);
}

.volunteer-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn-accent {
    background: var(--accent);
    color: var(--navy);
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(244, 168, 50, 0.4);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(244, 168, 50, 0.5);
}

.btn-white {
    background: transparent;
    color: var(--white);
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    transition: border-color .2s, background .2s;
}

.btn-white:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

/* Beneficiários: compact table and clickable rows */
#ben-main-table tbody tr { cursor: pointer; }
#ben-main-table tbody tr:hover { background: #fbfbfd; }
#ben-main-table td { padding: 12px 10px; vertical-align: middle; }
.name-cell { display: flex; gap: 12px; align-items: center; }
.avatar-circle { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--navy); }
.id-code { font-size: 0.8rem; color: var(--muted); }
.row-actions { display:flex; gap:6px; }
.row-btn { border: none; background: transparent; padding:6px; cursor:pointer; border-radius:6px; }
.row-btn.del { color: var(--red); }

.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; margin-top: 18px; }
.detail-card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.detail-header { display:flex; gap:16px; align-items:center; }
.detail-header h2 { margin-left:8px; }
.info-row { padding:6px 0; border-bottom: 1px dashed #f0f0f0; }
.note { border-left: 3px solid var(--border); padding:8px; margin:8px 0; background:#fafafa; }
.docs-list { display:flex; flex-direction:column; gap:8px; }
.doc-item { display:flex; justify-content:space-between; padding:8px 10px; border-radius:8px; text-decoration:none; color:inherit; border:1px solid var(--border); }
.doc-item:hover { background:var(--grey2); }

/* members table reuse same styles */
#mem-main-table tbody tr { cursor: pointer; }
#mem-main-table tbody tr:hover { background: #fbfbfd; }
#mem-main-table td { padding: 12px 10px; vertical-align: middle; }

/* ── FOOTER ── */
footer {
    background: #050d1a;
    color: rgba(255, 255, 255, 0.5);
    padding: 60px 5% 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-logo .logo-text {
    color: white;
    font-size: 1.1rem;
}

.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.65;
    max-width: 280px;
}

.footer-col h5 {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.footer-col ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.footer-col ul a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.84rem;
    transition: color .2s;
}

.footer-col ul a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: none;
    }

    .hero p {
        margin: 0 auto 40px;
    }

    .hero-actions {
        justify-content: center;
    }

    .inclusao-grid {
        grid-template-columns: 1fr;
    }

    .projetos-grid {
        grid-template-columns: 1fr;
    }

    .projeto-card.featured {
        grid-column: auto;
    }

    .noticias-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* keep the menu in the DOM and off-screen; slide in from right */
    nav ul {
        display: flex;
        flex-direction: column;
        gap: 0;
        position: fixed;
        top: 0;
        right: -320px; /* hidden off-screen */
        height: 100vh;
        width: 280px;
        padding: 20px 18px;
        background: rgba(255,255,255,0.98);
        border-left: 1px solid var(--border);
        box-shadow: -8px 0 30px rgba(10,22,40,0.06);
        transition: right .32s cubic-bezier(.2,.8,.2,1);
        z-index: 260;
        display: flex;
    }
}

/* Mobile nav behaviour: show toggle and expanded menu */
@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    nav {
        padding: 0 4%;
        height: 64px;
    }

    /* When open, slide the panel into view from the right */
    nav.open ul {
        right: 0;
    }

    nav ul li {
        padding: 12px 0;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul a {
        color: var(--navy);
        font-size: 1rem;
        display: block;
        padding: 6px 0;
    }

    nav .nav-cta {
        margin-top: 8px;
    }

    /* backdrop when menu is open */
    nav.open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.28);
        z-index: 250;
        transition: opacity .2s ease;
    }
}

/* ═══════════════ Beneficiários ═══════════════ */

.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--blue);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.brand-name {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1.2rem;
    color: white;
    letter-spacing: -0.02em;
}

.brand-name span {
    color: #7da8ff;
}

.sidebar-section {
    padding: 20px 12px 8px;
}

.sidebar-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    padding: 0 8px;
    margin-bottom: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .18s;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2px;
    user-select: none;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
}

.nav-item.active {
    background: rgba(26, 79, 214, 0.35);
    color: #7da8ff;
    border: 1px solid rgba(26, 79, 214, 0.3);
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--blue);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info .name {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.user-info .role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════ MAIN ═══════════════ */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* TOPBAR */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.topbar-left .page-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1.15rem;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.topbar-left .page-sub {
    font-size: 0.75rem;
    color: var(--muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
}

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

.topbar-btn.primary:hover {
    background: #1440bb;
}

.topbar-btn.ghost {
    background: var(--grey);
    color: var(--text);
    border: 1px solid var(--border);
}

.topbar-btn.ghost:hover {
    background: var(--grey2);
}

.notif-btn {
    width: 36px;
    height: 36px;
    background: var(--grey);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    position: relative;
}

.notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: var(--red);
    border-radius: 50%;
    border: 1.5px solid white;
}

/* CONTENT */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
}

/* PAGE visibility */
.page {
    display: none;
    animation: fadeIn .3s ease;
}

.page.active {
    display: block;
}

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

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

/* ═══════════════ DASHBOARD PAGE ═══════════════ */

/* KPI CARDS */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--white);
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    transition: box-shadow .2s, transform .2s;
}

.kpi-card:hover {
    box-shadow: 0 6px 24px rgba(10, 22, 40, .08);
    transform: translateY(-2px);
}

.kpi-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.kpi-icon.blue {
    background: var(--sky);
}

.kpi-icon.green {
    background: #d1fae5;
}

.kpi-icon.orange {
    background: #fff7ed;
}

.kpi-icon.accent {
    background: #fef3c7;
}

.kpi-trend {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
}

.kpi-trend.up {
    background: #d1fae5;
    color: #059669;
}

.kpi-trend.down {
    background: #fee2e2;
    color: #dc2626;
}

.kpi-value {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 2rem;
    color: var(--navy);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--muted);
}

/* MIDDLE GRID */
.dash-mid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    margin-bottom: 24px;
}

/* Activity chart */
.chart-card {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 22px 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1rem;
    color: var(--navy);
}

.card-header-meta {
    font-size: 0.75rem;
    color: var(--muted);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.bar-wrap {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 100px;
    width: 100%;
}

.bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    transition: opacity .2s;
    cursor: pointer;
    min-height: 4px;
}

.bar:hover {
    opacity: .75;
}

.bar.blue {
    background: var(--blue);
}

.bar.sky {
    background: #93c5fd;
}

.bar-month {
    font-size: 0.65rem;
    color: var(--muted);
    font-weight: 500;
}

.chart-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--muted);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

/* Quick stats panel */
.quick-panel {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quick-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--grey);
    border-radius: 10px;
}

.quick-stat-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-stat-emoji {
    font-size: 20px;
}

.quick-stat-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
}

.quick-stat-sub {
    font-size: 0.72rem;
    color: var(--muted);
}

.quick-stat-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}

/* BOTTOM GRID */
.dash-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Recent projects */
.recent-card {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 22px 24px;
}

.proj-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.proj-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.proj-row:first-child {
    padding-top: 0;
}

.proj-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.proj-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proj-meta {
    font-size: 0.72rem;
    color: var(--muted);
}

.proj-bar-wrap {
    width: 80px;
}

.proj-bar-bg {
    height: 5px;
    background: var(--grey2);
    border-radius: 3px;
}

.proj-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--blue);
}

.proj-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--navy);
    text-align: right;
    margin-top: 2px;
}

/* Tasks summary */
.task-summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-sum-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: border-color .2s, background .2s;
    cursor: pointer;
}

.task-sum-item:hover {
    border-color: var(--blue);
    background: var(--sky);
}

.task-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all .18s;
}

.task-check.done {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.task-sum-text {
    flex: 1;
    font-size: 0.83rem;
    font-weight: 500;
}

.task-sum-text.done {
    text-decoration: line-through;
    color: var(--muted);
}

.task-sum-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 100px;
    letter-spacing: 0.05em;
}

.tag-red {
    background: #fee2e2;
    color: #dc2626;
}

.tag-orange {
    background: #fff7ed;
    color: #ea580c;
}

.tag-blue {
    background: var(--sky);
    color: var(--blue);
}

.tag-green {
    background: #d1fae5;
    color: #059669;
}

.tag-grey {
    background: var(--grey2);
    color: var(--muted);
}

/* ═══════════════ PROJETOS PAGE ═══════════════ */

.proj-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}

.filter-tab {
    padding: 6px 16px;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .18s;
    color: var(--muted);
    border: none;
    background: none;
}

.filter-tab.active {
    background: var(--navy);
    color: white;
}

.search-input {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 7px 14px;
    font-size: 0.82rem;
    color: var(--muted);
    flex: 1;
    max-width: 280px;
}

.search-input input {
    border: none;
    outline: none;
    background: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 0.82rem;
    color: var(--text);
    width: 100%;
}

.proj-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.proj-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s;
}

.proj-card:hover {
    box-shadow: 0 12px 36px rgba(10, 22, 40, .09);
    transform: translateY(-3px);
}

.proj-card-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    position: relative;
}

.proj-card-header.h-blue {
    background: linear-gradient(135deg, #1a4fd6, #3b6ef8);
}

.proj-card-header.h-navy {
    background: linear-gradient(135deg, #0a1628, #1a3060);
}

.proj-card-header.h-accent {
    background: linear-gradient(135deg, #f4a832, #f7c06a);
}

.proj-card-header.h-green {
    background: linear-gradient(135deg, #059669, #34d399);
}

.proj-card-header.h-red {
    background: linear-gradient(135deg, #dc2626, #f87171);
}

.proj-card-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: 0.07em;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.proj-card-body {
    padding: 18px 20px;
}

.proj-card-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--sky);
    color: var(--blue);
    margin-bottom: 10px;
}

.proj-card-body h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.3;
}

.proj-card-body p {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 14px;
}

.proj-card-footer {
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.proj-card-members {
    display: flex;
}

.member-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-left: -6px;
}

.member-avatar:first-child {
    margin-left: 0;
}

.proj-progress-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--navy);
}

.proj-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.prog-bar {
    flex: 1;
    height: 4px;
    background: var(--grey2);
    border-radius: 2px;
}

.prog-fill {
    height: 100%;
    border-radius: 2px;
}

.prog-fill.blue {
    background: var(--blue);
}

.prog-fill.green {
    background: var(--green);
}

.prog-fill.orange {
    background: var(--orange);
}

.prog-fill.accent {
    background: var(--accent);
}

/* ═══════════════ TAREFAS PAGE ═══════════════ */

.tasks-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
}

/* Kanban */
.kanban {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.kanban-col {
    background: var(--grey2);
    border-radius: 14px;
    padding: 14px;
    min-height: 400px;
}

.col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.col-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.col-count {
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--white);
    padding: 2px 8px;
    border-radius: 100px;
    color: var(--muted);
    border: 1px solid var(--border);
}

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

.col-dot.red {
    background: var(--red);
}

.col-dot.orange {
    background: var(--orange);
}

.col-dot.green {
    background: var(--green);
}

.add-task-btn {
    background: none;
    border: 1.5px dashed var(--border);
    color: var(--muted);
    font-size: 0.78rem;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: all .18s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

.add-task-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--sky);
}

/* Task cards */
.task-card {
    background: var(--white);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
    cursor: grab;
    transition: box-shadow .2s;
    user-select: none;
}

.task-card:hover {
    box-shadow: 0 6px 20px rgba(10, 22, 40, .1);
}

.task-card-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    margin-bottom: 8px;
    display: inline-block;
    letter-spacing: 0.07em;
}

.task-card h4 {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.task-card p {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

.task-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-due {
    font-size: 0.7rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-due.urgent {
    color: var(--red);
    font-weight: 600;
}

.task-assignee {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* Side panel tasks */
.task-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.task-side-card {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 18px 20px;
}

.task-side-card h4 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 0.95rem;
    color: var(--navy);
    margin-bottom: 14px;
}

/* Mini calendar placeholder */
.mini-cal {
    text-align: center;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
}

.cal-nav {
    cursor: pointer;
    color: var(--muted);
    font-size: 0.9rem;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day {
    font-size: 0.67rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    padding: 4px;
}

.cal-date {
    font-size: 0.72rem;
    text-align: center;
    padding: 5px 2px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s;
}

.cal-date:hover {
    background: var(--sky);
    color: var(--blue);
}

.cal-date.today {
    background: var(--blue);
    color: white;
    font-weight: 700;
}

.cal-date.has-event {
    position: relative;
}

.cal-date.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
}

.cal-date.empty {
    opacity: 0;
    pointer-events: none;
}

/* Priority list */
.priority-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.priority-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.priority-item:first-child {
    padding-top: 0;
}

.prio-bar {
    width: 3px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}

.prio-bar.high {
    background: var(--red);
}

.prio-bar.med {
    background: var(--orange);
}

.prio-bar.low {
    background: var(--green);
}

.prio-text {
    flex: 1;
}

.prio-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.prio-project {
    font-size: 0.7rem;
    color: var(--muted);
}

.prio-date {
    font-size: 0.7rem;
    color: var(--muted);
    white-space: nowrap;
}

/* ═══════════════ MODAL ═══════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, .5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

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

.modal {
    background: var(--white);
    border-radius: 18px;
    padding: 32px 36px;
    width: 520px;
    max-width: 95vw;
    box-shadow: 0 24px 80px rgba(10, 22, 40, .25);
    transform: translateY(16px);
    transition: transform .2s;
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 24px;
}

.form-row {
    margin-bottom: 16px;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 0.85rem;
    color: var(--text);
    outline: none;
    transition: border-color .18s;
    background: var(--white);
}

.form-input:focus {
    border-color: var(--blue);
}

.form-select {
    appearance: none;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-cancel {
    padding: 9px 22px;
    border-radius: 9px;
    background: var(--grey);
    border: 1px solid var(--border);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background .18s;
}

.btn-cancel:hover {
    background: var(--grey2);
}

.btn-save {
    padding: 9px 24px;
    border-radius: 9px;
    background: var(--blue);
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: background .18s;
}

.btn-save:hover {
    background: #1440bb;
}

/* scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* ===== Admin overrides (scoped to body.admin) =====
    Fix layout conflicts between public CSS and admin/dashboard styles.
*/
body.admin .app {
    display: block;
    height: auto;
    overflow: visible;
}

body.admin .page {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

body.admin .right,
body.admin .main {
    overflow: auto;
}

/* Projects / dashboard cards */
body.admin .projetos-grid,
body.admin .proj-cards,
body.admin .noticias-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px;
}

body.admin .projeto-card,
body.admin .proj-card,
body.admin .n oticia-card,
body.admin .task-card {
    width: auto;
    max-width: none;
}

/* Dash layouts */
body.admin .dash-mid {
    grid-template-columns: 1fr 320px;
}

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

/* Ensure scrollable content area */
body.admin .right,
body.admin .content {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Admin — login page layout (scoped) */
body.admin .page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

body.admin .left {
    background: var(--navy);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    position: relative;
    overflow: hidden;
    color: #fff;
}

body.admin .left::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 79, 214, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

body.admin .left::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 168, 50, 0.1) 0%, transparent 65%);
    pointer-events: none;
}

body.admin .grid-texture {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

body.admin .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 72px;
}

body.admin .brand-icon {
    width: 42px;
    height: 42px;
    background: var(--blue);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

body.admin .brand-name {
    font-size: 1.4rem;
    color: white;
    letter-spacing: -0.02em;
}

body.admin .left-headline {
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: white;
    line-height: 1.15;
    margin-bottom: 20px;
}

body.admin .left-headline em {
    font-style: italic;
    color: var(--accent);
}

body.admin .left-sub {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
    font-weight: 300;
    max-width: 360px;
}

body.admin .feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 52px;
    position: relative;
    z-index: 1;
}

body.admin .feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 14px 18px;
}

body.admin .left-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.admin .left-footer-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
}

body.admin .left-footer-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 0.72rem;
    color: rgba(16, 185, 129, 0.9);
    font-weight: 600;
}

body.admin .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

body.admin .right {
    background: var(--grey);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}

body.admin .login-box {
    width: 100%;
    max-width: 420px;
}

/* Right column — login form internals (scoped to admin) */
body.admin .login-header {
    margin-bottom: 36px;
}

body.admin .login-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.admin .login-eyebrow::before {
    content: '';
    width: 18px;
    height: 2px;
    background: var(--blue);
    border-radius: 1px;
    display: inline-block;
}

body.admin .login-title {
    font-size: 2rem;
    color: var(--navy);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 8px;
}

body.admin .login-sub {
    font-size: 0.875rem;
    color: var(--muted);
    font-weight: 300;
}

/* Form */
body.admin .form-group {
    margin-bottom: 18px;
}

body.admin .form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

body.admin .form-label a {
    font-weight: 400;
    color: var(--blue);
    text-decoration: none;
    font-size: 0.78rem;
    transition: opacity .2s;
}

body.admin .form-label a:hover {
    opacity: .7;
}

body.admin .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

body.admin .input-icon {
    position: absolute;
    left: 14px;
    color: var(--muted);
    font-size: 16px;
    pointer-events: none;
    display: flex;
    align-items: center;
}

body.admin .form-input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

body.admin .form-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26, 79, 214, 0.1);
}

body.admin .form-input::placeholder {
    color: #b0b7c3;
}

body.admin .form-input.error {
    border-color: var(--red);
}

body.admin .form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

body.admin .toggle-pass {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    padding: 0;
    line-height: 1;
    transition: color .2s;
}

body.admin .toggle-pass:hover {
    color: var(--text);
}

/* Remember */
body.admin .remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

body.admin .checkbox {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    transition: background .18s, border-color .18s;
}

body.admin .checkbox.checked {
    background: var(--blue);
    border-color: var(--blue);
}

body.admin .checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: 700;
}

body.admin .remember-label {
    font-size: 0.83rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

/* Buttons and states */
body.admin .btn-login {
    width: 100%;
    padding: 13px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(26, 79, 214, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

body.admin .btn-login:hover {
    background: #1440bb;
    box-shadow: 0 6px 22px rgba(26, 79, 214, 0.38);
    transform: translateY(-1px);
}

body.admin .btn-login.loading {
    pointer-events: none;
}

body.admin .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
}

body.admin .btn-login.loading .spinner {
    display: block;
}

body.admin .btn-login.loading .btn-label {
    opacity: .7;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

body.admin .divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

body.admin .divider::before,
body.admin .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

body.admin .divider span {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}

body.admin .alt-access {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 11px 16px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    width: 100%;
}

body.admin .alt-access:hover {
    border-color: var(--blue);
    background: var(--sky);
}

body.admin .login-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
}

body.admin .login-footer a {
    color: var(--blue);
    text-decoration: none;
}

body.admin .login-footer a:hover {
    text-decoration: underline;
}

/* Success */
body.admin .success-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    animation: fadeUp .4s ease;
}

body.admin .success-screen.show {
    display: flex;
}

body.admin .login-box-inner.hide {
    display: none;
}

body.admin .success-icon {
    width: 72px;
    height: 72px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    animation: pop .4s cubic-bezier(.175, .885, .32, 1.275);
}

@keyframes pop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

body.admin .success-title {
    font-size: 1.6rem;
    color: var(--navy);
    margin-bottom: 8px;
}

body.admin .success-sub {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 24px;
}

body.admin .btn-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background: var(--blue);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background .2s;
    border: none;
    cursor: pointer;
}

body.admin .btn-dashboard:hover {
    background: #1440bb;
}

/* Error message (login) - hidden by default, visible when .show */
body.admin .error-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: #dc2626;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}

body.admin .error-msg.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

:root {
    --navy: #0a1628;
    --navy2: #111f38;
    --blue: #1a4fd6;
    --blue-light: #3b6ef8;
    --sky: #e8f0fe;
    --accent: #f4a832;
    --green: #10b981;
    --green-light: #d1fae5;
    --red: #ef4444;
    --red-light: #fee2e2;
    --orange: #f97316;
    --orange-light: #fff7ed;
    --purple: #7c3aed;
    --purple-light: #ede9fe;
    --white: #ffffff;
    --grey: #f5f6f8;
    --grey2: #eef0f4;
    --text: #1a1f2e;
    --muted: #6b7280;
    --border: #e2e5ed;
    --sidebar-w: 240px;
}

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

html,
body {
    height: 100%;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--grey);
}

.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-w);
    background: var(--navy);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--blue);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.brand-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    color: white;
    letter-spacing: -.02em;
}

.brand-name span {
    color: #7da8ff;
}

.sidebar-section {
    padding: 20px 12px 8px;
}

.sidebar-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .3);
    padding: 0 8px;
    margin-bottom: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .18s;
    color: rgba(255, 255, 255, .5);
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 2px;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .85);
}

.nav-item.active {
    background: rgba(26, 79, 214, .35);
    color: #7da8ff;
    border: 1px solid rgba(26, 79, 214, .3);
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--blue);
    color: white;
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info .name {
    font-size: .8rem;
    font-weight: 600;
    color: white;
}

.user-info .role {
    font-size: .7rem;
    color: rgba(255, 255, 255, .4);
}

/* MAIN */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.topbar-left .page-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.15rem;
    color: var(--navy);
    letter-spacing: -.02em;
}

.topbar-left .page-sub {
    font-size: .75rem;
    color: var(--muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tb-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: 'DM Sans', sans-serif;
    transition: all .18s;
}

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

.tb-btn.primary:hover {
    background: #1440bb;
}

.tb-btn.ghost {
    background: var(--grey);
    color: var(--text);
    border: 1px solid var(--border);
}

.tb-btn.ghost:hover {
    background: var(--grey2);
}

.tb-btn.danger {
    background: var(--red-light);
    color: var(--red);
    border: 1px solid #fecaca;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

/* STATS ROW */
.stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 16px 18px;
    transition: box-shadow .2s;
}

.stat-card:hover {
    box-shadow: 0 4px 18px rgba(10, 22, 40, .07);
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-icon {
    font-size: 18px;
}

.stat-trend {
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
}

.stat-trend.up {
    background: var(--green-light);
    color: #059669;
}

.stat-trend.neutral {
    background: var(--grey2);
    color: var(--muted);
}

.stat-value {
    font-family: 'DM Serif Display', serif;
    font-size: 1.7rem;
    color: var(--navy);
    letter-spacing: -.03em;
    line-height: 1;
}

.stat-label {
    font-size: .73rem;
    color: var(--muted);
    margin-top: 2px;
}

/* FILTERS BAR */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 9px;
    padding: 7px 14px;
    flex: 1;
    max-width: 280px;
    transition: border-color .18s;
}

.search-box:focus-within {
    border-color: var(--blue);
}

.search-box input {
    border: none;
    outline: none;
    background: none;
    font-family: 'DM Sans', sans-serif;
    font-size: .83rem;
    color: var(--text);
    width: 100%;
}

.search-box input::placeholder {
    color: #b0b7c3;
}

.filter-select {
    padding: 7px 12px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-family: 'DM Sans', sans-serif;
    font-size: .82rem;
    color: var(--text);
    background: var(--white);
    outline: none;
    cursor: pointer;
    transition: border-color .18s;
}

.filter-select:focus {
    border-color: var(--blue);
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all .18s;
}

.filter-tag.active {
    border-color: var(--blue);
    background: var(--sky);
    color: var(--blue);
}

.filter-tag:not(.active) {
    background: var(--white);
    border-color: var(--border);
    color: var(--muted);
}

.filter-tag:not(.active):hover {
    border-color: var(--blue);
    color: var(--blue);
}

.results-count {
    margin-left: auto;
    font-size: .78rem;
    color: var(--muted);
}

/* TABLE */
.table-wrap {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
}

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

thead {
    background: var(--grey);
    border-bottom: 1px solid var(--border);
}

th {
    padding: 11px 16px;
    text-align: left;
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color .18s;
}

th.sortable:hover {
    color: var(--navy);
}

th .sort-icon {
    margin-left: 4px;
    opacity: .4;
}

th.sorted .sort-icon {
    opacity: 1;
    color: var(--blue);
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: #fafbfd;
}

tbody tr.selected {
    background: var(--sky);
}

td {
    padding: 13px 16px;
    font-size: .84rem;
    color: var(--text);
    vertical-align: middle;
}

/* Checkbox col */
.cb {
    width: 40px;
}

.row-check {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}

.row-check.checked {
    background: var(--blue);
    border-color: var(--blue);
}

.row-check.checked::after {
    content: '✓';
    color: white;
    font-size: 9px;
    font-weight: 700;
}

/* Name cell */
.name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.name-cell .fullname {
    font-weight: 600;
    color: var(--navy);
    font-size: .85rem;
}

.name-cell .id-code {
    font-size: .7rem;
    color: var(--muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
}

.badge-blue {
    background: var(--sky);
    color: var(--blue);
}

.badge-green {
    background: var(--green-light);
    color: #059669;
}

.badge-orange {
    background: var(--orange-light);
    color: #c2410c;
}

.badge-red {
    background: var(--red-light);
    color: #dc2626;
}

.badge-purple {
    background: var(--purple-light);
    color: var(--purple);
}

.badge-grey {
    background: var(--grey2);
    color: var(--muted);
}

.badge-navy {
    background: #e0e5f0;
    color: var(--navy);
}

/* Status dot */
.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
}

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

.dot.green {
    background: var(--green);
}

.dot.orange {
    background: var(--orange);
}

.dot.grey {
    background: #d1d5db;
}

/* Progress cell */
.prog-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prog-bg {
    width: 60px;
    height: 5px;
    background: var(--grey2);
    border-radius: 3px;
}

.prog-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--blue);
}

/* Actions */
.row-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity .18s;
}

tbody tr:hover .row-actions {
    opacity: 1;
}

.row-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all .18s;
}

.row-btn:hover {
    border-color: var(--blue);
    background: var(--sky);
}

.row-btn.del:hover {
    border-color: var(--red);
    background: var(--red-light);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

.page-info {
    font-size: .78rem;
    color: var(--muted);
}

.page-btns {
    display: flex;
    gap: 4px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text);
    transition: all .18s;
}

.page-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.page-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.page-btn:disabled {
    opacity: .4;
    pointer-events: none;
}

/* MODAL */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, .45);
    backdrop-filter: blur(5px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--white);
    border-radius: 20px;
    width: 640px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(10, 22, 40, .25);
    transform: translateY(16px);
    transition: transform .2s;
}

.overlay.open .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 28px 32px 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.modal-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.35rem;
    color: var(--navy);
}

.modal-sub {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 3px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--muted);
    transition: all .18s;
}

.modal-close:hover {
    background: var(--grey2);
    color: var(--text);
}

.modal-body {
    padding: 24px 32px;
}

.modal-footer {
    padding: 16px 32px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
}

/* Form inside modal */
.form-section {
    margin-bottom: 24px;
}

.form-section-title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.form-grid {
    display: grid;
    gap: 14px;
}

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

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

.f-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.f-label {
    font-size: .76rem;
    font-weight: 600;
    color: var(--text);
}

.f-label .req {
    color: var(--red);
    margin-left: 2px;
}

.f-input,
.f-select,
.f-textarea {
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-family: 'DM Sans', sans-serif;
    font-size: .84rem;
    color: var(--text);
    outline: none;
    transition: border-color .18s;
    background: var(--white);
    width: 100%;
}

.f-input:focus,
.f-select:focus,
.f-textarea:focus {
    border-color: var(--blue);
}

.f-input::placeholder,
.f-textarea::placeholder {
    color: #b0b7c3;
}

.f-textarea {
    resize: vertical;
    min-height: 72px;
}

.f-select {
    appearance: none;
    cursor: pointer;
}

.btn-cancel {
    padding: 9px 22px;
    border-radius: 9px;
    background: var(--grey);
    border: 1px solid var(--border);
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background .18s;
}

.btn-cancel:hover {
    background: var(--grey2);
}

.btn-save {
    padding: 9px 24px;
    border-radius: 9px;
    background: var(--blue);
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: background .18s;
}

.btn-save:hover {
    background: #1440bb;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--navy);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: .83rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 30px rgba(10, 22, 40, .3);
    z-index: 999;
    transform: translateY(80px);
    opacity: 0;
    transition: all .3s cubic-bezier(.175, .885, .32, 1.275);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    opacity: .4;
}

.empty-state p {
    font-size: .9rem;
}

/* ── ADMIN PAGES: MEMBERS, NEWS, EVENTS, FINANCE ── */

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 12px;
}

.member-card.empty {
    justify-content: center;
    text-align: center;
}

.member-avatar {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: var(--sky);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.member-body h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.member-body .muted {
    font-size: 0.86rem;
    color: var(--muted);
}

.member-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.86rem;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
}

.btn-small.primary {
    background: var(--blue);
    color: var(--white);
    border-color: transparent;
}

.btn-small.ghost {
    background: transparent;
    color: var(--muted);
}

.news-list {
    display: grid;
    gap: 16px;
}

.news-item {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: 12px;
}

.news-item h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.news-item .muted {
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.news-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.events-upcoming {
    display: grid;
    gap: 12px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 10px;
}

.event-date {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: var(--sky);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--blue);
}

.event-body h4 {
    margin: 0;
    font-size: 1rem;
}

.event-body .muted {
    font-size: 0.85rem;
    color: var(--muted);
}

.event-actions { margin-left: auto; }

.finance-overview {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.card.small {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 10px;
    min-width: 160px;
}

.card-title { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.card-value { font-size: 1.2rem; color: var(--navy); font-weight: 700; }

.finance-table table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 8px; overflow: hidden; }
.finance-table th, .finance-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.92rem; }
.finance-table thead th { background: var(--grey2); font-weight: 700; color: var(--muted); }