@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Instrument+Sans:wght@400;500;600;700&display=swap');

:root {
    --brand-900: #0d2f4a;
    --brand-800: #13486d;
    --brand-700: #1f5f8c;
    --brand-600: #2f7cae;
    --accent-500: #e0a239;
    --accent-600: #c48724;
    --surface-0: #f6f9fc;
    --surface-1: #ffffff;
    --surface-2: #edf3f8;
    --line-200: #d7e2ec;
    --line-300: #c2d2df;
    --text-900: #132536;
    --text-700: #3f566a;
    --text-500: #6f8397;
    --success-500: #2a8f68;
    --danger-500: #c84545;
    --shadow-soft: 0 16px 34px rgba(17, 44, 67, 0.08);
    --shadow-strong: 0 24px 40px rgba(10, 38, 59, 0.15);
    --radius-xl: 1.1rem;
    --radius-lg: 0.85rem;
    --radius-md: 0.65rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Instrument Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-900);
    background:
        radial-gradient(circle at 0% 0%, rgba(47, 124, 174, 0.12), transparent 42%),
        radial-gradient(circle at 92% 88%, rgba(224, 162, 57, 0.12), transparent 34%),
        var(--surface-0);
    font-size: 1.03rem;
    line-height: 1.58;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.section-title,
.sidebar-brand strong,
.admin-eyebrow {
    font-family: 'Outfit', 'Instrument Sans', sans-serif;
    letter-spacing: 0.01em;
}

a {
    color: var(--brand-700);
}

a:hover,
a:focus {
    color: var(--brand-600);
}

.container,
.container-fluid {
    position: relative;
}

.barangay-nav {
    background: linear-gradient(95deg, #0b2b43, #144b72 62%, #1e5f8d);
    border-bottom: 3px solid var(--accent-500);
    box-shadow: 0 10px 24px rgba(8, 31, 49, 0.24);
}

.barangay-nav .nav-link,
.barangay-nav .navbar-brand {
    color: #ffffff;
}

.barangay-nav .nav-link {
    position: relative;
    font-weight: 600;
    opacity: 0.96;
}

.barangay-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.2rem;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s ease;
    background: linear-gradient(90deg, rgba(224, 162, 57, 0.1), rgba(224, 162, 57, 1), rgba(224, 162, 57, 0.1));
}

.barangay-nav .nav-link:hover::after,
.barangay-nav .nav-link:focus::after {
    transform: scaleX(1);
}

.barangay-nav .nav-link:hover,
.barangay-nav .nav-link:focus {
    color: #ffe8be;
}

.public-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 4px;
    box-shadow: 0 4px 12px rgba(5, 17, 28, 0.2);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.brand-subtitle {
    display: block;
    font-size: 0.74rem;
    font-weight: 500;
    opacity: 0.84;
    margin-top: -2px;
}

.hero-section {
    background:
        linear-gradient(rgba(12, 43, 67, 0.82), rgba(18, 61, 95, 0.82)),
        url('../img/bg.jpg') center/cover no-repeat;
    color: #ffffff;
    padding: 5rem 0;
}

.hero-panel {
    background: linear-gradient(150deg, rgba(10, 35, 56, 0.6), rgba(18, 68, 105, 0.42));
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    backdrop-filter: blur(2px);
}

.hero-image-frame {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(234, 242, 249, 0.96));
    border-radius: 1rem;
    padding: 0.65rem;
    box-shadow: var(--shadow-strong);
    transform: translateY(0);
    transition: transform 0.35s ease;
}

.hero-image-frame:hover {
    transform: translateY(-5px);
}

