:root {
    --felicia-red: #e91512;
    --felicia-orange: #f47b0b;
    --felicia-yellow: #f7c900;
    --felicia-green: #58bd16;
    --felicia-cyan: #0799b5;
    --felicia-blue: #0758e8;
    --felicia-purple: #6425c7;
    --felicia-navy: #08233f;
    --felicia-spectrum: linear-gradient(90deg, var(--felicia-red) 0 14.28%, var(--felicia-orange) 14.28% 28.56%, var(--felicia-yellow) 28.56% 42.84%, var(--felicia-green) 42.84% 57.12%, var(--felicia-cyan) 57.12% 71.4%, var(--felicia-blue) 71.4% 85.68%, var(--felicia-purple) 85.68% 100%);
    --forest: var(--felicia-blue);
    --forest-deep: var(--felicia-navy);
    --leaf: var(--felicia-green);
    --mint: #eaf8e2;
    --cream: #f6f9fc;
    --paper: #fff;
    --ink: #102a43;
    --muted: #5e7183;
    --line: #dbe6ef;
    --gold: var(--felicia-yellow);
    --lavender: #dcd0f5;
    --lilac: #f3eefc;
}

/* Shared brand signature: every official logo colour stays visible without tinting content surfaces. */
body::before {
    position: fixed;
    z-index: 100001;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--felicia-spectrum);
    content: "";
    pointer-events: none;
}

.site-brand-logo,
.admin-brand-logo {
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 .45rem .75rem rgba(8, 35, 63, .16));
}

.site-brand-logo { width: 48px; height: 48px; }
.admin-brand-logo { width: 58px; height: 58px; }

/* Public site */
.public-home,
body:has(.public-home) {
    --forest: var(--felicia-blue);
    --forest-deep: var(--felicia-navy);
    --leaf: var(--felicia-green);
    --mint: #eaf8e2;
    --cream: #f6f9fc;
    --paper: #fff;
    --ink: #102a43;
    --muted: #5e7183;
    --line: #dbe6ef;
    --gold: var(--felicia-yellow);
    --lavender: #dcd0f5;
    --lilac: #f3eefc;
}

