:root {
    --primary: #4caf50;
    --primary-dark: #388e3c;
    --navy: #2c3e50;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --danger-bg: #fef2f2;
    --danger: #b91c1c;
    --shadow: 0 10px 40px rgba(44, 62, 80, 0.1);
    --radius: 14px;
    --font: 'Poppins', system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 24px rgba(44, 62, 80, 0.06);
}

.site-header__bar {
    border-top: 3px solid var(--primary);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
    gap: 1rem;
    width: 100%;
    min-height: 3.5rem;
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--navy);
    min-width: 0;
    border-radius: 12px;
    padding: 0.2rem 0.35rem 0.2rem 0;
    margin: -0.2rem 0;
    transition: background 0.2s ease;
}

.logo-row:hover {
    text-decoration: none;
    background: rgba(76, 175, 80, 0.06);
}

.logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #66bb6a 0%, var(--primary) 45%, var(--primary-dark) 100%);
    box-shadow:
        0 4px 16px rgba(56, 142, 60, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-mark-fallback {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.logo-text-name {
    font-weight: 700;
    font-size: clamp(0.95rem, 2.5vw, 1.08rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(52vw, 14rem);
}

.logo-text-tag {
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--muted);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(58vw, 16rem);
}

@media (min-width: 480px) {
    .logo-text-name {
        max-width: 18rem;
    }

    .logo-text-tag {
        max-width: 20rem;
    }
}

.nav-desktop {
    display: flex;
    align-items: center;
}

.nav-desktop-list {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0.25rem;
    background: #f1f5f9;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
}

.nav-desktop-list li {
    margin: 0;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.05rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    color: var(--navy);
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.nav-pill:hover {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.nav-pill.is-active {
    color: #fff;
    background: linear-gradient(145deg, #66bb6a, var(--primary-dark));
    box-shadow: 0 2px 12px rgba(56, 142, 60, 0.35);
}

.nav-pill--cta {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid #cbd5e1;
}

.nav-pill--cta:hover {
    border-color: var(--primary);
    background: #fff;
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    box-shadow: 0 1px 3px rgba(44, 62, 80, 0.06);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.menu-toggle:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.menu-toggle__icon {
    width: 20px;
    height: 14px;
    position: relative;
    display: block;
}

.menu-toggle__line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition:
        transform 0.25s ease,
        opacity 0.2s ease,
        top 0.25s ease;
}

.menu-toggle__line:nth-child(1) {
    top: 0;
}

.menu-toggle__line:nth-child(2) {
    top: 6px;
}

.menu-toggle__line:nth-child(3) {
    top: 12px;
}

.menu-toggle.is-open .menu-toggle__line:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.menu-toggle.is-open .menu-toggle__line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.is-open .menu-toggle__line:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

.nav-mobile-wrap {
    border-top: 1px solid #e8edf3;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
    animation: navMobileReveal 0.28s ease;
}

.nav-mobile-wrap[hidden] {
    display: none !important;
}

@keyframes navMobileReveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 0 1.15rem;
}

.nav-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.nav-mobile-link i {
    width: 1.25rem;
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
    transition: color 0.2s ease;
}

.nav-mobile-link:hover {
    background: #fff;
    border-color: #e2e8f0;
    text-decoration: none;
    color: var(--primary-dark);
}

.nav-mobile-link:hover i {
    color: var(--primary-dark);
}

.nav-mobile-link.is-active {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.35);
    color: var(--primary-dark);
}

.nav-mobile-link.is-active i {
    color: var(--primary-dark);
}

.nav-mobile-link--cta {
    margin-top: 0.25rem;
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.05);
}

.nav-mobile-link--cta:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(56, 142, 60, 0.12);
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        max-width: 95%;
    }

    .nav-desktop {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}

/* Hero */
.hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4.5rem 1.25rem;
    background: linear-gradient(120deg, #2c3e50 0%, #1e3a2f 45%, #2e7d32 100%);
    color: #fff;
    overflow: hidden;
}

.hero--photo {
    background-image:
        linear-gradient(115deg, rgba(44, 62, 80, 0.9) 0%, rgba(30, 58, 47, 0.78) 42%, rgba(46, 125, 50, 0.55) 100%),
        url('https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.hero-kicker {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
}

.hero-lead {
    margin: 0 0 1.75rem;
    font-size: 1.05rem;
    opacity: 0.92;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-inner {
    position: relative;
    max-width: 720px;
}

.hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.btn-hero:hover {
    background: #66bb6a;
    text-decoration: none;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.btn-hero--outline {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff;
    box-shadow: none;
}

.btn-hero--outline:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Hero stats strip */
.hero-stats {
    position: relative;
    z-index: 2;
    margin-top: -2.75rem;
    padding: 0 0 3rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.stat-chip {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(44, 62, 80, 0.12);
    padding: 1.1rem 1.2rem;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.1rem;
    align-items: center;
    border: 1px solid #eef2f7;
}

.stat-chip--link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-chip--link:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 44px rgba(44, 62, 80, 0.16);
}

.stat-chip-icon {
    grid-row: 1 / span 2;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #e8f5e9;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-chip-num {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.15;
    word-break: break-word;
}

.stat-chip-lbl {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
}

.stat-chip--ok .stat-chip-icon {
    background: #e8f5e9;
    color: #2e7d32;
}

.stat-chip--ok .stat-chip-num {
    color: #2e7d32;
}

.stat-chip-warn .stat-chip-icon {
    background: #fff3e0;
    color: #e65100;
}

.stat-chip-warn .stat-chip-num {
    color: #c62828;
}

@media (max-width: 1100px) {
    .stats-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .hero-stats {
        margin-top: -1.5rem;
    }
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: #fff;
}

.defaulter-criterion-label {
    color: var(--primary-dark);
    font-weight: 600;
}

.section-head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-head h2 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    color: var(--navy);
}

.section-head p {
    margin: 0;
    color: var(--muted);
    max-width: 42rem;
    margin-inline: auto;
}

/* Cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid #eef2f7;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(44, 62, 80, 0.12);
}

.card-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid #e8f5e9;
    display: block;
}

.card-avatar.ph {
    background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: #555;
    margin-inline: auto;
}

.card h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    color: var(--navy);
}

.card .role {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Security guards */
.security-guard-avatar {
    background: linear-gradient(135deg, #c8e6c9, #81c784) !important;
    color: #1b5e20 !important;
}

.security-guard-shift {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

.security-guard-shift i {
    font-size: 0.8rem;
    opacity: 0.85;
}

.security-guard-contact {
    margin: 0.85rem 0 0;
    font-size: 0.9rem;
}

.security-guard-contact a {
    color: var(--muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s;
}

.security-guard-contact a:hover {
    color: var(--primary-dark);
}

.security-guard-contact i {
    font-size: 0.8rem;
}

/* Defaulters */
.card.warn {
    background: var(--danger-bg);
    border-color: #fecaca;
}

.card.warn .due {
    color: var(--danger);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.badge-warn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #fee2e2;
    color: var(--danger);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Finance summary */
.finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin-inline: auto;
}

.fin-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid #eef2f7;
    text-align: center;
}

.fin-card .lbl {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 600;
}

.fin-card .num {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--navy);
    margin-top: 0.35rem;
}

.fin-card.highlight .num {
    color: var(--primary-dark);
}

.progress-bar {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    margin-top: 1.25rem;
    overflow: hidden;
    max-width: 480px;
    margin-inline: auto;
}

.progress-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #81c784);
}

/* Footer */
.site-footer {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.site-footer strong {
    color: var(--navy);
}

/* Residents table (public) */
.table-simple {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid #eef2f7;
}

.table-simple th,
.table-simple td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.table-simple th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--navy);
    font-size: 0.85rem;
}

.table-simple tr:last-child td {
    border-bottom: none;
}

/* Pagination (public site) */
.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid #eef2f7;
    box-shadow: var(--shadow);
    font-size: 0.85rem;
}

.pagination-info {
    color: var(--muted);
}

.pagination-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.pagination-link,
.pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 0.45rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
}

