﻿@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap');

:root {
    --rdc-blue: #007FFF;
    --rdc-blue-mid: #0066D6;
    --rdc-blue-deep: #003D8F;
    --rdc-navy: #002B5C;
    --rdc-navy-dark: #001A38;
    --rdc-yellow: #F7D618;
    --rdc-yellow-dark: #C9A000;
    --rdc-red: #CE1126;
    --rdc-red-dark: #A50E1E;
    --night: #001A38;
    --night-2: #001F3F;
    --night-3: #002B5C;
    --night-4: #004080;
    --midnight: #001F3F;
    --bleu-nuit: #002B5C;
    --bleu-nuit-soft: #003A70;
    --accent: #007FFF;
    --accent-glow: #4DA6FF;
    --gold: #F7D618;
    --sls-navy: #002B5C;
    --sls-navy-2: #003A70;
    --sls-blue: #007FFF;
    --sls-blue-dark: #0066D6;
    --sls-bg: #F0F6FC;
    --sls-card: #ffffff;
    --sls-border: #D0DFEF;
    --sls-text: #0B1F3A;
    --sls-muted: #5A6F8A;
    --sls-success: #0F8A5F;
    --sls-danger: #CE1126;
    --sls-sidebar-w: 268px;
    --sls-radius: 16px;
    --font-ui: 'Sora', system-ui, sans-serif;
    --font-display: 'Source Serif 4', Georgia, serif;
}

* { box-sizing: border-box; }

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--sls-text);
    background:
        radial-gradient(ellipse at top right, rgba(0,127,255,.06), transparent 42%),
        radial-gradient(ellipse at bottom left, rgba(247,214,24,.05), transparent 40%),
        var(--sls-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-width: 0;
}

body.sidebar-open {
    overflow: hidden;
    touch-action: none;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

a { color: var(--sls-blue); text-decoration: none; }
a:hover { color: var(--rdc-blue-mid); }

.brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}
.brand-wrap .brand-copy {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
}
.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    height: 34px;
    padding: 0 .6rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(247,214,24,.28), rgba(0,127,255,.22));
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    font-size: .7rem;
    letter-spacing: .16em;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

h1, h2, .display-heading {
    font-family: var(--font-display);
    letter-spacing: -.02em;
}

.rdc-stripe {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--rdc-blue) 0 34%, var(--rdc-yellow) 34% 50%, var(--rdc-red) 50% 66%, var(--rdc-blue) 66% 100%);
}

/* ========== BUTTONS ========== */
.btn-sls {
    background: linear-gradient(135deg, var(--rdc-blue) 0%, var(--rdc-blue-mid) 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,127,255,.28);
    transition: transform .2s ease, box-shadow .2s ease;
}
.btn-sls:hover {
    background: linear-gradient(135deg, var(--rdc-blue-mid), var(--rdc-blue-deep));
    color: #fff;
    transform: translateY(-1px);
}
.btn-outline-sls {
    border: 1.5px solid rgba(255,255,255,.5);
    color: #fff;
    background: transparent;
    font-weight: 600;
    border-radius: 12px;
}
.btn-outline-sls:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn-navy { background: var(--rdc-navy); border: none; color: #fff; border-radius: 12px; }
.btn-navy:hover { background: var(--rdc-blue-deep); color: #fff; }
.btn-gold {
    background: linear-gradient(135deg, var(--rdc-yellow), var(--rdc-yellow-dark));
    border: none;
    color: var(--rdc-navy-dark);
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(247,214,24,.3);
}
/* ========== CARDS ========== */
.card-sls {
    background: var(--sls-card);
    border: 1px solid var(--sls-border);
    border-radius: var(--sls-radius);
    box-shadow: 0 4px 18px rgba(0, 26, 56, .05);
}

/* Cartes KPI toujours colorees (citoyen + tous les admin) */
.stat-card {
    border: none;
    border-radius: 18px;
    padding: 1.2rem 1.25rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 110px;
    box-shadow: 0 12px 28px rgba(0, 26, 56, .15);
    background: linear-gradient(135deg, #0052B3, #007FFF);
    transition: transform .25s ease, box-shadow .25s ease;
}
.stat-card::before { display: none; }
.stat-card .label {
    color: rgba(255,255,255,.85);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.stat-card .value {
    font-size: 1.95rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-top: .25rem;
}
.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 36px rgba(0,26,56,.22);
}
.stat-card.success,
.stat-card.teal { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.stat-card.gold { background: linear-gradient(135deg, #C9A000, #F7D618); }
.stat-card.purple { background: linear-gradient(135deg, #007FFF, #4DA6FF); }
.stat-card.cyan { background: linear-gradient(135deg, #0369a1, #38bdf8); }
.stat-card.danger { background: linear-gradient(135deg, #CE1126, #E85A6B); }
.stat-card.navy { background: linear-gradient(135deg, #002B5C, #003A70); }

/* ========== LANDING ========== */
.landing-nav {
    background: rgba(0, 26, 56, .92);
    backdrop-filter: blur(12px);
    padding: .95rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.landing-nav .brand {
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
}
.landing-nav .brand .brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}
.landing-nav .brand .nav-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,127,255,.3);
}
.landing-nav .brand .brand-name {
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
}
.landing-nav .nav-link { color: rgba(255,255,255,.78); font-weight: 500; }
.landing-nav .nav-link:hover { color: #fff; }
.landing-nav .btn-outline-sls { border-color: rgba(255,255,255,.35); color: #fff; }
.landing-nav .btn-sls { padding: .45rem 1rem; }

.landing-hero {
    padding: 5rem 0 4rem;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0,127,255,.25), transparent 45%),
        radial-gradient(ellipse at 80% 10%, rgba(247,214,24,.12), transparent 40%),
        linear-gradient(160deg, #001A38 0%, #002B5C 45%, #002B5C 100%);
    color: #fff;
}
.landing-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
}
.landing-hero .lead { color: rgba(255,255,255,.72); max-width: 34rem; }
.map-illustration {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 24px;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 30px 60px rgba(0,0,0,.35);
    overflow: hidden;
}
.rdc-map-image {
    width: 100%;
    max-width: 430px;
    height: auto;
    display: block;
    filter: drop-shadow(0 18px 30px rgba(0,0,0,.28));
}
.feature-card {
    background: #fff;
    border: 1px solid var(--sls-border);
    border-radius: var(--sls-radius);
    padding: 1.5rem;
    height: 100%;
    transition: .25s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0,26,56,.1); }
.feature-card .icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #E0F0FF, #F0F7FF);
    color: #0052B3;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.reply-preview,
.forward-indicator {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(0, 123, 255, .08);
    border: 1px solid rgba(0, 123, 255, .12);
    border-radius: 10px;
    color: var(--sls-muted);
    font-size: .72rem;
    padding: .3rem .5rem;
    margin-bottom: .45rem;
}
.forward-indicator {
    background: rgba(247, 214, 24, .14);
    border-color: rgba(247, 214, 24, .2);
    color: var(--rdc-navy-dark);
    font-weight: 600;
}
.message-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-top: .6rem;
    flex-wrap: wrap;
}
.msg-action {
    border: none;
    background: transparent;
    padding: 0;
    font-size: .72rem;
    font-weight: 600;
    color: var(--sls-blue);
}
.msg-action.delete-message {
    color: var(--sls-danger);
}
.landing-footer {
    background: var(--night);
    color: rgba(255,255,255,.75);
    padding: 2.2rem 0;
    margin-top: 4rem;
}

/* ========== AUTH  -  BLEU DE NUIT ========== */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--night);
}
.auth-visual {
    position: relative;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 30%, rgba(0,127,255,.35), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(247,214,24,.18), transparent 35%),
        linear-gradient(160deg, #001029 0%, #002B5C 50%, #0a1224 100%);
    color: #fff;
}
.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: .35;
    pointer-events: none;
}
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual .brand-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 800;
    font-size: 1.15rem;
}
.auth-visual .brand-badge {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #007FFF, #003D8F);
    display: grid; place-items: center;
    box-shadow: 0 0 30px rgba(0,127,255,.45);
}
.auth-visual h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    max-width: 16ch;
    margin: 2rem 0 1rem;
}
.auth-visual p { color: rgba(255,255,255,.7); max-width: 34ch; font-size: 1.05rem; }
.auth-visual .glow-orbs {
    display: flex;
    gap: .6rem;
    margin-top: 2rem;
}
.auth-visual .orb {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent-glow);
    box-shadow: 0 0 12px var(--accent-glow);
}
.auth-visual .orb:nth-child(2) { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.auth-visual .orb:nth-child(3) { background: var(--rdc-red); box-shadow: 0 0 12px var(--rdc-red); }

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        linear-gradient(180deg, #001F3F 0%, #0e1a32 100%);
}
.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 22px;
    padding: 2.25rem;
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    backdrop-filter: blur(18px);
    color: #fff;
}
.auth-card.wide { max-width: 620px; }
.auth-card h1 {
    font-weight: 800;
    font-size: 1.65rem;
    margin-bottom: .25rem;
}
.auth-card .subtitle { color: rgba(255,255,255,.55); margin-bottom: 1.5rem; }
.auth-card .form-label {
    color: rgba(255,255,255,.78);
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: .4rem;
}
.auth-card .form-control,
.auth-card .form-select {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    border-radius: 12px;
    padding: .85rem 1rem;
}
.auth-card .form-control:focus,
.auth-card .form-select:focus {
    background: rgba(255,255,255,.09);
    border-color: #007FFF;
    box-shadow: 0 0 0 .25rem rgba(0,127,255,.2);
    color: #fff;
}
.auth-card .form-control::placeholder { color: rgba(255,255,255,.35); }
.auth-card .form-select option { color: #0f172a; }
.auth-card .input-group-text {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.55);
    border-radius: 12px 0 0 12px;
}
.auth-card .input-group .form-control { border-radius: 0 12px 12px 0; }
.auth-card a { color: #99C9FF; }
.auth-card .btn-sls {
    padding: .95rem;
    font-size: 1rem;
    border-radius: 12px;
    margin-top: .25rem;
}
.auth-card .auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    color: rgba(255,255,255,.55);
    font-size: .9rem;
}
.auth-card .alert { border-radius: 12px; }

@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { min-height: 220px; padding: 1.5rem; }
    .auth-visual h2 { font-size: 1.6rem; margin: 1rem 0 .5rem; }
}

/* ========== APP SHELL ========== */
.app-shell {
    display: grid;
    grid-template-columns: var(--sls-sidebar-w) 1fr;
    min-height: 100vh;
}
.app-sidebar {
    background: linear-gradient(180deg, #001A38 0%, #002B5C 100%);
    color: #fff;
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,.06);
}
.app-sidebar .brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-weight: 800;
    padding: .35rem .5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 1rem;
    text-decoration: none;
    color: #fff;
}
.app-sidebar .brand-badge {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, #007FFF, #0052B3);
    border-radius: 11px;
    display: grid; place-items: center;
    font-size: .75rem;
    box-shadow: 0 0 18px rgba(0,127,255,.35);
}
.app-sidebar .nav-link {
    color: rgba(255,255,255,.72);
    border-radius: 10px;
    padding: .7rem .85rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 500;
    margin-bottom: .25rem;
}
.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
    background: rgba(0,127,255,.18);
    color: #fff;
}
.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
    background: #fff;
    border-bottom: 1px solid var(--sls-border);
    padding: .9rem 1.35rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
}
.app-topbar .search-wrap { flex: 1; max-width: 520px; }
.app-topbar .search-wrap input {
    border-radius: 999px;
    background: #f1f5f9;
    border-color: transparent;
}
.app-content { padding: 1.35rem; }
.feed-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.25rem;
}
.composer-card {
    display: flex;
    gap: .85rem;
    align-items: center;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}