.hero-image-frame img {
    border-radius: 0.75rem;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero {
    overflow: hidden;
}

.hero-highlights {
    margin-top: 1rem;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 0.52rem;
}

.hero-highlights li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.hero-highlights li::before {
    content: '';
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffd88f, #e0a239);
    box-shadow: 0 0 0 3px rgba(255, 217, 141, 0.2);
}

.hero-float-note {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    background: linear-gradient(145deg, rgba(14, 45, 68, 0.9), rgba(25, 78, 114, 0.88));
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 0.7rem;
    padding: 0.6rem 0.75rem;
    min-width: 148px;
    text-align: center;
    box-shadow: var(--shadow-strong);
}

.hero-float-note strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    line-height: 1.1;
}

.hero-float-note span {
    font-size: 0.76rem;
    opacity: 0.88;
}

.portal-kpi-wrap {
    margin-top: 1.35rem;
}

.portal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.kpi-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.82rem;
    background: linear-gradient(145deg, rgba(12, 46, 70, 0.88), rgba(24, 74, 109, 0.78));
    color: #ffffff;
    padding: 0.82rem 0.9rem;
    box-shadow: 0 14px 24px rgba(7, 27, 44, 0.2);
}

.kpi-label {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.86;
}

.kpi-value {
    margin: 0.2rem 0 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.58rem;
    line-height: 1.08;
}

.home-section-head {
    max-width: 720px;
    margin-bottom: 1rem;
}

.home-section-head.text-center {
    margin-left: auto;
    margin-right: auto;
}

.service-tag {
    display: inline-block;
    margin-bottom: 0.5rem;
    border-radius: 999px;
    padding: 0.18rem 0.58rem;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #265277;
    background-color: #e7f1f9;
    border: 1px solid #cfe1ef;
}

.process-step {
    border: 1px solid #d7e5f0;
    border-radius: 0.82rem;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.process-step::after {
    content: '';
    position: absolute;
    right: -28px;
    top: -28px;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 124, 174, 0.22), transparent 70%);
}

.process-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    margin-bottom: 0.6rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #0f4468;
    background: linear-gradient(140deg, #e6f1fa, #d3e8f8);
    border: 1px solid #bcd8ed;
}