.pagination-link {
    background: #f8fafc;
    color: var(--navy);
    border: 1px solid #e2e8f0;
    text-decoration: none;
}

.pagination-link:hover {
    background: #e8f5e9;
    border-color: var(--primary);
    color: var(--primary-dark);
    text-decoration: none;
}

.pagination-current {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

/* Inner page (e.g. residents list) */
.page-hero {
    padding: 2.5rem 0 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f5e9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.page-hero--slim {
    padding-top: 2rem;
}

.page-hero-kicker {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.page-hero-kicker a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.page-hero-kicker a:hover {
    text-decoration: underline;
}

.page-hero-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--navy);
}

.page-hero-lead {
    margin: 0;
    max-width: 40rem;
    color: var(--muted);
    font-size: 1rem;
}

.users-page-toolbar {
    margin-bottom: 1.5rem;
}

.vehicles-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    margin-bottom: 2.75rem;
}

.vehicles-page-toolbar + .users-table-card {
    margin-top: 0.5rem;
}

.vehicles-page-heading {
    flex: 1 1 200px;
    min-width: 0;
}

.vehicles-page-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text, #0f172a);
}

.vehicles-page-lead {
    margin: 0.35rem 0 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.vehicles-page-search {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    flex: 0 1 360px;
    min-width: min(100%, 260px);
    margin-left: auto;
}

.vehicles-page-search .users-search-row {
    width: 100%;
    justify-content: flex-end;
}

.vehicles-page-search .users-search-input-wrap--public {
    flex: 1 1 auto;
    max-width: none;
}

.vehicles-page-search .users-search-clear {
    align-self: flex-end;
}

.vehicle-no-value {
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.vehicle-no-empty {
    color: var(--muted);
}

.table-vehicles-directory {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-vehicles-directory thead th {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.95rem 1rem;
    border-bottom: none;
    white-space: nowrap;
}

.table-vehicles-directory thead th:first-child {
    border-radius: 0;
}

.table-vehicles-directory tbody td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    font-size: 0.95rem;
    color: #334155;
    background: #fff;
}

.table-vehicles-directory tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.table-vehicles-directory tbody tr:hover td {
    background: #f0fdf4;
}

.table-vehicles-directory tbody tr:last-child td {
    border-bottom: none;
}

.table-vehicles-directory .th-sno,
.table-vehicles-directory .td-sno {
    width: 64px;
    text-align: center;
}

.vehicles-sno {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 700;
}

.vehicle-plate {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #f59e0b;
    color: #92400e;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.vehicle-plate > i {
    font-size: 0.85rem;
    color: #d97706;
}

.vehicle-plate--empty {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
}

.vehicle-flat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.88rem;
}

.vehicle-flat-chip > i {
    font-size: 0.78rem;
    opacity: 0.85;
}

.vehicle-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.vehicle-contact-link:hover {
    background: #d1fae5;
    color: #065f46;
}

.vehicle-contact-link > i {
    font-size: 0.75rem;
}

.vehicle-resident {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.vehicle-resident-avatar {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.vehicle-resident-name {
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicles-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 0.5rem;
    color: var(--muted);
}

.vehicles-empty > i {
    font-size: 1.75rem;
    color: #94a3b8;
}

.vehicles-empty p {
    margin: 0;
}

.vehicles-mobile-name {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.users-page-section {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

.users-page-search {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.users-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.users-search-input-wrap--public {
    position: relative;
    flex: 1 1 220px;
    min-width: 0;
    max-width: 400px;
}

.users-search-input-wrap--public > i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.users-search-input-wrap--public input[type='search'] {
    width: 100%;
    padding: 0.65rem 0.75rem 0.65rem 2.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
}

.users-search-input-wrap--public input[type='search']:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.users-table-scroll {
    overflow-x: auto;
}

.is-hidden {
    display: none !important;
}

[data-live-search-results].is-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.users-mobile-meta {
    display: none;
}

@media (max-width: 640px) {
    .users-page-section {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    .users-page-section .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .users-page-toolbar {
        margin-bottom: 1rem;
    }

    .vehicles-page-toolbar {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 2.25rem;
    }

    .vehicles-page-search {
        width: 100%;
        flex: 1 1 auto;
        align-items: stretch;
        margin-left: 0;
    }

    .vehicles-page-search .users-search-clear {
        align-self: flex-start;
    }

    .users-search-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.45rem;
        width: 100%;
    }

    .users-search-input-wrap--public {
        flex: none;
        max-width: none;
        width: 100%;
    }

    .users-search-submit {
        width: auto;
        padding: 0.65rem 1rem;
        font-size: 0.92rem;
        white-space: nowrap;
    }

    .users-search-clear {
        text-align: center;
        display: block;
        padding: 0.15rem 0;
    }

    .users-table-card {
        border-left: none;
        border-right: none;
        border-radius: 10px;
    }

    .users-table-scroll {
        margin-left: -0.15rem;
        margin-right: -0.15rem;
    }

    .table-users-directory {
        width: 100%;
        min-width: 0;
    }

    .table-users-directory .col-hide-mobile {
        display: none;
    }

    .table-vehicles-directory {
        width: 100%;
        min-width: 0;
    }

    .table-vehicles-directory .col-hide-mobile {
        display: none;
    }

    .table-vehicles-directory thead th,
    .table-vehicles-directory tbody td {
        padding: 0.7rem 0.55rem;
        font-size: 0.85rem;
    }

    .table-vehicles-directory .th-sno,
    .table-vehicles-directory .td-sno {
        width: 42px;
        padding-left: 0.4rem;
        padding-right: 0.25rem;
    }

    .vehicle-plate {
        font-size: 0.78rem;
        padding: 0.32rem 0.55rem;
        letter-spacing: 0.04em;
        max-width: 100%;
    }

    .vehicle-flat-chip,
    .vehicle-contact-link {
        font-size: 0.78rem;
        padding: 0.28rem 0.55rem;
    }

    .users-mobile-meta {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        margin-top: 0.35rem;
    }

    .users-mobile-flat {
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--navy);
    }

    .users-mobile-meta .maint-summary {
        font-size: 0.78rem;
        white-space: normal;
    }

    .table-users-directory .th-photo,
    .table-users-directory td:first-child {
        width: 52px;
        padding-right: 0.35rem;
    }

    .table-users-directory .dir-avatar,
    .table-users-directory .dir-avatar.ph {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .table-users-directory th,
    .table-users-directory td {
        padding: 0.65rem 0.5rem;
        font-size: 0.88rem;
    }

    .btn-dir-detail-label {
        display: none;
    }

    .btn-dir-detail {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 10px;
    }

    .btn-dir-detail-icon {
        display: inline-block;
        font-size: 0.82rem;
    }

    .users-table-card .pagination-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 0.75rem;
    }

    .users-table-card .pagination-nav {
        justify-content: center;
    }
}

@media (min-width: 641px) {
    .btn-dir-detail-icon {
        display: none;
    }
}

.btn-text-link {
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-text-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.users-table-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid #eef2f7;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.users-table-card .pagination-bar {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

.table-users-directory .th-photo {
    width: 72px;
}

.dir-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e8f5e9;
    display: block;
}

.dir-avatar.ph {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #555;
    font-size: 1rem;
}

.empty-cell {
    text-align: center;
    padding: 2rem 1rem !important;
    color: var(--muted);
}

.users-page-note {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.users-cta-section {
    padding: 3rem 0;
}

.users-cta-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #fff 0%, #f1f8f4 100%);
    border: 1px solid #e8f5e9;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.users-cta-body {
    flex: 1 1 240px;
    min-width: 0;
}

.users-cta-title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: var(--navy);
}

.users-cta-text {
    margin: 0;
    color: var(--muted);
    max-width: 36rem;
    line-height: 1.55;
}

.users-cta-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .users-cta-section {
        padding: 1.5rem 0 1.75rem;
    }

    .users-cta-section .container {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .users-cta-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.1rem 1rem 1.15rem;
        border-radius: 12px;
    }

    .users-cta-body {
        flex: none;
    }

    .users-cta-title {
        font-size: 1.12rem;
        margin-bottom: 0.4rem;
    }

    .users-cta-text {
        font-size: 0.88rem;
        line-height: 1.5;
        max-width: none;
    }

    .users-cta-btn {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1.25rem;
        font-size: 0.95rem;
    }
}

.home-bottom-cta {
    padding: 2.5rem 0 3rem;
}

.home-bottom-cta-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-bottom-cta {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.table-users-directory .resident-row-warn td {
    background: var(--danger-bg);
}

.badge-warn--inline {
    margin-top: 0;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Gallery slider (home) */
.section-gallery {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.gallery-slider {
    position: relative;
    margin-top: 1rem;
    --gallery-gap: 0.85rem;
    --gallery-slide-basis: 20%;
}

@media (max-width: 768px) {
    .gallery-slider {
        --gallery-slide-basis: 66.666%;
        --gallery-gap: 0.7rem;
    }
}

.gallery-viewport {
    position: relative;
    z-index: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid #eef2f7;
    box-shadow: var(--shadow);
    background: #fff;
    padding: 0.85rem;
    scrollbar-width: none;
}

.gallery-viewport::-webkit-scrollbar {
    display: none;
}

.gallery-track {
    display: flex;
    gap: var(--gallery-gap);
    align-items: stretch;
}

.gallery-slide {
    flex: 0 0 var(--gallery-slide-basis);
    scroll-snap-align: start;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    border: 1px solid #e8edf3;
    aspect-ratio: 4 / 3;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-slide:hover img {
    transform: scale(1.06);
    filter: saturate(1.05) contrast(1.02);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.16);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--navy);
    transition: transform 0.15s ease, background 0.15s ease;
}

.gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.04);
}

.gallery-nav--prev {
    left: 0.55rem;
}

.gallery-nav--next {
    right: 0.55rem;
}

@media (min-width: 769px) {
    .gallery-nav {
        display: inline-flex;
    }
}

.gallery-note {
    margin: 0.85rem auto 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    max-width: 44rem;
}

/* Residents directory — maintenance summary & links */
.table-users-directory .th-action {
    width: 1%;
    white-space: nowrap;
}

.resident-name-link {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.resident-name-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.maint-summary {
    font-size: 0.88rem;
    white-space: nowrap;
}

.maint-summary--muted {
    color: var(--muted);
}

.ms-paid {
    color: #2e7d32;
    font-weight: 600;
}

.ms-due {
    color: #c62828;
    font-weight: 600;
}

.btn-dir-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    background: #e8f5e9;
    color: #1b5e20;
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: none;
    border: 1px solid #a5d6a7;
    white-space: nowrap;
}

.btn-dir-detail:hover {
    background: #c8e6c9;
    text-decoration: none;
    color: #0d3d12;
}

.resident-row-clickable:hover td {
    background: #fafdfb;
}

/* Resident maintenance detail (resident.php) */
.page-hero--resident {
    padding: 2rem 0 2.25rem;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(76, 175, 80, 0.18) 0%, transparent 55%),
        radial-gradient(90% 60% at 0% 100%, rgba(44, 62, 80, 0.08) 0%, transparent 50%),
        linear-gradient(165deg, #f8fafc 0%, #eef7f0 42%, #e8f5e9 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.resident-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.35rem;
}

.resident-hero-kicker {
    margin: 0;
}

.resident-hero-kicker-sep {
    margin: 0 0.35rem;
    color: #cbd5e1;
    font-weight: 400;
}

.resident-hero-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.06);
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.resident-hero-back:hover {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary-dark);
    text-decoration: none;
}

.resident-hero-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resident-hero-head {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 1.75rem);
    min-width: 0;
}