.site-header { border-top: 4px solid transparent; border-image: var(--felicia-spectrum) 1; }
.site-brand-mark { background: var(--felicia-spectrum); }
.nav-action,
.button-primary { background: linear-gradient(135deg, var(--felicia-blue), var(--felicia-cyan)); }
.nav-action:hover,
.button-primary:hover { background: linear-gradient(135deg, #0648be, #087f96); }
.eyebrow { color: var(--felicia-orange); }
.mobile-dock a.is-active { color: var(--felicia-blue); }
.hero::before {
    background: linear-gradient(100deg, rgba(8, 35, 63, .99) 0%, rgba(7, 63, 126, .94) 38%, rgba(7, 153, 181, .46) 68%, rgba(8, 35, 63, .06) 90%);
}
.hero .eyebrow { color: #ffe66a; }
.hero h1 em { color: #a6ef70; }
.hero-location svg { stroke: #ffe66a; }
.summary-intro { background: linear-gradient(135deg, var(--felicia-navy), var(--felicia-blue) 58%, var(--felicia-cyan)); }
.closing { background: linear-gradient(110deg, var(--felicia-navy), #063f7e 58%, #087f96); }

/* Resident app */
.app-shell {
    --ink: #102a43;
    --forest: var(--felicia-blue);
    --green: var(--felicia-blue);
    --mint: #e8f1ff;
    --paper: #f7f9fc;
    --coral: var(--felicia-orange);
    --muted: #617386;
    --line: #dce5ee;
}

.app-shell .home-hero,
.app-shell .profile-identity-card,
.app-shell .resident-admin-intro {
    background: linear-gradient(135deg, var(--felicia-navy), var(--felicia-blue) 58%, var(--felicia-cyan));
}
.app-shell .action-card:nth-child(4n + 1) .action-icon { color: var(--felicia-blue); background: #e8f1ff; }
.app-shell .action-card:nth-child(4n + 2) .action-icon { color: #3c8d0b; background: #eaf8e2; }
.app-shell .action-card:nth-child(4n + 3) .action-icon { color: #a56500; background: #fff5cc; }
.app-shell .action-card:nth-child(4n) .action-icon { color: var(--felicia-purple); background: #f1eafa; }
.app-shell .quick-icon.blue { color: var(--felicia-blue); background: #e8f1ff; }
.app-shell .app-button,
.app-shell .household-sheet-actions button:last-child,
.app-shell .install-action button,
.app-shell .install-complete a { background: linear-gradient(135deg, var(--felicia-blue), var(--felicia-cyan)); }
.app-shell .status-error,
.app-shell .is-danger { color: #b20d0b; }

.app-shell .floating-nav,
.mobile-dock {
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(8, 35, 63, .96);
    box-shadow: 0 18px 45px rgba(8, 35, 63, .28);
}
.app-shell .floating-nav { grid-template-columns: repeat(5, 1fr); }
.app-shell .floating-nav::before,
.mobile-dock::before {
    position: absolute;
    top: -1px;
    right: 18px;
    left: 18px;
    height: 3px;
    border-radius: 0 0 6px 6px;
    background: var(--felicia-spectrum);
    content: "";
}
.app-shell .floating-nav button { color: #bcd3e8; }
.app-shell .floating-nav button:nth-child(1).is-active { color: #0648be; background: #e8f1ff; }
.app-shell .floating-nav button:nth-child(2).is-active { color: #087f96; background: #ddf5f8; }
.app-shell .floating-nav button:nth-child(3).is-active { color: #3c8d0b; background: #eaf8e2; }
.app-shell .floating-nav button:nth-child(4).is-active { color: #b46600; background: #fff1cc; }
.app-shell .floating-nav button:nth-child(5).is-active { color: #a91210; background: #ffebea; }
.mobile-dock a { color: #c5d7e8; }
.mobile-dock a:hover,
.mobile-dock a:focus-visible,
.mobile-dock a.is-active { color: #0648be; background: #e8f1ff; }
.mobile-dock a:nth-child(2):hover,
.mobile-dock a:nth-child(2):focus-visible,
.mobile-dock a:nth-child(2).is-active { color: #b46600; background: #fff1cc; }

/* Admin */
.admin-body {
    --dm-blue: var(--felicia-blue);
    --dm-navy: var(--felicia-navy);
    --dm-border: #d8e4ee;
    --dm-bg: #f5f8fb;
    --dm-gold: var(--felicia-yellow);
}
.admin-sidebar {
    background:
        radial-gradient(circle at 12% 8%, rgba(7, 88, 232, .38), transparent 32%),
        radial-gradient(circle at 92% 88%, rgba(100, 37, 199, .28), transparent 35%),
        linear-gradient(180deg, #08233f, #06182b);
}
.admin-sidebar::before {
    height: 4px;
    background: var(--felicia-spectrum);
    content: "";
    position: absolute;
    inset: 0 0 auto;
}
.admin-nav-submenu .admin-nav-link.active { box-shadow: inset 3px 0 var(--felicia-yellow); }
.admin-page .btn-primary,
.admin-body .page-item.active .page-link { border-color: var(--felicia-blue); background: var(--felicia-blue); }
.badge-status { color: #357e0d; background: #eaf8e2; }
.badge-status i { background: var(--felicia-green); }
.dashboard-command { background: linear-gradient(120deg, var(--felicia-navy), #063f7e 62%, #087f96); }
.dashboard-kpi:first-child { background: var(--felicia-blue); }
.dashboard-kpi:nth-child(2) { border-top: 4px solid var(--felicia-green); }
.dashboard-kpi:nth-child(3) { border-top: 4px solid var(--felicia-orange); }
.dashboard-kpi:nth-child(4) { border-top: 4px solid var(--felicia-purple); }

/* Shared loader and focus treatment */
.page-loader__refresh { background: linear-gradient(135deg, var(--felicia-blue), var(--felicia-cyan)); }
:focus-visible { outline-color: var(--felicia-yellow); }

@media (max-width: 575px) {
    .admin-brand-logo { width: 52px; height: 52px; }
}

@media (max-width: 720px) {
    .hero::before {
        background: linear-gradient(90deg, rgba(8, 35, 63, .97), rgba(7, 63, 126, .8), rgba(7, 153, 181, .32));
    }
}

/* News lives inside resident app only. */
.news-list,
.news-admin-list { display: grid; gap: 16px; }
.dashboard-news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dashboard-news-grid .news-card { border-radius: 18px; box-shadow: 0 8px 22px rgba(8, 35, 63, .07); }
.dashboard-news-grid .news-main-image-button > img { aspect-ratio: 1 / 1; }
.dashboard-news-grid .news-main-image-button > span,
.dashboard-news-grid .news-view-thumbnails,
.dashboard-news-grid .news-card-copy > p,
.dashboard-news-grid .news-contact { display: none; }
.dashboard-news-grid .news-card-copy { padding: 11px 12px 13px; }
.dashboard-news-grid .news-card-copy > small { font-size: 8px; }
.dashboard-news-grid .news-card-copy h3 { margin: 4px 0 0; font-size: 13px; line-height: 1.3; }
.dashboard-news-grid .empty-card { grid-column: 1 / -1; }
.news-card {
    overflow: hidden;
    border: 1px solid #dce5ee;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(8, 35, 63, .08);
}
.news-main-image-button { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: #e8f1ff; cursor: zoom-in; }
.news-main-image-button > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.news-main-image-button > span { position: absolute; right: 12px; bottom: 12px; padding: 7px 10px; border-radius: 10px; color: #fff; background: rgba(8, 35, 63, .84); font-size: 9px; font-weight: 800; backdrop-filter: blur(8px); }
.news-view-thumbnails { display: grid; grid-template-columns: repeat(3, 56px); gap: 7px; padding: 10px 18px 0; }
.news-view-thumbnails button { width: 56px; height: 46px; padding: 2px; border: 2px solid transparent; border-radius: 10px; background: #edf4fa; }
.news-view-thumbnails button.is-active { border-color: var(--felicia-blue); }
.news-view-thumbnails img { width: 100%; height: 100%; border-radius: 6px; object-fit: cover; }
.news-gallery-dialog { width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #061524; }
.news-gallery-dialog::backdrop { background: #061524; }
.news-gallery-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: 100%; height: 100dvh; padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); color: #fff; background: radial-gradient(circle at 50% 38%, #153652, #061524 62%); }
.news-gallery-shell header { display: flex; min-height: 52px; align-items: center; justify-content: space-between; }
.news-gallery-shell header span { padding: 7px 10px; border-radius: 9px; background: rgba(255, 255, 255, .1); font-size: 11px; font-weight: 800; }
.news-gallery-shell header button { width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; color: #fff; background: rgba(255, 255, 255, .08); font-size: 27px; }
.news-gallery-stage { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; min-height: 0; align-items: center; gap: 7px; }
.news-gallery-stage.is-single { grid-template-columns: minmax(0, 1fr); }
.news-gallery-stage > img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.news-gallery-stage button { width: 42px; height: 54px; border: 0; border-radius: 13px; color: #fff; background: rgba(255, 255, 255, .1); font-size: 33px; }
.news-gallery-thumbnails { display: flex; min-height: 72px; align-items: center; justify-content: center; gap: 8px; padding-top: 12px; }
.news-gallery-thumbnails button { width: 62px; height: 56px; padding: 2px; border: 2px solid transparent; border-radius: 11px; background: rgba(255, 255, 255, .1); }
.news-gallery-thumbnails button.is-active { border-color: var(--felicia-yellow); }
.news-gallery-thumbnails img { width: 100%; height: 100%; border-radius: 7px; object-fit: cover; }
.news-card-copy { padding: 18px; }
.news-card-copy > small { color: #087f96; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.news-card-copy h3 { margin: 5px 0 8px; color: #102a43; font: 800 20px/1.2 Manrope, sans-serif; }
.news-card-copy > p { margin: 0; color: #617386; font-size: 13px; line-height: 1.65; white-space: pre-line; }
.news-contact { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin-top: 16px; padding: 13px 14px; border-left: 4px solid var(--felicia-green); border-radius: 12px; background: #f1faec; }
.news-contact span { grid-column: 1 / -1; color: #3c8d0b; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.news-contact strong { color: #244c15; font-size: 13px; }
.news-contact a { align-self: center; color: #0648be; font-size: 12px; font-weight: 800; text-decoration: none; }
.news-admin-page { min-height: 100dvh; padding: 24px 18px 110px; background: linear-gradient(180deg, #f7fafd, #edf5fb); }
.news-editor-card { margin: 24px 0; padding: 22px; border-radius: 26px; background: #fff; box-shadow: 0 16px 40px rgba(8, 35, 63, .1); }
.news-editor-card > div small { color: var(--felicia-orange); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.news-editor-card h2 { margin: 5px 0; font: 800 23px/1.2 Manrope, sans-serif; }
.news-editor-card > div p { margin: 0 0 20px; color: #617386; font-size: 12px; }
.news-editor-card form { display: grid; gap: 15px; }
.news-editor-card label { display: grid; gap: 7px; color: #263f56; font-size: 12px; font-weight: 800; }
.news-editor-card label small { color: #7a8b9b; font-weight: 500; }
.news-editor-card input,
.news-editor-card textarea { width: 100%; padding: 13px 14px; border: 1px solid #ccdbe7; border-radius: 13px; color: #102a43; background: #fbfdff; font: 500 14px DM Sans, sans-serif; }
.news-editor-card textarea { resize: vertical; }
.news-editor-card input:focus,
.news-editor-card textarea:focus { border-color: var(--felicia-blue); outline: 3px solid rgba(7, 88, 232, .12); }
.news-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.news-editor-card form > button { min-height: 52px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--felicia-blue), var(--felicia-cyan)); font-size: 14px; font-weight: 800; }
.news-admin-item > form { margin-top: -8px; padding: 0 14px 14px; border-radius: 0 0 24px 24px; background: #fff; }
.news-admin-item > form button { border: 0; color: #a91210; background: transparent; font-size: 11px; font-weight: 800; }

@media (max-width: 480px) {
    .news-form-grid { grid-template-columns: 1fr; }
    .app-shell .floating-nav button { font-size: 10px; }
    .app-shell .floating-nav button svg { width: 23px; height: 23px; }
}

.news-admin-page { padding-bottom: 128px; }
.news-list-card {
    position: relative;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) 38px;
    gap: 14px;
    align-items: center;
    min-height: 132px;
    padding: 12px;
    border: 1px solid #dce5ee;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(8, 35, 63, .07);
}
.news-list-card.is-hidden { opacity: .62; }
.news-list-card > img { width: 108px; height: 108px; border-radius: 16px; object-fit: cover; background: #e8f1ff; }
.news-list-copy { min-width: 0; }
.news-list-copy > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.news-list-copy small { color: #087f96; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.news-list-copy div span { padding: 3px 6px; border-radius: 5px; color: #8d4b00; background: #fff1cc; font-size: 8px; font-weight: 900; }
.news-list-copy h2 { margin: 5px 0; color: #102a43; font: 800 16px/1.25 Manrope, sans-serif; }
.news-list-copy p { display: -webkit-box; overflow: hidden; margin: 0; color: #617386; font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-list-copy > strong { display: block; overflow: hidden; margin-top: 7px; color: #3c8d0b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.news-card-menu-wrap { position: relative; align-self: start; }
.news-card-menu-toggle { display: grid; width: 38px; height: 38px; place-items: center; padding: 10px 0; border: 0; border-radius: 12px; background: #edf4fa; cursor: pointer; }
.news-card-menu-toggle span { display: block; width: 4px; height: 4px; border-radius: 50%; background: #34536d; }
.news-card-menu { position: absolute; z-index: 15; top: 44px; right: 0; width: 170px; overflow: hidden; padding: 6px; border: 1px solid #dbe6ef; border-radius: 15px; background: #fff; box-shadow: 0 18px 42px rgba(8, 35, 63, .2); }
.news-card-menu form { margin: 0; }
.news-card-menu button { width: 100%; padding: 11px 10px; border: 0; border-radius: 10px; color: #24445f; background: transparent; text-align: left; font-size: 11px; font-weight: 800; }
.news-card-menu button:hover { background: #edf5fb; }
.news-card-menu button.is-danger { color: #a91210; }
.news-floating-nav { position: fixed; z-index: 30; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); left: 14px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 7px; max-width: 520px; margin: auto; padding: 7px; border-radius: 22px; background: rgba(8, 35, 63, .96); box-shadow: 0 18px 45px rgba(8, 35, 63, .28); backdrop-filter: blur(16px); }
.news-floating-nav::before { position: absolute; top: 0; right: 20px; left: 20px; height: 3px; border-radius: 0 0 6px 6px; background: var(--felicia-spectrum); content: ""; }
.news-floating-nav a,
.news-floating-nav button { display: flex; min-height: 60px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; color: #d5e4f1; background: transparent; font: 800 12px DM Sans, sans-serif; text-decoration: none; }
.news-floating-nav button { color: #063f7e; background: linear-gradient(135deg, #e8f1ff, #ddf5f8); }
.news-floating-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-hub-floating-nav { grid-template-columns: 1fr; }
.admin-hub-floating-nav a { color: #063f7e; background: linear-gradient(135deg, #e8f1ff, #ddf5f8); }
.news-dialog { width: min(calc(100% - 24px), 540px); max-height: calc(100dvh - 28px); margin: auto; padding: 0; border: 0; border-radius: 26px; background: transparent; }
.news-dialog::backdrop { background: rgba(8, 25, 43, .7); backdrop-filter: blur(5px); }
.news-dialog-card { max-height: calc(100dvh - 28px); overflow-y: auto; padding: 22px; border-radius: 26px; background: #fff; }
.news-dialog-card header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.news-dialog-card header small { color: var(--felicia-orange); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.news-dialog-card header h2 { margin: 3px 0 0; font: 800 23px Manrope, sans-serif; }
.news-dialog-card header button { width: 40px; height: 40px; border: 0; border-radius: 13px; color: #34536d; background: #edf4fa; font-size: 25px; }
.news-dialog-card form { display: grid; gap: 15px; }
.news-dialog-card label { display: grid; gap: 7px; color: #263f56; font-size: 12px; font-weight: 800; }
.news-dialog-card label small { color: #7a8b9b; font-weight: 500; }
.news-dialog-card input,
.news-dialog-card textarea { width: 100%; padding: 13px 14px; border: 1px solid #ccdbe7; border-radius: 13px; color: #102a43; background: #fbfdff; font: 500 14px DM Sans, sans-serif; }
.news-dialog-card textarea { resize: vertical; }
.news-dialog-card input:focus,
.news-dialog-card textarea:focus { border-color: var(--felicia-blue); outline: 3px solid rgba(7, 88, 232, .12); }
.news-dialog-card form > button { min-height: 52px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--felicia-blue), var(--felicia-cyan)); font-size: 14px; font-weight: 800; }
.news-image-uploader { display: grid; gap: 12px; padding: 14px; border: 1px solid #d6e3ed; border-radius: 17px; background: #f7fbfe; }
.news-image-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.news-image-heading strong,
.news-image-heading small { display: block; }
.news-image-heading strong { color: #263f56; font-size: 12px; }
.news-image-heading small { margin-top: 2px; color: #73879a; font-size: 9px; font-weight: 600; }
.news-image-heading > span { display: grid; width: 38px; height: 30px; place-items: center; border-radius: 10px; color: #0648be; background: #e8f1ff; font-size: 11px; font-weight: 900; }
.news-image-thumbnails { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.news-image-thumbnails:empty { display: none; }
.news-image-thumb { position: relative; display: grid; gap: 6px; min-width: 0; padding: 6px; border: 1px solid #d8e4ee; border-radius: 13px; background: #fff; }
.news-image-thumb img { width: 100%; aspect-ratio: 1; border-radius: 9px; object-fit: cover; background: #e8f1ff; }
.news-image-thumb label { display: flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 800; }
.news-image-thumb label.is-delete { color: #a91210; }
.news-image-thumb button { min-height: 25px; padding: 0; border: 0; color: #a91210; background: #ffebea; border-radius: 7px; font-size: 9px; font-weight: 800; }
.news-image-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.news-image-actions label { display: flex; min-height: 43px; align-items: center; justify-content: center; gap: 7px; border-radius: 12px; color: #0648be; background: #e8f1ff; cursor: pointer; font-size: 10px; font-weight: 900; }
.news-image-actions label:last-child { color: #087f96; background: #ddf5f8; }
.news-image-actions svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.news-image-message { min-height: 14px; margin: 0; color: #617386; font-size: 9px; font-weight: 700; }

@media (max-width: 420px) {
    .news-list-card { grid-template-columns: 88px minmax(0, 1fr) 34px; gap: 10px; }
    .news-list-card > img { width: 88px; height: 96px; }
    .news-card-menu-toggle { width: 34px; height: 38px; }
}