.composer-card .avatar,
.post-card .avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #002B5C, #0052B3);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
    flex-shrink: 0;
}
.composer-card .fake-input {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid var(--sls-border);
    border-radius: 999px;
    padding: .7rem 1rem;
    color: var(--sls-muted);
}
.post-card { padding: 1.15rem; margin-bottom: 1rem; }
.post-card .meta { color: var(--sls-muted); font-size: .82rem; }
.post-card .cat-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #ecfdf5;
    color: #059669;
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .65rem;
    border-radius: 999px;
}
.post-card .media-box {
    background: #E3EEF8;
    border-radius: 12px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sls-muted);
    overflow: hidden;
    margin: .85rem 0;
}
.post-card .media-box img,
.post-card .media-box video { width: 100%; max-height: 320px; object-fit: cover; }
.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    border-top: 1px solid var(--sls-border);
    padding-top: .75rem;
}
.post-actions .btn {
    border: none;
    background: transparent;
    color: var(--sls-muted);
    font-size: .85rem;
    font-weight: 600;
}
.post-actions .btn:hover { color: var(--sls-blue); background: #F0F7FF; }
.side-widget { padding: 1rem; margin-bottom: 1rem; }
.side-widget h6 { font-weight: 800; color: var(--bleu-nuit); margin-bottom: .85rem; }
.trend-item, .cat-item {
    display: flex;
    justify-content: space-between;
    padding: .45rem 0;
    border-bottom: 1px solid var(--sls-border);
    font-size: .9rem;
    color: var(--sls-text);
}
.trend-item:last-child, .cat-item:last-child { border-bottom: none; }

/* ========== ADMIN ========== */
.admin-shell {
    display: grid;
    grid-template-columns: var(--sls-sidebar-w) 1fr;
    min-height: 100vh;
}
.admin-sidebar {
    background: linear-gradient(180deg, #001029, #002B5C);
    color: #fff;
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,.78);
    border-radius: 10px;
    padding: .7rem .85rem;
    display: flex;
    gap: .7rem;
    align-items: center;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(0,127,255,.22);
    color: #fff;
}
.admin-sidebar .nav-link.active {
    box-shadow: inset 3px 0 0 #4DA6FF;
}
.admin-main-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    background: var(--sls-bg);
}
.admin-main { padding: 1.5rem; background: transparent; flex: 1; min-width: 0; }
.admin-mobile-topbar {
    display: none;
    align-items: center;
    gap: .75rem;
    padding: .7rem .85rem;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--sls-border);
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(10px);
}
.admin-mobile-title {
    flex: 1;
    font-weight: 800;
    color: var(--rdc-navy);
    font-size: .95rem;
}
.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.35rem;
}