.announcement-feature {
    border: 1px solid #d5e5f2;
    border-radius: 0.9rem;
    background: linear-gradient(160deg, #ffffff, #f4faff);
    box-shadow: var(--shadow-soft);
    padding: 1.15rem;
}

.announcement-list-stack {
    display: grid;
    gap: 0.8rem;
}

.announcement-item {
    border: 1px solid #dae7f2;
    border-radius: 0.76rem;
    background: #ffffff;
    padding: 0.9rem;
    box-shadow: 0 10px 22px rgba(15, 46, 67, 0.07);
}

.announcement-item p {
    margin-bottom: 0;
    color: var(--text-700);
}

.announcement-empty-state {
    border: 1px dashed #bfd3e3;
    background: linear-gradient(180deg, #f8fcff, #f1f7fc);
    border-radius: 0.82rem;
    padding: 0.95rem 1rem;
    color: var(--text-700);
}

.announcement-skeleton-card {
    border: 1px solid #dce8f2;
    border-radius: 0.76rem;
    background: #ffffff;
    padding: 0.88rem;
    box-shadow: 0 10px 22px rgba(15, 46, 67, 0.07);
}

.skeleton-pill,
.skeleton-line {
    border-radius: 999px;
    background: linear-gradient(90deg, #ebf1f6 25%, #f7fbff 50%, #ebf1f6 75%);
    background-size: 220% 100%;
    animation: skeletonShimmer 1.3s ease-in-out infinite;
}

.skeleton-pill {
    width: 35%;
    height: 0.56rem;
    margin-bottom: 0.78rem;
}

.skeleton-line {
    width: 100%;
    height: 0.62rem;
    margin-bottom: 0.58rem;
}

.skeleton-line-title {
    width: 82%;
}

.skeleton-line-short {
    width: 58%;
    margin-bottom: 0;
}

.announcement-fallback-note {
    border-left: 4px solid #8fb8d8;
}

.about-visual {
    border-radius: 0.95rem;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
}

.about-checklist {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 0.52rem;
}

.about-checklist li {
    display: flex;
    gap: 0.56rem;
    color: var(--text-700);
}

.about-checklist li::before {
    content: '\2713';
    font-weight: 700;
    color: #1f6da1;
}

.cta-band {
    border-radius: 1rem;
    background: linear-gradient(100deg, #0f3655, #1a5a84 64%, #2a77a8);
    color: #ffffff;
    padding: 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow-strong);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cta-band p {
    color: rgba(255, 255, 255, 0.88);
}

.floating-quick-access {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0.75rem;
    z-index: 1150;
    padding: 0 0.78rem;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.floating-quick-access.is-hidden {
    transform: translateY(112%);
    opacity: 0;
    pointer-events: none;
}

.quick-access-inner {
    max-width: 520px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(95deg, rgba(11, 44, 68, 0.94), rgba(22, 79, 117, 0.92));
    border-radius: 999px;
    box-shadow: var(--shadow-strong);
    padding: 0.38rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.38rem;
}

.quick-access-btn {
    min-height: 42px;
    border-radius: 999px;
    font-weight: 700;
}

.quick-access-login {
    background: linear-gradient(135deg, #ffffff, #eef4fa);
    color: #153f60;
    border: 1px solid #ffffff;
}

.quick-access-login:hover,
.quick-access-login:focus {
    color: #123a59;
    background: linear-gradient(135deg, #f8fbff, #e9f1f8);
}

.quick-access-register {
    background: linear-gradient(135deg, #f0b84f, #df9b2f);
    color: #1c2630;
    border: 1px solid #df9b2f;
}

.quick-access-register:hover,
.quick-access-register:focus {
    color: #1b2530;
    background: linear-gradient(135deg, #eab04a, #cf8f2a);
}

.section-bg {
    background-color: var(--surface-2);
}

.section-title {
    color: var(--brand-800);
    font-weight: 700;
    margin-bottom: 0.95rem;
}

.service-card,
.info-card,
.dashboard-card,
.page-card,
.admin-card,
.auth-card {
    border: 1px solid var(--line-200);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 252, 255, 0.97));
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover,
.info-card:hover,
.dashboard-card:hover,
.page-card:hover,
.admin-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-300);
    box-shadow: 0 18px 34px rgba(14, 41, 63, 0.13);
}

.service-card {
    border-top: 4px solid var(--brand-700);
}

.service-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(130deg, #edf4fb, #dcecf8);
    color: var(--brand-700);
    font-weight: 700;
    margin-bottom: 0.72rem;
}

.badge-official {
    background: linear-gradient(140deg, #0d3a60, #1a567f);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
}

.barangay-footer {
    background: linear-gradient(92deg, #0b2b44, #154f78 62%, #1d6595);
    color: #ffffff;
    border-top: 2px solid rgba(255, 255, 255, 0.12);
}

.auth-card {
    max-width: 980px;
    margin: 2.2rem auto;
    overflow: hidden;
}

.auth-banner {
    min-height: 100%;
    background:
        linear-gradient(rgba(12, 47, 74, 0.82), rgba(15, 63, 98, 0.78)),
        url('../img/barangay.jpg') center/cover no-repeat;
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 1.9rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.auth-logo {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    object-fit: contain;
    padding: 4px;
}

.btn-primary-gov,
.btn-primary {
    background: linear-gradient(135deg, #165987, #2a76a8);
    border: 1px solid #155680;
    color: #ffffff;
    border-radius: 0.66rem;
    box-shadow: 0 10px 18px rgba(18, 62, 94, 0.2);
}

.btn-primary-gov:hover,
.btn-primary-gov:focus,
.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #12486d, #23658f);
    border-color: #12486d;
    color: #ffffff;
}

.btn {
    border-radius: 0.64rem;
    font-weight: 600;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-dark {
    border-width: 1.5px;
}

.form-control,
.form-select,
textarea {
    border-radius: 0.62rem;
    border-color: var(--line-300);
    min-height: 42px;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: #5c9aca;
    box-shadow: 0 0 0 0.25rem rgba(47, 124, 174, 0.2);
}

.alert {
    border: 1px solid transparent;
    border-radius: 0.66rem;
}

.resident-layout {
    min-height: 100vh;
    background:
        radial-gradient(circle at 100% 0%, rgba(20, 88, 130, 0.1), transparent 38%),
        var(--surface-0);
}

.resident-sidebar {
    background: linear-gradient(180deg, #0f3655, #174f76 52%, #1f5f8b);
    color: #ffffff;
    min-height: 100vh;
    position: sticky;
    top: 0;
}

.resident-sidebar .portal-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.94);
    padding: 4px;
    object-fit: contain;
}

.resident-sidebar-top {
    display: flex;
    align-items: center;
    gap: 0.68rem;
}

.resident-user-pill {
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.74rem;
    padding: 0.72rem 0.8rem;
}

.resident-user-pill small {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.74rem;
}

.resident-nav-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.58rem;
}

.resident-main-nav {
    display: grid;
    gap: 0.5rem;
}

.resident-main-nav a,
.resident-logout-link {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.56rem;
    padding: 0.72rem 0.88rem;
    border-radius: 0.62rem;
    border: 1px solid transparent;
    transition: all 0.22s ease;
}

.resident-main-nav a span,
.resident-logout-link span {
    width: 1.15rem;
    display: inline-flex;
    justify-content: center;
}

.resident-main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.26);
}

.resident-main-nav a.active {
    background: linear-gradient(130deg, #ffffff, #edf7ff);
    color: #124b72;
    border-color: #ffffff;
    box-shadow: 0 10px 20px rgba(6, 28, 46, 0.2);
}

.resident-logout-link {
    background-color: rgba(158, 34, 34, 0.24);
    border-color: rgba(255, 220, 220, 0.25);
}

.resident-logout-link:hover,
.resident-logout-link:focus {
    background-color: rgba(168, 29, 29, 0.34);
}

#mobileMenu {
    width: 88vw;
    max-width: 376px;
}

.resident-mobile-header {
    border-bottom: 1px solid #dce8f2;
    padding-top: 1rem;
    padding-bottom: 0.92rem;
}

.resident-mobile-body {
    background-color: #f7fbff;
}

.resident-mobile-user {
    background-color: #ffffff;
    border: 1px solid #dbe8f2;
    border-radius: 0.66rem;
    padding: 0.74rem 0.88rem;
}

.resident-mobile-nav {
    display: grid;
    gap: 0.5rem;
}

.resident-mobile-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #627486;
    margin-bottom: 0.56rem;
}

.resident-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.56rem;
    text-decoration: none;
    color: #123f60;
    background-color: #ffffff;
    border: 1px solid #dbe7f0;
    border-radius: 0.62rem;
    padding: 0.74rem 0.88rem;
    font-weight: 600;
    min-height: 46px;
    transition: all 0.22s ease;
}

.resident-mobile-link span {
    width: 1.1rem;
    display: inline-flex;
    justify-content: center;
}

.resident-mobile-link:hover,
.resident-mobile-link:focus {
    background-color: #eef6fd;
    color: #0f4062;
}

.resident-mobile-link.active {
    background: linear-gradient(140deg, #165a86, #2c78a8);
    border-color: #165a86;
    color: #ffffff;
}

.resident-mobile-link.danger {
    color: #b42323;
    border-color: #f2caca;
    background-color: #fff6f6;
}

.resident-mobile-link.danger:hover,
.resident-mobile-link.danger:focus {
    background-color: #fee7e7;
    color: #972121;
}

.page-card {
    border-radius: var(--radius-lg);
}

.welcome-banner {
    border-radius: 0.95rem;
    background:
        linear-gradient(rgba(13, 52, 79, 0.88), rgba(19, 72, 109, 0.86)),
        url('../img/bg.jpg') center/cover no-repeat;
    color: #ffffff;
    padding: 1.2rem 1.26rem;
    box-shadow: var(--shadow-strong);
}

.resident-table {
    border-radius: 0.7rem;
    overflow: hidden;
}

.resident-table thead th {
    font-size: 0.9rem;
    color: #2c455a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background-color: #edf3f8;
}

.resident-table td {
    vertical-align: middle;
    border-color: #e2ebf2;
}

.status-pending {
    background-color: #eef1f5;
    color: #394555;
}

.status-approved,
.status-processing {
    background-color: #ddefff;
    color: #224f86;
}

.status-completed,
.status-ready {
    background-color: #dcf5ea;
    color: #1d6a50;
}

.status-cancelled {
    background-color: #fde7e7;
    color: #a73333;
}

.resident-chip {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background-color: #e8f1fb;
    color: #174d79;
}

.resident-announce-card {
    border-left: 4px solid var(--brand-700);
}

.profile-list dt,
.profile-list dd {
    padding: 0.48rem 0;
    border-bottom: 1px solid #e8edf3;
}

.profile-list dd {
    margin-bottom: 0;
}

.admin-layout {
    background:
        radial-gradient(circle at 86% 6%, rgba(224, 162, 57, 0.12), transparent 33%),
        radial-gradient(circle at 0% 80%, rgba(25, 96, 140, 0.12), transparent 42%),
        var(--surface-0);
}

.admin-mobile-nav {
    position: sticky;
    top: 0;
    z-index: 1090;
    background: linear-gradient(95deg, #0f3655, #1a5883);
    border-bottom: 2px solid rgba(224, 162, 57, 0.65);
    box-shadow: 0 8px 18px rgba(8, 28, 45, 0.22);
}

.admin-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.56rem;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.admin-mobile-brand:hover,
.admin-mobile-brand:focus {
    color: #ffffff;
}

.admin-menu-toggle {
    width: 42px;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0;
}

.admin-menu-toggle span {
    width: 19px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 99px;
    margin: 0 auto;
}

.sidebar {
    background: linear-gradient(180deg, #0f3655, #1a547f 56%, #1f5f8b);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 268px;
    padding: 18px 14px;
    z-index: 1100;
    overflow-y: auto;
    box-shadow: 10px 0 26px rgba(7, 28, 45, 0.25);
}

.sidebar-brand {
    color: #ffffff;
    padding: 0.4rem 0.4rem 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

.sidebar-brand small {
    display: block;
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.76);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.36rem;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    padding: 0.72rem 0.84rem;
    display: block;
    border: 1px solid transparent;
    border-radius: 0.64rem;
    transition: all 0.22s ease;
    font-weight: 600;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus {
    background-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-nav a.active {
    background: linear-gradient(145deg, #ffffff, #eef7ff);
    color: #12486d;
    border-color: #ffffff;
    box-shadow: 0 10px 20px rgba(6, 28, 46, 0.2);
}

.admin-sidebar-backdrop {
    display: none;
}

.main-content {
    margin-left: 268px;
    padding: 1.3rem;
}

.admin-top-bar {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dce8f1;
    border-radius: 0.85rem;
    padding: 0.88rem 0.65rem;
    margin-bottom: 1.2rem;
    backdrop-filter: blur(2px);
    box-shadow: 0 10px 24px rgba(16, 43, 64, 0.08);
}

.admin-eyebrow {
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-500);
}

.admin-card {
    border-radius: var(--radius-lg);
    padding: 1.1rem;
}

.admin-card .table {
    margin-bottom: 0;
}

.admin-card .table thead th {
    color: #2e495f;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background-color: #edf4fa;
}

.admin-card .table td,
.admin-card .table th {
    border-color: #e2ecf3;
    vertical-align: middle;
}

.admin-stat-card {
    color: #ffffff;
    padding: 1.2rem;
    border-radius: 0.9rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-strong);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(140deg, #17547f, #2f7fb2);
}

.admin-stat-card.danger {
    background: linear-gradient(140deg, #8a3a35, #bc5d55);
}

.admin-stat-card.success {
    background: linear-gradient(140deg, #2a7d5f, #35a679);
}

.admin-stat-card.warning {
    background: linear-gradient(140deg, #a16f1f, #cc8f30);
}

.admin-stat-card h3 {
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.9;
}

.admin-stat-card .stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.05rem, 2.5vw, 2.4rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.modal-content {
    border: 1px solid #d7e4ef;
    border-radius: 0.82rem;
    box-shadow: 0 22px 40px rgba(15, 37, 55, 0.2);
}

.modal-header,
.modal-footer {
    border-color: #e5edf4;
}

.ux-reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: revealUp 0.58s cubic-bezier(0.2, 0.74, 0.3, 1) forwards;
    animation-delay: var(--reveal-delay, 0ms);
}

body.reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
}

body.reveal-ready [data-reveal].is-visible {
    animation: revealUp 0.58s cubic-bezier(0.2, 0.74, 0.3, 1) forwards;
    animation-delay: var(--reveal-delay, 0ms);
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .ux-reveal,
    body.reveal-ready [data-reveal],
    body.reveal-ready [data-reveal].is-visible {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

@media (max-width: 1199px) {
    .main-content {
        margin-left: 252px;
        padding: 1rem;
    }

    .sidebar {
        width: 252px;
    }
}

@media (max-width: 991px) {
    .hero-section {
        padding: 3.8rem 0;
    }

    .portal-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cta-band {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-card {
        margin: 1.5rem auto;
    }

    .auth-banner {
        min-height: 220px;
    }

    .resident-layout main {
        padding-bottom: 4.2rem !important;
    }

    .sidebar {
        transform: translateX(-110%);
        transition: transform 0.26s ease;
        width: min(85vw, 310px);
        max-width: 310px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .admin-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(7, 19, 31, 0.48);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 1080;
        transition: opacity 0.24s ease, visibility 0.24s ease;
    }

    .admin-sidebar-backdrop.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .main-content {
        margin-left: 0;
        padding: 0.9rem 0.8rem 1rem;
    }

    .admin-layout.admin-menu-open {
        overflow: hidden;
    }

    .admin-top-bar {
        margin-top: 0.6rem;
    }

    .admin-card {
        padding: 0.95rem;
    }

    .btn-group {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .btn-group > .btn {
        border-radius: 0.62rem !important;
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 132px;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 1rem;
    }

    .hero-highlights {
        gap: 0.4rem;
    }

    .hero-panel {
        padding: 1.2rem;
    }

    .hero-float-note {
        position: static;
        margin-top: 0.7rem;
        width: 100%;
    }

    .portal-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .kpi-card {
        padding: 0.72rem 0.75rem;
    }

    .kpi-value {
        font-size: 1.3rem;
    }

    .process-step,
    .announcement-feature,
    .announcement-item {
        padding: 0.82rem;
    }

    .announcement-skeleton-card {
        padding: 0.76rem;
    }

    .cta-band {
        padding: 1rem;
    }

    .brand-subtitle {
        display: none;
    }

    .welcome-banner {
        padding: 0.95rem 1rem;
    }

    .admin-stat-card,
    .dashboard-card,
    .page-card,
    .info-card,
    .admin-card {
        border-radius: 0.78rem;
    }

    .table-responsive {
        border-radius: 0.68rem;
    }

    .admin-stat-card .stat-number {
        font-size: 2rem;
    }

    .admin-top-bar .d-flex {
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    .admin-mobile-brand span {
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .floating-quick-access {
        display: none !important;
    }
}