.resident-hero-head-copy {
    min-width: 0;
    flex: 1;
}

.resident-hero-photo {
    width: clamp(88px, 18vw, 112px);
    height: clamp(88px, 18vw, 112px);
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 12px 32px rgba(56, 142, 60, 0.22),
        0 0 0 1px rgba(76, 175, 80, 0.2);
    background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
}

.resident-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.resident-hero-photo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-dark);
    background: linear-gradient(160deg, #fff 0%, #e8f5e9 100%);
}

.resident-hero-copy {
    min-width: 0;
    flex: 1;
}

.resident-hero-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.resident-hero-lead {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--muted);
    max-width: 36rem;
    line-height: 1.5;
}

.resident-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.resident-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e2e8f0;
}

.resident-meta-pill i {
    color: var(--primary-dark);
    font-size: 0.88rem;
    opacity: 0.9;
}

.resident-meta-pill--link {
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.resident-meta-pill--link:hover {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary-dark);
    text-decoration: none;
}

.resident-detail-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.resident-detail-container {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.resident-dashboard {
    background: var(--card);
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid #e8edf3;
    box-shadow: 0 8px 40px rgba(44, 62, 80, 0.08);
    padding: 1.35rem 1.35rem 1.25rem;
}

.resident-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.resident-stat-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid #eef2f7;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.resident-stat-card:hover {
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.06);
}