/* Super Admin unique */
.sa-hero {
    background:
        radial-gradient(circle at right top, rgba(0,127,255,.35), transparent 40%),
        radial-gradient(circle at left bottom, rgba(247,214,24,.2), transparent 35%),
        linear-gradient(135deg, #001A38 0%, #002B5C 50%, #003A70 100%);
    color: #fff;
    border-radius: 20px;
    padding: 1.75rem 1.75rem 1.5rem;
    margin-bottom: 1.35rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 20px 50px rgba(0,26,56,.25);
}
.sa-hero::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,127,255,.35), transparent 70%);
}
.sa-hero h1 { font-weight: 800; font-size: 1.75rem; margin-bottom: .25rem; }
.sa-hero p { color: rgba(255,255,255,.65); margin: 0; }
.sa-stat {
    border: none;
    border-radius: 18px;
    padding: 1.2rem 1.25rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 118px;
    box-shadow: 0 12px 28px rgba(0,26,56,.15);
}
.sa-stat .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; font-weight: 700; }
.sa-stat .value { font-size: 2rem; font-weight: 800; margin-top: .2rem; }
.sa-stat .icon {
    position: absolute;
    right: 1rem; bottom: .8rem;
    font-size: 2.2rem;
    opacity: .25;
}
.sa-stat.c1 { background: linear-gradient(135deg, #0052B3, #007FFF); }
.sa-stat.c2 { background: linear-gradient(135deg, #007FFF, #4DA6FF); }
.sa-stat.c3 { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.sa-stat.c4 { background: linear-gradient(135deg, #C9A000, #F7D618); }
.sa-stat.c5 { background: linear-gradient(135deg, #CE1126, #E85A6B); }
.sa-stat.c6 { background: linear-gradient(135deg, #0369a1, #38bdf8); }
.sa-panel {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--sls-border);
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(0,26,56,.06);
}
.chart-placeholder {
    height: 220px;
    background: linear-gradient(180deg, #F0F7FF, #f8fafc);
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 1rem .75rem .5rem;
}
.chart-bar {
    width: 28px;
    background: linear-gradient(180deg, #4DA6FF, #0052B3);
    border-radius: 6px 6px 0 0;
}
.map-panel {
    min-height: 280px;
    background: linear-gradient(160deg, #002B5C, #003A70);
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
}

/* ========== MESSAGES ========== */
.chat-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1rem;
    min-height: calc(100vh - 140px);
}
.chat-list, .chat-window {
    background: #fff;
    border: 1px solid var(--sls-border);
    border-radius: var(--sls-radius);
}
.chat-list { overflow: auto; }
.chat-item {
    display: flex;
    gap: .75rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--sls-border);
    color: inherit;
}
.chat-item:hover, .chat-item.active { background: #F0F7FF; }
.chat-item .av {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, #002B5C, #0052B3);
    color: #fff;
    display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}
.chat-window { display: flex; flex-direction: column; }
.chat-messages { flex: 1; padding: 1rem; overflow: auto; background: #f8fafc; }
.bubble {
    max-width: 70%;
    padding: .7rem 1rem;
    border-radius: 14px;
    margin-bottom: .65rem;
    font-size: .92rem;
}
.bubble.me { background: linear-gradient(135deg, #0052B3, #007FFF); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble.other { background: #fff; border: 1px solid var(--sls-border); border-bottom-left-radius: 4px; }
.chat-input { padding: .85rem; border-top: 1px solid var(--sls-border); background: #fff; }

.notif-item {
    display: flex;
    gap: .9rem;
    padding: 1rem;
    border-bottom: 1px solid var(--sls-border);
    background: #fff;
}
.notif-item.unread { background: #F0F7FF; }
.notif-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: #E0F0FF; color: #0052B3;
    display: grid; place-items: center; flex-shrink: 0;
}
.notif-icon.ok { background: #d1fae5; color: #059669; }
.profile-hero {
    background: linear-gradient(135deg, #001A38, #002B5C);
    color: #fff;
    border-radius: var(--sls-radius);
    padding: 1.5rem;
    display: flex;
    gap: 1.25rem;
    align-items: center;
}
.profile-hero .avatar-lg {
    width: 96px; height: 96px; border-radius: 50%;
    background: linear-gradient(135deg, #007FFF, #0052B3);
    color: #fff;
    display: grid; place-items: center; font-size: 2rem; font-weight: 700;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.2);
}
.profile-hero .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero .text-muted { color: rgba(255,255,255,.65) !important; }
.settings-tabs .nav-link {
    color: var(--sls-muted);
    font-weight: 700;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}
.settings-tabs .nav-link.active {
    color: #0052B3;
    border-bottom-color: #0052B3;
    background: transparent;
}
.upload-zone {
    border: 2px dashed #99C9FF;
    border-radius: 14px;
    padding: 2rem;
    text-align: center;
    background: #f8fbff;
    color: var(--sls-muted);
}

/* ========== ADMIN PREMIUM ========== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes softPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,127,255,.35); }
    50% { box-shadow: 0 0 0 10px rgba(0,127,255,0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.admin-main {
    padding: 1.75rem;
    background:
        radial-gradient(circle at top right, rgba(0,127,255,.08), transparent 35%),
        linear-gradient(180deg, #E8F2FA 0%, #F5F9FD 40%, #F0F6FC 100%);
    min-height: 100vh;
}
.admin-sidebar {
    background: linear-gradient(185deg, #001029 0%, #001F3F 45%, #002B5C 100%);
    box-shadow: 8px 0 30px rgba(0,0,0,.2);
}
.admin-sidebar .nav-link {
    transition: all .25s ease;
    position: relative;
}
.admin-sidebar .nav-link:hover {
    background: rgba(0,127,255,.2);
    transform: translateX(4px);
}
.admin-sidebar .nav-link i {
    width: 1.25rem;
    text-align: center;
}

.admin-page-hero {
    background: linear-gradient(135deg, #001A38 0%, #002B5C 55%, #004C99 100%);
    color: #fff;
    border-radius: 22px;
    padding: 1.6rem 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    animation: fadeUp .55s ease both;
}
.admin-page-hero::before {
    content: '';
    position: absolute;
    width: 220px; height: 220px;
    right: -60px; top: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,127,255,.4), transparent 70%);
    animation: floatY 5s ease-in-out infinite;
}
.admin-page-hero::after {
    content: '';
    position: absolute;
    width: 140px; height: 140px;
    left: 35%; bottom: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247,214,24,.25), transparent 70%);
}
.admin-page-hero > * { position: relative; z-index: 1; }
.admin-page-hero .eyebrow {
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #99C9FF;
    font-weight: 700;
    margin-bottom: .35rem;
}
.admin-page-hero h1 {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 .35rem;
}
.admin-page-hero p {
    margin: 0;
    color: rgba(255,255,255,.65);
    max-width: 42rem;
}

.admin-form-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(226,232,240,.9);
    box-shadow: 0 14px 40px rgba(0,43,92,.07);
    overflow: hidden;
    animation: fadeUp .6s ease both;
    transition: transform .25s ease, box-shadow .25s ease;
}
.admin-form-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 48px rgba(0,43,92,.1);
}
.admin-form-card .card-head {
    padding: 1.15rem 1.35rem;
    background: linear-gradient(135deg, #002B5C, #003A70);
    color: #fff;
    display: flex;
    align-items: center;
    gap: .85rem;
}
.admin-form-card .card-head .icon-wrap {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    display: grid; place-items: center;
    font-size: 1.15rem;
}
.admin-form-card .card-head h2 {
    font-size: 1.05rem;
    font-weight: 750;
    margin: 0;
}
.admin-form-card .card-head small {
    color: rgba(255,255,255,.65);
    display: block;
    margin-top: .1rem;
}
.admin-form-card .card-body-pad {
    padding: 1.35rem;
}
.admin-form-card.delay-1 { animation-delay: .08s; }
.admin-form-card.delay-2 { animation-delay: .16s; }
.admin-form-card.delay-3 { animation-delay: .24s; }

.field-premium {
    margin-bottom: 1rem;
}
.field-premium label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: .4rem;
}
.field-premium .form-control,
.field-premium .form-select {
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    padding: .8rem 1rem;
    background: #f8fafc;
    transition: all .22s ease;
}
.field-premium .form-control:focus,
.field-premium .form-select:focus {
    background: #fff;
    border-color: #007FFF;
    box-shadow: 0 0 0 .25rem rgba(0,127,255,.15);
}
.field-premium .input-icon {
    position: relative;
}
.field-premium .input-icon i {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}
.field-premium .input-icon .form-control {
    padding-left: 2.5rem;
}

.btn-premium {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: .85rem 1.1rem;
    font-weight: 750;
    color: #fff;
    background: linear-gradient(135deg, #0066D6, #0052B3);
    box-shadow: 0 10px 24px rgba(0,102,214,.28);
    transition: all .25s ease;
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0,102,214,.38);
    color: #fff;
    background: linear-gradient(135deg, #0052B3, #003D8F);
}
.btn-premium.gold {
    background: linear-gradient(135deg, #F7D618, #C9A000);
    color: #001F3F;
    box-shadow: 0 10px 24px rgba(201,160,0,.28);
}
.btn-premium.danger {
    background: linear-gradient(135deg, #CE1126, #A50E1E);
    box-shadow: 0 10px 24px rgba(206,17,38,.25);
}

.province-grid {
    display: grid;
    gap: 1rem;
}
.province-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem 1.1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .85rem;
    align-items: center;
    transition: all .25s ease;
    animation: fadeUp .55s ease both;
}
.province-item:hover {
    border-color: #99C9FF;
    box-shadow: 0 12px 28px rgba(0,102,214,.1);
    transform: translateY(-2px);
}
.province-item .meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .55rem;
}
.province-item .chip {
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: #F0F7FF;
    color: #0052B3;
}
.province-item .chip.soft {
    background: #f1f5f9;
    color: #475569;
}
.admin-list-user {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem 0;
    border-bottom: 1px solid #eef2f7;
    animation: fadeUp .5s ease both;
}
.admin-list-user:last-child { border-bottom: none; }
.admin-list-user .av {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #002B5C, #007FFF);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
    flex-shrink: 0;
}
.settings-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 1.25rem;
}
.settings-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}
.settings-switch .form-check-input {
    width: 2.6rem;
    height: 1.35rem;
    cursor: pointer;
}
.settings-hint {
    font-size: .8rem;
    color: #64748b;
    margin-top: .35rem;
}
.settings-side-card {
    background: linear-gradient(160deg, #002B5C, #003A70);
    color: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    height: 100%;
    animation: fadeUp .65s ease both;
    position: relative;
    overflow: hidden;
}
.settings-side-card::before {
    content: '';
    position: absolute;
    inset: auto -30px -30px auto;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.ai-feature {
    display: flex;
    gap: .8rem;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.ai-feature:last-child { border-bottom: none; }
.ai-feature i {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,.12);
    display: grid; place-items: center;
}
.sa-stat, .admin-form-card, .province-item, .sa-panel {
    will-change: transform;
}
.sa-stat {
    transition: transform .25s ease, box-shadow .25s ease;
    animation: fadeUp .55s ease both;
}
.sa-stat:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 36px rgba(0,26,56,.22);
}
.sa-stat.c1 { animation-delay: .05s; }
.sa-stat.c2 { animation-delay: .1s; }
.sa-stat.c3 { animation-delay: .15s; }
.sa-stat.c4 { animation-delay: .2s; }
.sa-stat.c5 { animation-delay: .25s; }
.sa-stat.c6 { animation-delay: .3s; }

@media (max-width: 992px) {
    .app-shell, .admin-shell { grid-template-columns: 1fr; }
    .feed-layout, .chat-layout { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .province-item { grid-template-columns: 1fr; }
}

/* ========== CITIZEN PREMIUM ========== */
.app-content {
    background:
        radial-gradient(circle at top right, rgba(0,127,255,.07), transparent 40%),
        transparent;
}
.app-sidebar .nav-link {
    transition: all .25s ease;
}
.app-sidebar .nav-link:hover {
    transform: translateX(4px);
}
.app-sidebar .brand-badge {
    animation: softPulse 2.8s infinite;
}
.app-topbar {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,.92);
}
.citizen-hero {
    background: linear-gradient(135deg, #001A38 0%, #002B5C 55%, #004C99 100%);
    color: #fff;
    border-radius: 20px;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    animation: fadeUp .5s ease both;
}
.citizen-hero::before {
    content: '';
    position: absolute;
    width: 180px; height: 180px;
    right: -50px; top: -60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,127,255,.4), transparent 70%);
    animation: floatY 5s ease-in-out infinite;
}
.citizen-hero > * { position: relative; z-index: 1; }
.citizen-hero .eyebrow {
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #99C9FF;
    font-weight: 700;
}
.citizen-hero h1 {
    font-size: 1.45rem;
    font-weight: 800;
    margin: .2rem 0 .25rem;
}
.citizen-hero p { margin: 0; color: rgba(255,255,255,.65); }

.composer-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--sls-border);
    box-shadow: 0 10px 28px rgba(0,43,92,.06);
    transition: transform .25s ease, box-shadow .25s ease;
    animation: fadeUp .55s ease both;
}
.composer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0,43,92,.1);
}
.post-card {
    border-radius: 18px;
    transition: transform .25s ease, box-shadow .25s ease;
    animation: fadeUp .55s ease both;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0,43,92,.1);
}
.side-widget {
    border-radius: 18px;
    animation: fadeUp .6s ease both;
    transition: transform .25s ease, box-shadow .25s ease;
}
.side-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,43,92,.08);
}
.score-widget {
    background: linear-gradient(160deg, #002B5C, #003A70);
    color: #fff;
    border: none;
}
.score-widget h6 { color: #fff !important; }
.score-widget .display-6 { color: #F7D618 !important; }
.score-widget .small { color: rgba(255,255,255,.7) !important; }

.cat-item, .trend-item {
    transition: all .2s ease;
    border-radius: 8px;
    padding-left: .35rem;
    padding-right: .35rem;
}
.cat-item:hover, .trend-item:hover {
    background: #F0F7FF;
    color: #0052B3;
}

.citizen-form-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(226,232,240,.9);
    box-shadow: 0 14px 40px rgba(0,43,92,.07);
    overflow: hidden;
    animation: fadeUp .55s ease both;
}
.citizen-form-card .card-head {
    padding: 1.15rem 1.35rem;
    background: linear-gradient(135deg, #002B5C, #003A70);
    color: #fff;
    display: flex;
    align-items: center;
    gap: .85rem;
}
.citizen-form-card .card-head .icon-wrap {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    display: grid; place-items: center;
}
.citizen-form-card .card-head h2 {
    font-size: 1.05rem;
    font-weight: 750;
    margin: 0;
}
.citizen-form-card .card-body-pad { padding: 1.35rem; }

.filter-bar {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--sls-border);
    padding: 1rem;
    margin-bottom: 1rem;
    animation: fadeUp .5s ease both;
    box-shadow: 0 8px 22px rgba(0,43,92,.04);
}
.filter-bar .form-control,
.filter-bar .form-select {
    border-radius: 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
}

.notif-panel, .chat-list, .chat-window {
    animation: fadeUp .55s ease both;
    border-radius: 18px !important;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0,43,92,.06);
}
.notif-item {
    transition: background .2s ease, transform .2s ease;
}
.notif-item:hover {
    transform: translateX(3px);
}
.chat-item {
    transition: all .2s ease;
}
.profile-hero {
    animation: fadeUp .5s ease both;
    box-shadow: 0 16px 40px rgba(0,26,56,.2);
}

/* Profile cover + avatar (style Facebook) */
.profile-card {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(226,232,240,.95);
    box-shadow: 0 16px 40px rgba(0,43,92,.08);
    animation: fadeUp .5s ease both;
}
.profile-cover {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, #002B5C, #003A70 55%, #007FFF);
    overflow: hidden;
}
.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-cover-fallback {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.18), transparent 40%),
        linear-gradient(135deg, #001A38, #003A70 55%, #0066D6);
}
.profile-cover-btn {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    box-shadow: 0 8px 18px rgba(0,0,0,.15);
}
.profile-body {
    position: relative;
    padding: 0 1.4rem 1.4rem;
}
.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-top: -62px;
    z-index: 3;
}
.profile-avatar {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: linear-gradient(135deg, #002B5C, #007FFF);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 800;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0,43,92,.2);
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-avatar-edit {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0052B3;
    color: #fff;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(29,78,216,.35);
    transition: transform .2s ease;
}
.profile-avatar-edit:hover {
    transform: scale(1.08);
    color: #fff;
}
.profile-identity-text {
    margin-top: .85rem;
}
.profile-identity-text h1 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #002B5C;
    margin: 0 0 .2rem;
}
.profile-identity-text p {
    color: #64748b;
    margin: 0 0 .75rem;
}
.profile-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid #eef2f7;
    margin-top: 1rem;
}
.profile-stat {
    text-align: center;
    padding: .9rem .5rem;
    text-decoration: none;
    color: inherit;
    border-right: 1px solid #eef2f7;
}
.profile-stat:last-child { border-right: 0; }
.profile-stat strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #002B5C;
    line-height: 1.1;
}
.profile-stat span {
    font-size: .8rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.profile-stat:hover strong { color: #0052B3; }
.profile-footer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}
.footer-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 20px rgba(0,43,92,.05);
    transition: transform .2s ease, box-shadow .2s ease;
}
.footer-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,43,92,.1);
    color: inherit;
}
.footer-stat strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #002B5C;
}
.footer-stat span {
    color: #64748b;
    font-size: .85rem;
    font-weight: 600;
}
.profile-cover-edit { height: 190px; border-radius: 16px; }
.profile-identity-edit {
    margin-top: -48px;
    padding: 0 .5rem;
}
.profile-edit-preview .profile-avatar { width: 104px; height: 104px; }

/* Social feed (Facebook / Instagram) */
.ig-post { padding-bottom: .35rem !important; }
.media-box-full {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    border-radius: 0;
    max-height: none;
}
.post-card .media-box-full img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(75vh, 720px);
    object-fit: contain;
    margin: 0 auto;
}
.social-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem .15rem .35rem;
    font-size: .9rem;
    color: #475569;
    border-bottom: 1px solid #eef2f7;
}
.social-meta a { color: #64748b; text-decoration: none; }
.social-meta a:hover { color: #0052B3; text-decoration: underline; }
.social-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .15rem;
    padding: .2rem 0;
    border-bottom: 1px solid #eef2f7;
}
.social-actions form { margin: 0; }
.social-btn {
    width: 100%;
    border: 0 !important;
    background: transparent !important;
    color: #475569 !important;
    font-weight: 600;
    border-radius: 10px !important;
    padding: .55rem .4rem !important;
}
.social-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}
.social-btn.is-liked,
.social-btn.is-liked i {
    color: #e11d48 !important;
}
.social-btn.is-liked i {
    animation: heartPop .35s ease;
}
@keyframes heartPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}
.ig-comment-bar {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .1rem .15rem;
}
.ig-comment-bar .form-control {
    border: 0;
    background: transparent;
    box-shadow: none !important;
    padding-left: 0;
}
.ig-comment-bar .btn-link { color: #0066D6; white-space: nowrap; }
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #002B5C, #007FFF);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.ig-comments { padding: 1rem 1.15rem; }
.ig-comment-item {
    display: flex;
    gap: .65rem;
    padding: .55rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.ig-comment-bubble {
    background: #f1f5f9;
    border-radius: 14px;
    padding: .55rem .8rem;
    flex: 1;
}
img.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.my-pub-card {
    display: flex;
    gap: .85rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: .75rem;
    background: #fff;
    height: 100%;
    transition: box-shadow .2s ease, transform .2s ease;
}
.my-pub-card:hover {
    box-shadow: 0 10px 24px rgba(0,43,92,.08);
    transform: translateY(-2px);
}
.my-pub-thumb {
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
    background: #e2e8f0;
}
.my-pub-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.my-pub-thumb-empty {
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #F0F7FF, #e2e8f0);
}
.my-pub-body {
    flex: 1;
    min-width: 0;
}
.network-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: .45rem;
}
.network-tabs a {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: .9rem;
    padding: .55rem .9rem;
    border-radius: 12px;
}
.network-tabs a.active,
.network-tabs a:hover {
    background: #002B5C;
    color: #fff;
}
.net-user-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.net-user-row:last-child { border-bottom: 0; }
.net-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.net-avatar-fallback {
    background: linear-gradient(135deg, #002B5C, #007FFF);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
}

@media (max-width: 768px) {
    .profile-cover { height: 160px; }
    .profile-avatar { width: 96px; height: 96px; }
    .profile-avatar-wrap { margin-top: -48px; }
    .social-actions { grid-template-columns: repeat(2, 1fr); }
}

.category-tile {
    background: #fff;
    border: 1px solid var(--sls-border);
    border-radius: 16px;
    padding: 1.15rem;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: all .25s ease;
    animation: fadeUp .55s ease both;
    box-shadow: 0 8px 22px rgba(0,43,92,.04);
}
.category-tile:hover {
    transform: translateY(-4px);
    border-color: #99C9FF;
    box-shadow: 0 16px 32px rgba(0,102,214,.12);
    color: inherit;
}
.category-tile .icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #E0F0FF, #F0F7FF);
    color: #0052B3;
    display: grid; place-items: center;
    margin-bottom: .75rem;
    font-size: 1.2rem;
}

/* ========== CITIZEN ULTRA ========== */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes glowLine {
    0% { width: 0; opacity: 0; }
    40% { opacity: 1; }
    100% { width: 72px; opacity: 1; }
}

.app-shell .app-sidebar {
    animation: slideInLeft .55s ease both;
}
.app-content {
    background:
        radial-gradient(circle at 90% 0%, rgba(0,127,255,.12), transparent 32%),
        radial-gradient(circle at 10% 40%, rgba(247,214,24,.06), transparent 28%),
        linear-gradient(180deg, #eef3fb 0%, #f7f9fc 45%, #F0F6FC 100%);
    min-height: calc(100vh - 70px);
}
.citizen-hero {
    border-radius: 24px;
    padding: 1.6rem 1.75rem;
    box-shadow: 0 22px 50px rgba(0,26,56,.22);
}
.citizen-hero::after {
    content: '';
    position: absolute;
    left: 1.75rem;
    bottom: 1.1rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #4DA6FF, #F7D618);
    animation: glowLine 1s ease .2s both;
}
.citizen-hero h1 { letter-spacing: -.02em; }
.composer-card {
    border-radius: 22px;
    padding: 1.1rem 1.25rem !important;
    border: 1px solid rgba(147,197,253,.45);
    background: linear-gradient(180deg, #fff, #f8fbff);
}
.composer-card .fake-input {
    background: #eef4ff;
    border-color: transparent;
    font-weight: 500;
}
.post-card {
    border: 1px solid rgba(226,232,240,.95);
    background: #fff;
    padding: 1.25rem !important;
    border-radius: 22px;
}
.post-card .avatar {
    box-shadow: 0 8px 18px rgba(29,78,216,.25);
}
.post-actions .btn {
    border-radius: 999px;
    padding: .4rem .75rem;
}
.post-actions .btn:hover {
    background: #F0F7FF;
    color: #0052B3;
    transform: translateY(-1px);
}
.side-widget {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226,232,240,.9);
    padding: 1.15rem !important;
}
.score-widget {
    position: relative;
    overflow: hidden;
}
.score-widget::before {
    content: '';
    position: absolute;
    width: 120px; height: 120px;
    right: -30px; top: -30px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    animation: floatY 4.5s ease-in-out infinite;
}
.filter-bar {
    border-radius: 18px;
    border: 1px solid rgba(147,197,253,.35);
    background: linear-gradient(180deg, #fff, #f8fbff);
}
.citizen-form-card {
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(0,43,92,.08);
}
.citizen-form-card .card-head {
    position: relative;
    overflow: hidden;
}
.citizen-form-card .card-head::after {
    content: '';
    position: absolute;
    right: -20px; top: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.category-tile {
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
.category-tile::before {
    content: '';
    position: absolute;
    inset: auto -20% -40% auto;
    width: 90px; height: 90px;
    border-radius: 50%;
    background: rgba(0,127,255,.08);
    transition: transform .3s ease;
}
.category-tile:hover::before { transform: scale(1.4); }
.category-tile .icon {
    transition: transform .3s ease;
}
.category-tile:hover .icon { transform: rotate(-8deg) scale(1.08); }

.chat-list, .chat-window, .notif-panel {
    border: 1px solid rgba(147,197,253,.28) !important;
}
.bubble.me {
    animation: scaleIn .25s ease both;
    box-shadow: 0 8px 18px rgba(0,102,214,.2);
}
.bubble.other {
    animation: scaleIn .25s ease both;
}
.profile-hero {
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}
.profile-hero::before {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    right: -40px; top: -60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,127,255,.35), transparent 70%);
    animation: floatY 6s ease-in-out infinite;
}
.app-topbar .btn.rounded-circle {
    transition: transform .2s ease, box-shadow .2s ease;
}
.app-topbar .btn.rounded-circle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0,43,92,.12);
}
.reveal-on-scroll {
    opacity: 1;
    transform: none;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}
@supports (animation: fadeUp .01s) {
    .js-ready .reveal-on-scroll:not(.is-visible) {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity .45s ease, transform .45s ease;
    }
    .js-ready .reveal-on-scroll.is-visible {
        opacity: 1;
        transform: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ========== RDC LANDING PRO ========== */
.landing-nav .brand { gap: .65rem; }
.landing-nav .brand-mark,
.landing-nav .brand span:first-child,
.landing-nav .brand-mark {
    display: inline-flex;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--rdc-yellow), var(--rdc-yellow-dark));
    color: var(--rdc-navy-dark);
    border-radius: 12px;
    font-size: .72rem;
    font-weight: 800;
    box-shadow: 0 0 0 2px rgba(247,214,24,.35), 0 8px 20px rgba(0,0,0,.25);
}
.landing-nav .brand-name { font-weight: 800; letter-spacing: -.01em; }
.landing-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(206,17,38,.18) 0%, transparent 28%),
        radial-gradient(ellipse at 18% 25%, rgba(0,127,255,.35), transparent 48%),
        radial-gradient(ellipse at 85% 15%, rgba(247,214,24,.18), transparent 42%),
        linear-gradient(160deg, #001029 0%, #002B5C 48%, #001A38 100%);
}
.hero-flag-glow {
    position: absolute;
    inset: auto -10% -20% auto;
    width: 50%; height: 70%;
    background: radial-gradient(circle, rgba(206,17,38,.2), transparent 65%);
    pointer-events: none;
}
.hero-brand-block { position: relative; z-index: 1; }
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--rdc-yellow);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: .85rem;
}
.rdc-star {
    display: inline-block;
    color: var(--rdc-yellow);
    font-size: 1.35rem;
    margin-bottom: .35rem;
    filter: drop-shadow(0 0 10px rgba(247,214,24,.55));
    animation: floatY 4s ease-in-out infinite;
}
.landing-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.7rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1rem;
}
.section-eyebrow {
    color: var(--rdc-blue-mid);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: .4rem;
}
.landing-section { background: linear-gradient(180deg, #fff 0%, #F0F6FC 100%); }
.landing-about { background: #fff; }
.about-flag-card {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--sls-border);
    box-shadow: 0 18px 40px rgba(0,43,92,.08);
    background: #fff;
}
.about-flag-card .flag-bar { height: 14px; }
.about-flag-card .flag-bar.blue { background: var(--rdc-blue); }
.about-flag-card .flag-bar.yellow { background: var(--rdc-yellow); }
.about-flag-card .flag-bar.red { background: var(--rdc-red); }
.about-flag-copy {
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.about-flag-copy strong { color: var(--rdc-navy); font-size: 1.05rem; }
.about-flag-copy span { color: var(--sls-muted); font-size: .92rem; }
.feature-card .icon {
    background: linear-gradient(135deg, #E0F0FF, #FFF8D6);
    color: var(--rdc-blue-mid);
}
.stat-card.gold { background: linear-gradient(135deg, #C9A000, #F7D618); color: #001A38; }
.stat-card.gold .label { color: rgba(0,26,56,.75); }
.stat-card.gold .value { color: #001A38; }
.stat-card.danger { background: linear-gradient(135deg, #A50E1E, #CE1126); }
.stat-card.teal { background: linear-gradient(135deg, #003D8F, #007FFF); }
.admin-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(247,214,24,.18), rgba(0,127,255,.18));
    box-shadow: inset 3px 0 0 var(--rdc-yellow);
}
.app-sidebar .brand-badge,
.admin-sidebar [style*="border-radius:12px"] {
    background: linear-gradient(135deg, var(--rdc-yellow), var(--rdc-yellow-dark)) !important;
    color: var(--rdc-navy-dark) !important;
}


.brand-badge-rdc {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: .75rem; font-weight: 800;
    background: linear-gradient(135deg, var(--rdc-yellow), var(--rdc-yellow-dark));
    color: var(--rdc-navy-dark);
    box-shadow: 0 0 0 2px rgba(247,214,24,.35), 0 10px 24px rgba(0,0,0,.25);
    animation: softPulse 2.8s infinite;
}
.app-sidebar .brand-badge {
    background: linear-gradient(135deg, var(--rdc-yellow), var(--rdc-yellow-dark)) !important;
    color: var(--rdc-navy-dark) !important;
    box-shadow: 0 0 0 2px rgba(247,214,24,.3), 0 8px 18px rgba(0,0,0,.2) !important;
}
.admin-page-hero .eyebrow,
.sa-hero .small.text-uppercase {
    color: var(--rdc-yellow) !important;
}
.btn-premium {
    background: linear-gradient(135deg, var(--rdc-blue), var(--rdc-blue-mid)) !important;
}
.btn-premium.gold {
    background: linear-gradient(135deg, var(--rdc-yellow), var(--rdc-yellow-dark)) !important;
    color: var(--rdc-navy-dark) !important;
}
.btn-premium.danger {
    background: linear-gradient(135deg, var(--rdc-red), var(--rdc-red-dark)) !important;
}
.chip {
    background: rgba(0,127,255,.1);
    color: var(--rdc-navy);
    border: 1px solid rgba(0,127,255,.18);
}
.chip.soft {
    background: rgba(247,214,24,.15);
    color: #7A6200;
    border-color: rgba(247,214,24,.35);
}

/* ========== LOGO & FAMILLE MFINGIZI ========== */
.auth-logo,
.nav-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.28);
    flex-shrink: 0;
}
.nav-logo { width: 40px; height: 40px; border-radius: 11px; }
.auth-visual .brand-row {
    align-items: center;
    gap: 1rem;
}
.auth-visual .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.auth-visual .brand-text strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
}
.auth-visual .brand-text small {
    color: var(--rdc-yellow);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-top: .25rem;
}
.auth-proprio {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.proprio-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #fff !important;
    background: rgba(247,214,24,.12);
    border: 1px solid rgba(247,214,24,.35);
    border-radius: 999px;
    padding: .55rem 1rem;
    font-size: .88rem;
    width: fit-content;
    transition: all .22s ease;
}
.proprio-link strong { color: var(--rdc-yellow); }
.proprio-link:hover {
    background: rgba(247,214,24,.22);
    transform: translateX(3px);
    color: #fff !important;
}
.proprio-link i { font-size: 1.35rem; color: var(--rdc-yellow); }

.family-page { min-height: 100vh; background: var(--sls-bg); }
.family-hero {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(0,127,255,.35), transparent 45%),
        radial-gradient(ellipse at 80% 20%, rgba(247,214,24,.18), transparent 40%),
        linear-gradient(160deg, #001029, #002B5C 55%, #001A38);
    color: #fff;
    padding: 2.5rem 0 3rem;
}
.family-back {
    color: rgba(255,255,255,.75) !important;
    font-size: .9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1.5rem;
}
.family-back:hover { color: #fff !important; }
.family-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.family-logo {
    width: 72px; height: 72px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,.3);
}
.family-eyebrow {
    color: var(--rdc-yellow);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 .35rem;
}
.family-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin: 0 0 .35rem;
}
.family-lead { color: rgba(255,255,255,.7); margin: 0; }
.family-content { padding: 2rem 0 3rem; max-width: 760px; }
.family-card {
    background: #fff;
    border: 1px solid var(--sls-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 16px 40px rgba(0,43,92,.07);
    line-height: 1.7;
}
.family-card h2 {
    color: var(--rdc-navy);
    font-size: 1.25rem;
    margin-top: 1.5rem;
}
.family-placeholder-note {
    background: linear-gradient(135deg, rgba(0,127,255,.08), rgba(247,214,24,.12));
    border: 1px dashed rgba(0,127,255,.3);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    color: var(--rdc-navy);
    font-weight: 600;
}
.family-footer {
    border-top: 1px solid var(--sls-border);
    padding: 1.25rem 0 2rem;
    color: var(--sls-muted);
    font-size: .9rem;
}
.family-footer a { font-weight: 700; }
.landing-footer .proprio-link-inline {
    color: var(--rdc-yellow) !important;
    font-weight: 700;
}

/* ========== RESPONSIVE LAYOUTS ========== */
.sidebar-backdrop { display: none; }

.min-w-0 { min-width: 0; }

.filter-bar .row > [class*="col-"] { min-width: 0; }

.table-responsive {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.sa-hero h1,
.citizen-hero h1,
.admin-page-hero h1 {
    overflow-wrap: anywhere;
}

@media (max-width: 1199.98px) {
    .feed-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 1rem;
    }
    .chat-layout {
        grid-template-columns: 280px minmax(0, 1fr);
    }
}

@media (max-width: 992px) {
    .app-shell,
    .admin-shell {
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .app-shell .app-sidebar,
    .admin-shell .admin-sidebar {
        position: fixed;
        inset: 4px auto 0 0;
        width: min(88vw, var(--sls-sidebar-w));
        height: calc(100vh - 4px);
        height: calc(100dvh - 4px);
        z-index: 1051;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-105%);
        visibility: hidden;
        animation: none;
        transition: transform .25s ease, visibility .25s ease;
        box-shadow: 12px 0 40px rgba(0, 15, 35, .28);
    }

    .app-shell .app-sidebar.is-open,
    .admin-shell .admin-sidebar.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 4px 0 0;
        z-index: 1050;
        border: 0;
        background: rgba(0, 15, 35, .55);
        backdrop-filter: blur(2px);
    }

    .app-sidebar.is-open + .sidebar-backdrop,
    .admin-sidebar.is-open + .sidebar-backdrop {
        display: block;
    }

    .admin-mobile-topbar { display: flex; }
    .admin-main { padding: 1.1rem; }
    .admin-main-wrap { min-height: 100dvh; }

    .app-main,
    .app-content,
    .admin-main,
    .admin-main-wrap { min-width: 0; }

    .feed-layout { grid-template-columns: minmax(0, 1fr); }
    .chat-layout {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
    }
    .chat-list { max-height: 220px; }
    .chat-window { min-height: 480px; }
    .settings-grid { grid-template-columns: 1fr; }
    .province-item { grid-template-columns: 1fr; }
    .app-topbar .search-wrap { max-width: none; }
    .landing-nav .container { flex-wrap: wrap; row-gap: .75rem; }
    .sa-hero { padding: 1.35rem 1.2rem; }
    .sa-hero h1 { font-size: 1.45rem; }
    .sa-stat .value { font-size: 1.65rem; }
    .media-box-full {
        margin-left: -.9rem;
        margin-right: -.9rem;
    }
    .social-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .social-btn { font-size: .78rem; padding: .5rem .2rem !important; }
    .social-btn .d-none.d-sm-inline { display: none !important; }
}

@media (max-width: 768px) {
    .app-topbar {
        flex-wrap: wrap;
        gap: .65rem;
        padding: .7rem .85rem;
    }
    .app-topbar .search-wrap {
        flex: 1 1 100%;
        order: 3;
    }
    .app-topbar > .ms-auto {
        margin-left: auto !important;
        order: 2;
    }
    .app-topbar > [data-sidebar-toggle] { order: 1; }
    .app-content { padding: 1rem; }
    .admin-main { padding: .9rem; }
    .admin-top {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-top .btn,
    .admin-top .d-flex { width: 100%; }
    .admin-top .d-flex { flex-wrap: wrap; }
    .landing-hero { padding: 3rem 0 2.5rem; }
    .landing-hero .row { text-align: center; }
    .landing-hero .lead { margin-left: auto; margin-right: auto; }
    .landing-hero .d-flex { justify-content: center; }
    .map-illustration { min-height: 240px; }
    .rdc-map-image { max-width: min(100%, 360px); }
    .auth-visual { min-height: 200px; }
    .auth-panel { padding: 1.25rem; }
    .auth-card { padding: 1.5rem; }
    .family-card { padding: 1.35rem; }
    .family-content { padding-top: 1.25rem; }
    .chat-window { min-height: 440px; }
    .filter-bar {
        display: grid;
        gap: .65rem;
        padding: .85rem;
    }
    .filter-bar .row { --bs-gutter-x: .65rem; --bs-gutter-y: .65rem; }
    .profile-identity-text h1 { font-size: 1.3rem; }
    .profile-stats-bar,
    .profile-footer-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .social-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .social-meta {
        flex-direction: column;
        gap: .35rem;
        align-items: flex-start;
    }
    .composer-card {
        flex-wrap: nowrap;
        align-items: center;
    }
    .composer-card .fake-input {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .post-card .media-box { min-height: 140px; }
    .post-card .media-box img,
    .post-card .media-box video { max-height: 240px; }
    .citizen-form-card .card-body-pad { padding: 1rem; }
    .province-item .d-flex.gap-2 {
        flex-wrap: wrap;
        width: 100%;
    }
    .province-item .d-flex.gap-2 > * { flex: 1 1 auto; }
    .chart-placeholder { height: 180px; }
    .map-panel { min-height: 220px; }
}

@media (max-width: 575.98px) {
    .landing-nav { padding: .65rem 0; }
    .landing-nav .container { justify-content: center !important; }
    .landing-nav .container > .brand { margin-right: auto; }
    .landing-nav .brand .brand-wrap { gap: .45rem; }
    .landing-nav .brand .nav-logo { width: 34px; height: 34px; }
    .landing-nav .brand .brand-name { font-size: .78rem; }
    .landing-nav .brand-badge { min-width: 48px; height: 29px; padding: 0 .4rem; font-size: .62rem; }
    .landing-nav .container > .d-flex.gap-2 { gap: .4rem !important; }
    .landing-nav .container > .d-flex.gap-2 .btn { padding: .4rem .55rem; font-size: .76rem; }
    .app-topbar { padding: .65rem; }
    .app-topbar > .ms-auto { gap: .35rem !important; }
    .app-topbar > .ms-auto .form-select { width: auto; max-width: 72px; }
    .app-topbar > .ms-auto .btn.rounded-circle {
        width: 34px;
        height: 34px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .app-content { padding: .75rem; }
    .admin-main { padding: .75rem; }
    .admin-mobile-topbar { padding: .6rem .7rem; }
    .citizen-hero { padding: 1.1rem 1rem; border-radius: 18px; }
    .citizen-hero::after { left: 1rem; }
    .citizen-hero h1 { font-size: 1.2rem; }
    .post-card, .composer-card { padding: .9rem !important; }
    .composer-card > .btn { display: none; }
    .post-actions { flex-wrap: wrap; }
    .post-actions .btn { padding: .35rem .55rem; font-size: .78rem; }
    .social-btn {
        font-size: .72rem;
        padding: .5rem .25rem !important;
        white-space: nowrap;
    }
    .social-btn i { font-size: .9rem; }
    .auth-visual { min-height: 0; padding: 1.15rem; }
    .auth-visual .brand-row { gap: .55rem; font-size: .9rem; }
    .auth-visual .brand-wrap { gap: .5rem; }
    .auth-visual .brand-badge { min-width: 48px; height: 30px; }
    .auth-visual h2 { font-size: 1.35rem; margin: .85rem 0 .4rem; }
    .auth-visual p { font-size: .9rem; margin-bottom: .35rem; }
    .auth-visual .glow-orbs { margin-top: .75rem; }
    .auth-proprio { gap: .4rem; margin-top: .75rem; }
    .auth-proprio .proprio-link { padding: .45rem .7rem; font-size: .78rem; }
    .auth-panel { padding: .85rem; }
    .auth-card { padding: 1.15rem; border-radius: 18px; }
    .auth-card .form-control,
    .auth-card .form-select,
    .form-control,
    .form-select { font-size: 16px; }
    .landing-hero h1 { font-size: clamp(1.85rem, 9vw, 2.6rem); }
    .landing-hero .btn-lg { padding: .7rem 1rem !important; font-size: .95rem; }
    .map-illustration { min-height: 190px; border-radius: 18px; }
    .chat-layout { gap: .65rem; }
    .chat-list { max-height: 175px; }
    .chat-window { min-height: 0; height: calc(100dvh - 150px); }
    .chat-messages { padding: .7rem; }
    .bubble { max-width: 92%; padding: .65rem .75rem; font-size: .86rem; overflow-wrap: anywhere; }
    .chat-input { padding: .6rem; }
    .chat-input .input-group { display: flex; flex-wrap: wrap; gap: .3rem; }
    .chat-input .input-group > .btn,
    .chat-input .input-group > label { border-radius: 10px !important; }
    .chat-input .input-group > .form-control { min-width: 0; flex: 1 1 110px; border-radius: 10px !important; }
    .message-actions { gap: .45rem; }
    .family-hero { padding: 1.6rem 0 2rem; }
    .family-card { padding: 1rem; }
    .family-quote { padding: .9rem 1rem; font-size: 1rem; }
    .landing-footer { margin-top: 2rem; padding: 1.5rem 0; }
    .app-content .table-responsive,
    .admin-main .table-responsive { max-width: 100%; }
    .table { font-size: .82rem; }
    .table td, .table th { white-space: nowrap; }
    .sa-stat { min-height: 100px; padding: 1rem; }
    .sa-stat .value { font-size: 1.4rem; }
    .sa-stat .icon { font-size: 1.7rem; }
    .notif-item,
    .chat-item { padding: .75rem .8rem; }
    .side-widget { padding: .9rem !important; }
    .category-tile { padding: 1rem; }
    .profile-cover { height: 140px; }
    .profile-avatar { width: 84px; height: 84px; }
    .profile-avatar-wrap { margin-top: -42px; }
    .profile-stat strong { font-size: 1.05rem; }
    .profile-stat span { font-size: .68rem; }
    .footer-stat strong { font-size: 1.25rem; }
    .media-box-full {
        margin-left: -.9rem;
        margin-right: -.9rem;
    }
    .btn-group { flex-wrap: wrap; }
}

@media (max-width: 380px) {
    .app-sidebar .brand span:not(.brand-badge),
    .admin-sidebar strong { font-size: .9rem; }
    .social-actions { grid-template-columns: 1fr 1fr; }
    .app-topbar > .ms-auto a[href*="messages"] { display: none; }
    .citizen-hero p { font-size: .85rem; }
}

@media (min-width: 993px) and (max-width: 1199.98px) {
    .app-content { padding: 1.15rem; }
    .admin-main { padding: 1.2rem; }
}

@media (min-width: 1400px) {
    .feed-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 1.5rem;
    }
    .app-content { padding: 1.5rem 1.75rem; }
}

@media (orientation: landscape) and (max-height: 500px) {
    .app-shell .app-sidebar,
    .admin-shell .admin-sidebar {
        width: min(70vw, 300px);
    }
    .chat-window { height: calc(100dvh - 110px); min-height: 280px; }
    .auth-visual { min-height: 0; padding: 1rem 1.25rem; }
    .citizen-hero { padding: 1rem 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
    .app-shell .app-sidebar,
    .admin-shell .admin-sidebar { transition: none; }
}

.family-intro {
    font-size: 1.05rem;
    color: var(--rdc-navy);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sls-border);
    margin-bottom: 1.5rem;
}
.family-tree {
    margin: 1.5rem 0 2rem;
    display: grid;
    gap: 1rem;
}
.family-tree-parents,
.family-tree-children {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
}
.family-person {
    background: #F5F9FD;
    border: 1px solid var(--sls-border);
    border-radius: 14px;
    padding: .9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.family-person .role {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sls-muted);
}
.family-person strong { color: var(--rdc-navy); font-size: .95rem; }
.family-person.highlight {
    background: linear-gradient(135deg, rgba(0,127,255,.1), rgba(247,214,24,.15));
    border-color: rgba(247,214,24,.45);
    box-shadow: 0 8px 20px rgba(0,43,92,.06);
}
.family-person.highlight .role { color: #8A7000; }
.family-quote {
    margin: 2rem 0 1.25rem;
    padding: 1.25rem 1.4rem;
    border-left: 4px solid var(--rdc-yellow);
    background: linear-gradient(90deg, rgba(247,214,24,.12), transparent);
    border-radius: 0 14px 14px 0;
    color: var(--rdc-navy);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-style: italic;
}
.family-signature {
    color: var(--sls-muted);
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 0;
}