.resident-stat--ok {
    border-color: #c8e6c9;
    background: linear-gradient(145deg, #fff 0%, #f4fbf6 100%);
}

.resident-stat--warn {
    border-color: #ffccbc;
    background: linear-gradient(145deg, #fff 0%, #fffaf8 100%);
}

.resident-stat--neutral {
    border-color: #e2e8f0;
    background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
}

.resident-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #e8f5e9;
    color: #2e7d32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.resident-stat--warn .resident-stat-icon {
    background: #fff3e0;
    color: #e65100;
}

.resident-stat--neutral .resident-stat-icon {
    background: #eceff1;
    color: #546e7a;
}

.resident-stat-body {
    min-width: 0;
}

.resident-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
}

.resident-stat-value {
    font-size: clamp(1.65rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.1;
    margin-top: 0.15rem;
    font-variant-numeric: tabular-nums;
}

.resident-stat-sub {
    font-size: 0.84rem;
    color: var(--muted);
    margin-top: 0.35rem;
    line-height: 1.35;
}

.resident-stat-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem 1.15rem;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.45;
}

.resident-stat-banner--ok {
    background: rgba(232, 245, 233, 0.65);
    border-color: #c8e6c9;
}

.resident-stat-banner--warn {
    background: rgba(255, 243, 224, 0.55);
    border-color: #ffccbc;
}

.resident-stat-banner__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.resident-stat-banner--warn .resident-stat-banner__icon {
    color: #e65100;
    background: rgba(255, 255, 255, 0.9);
}

.resident-stat-banner__text {
    min-width: 0;
}

.resident-stat-banner__sep {
    margin: 0 0.2rem;
    color: #94a3b8;
    font-weight: 400;
}

.text-warn {
    color: #bf360c;
    font-weight: 600;
}

.text-ok {
    color: #2e7d32;
    font-weight: 600;
}

.resident-pay-codes {
    display: grid;
    grid-template-columns: 1.2fr auto;
    gap: 1.25rem 1.75rem;
    align-items: center;
    margin: 1.25rem 0 1.5rem;
    padding: 1.35rem 1.4rem;
    background: var(--card);
    border: 1px solid #e8edf3;
    border-radius: calc(var(--radius) + 2px);
    box-shadow: 0 8px 40px rgba(44, 62, 80, 0.08);
}

.resident-pay-codes__title {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
    color: var(--navy);
}

.resident-pay-codes__lead {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 36rem;
}

.resident-pay-codes__code {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    color: var(--text);
}

.resident-pay-codes__code code {
    letter-spacing: 0.06em;
    background: #e8f5e9;
    color: #1b5e20;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
}

.resident-pay-codes__btn {
    display: inline-flex;
}

.resident-pay-codes__visuals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.resident-pay-barcode-wrap {
    min-width: 200px;
}

.resident-pay-barcode {
    max-width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.45rem;
    min-height: 72px;
}

.resident-pay-qr {
    display: inline-block;
    padding: 0.55rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    line-height: 0;
    text-decoration: none;
}

.resident-pay-qr img {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: contain;
}

@media (max-width: 720px) {
    .resident-pay-codes {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .resident-pay-codes__lead {
        margin-left: auto;
        margin-right: auto;
    }
}

.resident-history-card {
    background: var(--card);
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid #e8edf3;
    box-shadow: 0 8px 40px rgba(44, 62, 80, 0.08);
    overflow: hidden;
}

.resident-history-head {
    padding: 1.35rem 1.5rem 1rem;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.resident-history-title {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.resident-history-hint {
    margin: 0;
    font-size: 0.86rem;
    color: var(--muted);
    max-width: 42rem;
    line-height: 1.5;
}

.resident-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.resident-history-card .table-resident-maint.table-simple {
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
}

.table-resident-maint {
    min-width: 100%;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.table-resident-maint thead th {
    text-align: left;
    padding: 0.85rem 1.25rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--muted);
    background: #f8fafc;
    border-bottom: 1px solid #e8edf3;
    white-space: nowrap;
}

.table-resident-maint tbody td {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table-resident-maint tbody tr:last-child td {
    border-bottom: none;
}

.table-resident-maint tbody tr:hover td {
    background: #fbfcfd;
}

.resident-maint-row--due td {
    background: rgba(255, 248, 247, 0.55);
}

.resident-maint-row--due:hover td {
    background: rgba(255, 243, 241, 0.85);
}

.resident-maint-month {
    font-weight: 600;
    color: var(--navy);
}

.resident-maint-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--text);
}

.resident-maint-date {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    font-size: 0.88rem;
}

.maint-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.maint-badge--paid {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.maint-badge--due {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
}

.resident-maint-mobile-amt {
    display: none;
}

@media (max-width: 640px) {
    .page-hero--resident {
        padding: 1rem 0 1.25rem;
    }

    .page-hero--resident .container {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .resident-hero-top {
        margin-bottom: 0.85rem;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .resident-hero-kicker {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .resident-hero-back {
        padding: 0.35rem 0.7rem;
        font-size: 0.78rem;
        flex-shrink: 0;
    }

    .resident-hero-main {
        gap: 0.85rem;
    }

    .resident-hero-head {
        align-items: flex-start;
        gap: 0.85rem;
    }

    .resident-hero-photo {
        width: 72px;
        height: 72px;
        border-radius: 16px;
        flex-shrink: 0;
    }

    .resident-hero-photo-fallback {
        font-size: 1.75rem;
    }

    .resident-hero-title {
        font-size: 1.25rem;
        margin-bottom: 0.2rem;
    }

    .resident-hero-lead {
        margin-bottom: 0;
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .resident-hero-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
    }

    .resident-meta-pill--flat {
        grid-column: 1 / -1;
    }

    .resident-meta-pill {
        font-size: 0.76rem;
        padding: 0.38rem 0.65rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .resident-meta-pill--link {
        justify-content: flex-start;
    }

    .resident-detail-section {
        padding-top: 1.25rem;
        padding-bottom: 2rem;
    }

    .resident-detail-section .container {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .resident-detail-container {
        gap: 1.15rem;
    }

    .resident-dashboard {
        padding: 0.85rem;
        border-radius: 12px;
    }

    .resident-stat-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
        margin-bottom: 0.75rem;
    }

    .resident-stat-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.75rem 0.5rem;
        gap: 0.4rem;
    }

    .resident-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .resident-stat-label {
        font-size: 0.68rem;
    }

    .resident-stat-value {
        font-size: 1.45rem;
        line-height: 1;
    }

    .resident-stat-sub {
        font-size: 0.68rem;
        line-height: 1.35;
    }

    .resident-stat-banner {
        padding: 0.65rem 0.75rem;
        font-size: 0.82rem;
    }

    .resident-history-card {
        border-radius: 12px;
    }

    .resident-history-head {
        padding: 0.85rem 0.85rem 0;
    }

    .resident-history-title {
        font-size: 1rem;
    }

    .resident-history-hint {
        font-size: 0.8rem;
    }

    .table-resident-maint .col-hide-mobile {
        display: none;
    }

    .resident-maint-mobile-amt {
        display: block;
        margin-top: 0.2rem;
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--text);
    }

    .table-resident-maint th,
    .table-resident-maint td {
        padding: 0.65rem 0.55rem;
        font-size: 0.86rem;
    }
}

/* Maintenance Detail page */
.md-month-filter {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    background: var(--card);
    border: 1px solid #eef2f7;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.md-month-filter-label {
    margin: 0;
    font-weight: 600;
    color: var(--navy);
    font-size: 0.92rem;
}

.md-month-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.md-month-filter-row input[type='month'] {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fafbfc;
}

.md-month-filter-row input[type='month']:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.md-month-submit {
    white-space: nowrap;
    padding: 0.6rem 1.15rem;
    font-size: 0.92rem;
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.25);
    border: none;
}

.md-month-reset {
    align-self: flex-start;
}

@media (max-width: 640px) {
    .md-month-filter {
        padding: 0.85rem;
        margin-bottom: 1.15rem;
        gap: 0.55rem;
    }

    .md-month-filter-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.45rem;
        width: 100%;
    }

    .md-month-filter-row input[type='month'] {
        width: 100%;
        font-size: 0.88rem;
        padding: 0.55rem 0.6rem;
    }

    .md-month-submit {
        padding: 0.55rem 0.85rem;
        font-size: 0.82rem;
    }

    .md-month-reset {
        align-self: center;
        display: block;
        width: 100%;
        text-align: center;
        padding-top: 0.15rem;
    }
}

.md-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.md-summary-card {
    background: var(--card);
    border: 1px solid #eef2f7;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.md-summary-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f5e9 100%);
}

.md-summary-head h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--navy);
}

.md-summary-month {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.md-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.md-summary-table th,
.md-summary-table td {
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    font-size: 0.92rem;
}

.md-summary-table th {
    width: 55%;
    color: var(--muted);
    font-weight: 500;
}

.md-summary-table td {
    font-weight: 600;
    color: var(--navy);
}

.md-summary-table tr.is-ok td,
.md-summary-table td.is-ok {
    color: #2e7d32;
}

.md-summary-table tr.is-warn td,
.md-summary-table td.is-warn {
    color: #c62828;
}

.md-summary-table tr:last-child th,
.md-summary-table tr:last-child td {
    border-bottom: none;
}

.md-meter {
    padding: 1rem 1.2rem 1.25rem;
    border-top: 1px solid #eef2f7;
    background: #fafbfc;
}

.md-meter-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.md-meter-top strong {
    color: var(--navy);
}

.md-meter-track {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.md-meter-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #66bb6a, #2e7d32);
}

.md-meter-note {
    margin: 0.55rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.md-kpi-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    align-content: start;
}

.md-kpi {
    background: var(--card);
    border: 1px solid #eef2f7;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.md-kpi--ok {
    border-color: #c8e6c9;
    background: linear-gradient(160deg, #fff 0%, #f1f8e9 100%);
}

.md-kpi--warn {
    border-color: #ffcdd2;
    background: linear-gradient(160deg, #fff 0%, #fff5f5 100%);
}

.md-kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.md-kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
}

.md-kpi--ok .md-kpi-value {
    color: #2e7d32;
}

.md-kpi--warn .md-kpi-value {
    color: #c62828;
}

.md-kpi-sub {
    font-size: 0.78rem;
    color: var(--muted);
}

.md-panel {
    background: var(--card);
    border: 1px solid #eef2f7;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.md-panel-head {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #eef2f7;
    background: #fafbfc;
}

.md-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--navy);
}

.md-panel-head p {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.md-panel-body {
    padding: 0;
}

.md-panel-body .table-simple {
    margin: 0;
}

.md-row-current td {
    background: #e8f5e9;
}

.md-history-total th,
.md-history-total td {
    background: #f1f5f9;
    border-top: 2px solid #cbd5e1;
    font-weight: 700;
    color: var(--navy);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.md-panel-body a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.md-panel-body a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .md-layout {
        grid-template-columns: 1fr;
    }

    .md-kpi-col {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .md-kpi-col {
        grid-template-columns: 1fr;
    }
}

/* —— Technicians page —— */
.tech-page {
    padding-top: 1.75rem;
    padding-bottom: 3rem;
}

.tech-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.75rem;
    align-items: end;
    margin-bottom: 1.5rem;
}

.tech-hero-kicker {
    margin: 0 0 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.tech-hero-title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--navy);
    line-height: 1.2;
}

.tech-hero-lead {
    margin: 0;
    color: var(--muted);
    max-width: 36rem;
    font-size: 0.98rem;
}

.tech-search {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: stretch;
}

.tech-search-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.tech-search-input-wrap {
    position: relative;
    flex: 1 1 180px;
    min-width: 0;
}

.tech-search-input-wrap i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}

.tech-search-input-wrap input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.7rem 1rem 0.7rem 2.35rem;
    font: inherit;
    font-size: 0.92rem;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tech-search-input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
}

.tech-search-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.tech-search-clear {
    align-self: flex-start;
    font-size: 0.85rem;
}

.tech-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.tech-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--navy);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}

.tech-filter-chip i {
    font-size: 0.78rem;
    color: var(--primary-dark);
}

.tech-filter-chip:hover {
    border-color: #a5d6a7;
    background: #f1f8f2;
    transform: translateY(-1px);
}

.tech-filter-chip.is-active {
    background: linear-gradient(145deg, #66bb6a, var(--primary-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(56, 142, 60, 0.25);
}

.tech-filter-chip.is-active i {
    color: #fff;
}

.tech-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(44, 62, 80, 0.08);
    color: inherit;
}

.tech-filter-chip.is-active .tech-filter-count {
    background: rgba(255, 255, 255, 0.25);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.35rem;
}

.tech-card {
    background: var(--card);
    border: 1px solid #eef2f7;
    border-radius: calc(var(--radius) + 2px);
    padding: 1.35rem 1.35rem 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #81c784);
}

.tech-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(44, 62, 80, 0.12);
}

.tech-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.15rem;
}

.tech-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
    border: 2px solid #e8f5e9;
    display: block;
    flex-shrink: 0;
}

.tech-card-avatar--ph {
    background: linear-gradient(145deg, #c8e6c9, #66bb6a);
    color: #1b5e20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    font-weight: 700;
}

.tech-card-trade {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #e8f5e9;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.tech-card-name {
    margin: 0;
    font-size: 1.15rem;
    color: var(--navy);
    line-height: 1.3;
}

.tech-card-notes {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.tech-card-actions {
    margin-top: auto;
    padding-top: 0.55rem;
}

.tech-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: #f1f8f2;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #c8e6c9;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tech-call-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.tech-empty {
    text-align: center;
    padding: 3rem 1.25rem;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
}

.tech-empty-icon {
    display: inline-flex;
    width: 3.25rem;
    height: 3.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f5e9;
    color: var(--primary-dark);
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
}

.tech-empty h2 {
    margin: 0 0 0.35rem;
    color: var(--navy);
    font-size: 1.2rem;
}

.tech-empty p {
    margin: 0;
    color: var(--muted);
}

.tech-page-note {
    margin: 2rem 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

@media (max-width: 820px) {
    .tech-hero {
        grid-template-columns: 1fr;
        gap: 1.15rem;
        align-items: start;
    }
}

@media (max-width: 520px) {
    .tech-card-avatar {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }

    .tech-call-btn {
        width: 100%;
        justify-content: center;
    }
}

/* —— Pay / Razorpay page —— */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pay-page {
    padding-top: 1.75rem;
    padding-bottom: 3rem;
}

.pay-page-inner {
    max-width: 720px;
}

.pay-hero {
    margin-bottom: 1.25rem;
}

.pay-hero--with-qr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 1.5rem;
    padding: 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.pay-detect-note {
    margin: 0.65rem 0 0;
    display: inline-flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--primary-dark);
    font-weight: 500;
}

.pay-detect-note i {
    margin-top: 0.15rem;
}

.pay-hero-qr-wrap {
    text-align: center;
}

.pay-hero-qr {
    display: inline-block;
    width: 132px;
    height: 132px;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 0 auto;
    line-height: 0;
    text-decoration: none;
}

.pay-hero-qr img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pay-hero-qr-caption {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.pay-kicker {
    margin: 0 0 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-dark);
}

.pay-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--navy);
}

.pay-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.pay-code-inline {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    background: #e8f5e9;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    color: var(--navy);
}

.pay-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow);
    padding: 1.35rem 1.4rem 1.4rem;
}

.pay-card--empty,
.pay-card--ok {
    text-align: center;
    padding: 2.25rem 1.5rem;
}

.pay-card--ok i {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 0.65rem;
}

.pay-empty-icon {
    display: inline-flex;
    width: 3.25rem;
    height: 3.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f5e9;
    color: var(--primary-dark);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.pay-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 1rem;
}

.pay-card-head h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--navy);
}

.pay-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.pay-month-list {
    list-style: none;
    margin: 0 0 1.15rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.pay-month-list li + li {
    border-top: 1px solid #e2e8f0;
}

.pay-month-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    cursor: pointer;
    background: #fff;
    transition: background 0.15s;
}

.pay-month-row:hover {
    background: #f8fafc;
}

.pay-month-label {
    font-weight: 600;
    color: var(--navy);
}

.pay-month-amt {
    font-weight: 700;
    color: var(--primary-dark);
}

.pay-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: stretch;
}

.pay-submit {
    width: 100%;
    justify-content: center;
}

.pay-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pay-status {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
}

.pay-status--error {
    color: var(--danger);
}

.pay-flash {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.95rem 1.1rem;
    border-radius: 12px;
    margin-bottom: 1.15rem;
}

.pay-flash i {
    margin-top: 0.15rem;
}

.pay-flash strong {
    display: block;
    margin-bottom: 0.15rem;
}

.pay-flash span {
    font-size: 0.9rem;
}

.pay-flash--success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.pay-flash--warn {
    background: #fff8e1;
    color: #8d6e00;
    border: 1px solid #ffe082;
}

.pay-code-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.15rem;
}

.pay-code-form input {
    flex: 1 1 160px;
    max-width: 220px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font: inherit;
    text-align: center;
}

.pay-code-form input[name="code"] {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pay-note {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

.resident-pay-cta {
    margin-top: 1rem;
}

/* —— Society events page —— */
.events-band {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(1200px 420px at 12% -10%, rgba(129, 199, 132, 0.55), transparent 55%),
        radial-gradient(900px 380px at 88% 0%, rgba(46, 125, 50, 0.45), transparent 50%),
        linear-gradient(135deg, #1b4332 0%, #2c3e50 48%, #1b5e20 100%);
    padding: 2.4rem 0 2.6rem;
}

.events-band__glow {
    position: absolute;
    inset: auto -8% -40% auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(165, 214, 167, 0.35), transparent 68%);
    pointer-events: none;
    animation: eventsGlowFloat 8s ease-in-out infinite;
}

.events-band__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
    pointer-events: none;
}

.events-band__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem 2rem;
}

.events-band__kicker {
    margin: 0 0 0.45rem;
    display: inline-flex;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.events-band__title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.85rem, 3.4vw, 2.55rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.events-band__lead {
    margin: 0;
    max-width: 34rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1rem;
}

.events-band__stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.events-band__stat {
    min-width: 7.5rem;
    padding: 0.85rem 1.05rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.events-band__stat strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.1;
}

.events-band__stat span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
}

.events-page {
    padding-top: 2rem;
    padding-bottom: 3.5rem;
    background:
        radial-gradient(900px 280px at 0% 0%, rgba(200, 230, 201, 0.45), transparent 60%),
        radial-gradient(700px 240px at 100% 8%, rgba(232, 245, 233, 0.7), transparent 55%),
        var(--bg);
}

.events-section-head {
    margin: 2rem 0 1.15rem;
}

.events-section-head h2 {
    margin: 0 0 0.3rem;
    font-size: 1.35rem;
    color: var(--navy);
}

.events-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.events-reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: eventsRevealUp 0.55s ease forwards;
    animation-delay: var(--reveal-delay, 0ms);
}

@keyframes eventsRevealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes eventsGlowFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-18px, -12px, 0); }
}

/* Featured next event */
.event-feature {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(44, 62, 80, 0.1);
}

.event-feature__media {
    position: relative;
    min-height: 280px;
    background: #1b4332;
}

.event-feature__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-feature__media--ph,
.event-card-media--ph {
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-feature__ph,
.event-card-ph {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 3rem;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 45%),
        linear-gradient(145deg, #43a047, #2e7d32 55%, #1b5e20);
}

.event-feature__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.8rem;
    border-radius: 12px;
    background: rgba(27, 67, 50, 0.88);
    color: #fff;
    backdrop-filter: blur(6px);
}

.event-feature__badge-label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.event-feature__badge-count {
    font-size: 0.95rem;
    font-weight: 700;
}

.event-feature__body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.15rem;
    padding: 1.6rem 1.5rem;
    align-items: start;
}

.event-feature__dateblock {
    width: 4.6rem;
    padding: 0.75rem 0.4rem;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(180deg, #e8f5e9, #c8e6c9);
    color: #1b5e20;
    line-height: 1.15;
}

.event-feature__day {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

.event-feature__month {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.event-feature__year {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    opacity: 0.8;
}

.event-feature__when {
    margin: 0 0 0.45rem;
    font-size: 0.86rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.event-feature__when i {
    color: var(--primary-dark);
}

.event-feature__title {
    margin: 0 0 0.55rem;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    color: var(--navy);
    line-height: 1.2;
}

.event-feature__loc {
    margin: 0 0 0.65rem;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: var(--text);
}

.event-feature__loc i {
    color: var(--primary-dark);
    margin-top: 0.2rem;
}

.event-feature__desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Grid cards */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.4rem;
}

.event-card {
    background: var(--card);
    border: 1px solid #e8eef5;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(44, 62, 80, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(44, 62, 80, 0.14);
}

.event-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #2e7d32;
    overflow: hidden;
}

.event-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.event-card:hover .event-card-media img {
    transform: scale(1.04);
}

.event-card-ph {
    min-height: 100%;
    font-size: 2.4rem;
}

.event-card-datebadge {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    min-width: 3.4rem;
    padding: 0.4rem 0.55rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--navy);
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    line-height: 1.15;
}

.event-card-countdown {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: rgba(27, 67, 50, 0.88);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.event-card-day {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
}

.event-card-month {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-dark);
}

.event-card-body {
    padding: 1.1rem 1.2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.event-card-when {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.event-card-when i {
    color: var(--primary-dark);
    font-size: 0.78rem;
}

.event-card-dot {
    opacity: 0.55;
}

.event-card-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--navy);
    line-height: 1.3;
}

.event-card-loc {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.event-card-loc i {
    color: var(--primary-dark);
    margin-top: 0.2rem;
}

.event-card-desc {
    margin: 0.15rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Festival accents */
.event-theme-diwali .event-feature__ph,
.event-theme-diwali .event-card-ph {
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 236, 179, 0.45), transparent 45%),
        linear-gradient(145deg, #f9a825, #ef6c00 55%, #e65100);
}

.event-theme-lohri .event-feature__ph,
.event-theme-lohri .event-card-ph {
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 183, 77, 0.4), transparent 48%),
        linear-gradient(145deg, #ff7043, #e64a19 55%, #bf360c);
}

.event-theme-newyear .event-feature__ph,
.event-theme-newyear .event-card-ph {
    background:
        radial-gradient(circle at 28% 20%, rgba(197, 225, 165, 0.35), transparent 48%),
        linear-gradient(145deg, #455a64, #263238 55%, #1b5e20);
}

.event-theme-meeting .event-feature__ph,
.event-theme-meeting .event-card-ph {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.16), transparent 45%),
        linear-gradient(145deg, #66bb6a, #388e3c 55%, #1b5e20);
}

.events-empty {
    text-align: center;
    padding: 3rem 1.25rem;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
}

.events-empty-icon {
    display: inline-flex;
    width: 3.25rem;
    height: 3.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f5e9;
    color: var(--primary-dark);
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
}

.events-empty h2 {
    margin: 0 0 0.35rem;
    color: var(--navy);
    font-size: 1.2rem;
}

.events-empty p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 900px) {
    .event-feature {
        grid-template-columns: 1fr;
    }

    .event-feature__media {
        min-height: 220px;
    }
}

@media (max-width: 620px) {
    .events-band {
        padding: 1.8rem 0 2rem;
    }

    .events-band__stat {
        min-width: 6.5rem;
    }

    .event-feature__body {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .event-feature__dateblock {
        display: flex;
        width: auto;
        align-items: baseline;
        gap: 0.45rem;
        justify-content: flex-start;
        padding: 0.55rem 0.8rem;
    }

    .event-feature__day {
        font-size: 1.35rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .events-reveal,
    .events-band__glow,
    .event-card,
    .event-card-media img {
        animation: none !important;
        transition: none !important;
        opacity: 1;
        transform: none;
    }
}
