


@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --maroon-900: #4a0f19;
    --maroon-800: #651624;
    --maroon-700: #7a1f2f;
    --maroon-600: #8d2d3f;
    --maroon-500: #a94756;
    --rose-100: #f7ecec;
    --rose-200: #eedede;
    --rose-300: #dcc3c6;
    --surface: rgba(255, 248, 247, 0.9);
    --surface-strong: #fff8f7;
    --text: #35131a;
    --text-soft: #6d4a51;
    --border: rgba(101, 22, 36, 0.16);
    --shadow: 0 18px 45px rgba(58, 14, 24, 0.14);
    --shadow-soft: 0 10px 26px rgba(58, 14, 24, 0.08);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --button-height: 52px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.3), transparent 32%),
        radial-gradient(circle at bottom right, rgba(169, 71, 86, 0.18), transparent 28%),
        linear-gradient(180deg, #f7f0ef 0%, #efe2e1 48%, #e5d3d4 100%);
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a,
button,
input,
select,
textarea {
    touch-action: manipulation;
}

:focus-visible {
    outline: 3px solid rgba(122, 31, 47, 0.35);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    padding: 12px 16px;
    border-radius: 999px;
    background: #fff8f7;
    color: var(--maroon-800);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bg-image {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(74, 15, 25, 0.72), rgba(74, 15, 25, 0.72)),
        url("https://a.travel-assets.com/findyours-php/viewfinder/images/res70/345000/345051-San-Fernando.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: saturate(0.9);
}

.landing-page,
.auth-page,
.form-page,
.browse-page,
.details-page,
.homepage-container,
.welcome-transition-page {
    min-height: 100vh;
    position: relative;
}

.landing-page,
.auth-page,
.form-page,
.browse-page,
.details-page {
    padding: 24px;
}

.form-page {
    overflow: hidden;
    isolation: isolate;
}

.form-page::before,
.form-page::after {
    content: '';
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    pointer-events: none;
}

.form-page::before {
    top: 18%;
    left: -120px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(122, 31, 47, 0.24), rgba(122, 31, 47, 0));
    animation: form-orb-drift-left 8s ease-in-out infinite;
}

.form-page::after {
    right: -140px;
    bottom: 10%;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(255, 248, 247, 0.9), rgba(169, 71, 86, 0));
    animation: form-orb-drift-right 10s ease-in-out infinite;
}

.browse-topbar,
.homepage-header {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 24px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 251, 250, 0.52), rgba(244, 228, 229, 0.34));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
    color: var(--maroon-800);
}

.browse-brand,
.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.browse-nav,
.user-profile {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.browse-nav-link,
.logout-link,
.auth-chip-link,
.homepage-footer a {
    text-decoration: none;
}

.browse-nav-link,
.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--maroon-800);
    background: rgba(122, 31, 47, 0.08);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.browse-nav-link:hover,
.logout-link:hover,
.auth-chip-link:hover,
.back-btn:hover,
.backbtn:hover {
    transform: translateY(-1px);
}

.browse-nav-link:hover,
.logout-link:hover {
    background: rgba(122, 31, 47, 0.14);
}

.browse-hero,
.landing-hero {
    width: min(1180px, calc(100% - 48px));
    margin: 28px auto 0;
    text-align: center;
    padding: 30px 24px 10px;
}

.browse-hero h1,
.landing-hero h1,
.dashboard-card h1,
.welcome-card h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    color: var(--maroon-800);
}

.browse-hero p,
.landing-hero p {
    max-width: 720px;
    margin: 14px auto 0;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--text-soft);
}

.landing-main {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 16px 0 56px;
}

.welcome-card,
.dashboard-card,
.login-card,
.signup-card,
.lost-item-form,
.details-form-card,
.landing-feature-card,
.landing-trust-card,
.LostPosted,
.FoundPosted,
.item-card {
    background: linear-gradient(180deg, rgba(255, 251, 250, 0.58), rgba(248, 235, 235, 0.42));
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.welcome-card,
.landing-hero {
    color: var(--text);
}

.landing-hero {
    padding: 46px clamp(24px, 4vw, 48px);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(74, 15, 25, 0.84), rgba(141, 45, 63, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 50px rgba(38, 9, 16, 0.28);
}

.landing-hero h1 {
    color: #fff8f7;
}

.landing-hero p {
    color: rgba(255, 244, 242, 0.92);
}

.landing-tag,
.landing-microcopy {
    color: rgba(255, 242, 240, 0.8);
}

.landing-tag {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
}

.landing-description {
    max-width: 620px;
}

.landing-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.landing-link-primary,
.landing-link-secondary,
.button-link {
    text-decoration: none;
}

.landing-primary-btn,
.landing-secondary-btn,
.button-link,
.main-btn,
.search-btn,
.login-card button,
.signup-card button,
.lost-item-form button,
.details-form-card button,
.LostPosted button,
.FoundPosted button,
button {
    width: auto;
    min-height: var(--button-height);
    border: none;
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.2;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.landing-primary-btn,
.button-link,
.main-btn,
.login-card button,
.signup-card button,
.lost-item-form button,
.details-form-card button,
.LostPosted button,
.FoundPosted button,
.search-btn,
button {
    background: linear-gradient(135deg, var(--maroon-700), var(--maroon-500));
    color: #fff8f7;
    box-shadow: 0 12px 24px rgba(122, 31, 47, 0.22);
}

.landing-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff8f7;
    border: 1px solid rgba(255, 255, 255, 0.24);
    min-width: 170px;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.form-page .main-btn,
.form-page .lost-item-form button {
    position: relative;
    overflow: hidden;
}

.form-page .lost-item-form button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.34) 45%, transparent 58%);
    transform: translateX(-120%);
    animation: form-button-shine 2.8s ease-in-out infinite;
}

.button-group > * ,
.form-actions > * {
    width: 100%;
}

.search-btn,
.login-card button,
.signup-card button,
.lost-item-form button,
.details-form-card button,
.LostPosted button,
.FoundPosted button,
.main-btn,
.button-link {
    width: 100%;
}

.browse-btn {
    background: linear-gradient(135deg, #f1d7d8, #e8c3c7);
    color: var(--maroon-900);
    box-shadow: 0 10px 22px rgba(89, 31, 40, 0.12);
}

.landing-primary-btn:hover,
.landing-secondary-btn:hover,
.main-btn:hover,
.search-btn:hover,
.login-card button:hover,
.signup-card button:hover,
.lost-item-form button:hover,
.details-form-card button:hover,
.LostPosted button:hover,
.FoundPosted button:hover,
button:hover {
    transform: translateY(-2px);
}

.landing-features {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.landing-feature-card,
.landing-trust-card {
    padding: 26px;
    color: var(--text);
}

.landing-feature-card h2,
.landing-trust-card h2,
.item-card h2,
.LostPosted h2,
.FoundPosted h2,
.preview-container h2,
.lost-item-form h2,
.details-form-card h2 {
    margin: 0 0 10px;
    color: var(--maroon-800);
}

.landing-feature-card p,
.landing-trust-card p,
.subtitle,
.LostPosted p,
.FoundPosted p,
.item-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.landing-trust {
    margin-top: 18px;
}

.auth-page,
.form-page,
.browse-page,
.details-page {
    display: flex;
    flex-direction: column;
}

.login-container,
.signup-container,
.form-container,
.details-form-wrap,
.preview-container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.login-container,
.signup-container,
.form-container,
.details-form-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 0 56px;
}

.login-card,
.signup-card {
    width: min(460px, 100%);
    padding: 34px;
    text-align: center;
}

.lost-item-form,
.details-form-card {
    width: min(760px, 100%);
    padding: 34px;
    color: var(--text);
}

.personal-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.personal-field-wide {
    grid-column: 1 / -1;
}

@media (max-width: 620px) {
    .personal-fields-grid { grid-template-columns: 1fr; }
    .personal-field-wide { grid-column: auto; }
}

.form-page .lost-item-form {
    position: relative;
    overflow: hidden;
    animation: form-card-pop 0.9s cubic-bezier(0.2, 1, 0.22, 1) 0.08s both;
}

.form-page .lost-item-form::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.34) 48%, transparent 62%);
    transform: translateX(-120%);
    animation: form-card-sweep 3.8s ease-in-out infinite;
}

.login-card h1,
.signup-card h1,
.lost-item-form h2,
.details-form-card h2 {
    font-size: 2rem;
}

.login-subtitle,
.signup-subtitle,
.auth-message {
    color: var(--text-soft);
}

.auth-links,
.auth-secondary-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.auth-inline-link,
.auth-chip-link {
    color: var(--maroon-700);
}

.landing-hero .auth-chip-link {
    color: #fff;
}

.auth-chip-link {
    padding: 10px 14px;
    background: rgba(122, 31, 47, 0.08);
    border-radius: 999px;
}

.login-card input,
.signup-card input,
.lost-item-form input,
.lost-item-form select,
.details-form-card input,
.details-form-card select,
.details-form-card textarea,
.search-bar input[type="text"] {
    width: 100%;
    margin-top: 8px;
    padding: 13px 14px;
    border: 1px solid rgba(101, 22, 36, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.other-answer-input {
    margin-top: 8px;
}

.login-card input,
.signup-card input {
    margin-bottom: 12px;
}

.signup-card .auth-terms {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 13px 14px;
    border: 1px solid rgba(101, 22, 36, 0.12);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.72);
    text-align: left;
    cursor: pointer;
}

.signup-card .auth-terms input[type="checkbox"] {
    width: 19px;
    height: 19px;
    min-width: 19px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--maroon-700);
}

.signup-card .auth-terms span { color: var(--text); font-size: .9rem; font-weight: 600; line-height: 1.45; }

.signup-card .auth-terms a {
    color: var(--maroon-700);
    text-decoration: underline;
}

.signup-security-section {
    display: grid;
    gap: 14px;
    margin: 6px 0 18px;
}

.signup-security-section .auth-recaptcha {
    display: flex;
    justify-content: center;
    min-height: 78px;
}

/* Registration page only */
.signup-registration-card {
    width: min(760px, 100%);
    padding: clamp(26px, 4vw, 44px);
    text-align: left;
    border: 1px solid rgba(101, 22, 36, 0.12);
    background: linear-gradient(155deg, rgba(255, 252, 251, 0.96), rgba(248, 235, 235, 0.9));
    box-shadow: 0 24px 60px rgba(74, 15, 25, 0.16);
}

.signup-registration-card > h1,
.signup-registration-card > .signup-subtitle {
    text-align: center;
}

.signup-registration-card > h1 {
    margin-bottom: 8px;
    color: var(--maroon-900);
}

.signup-registration-card > .signup-subtitle {
    max-width: 560px;
    margin: 0 auto 26px;
    line-height: 1.6;
}

.signup-registration-form,
.signup-verification-form {
    display: grid;
    gap: 20px;
}

.signup-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.signup-field {
    min-width: 0;
}

.signup-field-wide {
    grid-column: 1 / -1;
}

.signup-registration-card .signup-field label {
    margin: 0 0 7px;
    color: var(--maroon-800);
    font-size: 0.86rem;
    font-weight: 700;
}

.signup-registration-card .signup-field input {
    min-height: 50px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
}

.signup-registration-card .signup-field input::placeholder {
    color: #9b7d83;
}

.signup-password-control {
    position: relative;
}

.signup-registration-card .signup-password-control input {
    padding-right: 70px;
}

.signup-registration-card .signup-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: auto;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: rgba(122, 31, 47, 0.08);
    box-shadow: none;
    color: var(--maroon-700);
    font-size: 0.78rem;
    font-weight: 700;
    transform: translateY(-50%);
}

.signup-registration-card .signup-password-toggle:hover {
    background: rgba(122, 31, 47, 0.14);
    transform: translateY(-50%);
}

.signup-registration-card .signup-security-section {
    gap: 16px;
    margin: 2px 0 0;
    padding-top: 4px;
    border-top: 1px solid rgba(101, 22, 36, 0.1);
}

.signup-verification-method {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.signup-verification-method legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: var(--maroon-800);
    font-size: 0.9rem;
    font-weight: 700;
}

.signup-registration-card .signup-method-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    margin: 0;
    padding: 13px 14px;
    border: 1px solid rgba(101, 22, 36, 0.13);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
}

.signup-registration-card .signup-method-option.is-selected {
    border-color: rgba(122, 31, 47, 0.38);
    background: rgba(122, 31, 47, 0.07);
    box-shadow: 0 0 0 3px rgba(122, 31, 47, 0.06);
}

.signup-registration-card .signup-method-option.is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.signup-registration-card .signup-method-option input {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--maroon-700);
}

.signup-method-option span,
.signup-method-option strong,
.signup-method-option small {
    display: block;
}

.signup-method-option strong {
    color: var(--maroon-800);
    font-size: 0.9rem;
}

.signup-method-option small {
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}

.signup-method-option em {
    display: inline-block;
    margin-left: 4px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(122, 31, 47, 0.12);
    font-size: 0.63rem;
    font-style: normal;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.signup-contact-choice {
    display: grid;
}

.signup-contact-field[hidden] {
    display: none;
}

.signup-method-notice {
    margin: 8px 0 0;
    padding: 9px 11px;
    border-radius: 9px;
    background: rgba(122, 31, 47, 0.08);
    color: var(--maroon-700);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
}

.signup-registration-card .auth-message {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(151, 35, 54, 0.2);
    border-radius: 11px;
    background: rgba(255, 238, 239, 0.88);
    color: #7a1f2f;
    font-size: 0.88rem;
    line-height: 1.55;
    text-align: left;
}

.signup-registration-card .signup-submit-button {
    min-height: 52px;
    margin: 0;
    border-radius: 12px;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.signup-verification-summary {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px solid rgba(101, 22, 36, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-soft);
    text-align: center;
}

.signup-verification-summary strong {
    color: var(--maroon-800);
    overflow-wrap: anywhere;
}

@media (max-width: 680px) {
    .signup-hero { padding-inline: 18px; }
    .signup-container { width: min(100% - 24px, 1180px); padding-top: 16px; }
    .signup-registration-card { padding: 24px 18px; border-radius: 18px; }
    .signup-fields-grid { grid-template-columns: 1fr; gap: 16px; }
    .signup-field-wide { grid-column: auto; }
    .signup-verification-method { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
    .signup-security-section .auth-recaptcha { justify-content: flex-start; transform: scale(.88); transform-origin: left top; width: 304px; min-height: 69px; }
}

body.final-review-open { overflow: hidden; }
.final-review-modal[hidden] { display: none; }
.final-review-modal { position: fixed; inset: 0; z-index: 10000; background: linear-gradient(145deg, #fffafa 0%, #f7e9e9 100%); color: var(--text); }
.final-review-screen { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.final-review-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(20px, 5vw, 72px); border-bottom: 1px solid rgba(101, 22, 36, .12); background: rgba(255, 250, 250, .92); }
.final-review-topbar > div { display: flex; align-items: center; gap: 12px; }
.final-review-topbar > div > span:last-child { display: grid; gap: 2px; }
.final-review-topbar strong { color: var(--maroon-900); }
.final-review-topbar small { color: var(--text-soft); }
.final-review-brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--maroon-700); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.final-review-topbar button { padding: 10px 16px; border: 1px solid rgba(101, 22, 36, .18); border-radius: 999px; background: #fff; color: var(--maroon-800); cursor: pointer; font-weight: 700; }
.final-review-main { overflow: auto; padding: clamp(28px, 5vw, 64px) clamp(20px, 6vw, 90px); }
.final-review-heading { max-width: 780px; margin-bottom: 30px; }
.final-review-heading h2 { margin: 5px 0 10px; color: var(--maroon-900); font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.05; }
.final-review-heading > p:last-child { color: var(--text-soft); font-size: 1.05rem; line-height: 1.7; }
.final-review-layout { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.6fr); gap: 24px; align-items: start; }
.final-review-checklist, .final-review-answer-panel { padding: clamp(20px, 3vw, 30px); border: 1px solid rgba(101, 22, 36, .11); border-radius: 22px; background: rgba(255, 255, 255, .84); box-shadow: 0 16px 45px rgba(73, 25, 34, .08); }
.final-review-step { display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 9px; border-radius: 999px; background: rgba(122, 31, 47, .1); color: var(--maroon-800); font-size: .78rem; font-weight: 800; }
.final-review-checklist h3, .final-review-section-title h3 { margin: 12px 0 4px; color: var(--maroon-900); font-size: 1.25rem; }
.final-review-reminders { display: grid; gap: 12px; margin-top: 20px; }
.final-review-reminders p { margin: 0; padding: 12px 0; border-bottom: 1px solid rgba(101, 22, 36, .1); color: var(--maroon-800); line-height: 1.5; }
.final-review-section-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.final-review-section-title h3 { margin-top: 2px; }
.final-review-section-title p { margin: 3px 0 0; color: var(--text-soft); }
.final-review-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.final-review-values > div { display: grid; gap: 6px; min-width: 0; padding: 15px 16px; border: 1px solid rgba(101, 22, 36, .1); border-radius: 14px; background: #fff; }
.final-review-values strong { color: var(--text-soft); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.final-review-values span { overflow-wrap: anywhere; color: var(--maroon-900); font-weight: 700; line-height: 1.45; }
.final-review-values .final-review-image-row { grid-column: 1 / -1; }
.final-review-image-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 220px)); gap: 12px; }
.final-review-image-gallery figure { min-width: 0; margin: 0; overflow: hidden; border: 1px solid rgba(101, 22, 36, .12); border-radius: 13px; background: #fffafa; }
.final-review-image-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f2e7e7; }
.final-review-image-gallery figcaption { overflow: hidden; padding: 9px 11px; color: var(--maroon-800); font-size: .82rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.final-review-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(20px, 5vw, 72px); border-top: 1px solid rgba(101, 22, 36, .12); background: #fffafa; box-shadow: 0 -10px 30px rgba(73, 25, 34, .06); }
.final-review-actions p { display: grid; gap: 2px; margin: 0; }
.final-review-actions p span { color: var(--text-soft); font-size: .87rem; }
.final-review-actions > div { display: flex; gap: 10px; }
.final-review-actions button { min-height: 46px; padding: 11px 22px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 800; }
.final-review-actions [data-review-edit] { border: 1px solid rgba(101, 22, 36, .16); background: #fff; color: var(--maroon-800); }
.final-review-actions [data-review-submit] { background: var(--maroon-700); color: #fff; box-shadow: 0 10px 24px rgba(122, 31, 47, .22); }
@media (max-width: 800px) { .final-review-layout { grid-template-columns: 1fr; } .final-review-values { grid-template-columns: 1fr; } .final-review-actions { align-items: stretch; flex-direction: column; } .final-review-actions > div, .final-review-actions button { width: 100%; } }

.login-card input:focus,
.signup-card input:focus,
.lost-item-form input:focus,
.lost-item-form select:focus,
.details-form-card input:focus,
.details-form-card select:focus,
.details-form-card textarea:focus,
.search-bar input[type="text"]:focus {
    border-color: rgba(122, 31, 47, 0.45);
    box-shadow: 0 0 0 4px rgba(122, 31, 47, 0.1);
}

.lost-item-form label,
.details-form-card label,
.login-card label,
.signup-card label {
    display: block;
    margin-top: 16px;
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--maroon-800);
}

.lost-item-form input[type="file"] {
    padding: 10px 12px;
}

.item-fields {
    display: none;
    margin-top: 18px;
    padding: 8px 0 0;
}

#id_checklist,
.hidden-checklist {
    margin-top: 12px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(122, 31, 47, 0.05);
    border: 1px solid rgba(122, 31, 47, 0.1);
    color: var(--text);
}

.hidden-checklist {
    position: absolute;
    top: 100%;
    left: 0;
    width: min(320px, 100%);
    max-height: 240px;
    overflow-y: auto;
    box-shadow: var(--shadow-soft);
}

.hidden-checklist p {
    margin: 0 0 8px;
    font-weight: 600;
}

.hidden-checklist label {
    margin: 0 0 6px;
    font-weight: 500;
    color: var(--text-soft);
}

.form-status-message {
    display: none;
    margin: 20px 0 0;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    line-height: 1.6;
    font-weight: 600;
}

.upload-preview {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 10px 0 16px;
    padding: 12px;
    border: 1px solid rgba(101, 22, 36, 0.16);
    border-radius: 12px;
    background: rgba(255, 248, 247, 0.72);
}
.upload-preview[hidden] { display: none; }
.upload-preview img { width: 110px; height: 90px; border-radius: 9px; object-fit: cover; }
.upload-preview > div { display: grid; gap: 6px; min-width: 0; }
.upload-preview span { overflow-wrap: anywhere; color: var(--text-soft); font-size: .84rem; }
.remove-image-button { width: fit-content; padding: 8px 12px; border: 1px solid #a12b2b; border-radius: 8px; background: transparent; color: #8a1c1c; font-weight: 800; cursor: pointer; }
.id-photo-uploads { display: grid; gap: 16px; padding: 18px; border: 1px solid rgba(101, 22, 36, 0.16); border-radius: var(--radius-md); background: rgba(255, 248, 247, 0.6); }
.id-photo-uploads[hidden], #idBackUpload[hidden] { display: none; }
.id-photo-uploads h2 { margin: 0 0 4px; color: var(--maroon-800); font-size: 1.05rem; }
.id-photo-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.id-back-question { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0; padding: 0; border: 0; }
.id-back-question legend { width: 100%; margin-bottom: 3px; color: var(--maroon-800); font-weight: 750; }
.id-back-question label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.id-back-question .field-hint { width: 100%; margin: 0; }
@media (max-width: 700px) { .id-photo-upload-grid { grid-template-columns: 1fr; } }
.barangay-image-preview { grid-column: 1 / -1; width: 100%; margin: 0; text-align: left; }
.barangay-image-preview .remove-image-button { min-height: 38px; background: transparent; color: #8a1c1c; box-shadow: none; }

.matching-explanation { width: min(1180px, calc(100% - 48px)); margin: 22px auto 26px; padding: 20px 22px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 17px; border: 1px solid rgba(101,22,36,.15); border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(248,232,235,.65)); box-shadow: 0 12px 30px rgba(83,24,35,.09); }
.matching-copy > span { color: var(--maroon-700); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.matching-explanation h2 { margin: 3px 0 5px; color: var(--maroon-900); font-size: 1.08rem; }
.matching-explanation p { margin: 0; color: var(--text-soft); line-height: 1.5; }
.browse-notification-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 17px; border-radius: 12px; background: var(--maroon-700); color: white; font-size: .9rem; font-weight: 750; text-decoration: none; box-shadow: 0 9px 20px rgba(122,31,47,.18); transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.browse-notification-button:hover { transform: translateY(-2px); background: var(--maroon-800); box-shadow: 0 13px 25px rgba(122,31,47,.25); }
.browse-notification-button:focus-visible { outline: 3px solid rgba(122,31,47,.25); outline-offset: 3px; }
.browse-notification-button b { font-size: 1.15rem; transition: transform .18s ease; }
.browse-notification-button:hover b { transform: translateX(3px); }

.form-status-message.is-error,
.form-status-message.is-success {
    display: block;
    animation: status-pop 0.45s cubic-bezier(0.2, 1, 0.22, 1);
}

.form-status-message.is-error {
    background: rgba(167, 29, 42, 0.1);
    border: 1px solid rgba(167, 29, 42, 0.18);
    color: #8d1f2f;
}

.form-status-message.is-success {
    background: rgba(22, 120, 64, 0.1);
    border: 1px solid rgba(22, 120, 64, 0.18);
    color: #176d43;
}

.surrender-result-panel {
    margin-top: 26px;
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(101, 22, 36, 0.14);
    box-shadow: var(--shadow-soft);
    animation: success-card-rise 0.7s cubic-bezier(0.2, 1, 0.22, 1);
}

.surrender-result-panel.is-match {
    background: linear-gradient(135deg, rgba(22, 120, 64, 0.14), rgba(255, 255, 255, 0.8));
    border-color: rgba(22, 120, 64, 0.28);
}

.surrender-result-panel.is-warning {
    background: linear-gradient(135deg, rgba(184, 124, 23, 0.18), rgba(255, 255, 255, 0.82));
    border-color: rgba(184, 124, 23, 0.34);
}

.surrender-result-label {
    display: inline-flex;
    margin: 0 0 10px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.surrender-result-panel.is-match .surrender-result-label {
    background: rgba(22, 120, 64, 0.14);
    color: #176d43;
}

.surrender-result-panel.is-warning .surrender-result-label {
    background: rgba(184, 124, 23, 0.16);
    color: #8a5600;
}

.surrender-result-panel h2 {
    margin: 0;
    color: var(--maroon-800);
    font-size: 1.45rem;
    line-height: 1.25;
}

.surrender-result-instruction {
    margin: 12px 0 0;
    color: var(--text);
    line-height: 1.65;
}

.surrender-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(101, 22, 36, 0.12);
}

.surrender-code-box span {
    color: var(--text-soft);
    font-weight: 600;
}

.surrender-code-box strong {
    color: var(--maroon-800);
    font-size: 1.35rem;
    letter-spacing: 0.06em;
}

.surrender-result-actions {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.surrender-result-actions > * {
    width: 100%;
}

.surrender-post-link {
    position: relative;
    overflow: hidden;
}

.homepage-container {
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
    isolation: isolate;
}

.homepage-container::before,
.homepage-container::after {
    content: '';
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(4px);
    opacity: 0.72;
}

.homepage-container::before {
    top: 16%;
    left: -80px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(122, 31, 47, 0.16), rgba(122, 31, 47, 0));
    animation: homepage-float-left 9s ease-in-out infinite;
}

.homepage-container::after {
    right: -90px;
    bottom: 12%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 248, 247, 0.78), rgba(169, 71, 86, 0));
    animation: homepage-float-right 11s ease-in-out infinite;
}

.welcome-transition-page {
    display: grid;
    place-items: center;
    padding: 24px;
    overflow: hidden;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.85s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-transition-page.is-active {
    opacity: 1;
    transform: scale(1);
}

.welcome-transition-page.is-exiting {
    opacity: 0;
    transform: scale(1.015);
}

.welcome-transition-card {
    position: relative;
    width: min(760px, 100%);
    padding: clamp(36px, 6vw, 64px);
    border-radius: 32px;
    text-align: center;
    background: linear-gradient(135deg, rgba(74, 15, 25, 0.92), rgba(141, 45, 63, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 70px rgba(58, 14, 24, 0.26);
    color: #fff8f7;
    isolation: isolate;
    opacity: 0;
    transform: translateY(26px) scale(0.985);
    transition: opacity 0.9s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

.welcome-transition-page.is-active .welcome-transition-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.welcome-transition-page.is-exiting .welcome-transition-card {
    opacity: 0;
    transform: translateY(-18px) scale(0.99);
    box-shadow: 0 16px 38px rgba(58, 14, 24, 0.14);
}

.transition-label {
    margin: 0 0 18px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    color: rgba(255, 239, 236, 0.72);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

.welcome-transition-page.is-active .transition-label {
    opacity: 1;
    transform: translateY(0);
}

.transition-text {
    min-height: 2.5em;
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.15;
    text-wrap: balance;
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    filter: blur(8px);
    transition: opacity 0.75s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), filter 0.75s ease;
}

.transition-text.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.transition-subtext {
    max-width: 520px;
    margin: 20px auto 0;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 239, 236, 0.78);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    filter: blur(6px);
    transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.55s ease;
}

.transition-subtext.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.transition-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    z-index: -1;
    animation: orb-float 10s ease-in-out infinite;
    opacity: 0.72;
}

.transition-orb-one {
    top: -60px;
    left: -35px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 233, 230, 0.34), rgba(255, 233, 230, 0));
}

.transition-orb-two {
    right: -55px;
    bottom: -75px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 211, 216, 0.26), rgba(255, 211, 216, 0));
    animation-delay: -3s;
}

.auth-hero,
.form-hero,
.details-hero {
    background: linear-gradient(135deg, rgba(255, 251, 250, 0.5), rgba(244, 228, 229, 0.32));
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 34px 26px;
}

.form-hero {
    animation: form-hero-slide 0.8s cubic-bezier(0.2, 1, 0.22, 1);
}

.dashboard-card {
    width: min(720px, calc(100% - 48px));
    margin: 40px auto 0;
    padding: clamp(28px, 4vw, 42px);
    text-align: center;
    animation: homepage-card-enter 0.85s cubic-bezier(0.2, 1, 0.22, 1);
}

.dashboard-card h1 {
    color: var(--maroon-800);
    font-size: clamp(2rem, 3.5vw, 3rem);
}

.subtitle {
    margin-top: 12px;
    margin-bottom: 28px;
    font-size: 1rem;
}

.button-group {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.button-group a {
    text-decoration: none;
}

.dashboard-quick-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: -4px 0 22px;
    color: var(--text-soft);
}

.dashboard-quick-label {
    font-size: 0.86rem;
    color: var(--text-soft);
}

.dashboard-quick-link {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--maroon-700);
    text-decoration: none;
    position: relative;
}

.dashboard-quick-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.dashboard-quick-link:hover::after,
.dashboard-quick-link:focus-visible::after {
    opacity: 0.8;
}

.search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 160px);
    gap: 12px;
    align-items: stretch;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}

.categories a {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(122, 31, 47, 0.09);
    color: var(--maroon-700);
}

.homepage-footer {
    width: min(1180px, calc(100% - 48px));
    margin: auto auto 0;
    padding: 22px 0 8px;
    text-align: center;
    color: var(--text-soft);
}

.homepage-footer a {
    color: var(--maroon-700);
    margin: 0 10px;
}

.field-hint {
    margin: 8px 0 0;
    font-size: 0.88rem;
    color: var(--text-soft);
}

.form-actions {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .back-btn,
.form-actions .backbtn {
    width: 100%;
}

.browse-grid {
    width: min(1180px, calc(100% - 48px));
    margin: 10px auto 100px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.browse-tabs {
    width: min(1180px, calc(100% - 48px));
    margin: 24px auto 10px;
    display: flex;
    gap: 10px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: var(--shadow-soft);
}

.browse-tab { flex: 1; width: auto; background: transparent; color: var(--maroon-800); box-shadow: none; }
.browse-tab.is-active { background: linear-gradient(135deg, var(--maroon-700), var(--maroon-500)); color: white; box-shadow: 0 10px 22px rgba(122,31,47,.2); }

.report-section {
    margin: 0 0 22px;
    padding: 24px;
    border: 1px solid rgba(122, 31, 47, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.38);
}

.report-section legend {
    padding: 0 10px;
    color: var(--maroon-800);
    font-size: 1.2rem;
    font-weight: 700;
}

.private-report-section { background: rgba(122, 31, 47, 0.055); }
.privacy-note, .question-placeholder {
    margin: 20px 0 0;
    padding: 14px 16px;
    border-left: 4px solid var(--maroon-500);
    border-radius: 10px;
    background: rgba(122, 31, 47, 0.08);
    color: var(--text-soft);
    line-height: 1.55;
}

.claim-item-preview { display: grid; gap: 18px; margin-bottom: 26px; }
.claim-item-preview img, .claim-image-placeholder { width: 100%; height: 280px; border-radius: 18px; object-fit: cover; }
.claim-image-placeholder { display: grid; place-items: center; background: rgba(122, 31, 47, .08); color: var(--text-soft); }
.public-details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.public-details-list div { padding: 14px; border-radius: 12px; background: rgba(255,255,255,.5); }
.public-details-list dt { font-weight: 700; color: var(--maroon-800); }
.public-details-list dd { margin: 5px 0 0; color: var(--text-soft); }
.verification-intro { padding-top: 22px; border-top: 1px solid rgba(122,31,47,.14); }
.verification-question { margin-top: 18px; }
.claim-explanation-section { display: grid; gap: 9px; margin-top: 24px; padding: 20px; border: 1px solid rgba(122,31,47,.16); border-radius: 16px; background: rgba(122,31,47,.045); }
.claim-explanation-section[hidden] { display: none !important; }
.claim-explanation-section label { color: var(--text-strong); font-weight: 800; }
.claim-explanation-section textarea { box-sizing: border-box; width: 100%; min-height: 130px; resize: vertical; border: 1px solid rgba(122,31,47,.24); border-radius: 12px; background: var(--surface, #fff); color: var(--text-strong); font: inherit; line-height: 1.55; padding: 13px 14px; }
.claim-explanation-section textarea:focus { border-color: #7a1f2f; box-shadow: 0 0 0 3px rgba(122,31,47,.12); outline: none; }
.claim-explanation-section input[type="file"] { box-sizing: border-box; width: 100%; min-width: 0; }
.claim-supporting-image-preview { min-width: 0; grid-template-columns: 1fr; }
.claim-supporting-image-preview img { width: 100%; max-width: 100%; height: auto; max-height: 240px; object-fit: contain; }
.claim-supporting-image-preview .remove-image-button { width: fit-content; min-height: 38px; padding: 8px 12px; border: 1px solid #a12b2b; border-radius: 8px; background: transparent; color: #8a1c1c; box-shadow: none; }
.notifications-list { width: min(900px, calc(100% - 48px)); margin: 20px auto 100px; display: grid; gap: 16px; }
.notification-card { padding: 24px; border: 1px solid rgba(255,255,255,.34); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(255,251,250,.68), rgba(248,235,235,.52)); box-shadow: var(--shadow); }
.notification-card h2 { margin: 8px 0; color: var(--maroon-800); }
.possible-match-badge { display: inline-flex; padding: 7px 11px; border-radius: 999px; background: var(--maroon-700); color: white; font-size: .78rem; font-weight: 700; }
.notification-card .button-link { margin-top: 16px; width: auto; }

/* Category-based report questions */
.hero-eyebrow { display: inline-block; margin-bottom: 8px; color: var(--maroon-700); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.form-progress { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.form-progress span { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,.42); color: var(--text-soft); font-weight: 700; }
.form-progress span b { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: rgba(122,31,47,.12); color: var(--maroon-700); }
.form-progress .is-current { background: rgba(122,31,47,.09); color: var(--maroon-800); }
.question-grid, .dynamic-question-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.question-grid-wide { grid-column: 1 / -1; }
.field-group { display: flex; flex-direction: column; min-width: 0; }
.field-group label { margin-bottom: 8px; }
.dynamic-question-grid .question-placeholder { grid-column: 1 / -1; margin-top: 0; }
.privacy-banner, .pending-notice { display: flex; align-items: flex-start; gap: 13px; margin: 8px 0 20px; padding: 15px 16px; border-radius: 14px; background: rgba(122,31,47,.08); color: var(--text-soft); }
.pending-notice { margin-top: 22px; background: rgba(181,122,18,.10); }
.privacy-banner > span, .pending-notice > span { display: grid; flex: 0 0 36px; height: 36px; place-items: center; border-radius: 11px; background: rgba(255,255,255,.65); }
.privacy-banner strong, .pending-notice strong { color: var(--text); }
.privacy-banner p, .pending-notice p { margin: 4px 0 0; line-height: 1.5; }

/* Notification center */
.notification-hero { padding-bottom: 34px; }
.notification-toolbar { width: min(900px, calc(100% - 48px)); margin: 28px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.notification-toolbar h2 { margin: 0; color: var(--text); font-size: 1.2rem; }
.notification-toolbar p { margin: 5px 0 0; color: var(--text-soft); }
.notification-secondary-button { width: auto; padding: 10px 15px; border: 1px solid rgba(122,31,47,.2); background: rgba(255,255,255,.55); color: var(--maroon-700); box-shadow: none; }
.notification-secondary-button:disabled { cursor: default; opacity: .55; }
.notifications-list { gap: 14px; margin-top: 16px; }
.notification-card { position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 16px; padding: 21px 22px; overflow: hidden; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.notification-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: transparent; }
.notification-card.is-unread { border-color: rgba(122,31,47,.26); background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(249,232,235,.72)); }
.notification-card.is-unread::before { background: var(--maroon-600); }
.notification-card:hover { transform: translateY(-2px); border-color: rgba(122,31,47,.30); box-shadow: 0 18px 38px rgba(83,24,35,.14); }
.notification-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: rgba(122,31,47,.10); font-size: 1.25rem; }
.notification-content { min-width: 0; }
.notification-card h2 { margin: 9px 0 5px; font-size: 1.08rem; line-height: 1.35; }
.notification-card p { margin: 0; color: var(--text-soft); line-height: 1.55; }
.notification-meta, .notification-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.notification-meta { justify-content: space-between; }
.notification-kicker { color: var(--maroon-700); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.unread-indicator, .read-indicator { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: .76rem; font-weight: 700; }
.unread-indicator i { width: 8px; height: 8px; border-radius: 50%; background: var(--maroon-600); box-shadow: 0 0 0 4px rgba(122,31,47,.09); }
.notification-actions { margin-top: 15px; }
.notification-card .button-link { margin-top: 0; padding: 9px 14px; }
.notification-text-button { width: auto; padding: 8px 4px; border: 0; background: transparent; color: var(--maroon-700); box-shadow: none; font-weight: 700; }
.notification-empty { align-items: center; padding-block: 34px; }
.browse-item-photo { width: 100%; height: 190px; border-radius: 14px; object-fit: cover; margin-bottom: 8px; }
.browse-photo-placeholder { display: grid; place-items: center; background: rgba(122,31,47,.08); color: var(--text-soft); }
.browse-photo-frame, .public-photo-frame { position: relative; overflow: hidden; border-radius: 14px; background: #fff; }
.public-photo-frame { border-radius: 18px; }
.browse-photo-frame .browse-item-photo { display: block; margin: 0; transform: scale(1.04); }
.privacy-blurred-image { filter: blur(5px); opacity: .92; }
.browse-photo-frame span, .public-photo-frame span { position: absolute; right: 10px; bottom: 10px; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.82); color: var(--maroon-800); font-size: .7rem; font-weight: 750; letter-spacing: .02em; box-shadow: 0 8px 18px rgba(35,20,23,.12); }
.public-photo-frame img { display: block; width: 100%; transform: scale(1.04); }
.required-mark { margin-left: 6px; color: var(--maroon-700); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 700px) {
    .report-section { padding: 18px 14px; }
    .public-details-list { grid-template-columns: 1fr; }
    .notifications-list { width: calc(100% - 24px); }
    .notification-toolbar { width: calc(100% - 24px); align-items: flex-start; }
    .question-grid, .dynamic-question-grid { grid-template-columns: 1fr; }
    .question-grid-wide { grid-column: auto; }
    .form-progress { grid-template-columns: 1fr; }
    .notification-card { grid-template-columns: 40px minmax(0,1fr); gap: 12px; padding: 18px 15px; }
    .notification-icon { width: 40px; height: 40px; border-radius: 12px; }
    .matching-explanation { width: calc(100% - 24px); grid-template-columns: 1fr; padding: 17px; }
    .browse-notification-button { grid-column: 1 / -1; width: 100%; }
}

.browse-search-panel {
    width: min(1180px, calc(100% - 48px));
    margin: 12px auto 0;
}

.browse-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(180px, 0.9fr) minmax(120px, 180px);
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 251, 250, 0.58), rgba(248, 235, 235, 0.42));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.browse-search-form input,
.browse-search-form select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(101, 22, 36, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
}

.LostPosted,
.FoundPosted {
    padding: 20px;
    text-align: center;
}

.browse-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.browse-column-heading {
    display: grid;
    gap: 4px;
    min-height: 76px;
    padding: 0 2px 12px;
    border-bottom: 1px solid rgba(101, 22, 36, 0.14);
}

.browse-column-heading h2 {
    margin: 0;
    color: var(--primary);
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    line-height: 1.15;
}

.browse-column-heading p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.browse-column-list {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 18px;
}

.browse-column-empty {
    display: grid;
    min-height: 140px;
    place-items: center;
    padding: 20px;
    border: 1px dashed rgba(101, 22, 36, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.46);
    text-align: center;
}

.browse-column-empty p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.browse-result-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    height: 100%;
}

.browse-result-card h3 {
    min-height: 1.35em;
    margin: 0 0 4px;
    color: var(--text);
    font-size: 1.2rem;
    line-height: 1.25;
}

.browse-result-card button,
.browse-result-card p,
.browse-result-card img {
    width: 100%;
}

.browse-result-card p {
    margin: 0;
    line-height: 1.45;
}

.browse-result-card button {
    margin-top: auto;
}

.browse-result-card button + p {
    min-height: 42px;
}

.browse-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin: 0 0 6px;
}

.browse-status-text {
    margin: 0;
    color: var(--text) !important;
}

.browse-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: auto;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.browse-empty-state {
    grid-column: 1 / -1;
    text-align: center;
}

.LostPosted img,
.FoundPosted img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    margin: 14px 0 16px;
    box-shadow: var(--shadow-soft);
    filter: blur(7px);
    transform: scale(1.08);
}

.item-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    margin: 14px 0 16px;
    box-shadow: var(--shadow-soft);
    filter: none;
}

.browse-result-card .browse-photo-frame img {
    margin: 0;
    border-radius: 14px;
    box-shadow: none;
    filter: blur(5px);
}

.LostPosted p i,
.FoundPosted p i {
    color: var(--text-soft);
}

.preview-container {
    padding: 80px 0;
    text-align: center;
}

.item-card {
    width: min(380px, 100%);
    margin: 24px auto 0;
    padding: 24px;
}

.back-btn,
.backbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    background: rgba(255, 248, 247, 0.88);
    color: var(--maroon-800);
    border: 1px solid rgba(101, 22, 36, 0.14);
    box-shadow: var(--shadow-soft);
}

.page-back-link {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto 40px;
}

.claims-list {
    width: min(980px, calc(100% - 48px));
    margin: 10px auto 100px;
    display: grid;
    gap: 20px;
}

.claim-summary-card,
.claim-card {
    background: linear-gradient(180deg, rgba(255, 251, 250, 0.64), rgba(248, 235, 235, 0.46));
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.claim-summary-card {
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: success-card-rise 0.72s cubic-bezier(0.2, 1, 0.22, 1);
}

.claim-summary-card::before {
    content: '';
    position: absolute;
    inset: -40% auto auto -18%;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(169, 71, 86, 0.18), rgba(169, 71, 86, 0));
    pointer-events: none;
    animation: celebration-orb 3.8s ease-in-out infinite;
}

.claim-success-mark {
    margin: 0 0 10px;
    font-size: 2.5rem;
    animation: success-check-bounce 0.75s cubic-bezier(0.2, 1.35, 0.32, 1);
}

.claim-card {
    padding: 26px;
}

.claim-card h2 {
    margin: 4px 0 0;
    color: var(--maroon-800);
}

.claim-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.claim-label {
    margin: 0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-soft);
}

.claim-meta,
.claim-message,
.claim-instruction,
.claim-approved-note {
    color: var(--text-soft);
    line-height: 1.7;
}

.claim-meta {
    margin: 10px 0 0;
}

.claim-highlight {
    font-size: 1.05rem;
    color: var(--text);
}

.claim-instruction-box {
    margin-top: 20px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(122, 31, 47, 0.07);
    border: 1px solid rgba(122, 31, 47, 0.12);
    animation: success-detail-rise 0.72s ease 0.22s both;
}

.claim-ticket-box {
    display: grid;
    gap: 14px;
    margin-top: 22px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(122, 31, 47, 0.12);
    animation: success-detail-rise 0.72s ease 0.14s both;
}

.claim-summary-canvas {
    width: 100%;
    max-width: 720px;
    height: auto;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid rgba(122, 31, 47, 0.14);
    box-shadow: var(--shadow-soft);
    background: #fff8f7;
}

.download-claim-button {
    width: min(100%, 320px);
    margin: 0 auto;
}

.claim-instruction-box p:last-child,
.claim-instruction,
.claim-approved-note,
.claim-message {
    margin-bottom: 0;
}

.claim-approved-note {
    margin-top: 16px;
    font-weight: 700;
    color: var(--maroon-700);
}

.claim-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.claim-actions > * {
    flex: 1 1 220px;
}

.card-actions-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.delete-button {
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid rgba(122, 31, 47, 0.18);
    border-radius: 999px;
    background: rgba(122, 31, 47, 0.08);
    color: var(--maroon-800);
    box-shadow: none;
}

.delete-button:hover {
    background: rgba(122, 31, 47, 0.14);
}

.post-preview-card {
    margin-top: 20px;
    animation: success-detail-rise 0.72s ease 0.16s both;
}

.post-preview-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}

.post-preview-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 220px;
    margin-bottom: 16px;
    border: 1px solid rgba(122, 31, 47, 0.12);
    border-radius: 18px;
    background: rgba(122, 31, 47, 0.07);
    color: var(--text-soft);
    font-weight: 700;
}

.post-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    margin: 4px 0 14px;
    box-shadow: var(--shadow-soft);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
}

.status-pending {
    background: rgba(184, 124, 23, 0.14);
    color: #9a5e00;
}

.status-approved {
    background: rgba(27, 129, 72, 0.14);
    color: #17663b;
}

.status-claimed {
    background: rgba(72, 102, 132, 0.14);
    color: #31516e;
}

.post-status-pending-not-ready-to-claim {
    background: rgba(182, 42, 42, 0.14);
    color: #a12828 !important;
}

.post-status-at-barangay-ready-for-claiming {
    background: rgba(27, 129, 72, 0.14);
    color: #17663b !important;
}

.admin-claim-form {
    display: grid;
    gap: 10px;
}

@media (max-width: 900px) {
    .browse-topbar,
    .homepage-header {
        flex-direction: column;
        align-items: stretch;
    }

    .browse-brand,
    .logo,
    .user-profile {
        text-align: center;
        justify-content: center;
    }

    .browse-nav {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .landing-page,
    .auth-page,
    .form-page,
    .browse-page,
    .details-page,
    .homepage-container,
    .welcome-transition-page {
        min-height: auto;
    }

    .landing-page,
    .auth-page,
    .form-page,
    .browse-page,
    .details-page {
        padding: 16px;
    }

    .browse-topbar,
    .homepage-header,
    .browse-hero,
    .landing-main,
    .login-container,
    .signup-container,
    .form-container,
    .details-form-wrap,
    .preview-container,
    .homepage-footer,
    .browse-search-panel,
    .browse-grid,
    .claims-list,
    .page-back-link,
    .dashboard-card {
        width: min(100%, calc(100% - 16px));
    }

    .browse-topbar,
    .homepage-header,
    .auth-hero,
    .form-hero,
    .details-hero,
    .dashboard-card,
    .login-card,
    .signup-card,
    .lost-item-form,
    .details-form-card,
    .LostPosted,
    .FoundPosted,
    .item-card {
        padding: 22px 18px;
    }

    .search-bar {
        grid-template-columns: 1fr;
    }

    .browse-search-form {
        grid-template-columns: 1fr;
    }

    .browse-grid {
        grid-template-columns: 1fr;
    }

    .browse-column-heading {
        min-height: auto;
    }

    .button-group,
    .form-actions,
    .landing-actions {
        width: 100%;
    }

    .dashboard-quick-links {
        flex-direction: column;
        gap: 8px;
    }

    .landing-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .browse-nav-link,
    .logout-link {
        width: 100%;
    }

    .homepage-footer {
        display: grid;
        gap: 10px;
        padding-bottom: 24px;
    }

    .homepage-footer a {
        margin: 0;
    }

    .LostPosted img,
    .FoundPosted img,
    .item-card img {
        height: 180px;
    }

    .landing-primary-btn,
    .landing-secondary-btn,
    .button-link,
    .main-btn,
    .search-btn,
    .login-card button,
    .signup-card button,
    .lost-item-form button,
    .details-form-card button,
    .LostPosted button,
    .FoundPosted button,
    .back-btn,
    .backbtn {
        width: 100%;
        min-height: 50px;
        padding-inline: 16px;
    }
}

/* Phone-first finishing layer: compact screens, touch targets, and less scrolling. */
@media (max-width: 700px) {
    html { font-size: 15px; }
    body { overflow-x: hidden; }
    img, canvas, video { max-width: 100%; height: auto; }
    input, select, textarea, button { max-width: 100%; font-size: 16px; }
    button, a, input, select { touch-action: manipulation; }

    .browse-topbar,
    .form-topbar {
        position: static;
        padding: 14px 16px;
        gap: 12px;
    }

    .browse-brand { font-size: .92rem; line-height: 1.25; }
    .browse-nav {
        display: flex;
        width: 100%;
        gap: 8px;
        padding: 2px 0 5px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .browse-nav::-webkit-scrollbar { display: none; }
    .browse-nav-link { flex: 0 0 auto; min-height: 42px; padding: 10px 13px; scroll-snap-align: start; }
    .browse-hero, .form-hero { padding: 30px 18px; }
    .browse-hero h1, .form-hero h1 { font-size: clamp(1.85rem, 9vw, 2.5rem); }
    .browse-search-panel, .form-container { width: calc(100% - 20px); margin-inline: auto; }
    .browse-search-form { grid-template-columns: 1fr; }
    .browse-grid { grid-template-columns: 1fr; gap: 14px; }
    .lost-item-form, .login-card, .signup-card { padding: 20px 16px; border-radius: 18px; }
    .lost-item-form { gap: 14px; }
    .form-actions, .claim-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
    .form-actions > *, .claim-actions > * { width: 100%; min-height: 46px; }

    .resident-header { position: sticky; top: 0; padding: 10px 12px; gap: 8px; }
    .resident-brand-mark { width: 40px; height: 40px; }
    .resident-brand div { display: none; }
    .resident-nav { order: 3; grid-column: 1 / -1; width: 100%; gap: 6px; padding: 0 0 2px; overflow-x: auto; scrollbar-width: none; }
    .resident-nav::-webkit-scrollbar { display: none; }
    .resident-nav a { flex: 0 0 auto; min-height: 40px; padding: 9px 12px; white-space: nowrap; }
    .resident-hero { min-height: auto; padding: 38px 16px; gap: 22px; }
    .resident-hero h1 { font-size: clamp(2.1rem, 11vw, 3rem); }
    .resident-hero-copy > p:not(.resident-eyebrow) { margin: 14px 0 18px; line-height: 1.55; }
    .resident-help-card { display: none; }
    .resident-section { padding-block: 38px; }
    .resident-service-grid { gap: 12px; }
    .resident-service-card { min-height: 0; padding: 18px; }
    .resident-service-card div > p:last-child { margin-bottom: 14px; }
    .resident-footer { padding: 30px 16px; }

    .barangay-shell { display: block; min-height: 100dvh; }
    .barangay-sidebar {
        position: sticky;
        top: 0;
        z-index: 30;
        display: grid;
        grid-template-columns: 1fr auto;
        padding: 10px 12px 8px;
        gap: 8px 12px;
    }
    .barangay-seal { flex-basis: 40px; height: 40px; font-size: .6rem; }
    .barangay-brand h1 { font-size: .95rem; }
    .barangay-brand .barangay-kicker, .barangay-help { display: none; }
    .barangay-lost-found-link { align-self: center; padding: 9px 11px; font-size: 0; }
    .barangay-lost-found-link::after { content: 'Main'; font-size: .78rem; }
    .barangay-sidebar-nav {
        grid-column: 1 / -1;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .barangay-sidebar-nav::-webkit-scrollbar { display: none; }
    .barangay-nav-link { flex: 0 0 auto; min-height: 40px; padding: 9px 12px; white-space: nowrap; }
    .barangay-main { padding: 10px 10px 90px; }
    .barangay-topbar { padding: 16px; margin-bottom: 10px; }
    .barangay-topbar-copy { display: none; }
    .barangay-topbar h2 { font-size: 1.28rem; }
    .barangay-secondary-link { width: auto; min-height: 42px; padding: 10px 12px; }
    .barangay-dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .barangay-stat-card { display: grid; justify-items: center; gap: 3px; padding: 12px 5px; text-align: center; }
    .barangay-card-icon { width: 34px; height: 34px; font-size: .56rem; }
    .barangay-stat-card p { font-size: .68rem; line-height: 1.15; }
    .barangay-stat-card strong { font-size: 1.2rem; }
    .barangay-overview-actions { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
    .barangay-overview-actions article { padding: 17px; }
    .barangay-overview-actions article > p:not(.barangay-kicker) { margin-bottom: 12px; line-height: 1.45; }
    .barangay-request-workspace, .barangay-card { padding: 16px 12px; }
    .barangay-section-heading { gap: 8px; margin-bottom: 14px; }
    .barangay-step-badge { display: none; }
    .barangay-form { gap: 0; }
    .barangay-form-section, .barangay-form-section + .barangay-form-section {
        margin: 0 0 9px;
        padding: 0;
        border: 1px solid rgba(101,22,36,.13);
        border-radius: 14px;
        background: rgba(255,255,255,.42);
        overflow: hidden;
    }
    .barangay-form-section legend {
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 10px 38px 10px 11px;
        background: rgba(122,31,47,.06);
        cursor: pointer;
        position: relative;
    }
    .barangay-form-section legend::after {
        content: '−';
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.25rem;
    }
    .barangay-form-section.is-collapsed legend::after { content: '+'; }
    .barangay-form-section.is-collapsed > :not(legend) { display: none !important; }
    .barangay-form-section > .barangay-field,
    .barangay-form-section > .barangay-form-grid,
    .barangay-form-section > .barangay-payment-notice,
    .barangay-form-section > .barangay-gcash-sample { margin: 12px; }
    .barangay-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 9px; }
    .barangay-field-wide, .barangay-checkbox { grid-column: 1 / -1; }
    .barangay-field label, .barangay-upload-group-label { font-size: .78rem; }
    .barangay-form input, .barangay-form select, .barangay-form textarea { min-height: 44px; padding: 10px; }
    .barangay-form textarea { min-height: 76px; }
    .barangay-id-upload-grid { grid-template-columns: 1fr; gap: 9px; }
    .barangay-upload-template { min-height: 112px; padding: 12px; }
    .barangay-form-actions { position: sticky; bottom: 8px; z-index: 15; padding: 10px; border-radius: 14px; background: rgba(255,248,247,.96); box-shadow: 0 8px 28px rgba(74,15,25,.2); }
    .barangay-form-actions p { display: none; }
    .barangay-form-actions button { width: 100%; min-height: 48px; }
    .barangay-history-card, .barangay-announcement-card { padding: 15px; }
    .barangay-modal { align-items: flex-end; padding: 0; }
    .barangay-modal-card { width: 100%; max-height: 88dvh; padding: 18px 14px; border-radius: 22px 22px 0 0; overflow-y: auto; }
}

@media (max-width: 390px) {
    .barangay-form-grid { grid-template-columns: 1fr; }
    .barangay-field { grid-column: 1 / -1; }
    .barangay-topbar { align-items: flex-start; }
    .barangay-secondary-link { font-size: .76rem; }
}

/* Resident-only homepage */
.resident-home-body { min-height: 100vh; background: #f7f5f2; color: #27211f; }
.resident-home { min-height: 100vh; }
.resident-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; min-height: 82px; padding: 14px max(24px, calc((100vw - 1240px) / 2)); background: rgba(255,255,255,.95); border-bottom: 1px solid #e6ded9; box-shadow: 0 3px 18px rgba(59,35,31,.05); backdrop-filter: blur(14px); }
.resident-brand { display: flex; align-items: center; gap: 12px; color: #571626; text-decoration: none; }
.resident-brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #6d1c2e; color: #fff; font-size: .72rem; font-weight: 900; letter-spacing: .06em; box-shadow: 0 8px 18px rgba(109,28,46,.2); }
.resident-brand strong, .resident-brand small { display: block; white-space: nowrap; }
.resident-brand strong { font-size: .98rem; }
.resident-brand small { margin-top: 2px; color: #776a66; font-size: .7rem; font-weight: 600; }
.resident-nav { display: flex; justify-content: center; align-items: center; gap: 4px; }
.resident-nav a { padding: 10px 12px; border-radius: 8px; color: #5f5551; text-decoration: none; font-size: .84rem; font-weight: 700; }
.resident-nav a:hover, .resident-nav a:focus-visible, .resident-nav a.is-current { background: #f7ecee; color: #6d1c2e; }
.resident-account { display: flex; align-items: center; gap: 9px; }
.resident-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #f1e3e5; color: #6d1c2e; font-weight: 800; }
.resident-account-copy small, .resident-account-copy strong { display: block; line-height: 1.2; }
.resident-account-copy small { color: #857873; font-size: .66rem; }
.resident-account-copy strong { font-size: .82rem; }
.resident-account > a { margin-left: 5px; color: #6d1c2e; font-size: .78rem; font-weight: 800; }
.resident-hero { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(290px,.75fr); gap: clamp(28px,5vw,72px); align-items: center; min-height: 570px; padding: clamp(64px,8vw,104px) max(24px, calc((100vw - 1180px) / 2)); background: radial-gradient(circle at 85% 15%, rgba(173,102,111,.18), transparent 28%), linear-gradient(135deg,#fff 0%,#faf5f3 58%,#f3e7e6 100%); border-bottom: 1px solid #e8ded9; }
.resident-hero-copy { max-width: 750px; }
.resident-eyebrow, .resident-card-label { margin: 0 0 10px; color: #8c3547; font-size: .74rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.resident-hero h1 { max-width: 720px; margin: 0; color: #42141e; font-size: clamp(2.7rem,5.2vw,4.9rem); line-height: 1.01; letter-spacing: -.045em; text-wrap: balance; }
.resident-hero-copy > p:not(.resident-eyebrow) { max-width: 650px; margin: 22px 0 28px; color: #655955; font-size: 1.06rem; line-height: 1.75; }
.resident-search { max-width: 680px; padding: 16px; border: 1px solid #e1d5d1; border-radius: 16px; background: #fff; box-shadow: 0 15px 40px rgba(76,40,34,.09); }
.resident-search > label { display: block; margin-bottom: 9px; color: #4b3e3a; font-size: .78rem; font-weight: 800; }
.resident-search-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.resident-search-row input { min-width: 0; min-height: 49px; padding: 0 14px; border: 1px solid #d9ceca; border-radius: 9px; background: #fbfaf9; color: #2f2825; }
.resident-search-row button, .resident-button-primary { border-color: #6d1c2e; background: #6d1c2e; color: #fff; }
.resident-search-row button { min-height: 49px; padding: 0 20px; border-radius: 9px; }
.resident-search small { display: block; margin-top: 8px; color: #8a7c77; font-size: .72rem; }
.resident-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.resident-button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 18px; border: 1px solid; border-radius: 9px; text-decoration: none; font-size: .86rem; font-weight: 800; }
.resident-button-secondary { border-color: #bca9a5; background: transparent; color: #571626; }
.resident-help-card { position: relative; padding: 34px; overflow: hidden; border-radius: 24px; background: linear-gradient(150deg,#541322,#821f35); color: #fff; box-shadow: 0 28px 60px rgba(84,19,34,.2); }
.resident-help-card::after { content: ''; position: absolute; right: -50px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.07); }
.resident-help-card .resident-eyebrow { color: #efc9ce; }
.resident-help-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 38px; border-radius: 14px; background: rgba(255,255,255,.14); font-size: 1.25rem; font-weight: 900; }
.resident-help-card h2 { margin: 0; font-size: 1.65rem; line-height: 1.2; }
.resident-help-card > p:not(.resident-eyebrow) { margin: 14px 0 24px; color: #f0dfe2; line-height: 1.65; }
.resident-help-card a { color: #fff; font-weight: 800; text-decoration: none; }
.resident-section, .resident-dashboard-row { width: min(1180px,calc(100% - 48px)); margin: 0 auto; }
.resident-section { padding: 78px 0; }
.resident-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 28px; }
.resident-section-heading h2, .resident-personal-panel h2, .resident-process-panel h2 { margin: 0; color: #42141e; font-size: clamp(1.7rem,3vw,2.35rem); letter-spacing: -.025em; }
.resident-section-heading > p { max-width: 480px; margin: 0; color: #756965; line-height: 1.65; }
.resident-service-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.resident-service-card { display: flex; flex-direction: column; min-height: 310px; padding: 24px; border: 1px solid #e4dad5; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(67,35,30,.045); transition: transform .2s ease, box-shadow .2s ease; }
.resident-service-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(67,35,30,.09); }
.resident-service-number { align-self: flex-start; margin-bottom: 46px; padding: 7px 9px; border-radius: 7px; background: #f4e7e9; color: #7b2437; font-size: .72rem; font-weight: 900; }
.resident-service-card h3 { margin: 0; color: #362b28; font-size: 1.22rem; line-height: 1.3; }
.resident-service-card div > p:last-child { color: #776b67; font-size: .86rem; line-height: 1.6; }
.resident-service-card > a { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid #eee6e2; color: #6d1c2e; text-decoration: none; font-size: .82rem; font-weight: 900; }
.resident-dashboard-row { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; padding-bottom: 80px; }
.resident-personal-panel, .resident-process-panel { padding: 30px; border: 1px solid #e3d9d4; border-radius: 18px; background: #fff; }
.resident-section-heading.compact { margin-bottom: 22px; }
.resident-shortcut-grid { display: grid; gap: 10px; }
.resident-shortcut-grid a { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid #ebe2de; border-radius: 11px; background: #fbf9f8; color: #3f322e; text-decoration: none; }
.resident-shortcut-grid a:hover { border-color: #cbaeb4; background: #faf2f3; }
.resident-shortcut-grid strong, .resident-shortcut-grid small { display: block; }
.resident-shortcut-grid small { margin-top: 4px; color: #827570; }
.resident-shortcut-grid b { color: #7b2437; }
.resident-process-panel { background: #f1e5e4; }
.resident-process-panel ol { display: grid; gap: 20px; margin: 25px 0 0; padding: 0; list-style: none; }
.resident-process-panel li { display: flex; gap: 13px; }
.resident-process-panel li > span { flex: 0 0 30px; display: grid; place-items: center; height: 30px; border-radius: 50%; background: #6d1c2e; color: #fff; font-size: .75rem; font-weight: 900; }
.resident-process-panel li strong, .resident-process-panel li small { display: block; }
.resident-process-panel li small { margin-top: 4px; color: #776864; line-height: 1.45; }
.resident-footer { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 50px; padding: 46px max(24px,calc((100vw - 1180px) / 2)); background: #361019; color: #fff; }
.resident-footer strong { font-size: .9rem; }
.resident-footer p { max-width: 480px; margin: 8px 0 0; color: #d9c7ca; font-size: .8rem; line-height: 1.6; }
.resident-footer a { color: #fff; }
.resident-footer nav { display: grid; align-content: start; gap: 9px; }
.resident-footer nav a { font-size: .8rem; text-decoration: none; }
@media (max-width: 1050px) { .resident-header { grid-template-columns: 1fr auto; } .resident-nav { grid-column: 1/-1; grid-row: 2; justify-content: flex-start; overflow-x: auto; } .resident-service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 780px) { .resident-header { position: static; gap: 14px; padding: 14px 18px; } .resident-account-copy { display: none; } .resident-nav { padding-bottom: 2px; } .resident-nav a { white-space: nowrap; } .resident-hero { grid-template-columns: 1fr; padding: 56px 24px; } .resident-help-card { max-width: 520px; } .resident-section-heading { align-items: flex-start; flex-direction: column; gap: 12px; } .resident-dashboard-row { grid-template-columns: 1fr; } .resident-footer { grid-template-columns: 1fr; gap: 26px; } }
@media (max-width: 540px) { .resident-brand small { white-space: normal; } .resident-account { gap: 4px; } .resident-account > a { font-size: .7rem; } .resident-hero h1 { font-size: 2.5rem; } .resident-search-row { grid-template-columns: 1fr; } .resident-hero-actions .resident-button { width: 100%; } .resident-service-grid { grid-template-columns: 1fr; } .resident-service-card { min-height: 270px; } .resident-section, .resident-dashboard-row { width: min(100% - 32px,1180px); } }

/* Barangay document service workspace */
.barangay-portal-screen[hidden] { display: none !important; }
.barangay-portal-screen.is-active { animation: barangay-screen-in .28s ease both; }
.barangay-overview-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.barangay-overview-actions article { padding: 24px; border: 1px solid rgba(101,22,36,.14); border-radius: 18px; background: rgba(255,248,247,.72); box-shadow: var(--shadow-soft); }
.barangay-overview-actions h3 { margin: 0 0 8px; color: var(--maroon-900); font-size: 1.2rem; }
.barangay-overview-actions article > p:not(.barangay-kicker) { margin: 0 0 18px; color: var(--text-soft); line-height: 1.6; }
.barangay-overview-actions a { display: inline-flex; min-height: 42px; align-items: center; padding: 10px 14px; border-radius: 10px; background: linear-gradient(135deg,var(--maroon-700),var(--maroon-500)); color: #fff; font-weight: 800; text-decoration: none; }
@keyframes barangay-screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.barangay-portal-body { scroll-behavior: smooth; }
.barangay-brand { display: flex; align-items: center; gap: 12px; }
.barangay-seal { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(255,255,255,.12); font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.barangay-brand h1 { font-size: 1.18rem; }
.barangay-help { display: grid; gap: 6px; margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.08); font-size: .86rem; line-height: 1.45; }
.barangay-help span { opacity: .76; }
.barangay-nav-link.is-active { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.28); }
.barangay-topbar-copy, .barangay-section-heading p { margin: 7px 0 0; color: var(--text-soft); line-height: 1.5; }
.barangay-step-badge { padding: 8px 12px; border-radius: 999px; background: var(--rose-100); color: var(--maroon-800); font-size: .8rem; font-weight: 800; white-space: nowrap; }
.barangay-request-workspace { padding: clamp(20px, 3vw, 32px); }
.barangay-form-section { margin: 0; padding: 0 0 26px; border: 0; }
.barangay-form-section + .barangay-form-section { padding-top: 26px; border-top: 1px solid rgba(101,22,36,.12); }
.barangay-form-section legend { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 18px; color: var(--maroon-900); font-size: 1rem; font-weight: 850; }
.barangay-form-section legend span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--maroon-700); color: white; font-size: .78rem; }
.barangay-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.barangay-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.barangay-field-wide { grid-column: 1 / -1; }
.barangay-field small { color: var(--text-soft); font-size: .78rem; }
.barangay-upload-group-label { color: var(--maroon-800); font-size: .9rem; font-weight: 800; }
.barangay-id-upload-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.barangay-upload-template { display: grid !important; gap: 9px; min-height: 190px; padding: 16px; border: 2px dashed rgba(101,22,36,.25); border-radius: 14px; background: rgba(255,248,247,.72); cursor: pointer; text-align: center; }
.barangay-upload-template > span { color: var(--maroon-800); }
.barangay-upload-template > strong { display: grid; place-items: center; min-height: 72px; color: var(--text-soft); letter-spacing: .08em; }
.barangay-upload-template input { min-height: 44px; background: #fff; }
.barangay-back-id-option { display: flex !important; align-items: center; gap: 9px; width: fit-content; margin-top: 10px; font-weight: 700 !important; }
.barangay-back-id-option input { width: 18px; min-height: 18px; }
.barangay-field[hidden] { display: none !important; }
.barangay-inline-fields { display: grid; grid-template-columns: minmax(0,1fr) 130px; gap: 8px; }
.required-mark { color: #b42318; }
.optional-mark { color: var(--text-soft); font-size: .74rem; font-weight: 600; }
.barangay-form input:focus, .barangay-form select:focus, .barangay-form textarea:focus, .barangay-admin-toolbar input:focus, .barangay-admin-toolbar select:focus { outline: 3px solid rgba(169,71,86,.18); border-color: var(--maroon-500); }
.barangay-form input[readonly] { background: rgba(245,237,236,.85); color: var(--text-soft); }
.barangay-checkbox { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid rgba(101,22,36,.14); border-radius: 12px; background: rgba(255,248,247,.7); }
.barangay-checkbox input { width: 19px; min-height: 19px; margin-top: 2px; }
.barangay-checkbox b { color: #b42318; }
#pickupPolicyNotice .barangay-checkbox { align-items: center; }
#pickupPolicyAcknowledged { flex: 0 0 19px; width: 19px; height: 19px; min-height: 19px; margin: 0; padding: 0; }
.barangay-payment-notice { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 16px; border: 1px solid #e9c46a; border-radius: 14px; background: #fff9e8; color: #6c5100; }
.barangay-payment-notice p { margin: 4px 0 0; }
.barangay-payment-notice > span { padding: 8px 10px; border-radius: 8px; background: #fff; font-weight: 800; white-space: nowrap; }
.barangay-gcash-sample { display: grid; grid-template-columns: minmax(160px, 240px) minmax(220px,1fr) minmax(220px,.9fr); align-items: center; gap: 20px; margin-top: 16px; padding: 16px; border: 1px solid #9bc8ff; border-radius: 14px; background: #edf7ff; }
.barangay-gcash-sample[hidden] { display: none; }
.barangay-gcash-logo { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #087cff; color: #fff; font-size: 1.5rem; font-weight: 900; }
.barangay-gcash-sample strong { color: #0756a3; }
.barangay-gcash-sample p { margin: 4px 0 6px; color: #41647f; font-size: .85rem; }
.barangay-gcash-sample a { color: #0756a3; font-size: .84rem; font-weight: 800; }
.barangay-gcash-qr-frame { background: #fff; border: 1px solid rgba(8,124,255,.18); border-radius: 8px; padding: 10px; }
.barangay-gcash-qr-frame img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.barangay-gcash-qr-frame .barangay-gcash-download { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 6px; background: #9f2f4a; color: #fff; text-align: center; text-decoration: none; }
.barangay-gcash-qr-frame .barangay-gcash-download:hover { background: #7c243a; }
.barangay-gcash-qr-frame .barangay-gcash-download:focus-visible { outline: 2px solid #0756a3; outline-offset: 3px; }
.barangay-gcash-account { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.barangay-form .barangay-gcash-sample .barangay-gcash-copy { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; min-width: 32px; min-height: 32px; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #41647f; box-shadow: none; vertical-align: middle; }
.barangay-form .barangay-gcash-sample .barangay-gcash-copy:hover { background: #dcecf9; color: #0756a3; }
.barangay-form .barangay-gcash-sample .barangay-gcash-copy:focus-visible { outline: 2px solid #0756a3; outline-offset: 2px; }
.barangay-gcash-fields { display: grid; gap: 12px; }
.barangay-inline-upload { display: flex; align-items: center; gap: 10px; }
.barangay-inline-upload input { min-width: 0; }
.barangay-gcash-sample button { margin: 0; background: #9f2f4a; white-space: nowrap; }
.barangay-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 22px; border-top: 1px solid rgba(101,22,36,.12); }
.barangay-form-actions p { margin: 0; color: var(--text-soft); font-size: .87rem; }
.barangay-form-actions button { flex: 0 0 auto; min-width: 220px; }
.barangay-empty-state { display: grid; place-items: center; gap: 5px; min-height: 140px; padding: 28px; border: 1px dashed rgba(101,22,36,.22); border-radius: 14px; text-align: center; }
.barangay-empty-state strong { color: var(--maroon-800); }
.barangay-public-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.barangay-public-info article { padding: 20px; border: 1px solid rgba(101,22,36,.12); border-radius: 14px; background: #fff; box-shadow: 0 10px 24px rgba(55,24,28,.06); }
.barangay-public-info h3 { margin: 0 0 8px; color: var(--maroon-800); }
.barangay-public-info p { margin: 0; color: var(--text-soft); line-height: 1.55; }
.barangay-history-card { display: grid; gap: 16px; padding: 18px; border: 1px solid rgba(101,22,36,.14); border-radius: 16px; background: rgba(255,248,247,.72); }
.barangay-history-head, .barangay-admin-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.barangay-history-head h3, .barangay-admin-summary h3, .barangay-admin-request h3 { margin: 4px 0; color: var(--maroon-900); }
.barangay-history-head time { color: var(--text-soft); font-size: .82rem; }
.barangay-history-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.barangay-history-meta span { padding: 11px; border-radius: 10px; background: rgba(255,255,255,.7); color: var(--text-soft); font-size: .84rem; line-height: 1.45; }
.barangay-approved-message { margin: 0; padding: 13px 15px; border-left: 4px solid #2f7a4f; border-radius: 8px; background: #edf8f1; color: #225e3d !important; line-height: 1.55; }
.barangay-rejected-message { margin: 0; padding: 13px 15px; border-left: 4px solid #a12b2b; border-radius: 8px; background: #fde8e8; color: #7d1d1d !important; line-height: 1.55; }
.barangay-status-rejected { color: #8a1c1c; background: #fde8e8; }
.barangay-status-ready-for-pickup { color: #634700; background: #fff0b8; }
.barangay-status-claimed { color: #44505c; background: #e8edf1; }
.barangay-admin-toolbar { display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 12px; margin-bottom: 16px; }
.barangay-admin-toolbar label { display: grid; gap: 6px; color: var(--maroon-800); font-size: .82rem; font-weight: 800; }
.barangay-admin-toolbar input, .barangay-admin-toolbar select, .barangay-admin-fields input, .barangay-admin-fields select, .barangay-admin-fields textarea { width: 100%; min-height: 44px; padding: 10px 11px; border: 1px solid rgba(101,22,36,.14); border-radius: 9px; background: white; color: var(--text); }
.barangay-admin-list { display: grid; gap: 14px; }
.barangay-admin-request { display: grid; gap: 16px; padding: 18px; border: 1px solid rgba(101,22,36,.14); border-radius: 16px; background: rgba(255,248,247,.72); }
.barangay-admin-summary p { margin: 3px 0; color: var(--text-soft); }
.barangay-admin-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.barangay-admin-fields label { display: grid; gap: 6px; color: var(--maroon-800); font-size: .8rem; font-weight: 800; }
.barangay-admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.barangay-admin-actions button { min-height: 40px; padding: 9px 13px; border-radius: 9px; }
.barangay-outline-button { border: 1px solid var(--maroon-700) !important; background: transparent !important; color: var(--maroon-800) !important; box-shadow: none !important; }
.barangay-danger-button { background: #a12b2b !important; }
.barangay-details-modal { width: min(860px,100%); }
.barangay-id-preview { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 16px; align-items: center; margin-bottom: 18px; padding: 14px; border-radius: 12px; background: rgba(255,248,247,.72); }
.barangay-id-preview img { width: 130px; height: 90px; border-radius: 8px; object-fit: cover; }
.barangay-id-preview span { overflow-wrap: anywhere; color: var(--text-soft); }
.barangay-details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.barangay-detail-row { display: grid; gap: 5px; padding: 12px; border: 1px solid rgba(101,22,36,.1); border-radius: 10px; background: rgba(255,255,255,.65); }
.barangay-detail-row span { color: var(--text-soft); font-size: .75rem; }
.barangay-detail-row strong { overflow-wrap: anywhere; color: var(--maroon-900); line-height: 1.45; }

@media (max-width: 760px) {
  .barangay-form-grid, .barangay-admin-toolbar, .barangay-admin-fields, .barangay-history-meta, .barangay-details-grid, .barangay-overview-actions, .barangay-id-upload-grid { grid-template-columns: 1fr; }
  .barangay-field-wide { grid-column: auto; }
  .barangay-form-actions, .barangay-payment-notice { align-items: stretch; flex-direction: column; }
  .barangay-form-actions button { width: 100%; min-width: 0; }
  .barangay-step-badge { align-self: flex-start; }
  .barangay-gcash-sample { grid-template-columns: 1fr; }
  .barangay-inline-upload { align-items: stretch; flex-direction: column; }
  .barangay-gcash-sample button { width: 100%; }
}

@media (max-width: 480px) {
  .barangay-inline-fields { grid-template-columns: 1fr; }
  .barangay-history-head, .barangay-admin-summary { align-items: stretch; flex-direction: column; }
  .barangay-id-preview { grid-template-columns: 1fr; }
  .barangay-id-preview img { width: 100%; height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}

@media (max-width: 768px) {
    .landing-page,
    .auth-page,
    .form-page,
    .browse-page,
    .details-page,
    .homepage-container,
    .welcome-transition-page {
        padding: 16px;
    }

    .browse-topbar,
    .homepage-header,
    .browse-hero,
    .landing-main,
    .login-container,
    .signup-container,
    .form-container,
    .details-form-wrap,
    .preview-container,
    .dashboard-card,
    .browse-search-panel,
    .browse-grid,
    .claims-list,
    .homepage-footer {
        width: min(100%, calc(100% - 16px));
    }

    .browse-topbar,
    .homepage-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .browse-nav,
    .user-profile {
        width: 100%;
    }

    .search-bar {
        grid-template-columns: 1fr;
    }

    .browse-grid {
        grid-template-columns: 1fr;
    }

    .login-card,
    .signup-card,
    .lost-item-form,
    .details-form-card,
    .welcome-transition-card,
    .claim-card {
        padding: 24px;
    }

    .claim-card-header {
        flex-direction: column;
    }

    .status-badge {
        min-width: 0;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 15px;
    }

    .landing-page,
    .auth-page,
    .form-page,
    .browse-page,
    .details-page,
    .homepage-container,
    .welcome-transition-page {
        padding: 12px;
    }

    .browse-topbar,
    .homepage-header {
        gap: 14px;
        border-radius: 18px;
    }

    .browse-brand,
    .logo {
        font-size: 1.05rem;
    }

    .browse-nav,
    .user-profile {
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .browse-hero,
    .landing-hero,
    .auth-hero,
    .form-hero,
    .details-hero,
    .dashboard-card,
    .login-card,
    .signup-card,
    .lost-item-form,
    .details-form-card,
    .claim-card,
    .item-card {
        border-radius: 20px;
        padding: 20px 16px;
    }

    .browse-hero h1,
    .landing-hero h1,
    .dashboard-card h1,
    .welcome-card h1 {
        font-size: clamp(1.75rem, 10vw, 2.35rem);
    }

    .lost-item-form label,
    .details-form-card label,
    .login-card label,
    .signup-card label {
        margin-top: 14px;
    }

    .lost-item-form input,
    .lost-item-form select,
    .details-form-card input,
    .details-form-card select,
    .details-form-card textarea,
    .browse-search-form input,
    .browse-search-form select,
    .search-bar input[type="text"] {
        min-height: 48px;
        font-size: 16px;
    }

    .homepage-container::before,
    .form-page::before {
        width: 190px;
        height: 190px;
        left: -95px;
    }

    .homepage-container::after,
    .form-page::after {
        width: 210px;
        height: 210px;
        right: -110px;
    }
}

@keyframes orb-float {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, -18px, 0) scale(1.08);
    }
}

@keyframes homepage-float-left {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(46px, 34px, 0) scale(1.08);
    }
}

@keyframes homepage-float-right {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-38px, -30px, 0) scale(1.1);
    }
}

@keyframes homepage-card-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes form-orb-drift-left {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(70px, 44px, 0) scale(1.12);
    }
}

@keyframes form-orb-drift-right {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-62px, -42px, 0) scale(1.14);
    }
}

@keyframes form-hero-slide {
    from {
        opacity: 0;
        transform: translateY(-18px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes form-card-pop {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.975);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes form-card-sweep {
    0%,
    45% {
        transform: translateX(-120%);
    }
    70%,
    100% {
        transform: translateX(120%);
    }
}

@keyframes form-button-shine {
    0%,
    40% {
        transform: translateX(-120%);
    }
    68%,
    100% {
        transform: translateX(120%);
    }
}

@keyframes success-card-rise {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes success-detail-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes success-check-bounce {
    0% {
        opacity: 0;
        transform: scale(0.45) rotate(-10deg);
    }
    62% {
        opacity: 1;
        transform: scale(1.16) rotate(4deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

@keyframes status-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes celebration-orb {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.72;
    }
    50% {
        transform: translate3d(28px, 18px, 0) scale(1.12);
        opacity: 0.9;
    }
}
.claim-message
{
   color: #4a0f19; 
}

.barangay-portal-body {
    --barangay-blue-950: #082a55;
    --barangay-blue-900: #0b3f7a;
    --barangay-blue-700: #1768b8;
    --barangay-blue-100: #e7f1ff;
    --barangay-blue-50: #f5f9ff;
    --barangay-gold: #f4b942;
    --barangay-green: #178a50;
    --barangay-border: rgba(11, 63, 122, 0.16);
    color: #12304f;
    background:
        linear-gradient(180deg, rgba(247, 251, 255, 0.96), rgba(231, 241, 255, 0.96)),
        linear-gradient(135deg, #f7fbff, #dcecff);
}

.barangay-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
}

.barangay-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px 22px;
    background: linear-gradient(180deg, var(--barangay-blue-950), var(--barangay-blue-900));
    color: #fff;
    box-shadow: 10px 0 30px rgba(8, 42, 85, 0.18);
}

.barangay-sidebar h1,
.barangay-topbar h2,
.barangay-section-heading h2,
.barangay-announcement-card h3,
.barangay-request-card h3 {
    margin: 0;
    line-height: 1.2;
}

.barangay-sidebar h1 {
    font-size: 1.45rem;
}

.barangay-kicker {
    margin: 0 0 7px;
    color: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.76;
}

.barangay-sidebar-nav {
    display: grid;
    gap: 10px;
}

.barangay-nav-link,
.barangay-lost-found-link,
.barangay-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    padding: 11px 14px;
    font-weight: 700;
    text-decoration: none;
}

.barangay-nav-link {
    justify-content: flex-start;
    color: #eaf4ff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.barangay-nav-link:hover,
.barangay-lost-found-link:hover,
.barangay-secondary-link:hover {
    transform: translateY(-1px);
}

.barangay-lost-found-link {
    margin-top: auto;
    color: var(--barangay-blue-950);
    background: #fff;
}

.barangay-main {
    min-width: 0;
    padding: 28px;
}

.barangay-topbar,
.barangay-card,
.barangay-stat-card,
.barangay-modal-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--barangay-border);
    border-radius: 8px;
    box-shadow: 0 14px 35px rgba(8, 42, 85, 0.09);
}

.barangay-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.barangay-topbar h2 {
    color: var(--barangay-blue-950);
    font-size: clamp(1.35rem, 3vw, 2.2rem);
}

.barangay-secondary-link {
    color: #fff;
    background: var(--barangay-blue-700);
}

.barangay-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.barangay-stat-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 14px;
    align-items: center;
    padding: 18px;
}

.barangay-card-icon {
    grid-row: span 2;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: var(--barangay-blue-900);
    background: var(--barangay-blue-100);
    font-size: 0.75rem;
    font-weight: 800;
}

.barangay-stat-card p,
.barangay-stat-card strong,
.barangay-profile-item span,
.barangay-profile-item strong,
.barangay-announcement-card p,
.barangay-request-card p,
.barangay-form-message {
    margin: 0;
}

.barangay-stat-card p,
.barangay-profile-item span,
.barangay-announcement-card p,
.barangay-request-card p {
    color: #52677d;
}

.barangay-stat-card strong {
    color: var(--barangay-blue-950);
    font-size: 1.45rem;
}

.barangay-card {
    margin-top: 18px;
    padding: 22px;
}

.barangay-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.barangay-section-heading h2 {
    color: var(--barangay-blue-950);
    font-size: 1.25rem;
}

.barangay-small-button,
.barangay-icon-button,
.barangay-form button {
    border-radius: 8px;
    background: var(--barangay-blue-700);
    color: #fff;
    box-shadow: 0 10px 22px rgba(23, 104, 184, 0.18);
}

.barangay-small-button {
    min-height: 42px;
    padding: 10px 14px;
}

.barangay-icon-button {
    width: 42px;
    min-height: 42px;
    padding: 0;
}

.barangay-profile-grid,
.barangay-announcement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.barangay-profile-item,
.barangay-announcement-card,
.barangay-request-card,
.barangay-qr-card {
    border: 1px solid var(--barangay-border);
    border-radius: 8px;
    background: var(--barangay-blue-50);
}

.barangay-profile-item {
    display: grid;
    gap: 6px;
    padding: 16px;
}

.barangay-profile-item strong {
    color: #15385d;
    line-height: 1.45;
}

.barangay-form {
    display: grid;
    gap: 10px;
}

.barangay-form label {
    font-weight: 700;
    color: #163a60;
}

.barangay-form input:not([type="checkbox"]),
.barangay-form select,
.barangay-form textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--barangay-border);
    border-radius: 8px;
    padding: 12px 13px;
    background: #fff;
    color: #12304f;
}

.barangay-form textarea {
    resize: vertical;
}

.barangay-form button {
    margin-top: 8px;
}

.barangay-form-message {
    min-height: 24px;
    color: var(--barangay-green);
    font-weight: 700;
}

.barangay-form-message.is-error {
    color: #b3261e;
}

.barangay-list {
    display: grid;
    gap: 12px;
}

.barangay-request-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
}

.barangay-request-id {
    color: var(--barangay-blue-700) !important;
    font-weight: 800;
}

.barangay-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 800;
    white-space: nowrap;
}

.barangay-status-pending {
    color: #7a5700;
    background: #fff2c2;
}

.barangay-status-approved {
    color: #0b663a;
    background: #dff7eb;
}

.barangay-status-ready-to-claim {
    color: var(--barangay-blue-900);
    background: #dcecff;
}

.barangay-announcement-card {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.barangay-announcement-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--barangay-blue-700);
    font-size: 0.85rem;
    font-weight: 800;
}

.barangay-payment-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.barangay-qr-card {
    display: grid;
    gap: 12px;
    place-items: center;
    padding: 18px;
    text-align: center;
}

.barangay-qr-card span {
    color: var(--barangay-blue-900);
    font-size: 1.3rem;
    font-weight: 800;
}

.barangay-qr-placeholder {
    width: min(100%, 210px);
    aspect-ratio: 1;
    border: 10px solid #fff;
    border-radius: 8px;
    object-fit: cover;
    background: #eaf4ff;
    box-shadow: inset 0 0 0 2px rgba(11, 63, 122, 0.24);
}

.barangay-empty-state {
    margin: 0;
    color: #52677d;
}

.barangay-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(8, 42, 85, 0.5);
}

.barangay-modal.is-open {
    display: grid;
}

.barangay-modal-card {
    width: min(620px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 22px;
}

@media (max-width: 920px) {
    .barangay-shell {
        grid-template-columns: 1fr;
    }

    .barangay-sidebar {
        position: static;
        min-height: auto;
    }

    .barangay-sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .barangay-lost-found-link {
        margin-top: 0;
    }

    .barangay-dashboard-grid,
    .barangay-payment-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .barangay-main,
    .barangay-sidebar {
        padding: 16px;
    }

    .barangay-topbar,
    .barangay-section-heading,
    .barangay-request-card {
        align-items: stretch;
        flex-direction: column;
    }

    .barangay-sidebar-nav {
        grid-template-columns: 1fr;
    }

    .barangay-secondary-link,
    .barangay-small-button,
    .barangay-status {
        width: 100%;
    }
}

.professional-dashboard {
    width: min(1180px, calc(100% - 48px));
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 22px;
    text-align: left;
    overflow: hidden;
}

.dashboard-hero-panel,
.dashboard-action-panel {
    min-width: 0;
}

.dashboard-hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-eyebrow {
    margin: 0 0 12px;
    color: var(--maroon-700);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.professional-dashboard .subtitle {
    max-width: 680px;
    margin: 14px 0 24px;
}

.dashboard-search {
    max-width: 720px;
    padding: 10px;
    border: 1px solid rgba(101, 22, 36, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: var(--shadow-soft);
}

.dashboard-action-panel {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(101, 22, 36, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.38);
}

.dashboard-action-grid {
    margin-bottom: 0;
}

.dashboard-service-block {
    display: grid;
    gap: 10px;
}

.dashboard-service-block h2 {
    margin: 0;
    color: var(--maroon-800);
    font-size: 1.05rem;
    line-height: 1.25;
}

.dashboard-service-block p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.55;
}

.barangay-service-note {
    padding: 16px;
    border: 1px solid rgba(101, 22, 36, 0.12);
    border-radius: 16px;
    background: rgba(255, 248, 247, 0.72);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-metrics article {
    min-width: 0;
    padding: 14px 10px;
    border: 1px solid rgba(101, 22, 36, 0.12);
    border-radius: 14px;
    background: rgba(255, 248, 247, 0.72);
    text-align: center;
}

.dashboard-metrics span,
.dashboard-metrics strong {
    display: block;
}

.dashboard-metrics span {
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 700;
}

.dashboard-metrics strong {
    margin-top: 4px;
    color: var(--maroon-800);
    font-size: clamp(0.86rem, 2vw, 1rem);
    line-height: 1.2;
}

.professional-dashboard .dashboard-quick-links {
    justify-content: flex-start;
    margin: 0;
}

.dashboard-quick-access {
    display: grid;
    gap: 12px;
    padding-top: 2px;
}

.dashboard-quick-access h2 {
    margin: 0;
    color: var(--maroon-800);
    font-size: 1.05rem;
    line-height: 1.25;
}

.professional-dashboard .dashboard-quick-access .dashboard-quick-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.professional-dashboard .dashboard-quick-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid rgba(101, 22, 36, 0.12);
    border-radius: 14px;
    background: rgba(255, 248, 247, 0.7);
    color: var(--maroon-800);
    font-size: 0.94rem;
}

.professional-dashboard .dashboard-quick-link::after {
    position: static;
    width: auto;
    height: auto;
    background: none;
    opacity: 0.7;
    content: '>';
    font-weight: 800;
}

.professional-dashboard .dashboard-quick-link:hover,
.professional-dashboard .dashboard-quick-link:focus-visible {
    background: rgba(122, 31, 47, 0.1);
}

.barangay-portal-body {
    --barangay-blue-950: var(--maroon-900);
    --barangay-blue-900: var(--maroon-800);
    --barangay-blue-700: var(--maroon-700);
    --barangay-blue-100: var(--rose-100);
    --barangay-blue-50: rgba(255, 248, 247, 0.72);
    --barangay-gold: #f1d7d8;
    --barangay-green: #2f7a4f;
    --barangay-border: rgba(101, 22, 36, 0.16);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.3), transparent 32%),
        radial-gradient(circle at bottom right, rgba(169, 71, 86, 0.18), transparent 28%),
        linear-gradient(180deg, #f7f0ef 0%, #efe2e1 48%, #e5d3d4 100%);
}

.barangay-sidebar {
    background: linear-gradient(180deg, rgba(74, 15, 25, 0.96), rgba(101, 22, 36, 0.92));
    box-shadow: 10px 0 30px rgba(58, 14, 24, 0.18);
}

.barangay-topbar,
.barangay-card,
.barangay-stat-card,
.barangay-modal-card {
    background: linear-gradient(180deg, rgba(255, 251, 250, 0.72), rgba(248, 235, 235, 0.52));
    border-color: rgba(255, 255, 255, 0.34);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.barangay-profile-item,
.barangay-announcement-card,
.barangay-request-card,
.barangay-qr-card {
    background: rgba(255, 248, 247, 0.7);
    border-color: rgba(101, 22, 36, 0.14);
    border-radius: 16px;
}

.barangay-nav-link {
    color: #fff3f3;
    background: rgba(255, 255, 255, 0.1);
}

.barangay-lost-found-link {
    color: var(--maroon-900);
    background: #fff8f7;
}

.barangay-secondary-link,
.barangay-small-button,
.barangay-icon-button,
.barangay-form button {
    background: linear-gradient(135deg, var(--maroon-700), var(--maroon-500));
    color: #fff8f7;
    box-shadow: 0 12px 24px rgba(122, 31, 47, 0.18);
}

.barangay-card-icon,
.barangay-status-ready-to-claim {
    color: var(--maroon-800);
    background: #f1d7d8;
}

.barangay-form input:not([type="checkbox"]),
.barangay-form select,
.barangay-form textarea {
    border-color: rgba(101, 22, 36, 0.14);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
}

.barangay-form label,
.barangay-topbar h2,
.barangay-section-heading h2,
.barangay-stat-card strong,
.barangay-profile-item strong,
.barangay-qr-card span {
    color: var(--maroon-800);
}

.barangay-stat-card p,
.barangay-profile-item span,
.barangay-announcement-card p,
.barangay-request-card p,
.barangay-empty-state {
    color: var(--text-soft);
}

.barangay-request-id,
.barangay-announcement-meta {
    color: var(--maroon-700) !important;
}

.barangay-modal {
    background: rgba(74, 15, 25, 0.48);
}

@media (max-width: 900px) {
    .professional-dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .professional-dashboard {
        width: min(100%, calc(100% - 16px));
        padding: 22px 18px;
    }

    .dashboard-action-panel {
        padding: 16px;
    }

    .dashboard-metrics {
        grid-template-columns: 1fr;
    }
}

/* Final mobile overrides stay last so every page keeps the compact phone layout. */
@media (max-width: 700px) {
    .browse-topbar, .form-topbar { position: static; padding: 14px 16px; gap: 12px; }
    .browse-nav, .resident-nav, .barangay-sidebar-nav { display: flex; width: 100%; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .browse-nav-link, .resident-nav a, .barangay-nav-link { flex: 0 0 auto; min-height: 40px; padding: 9px 12px; white-space: nowrap; }
    .browse-grid, .browse-search-form, .form-actions, .claim-actions { grid-template-columns: 1fr; }
    .lost-item-form, .login-card, .signup-card { padding: 20px 16px; }

    .resident-header { position: sticky; top: 0; padding: 10px 12px; gap: 8px; }
    .resident-brand div, .resident-help-card { display: none; }
    .resident-nav { grid-column: 1 / -1; }
    .resident-hero { min-height: auto; padding: 38px 16px; gap: 22px; }
    .resident-service-card { min-height: 0; padding: 18px; }

    .barangay-shell { display: block; min-height: 100dvh; }
    .barangay-sidebar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto; padding: 10px 12px 8px; gap: 8px 12px; }
    .barangay-brand .barangay-kicker, .barangay-help { display: none; }
    .barangay-sidebar-nav { grid-column: 1 / -1; }
    .barangay-main { padding: 10px 10px 90px; }
    .barangay-topbar { padding: 16px; margin-bottom: 10px; }
    .barangay-topbar-copy, .barangay-step-badge { display: none; }
    .barangay-dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .barangay-stat-card { padding: 12px 5px; text-align: center; }
    .barangay-overview-actions { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
    .barangay-request-workspace, .barangay-card { padding: 16px 12px; }
    .barangay-form-section, .barangay-form-section + .barangay-form-section { margin: 0 0 9px; padding: 0; border: 1px solid rgba(101,22,36,.13); border-radius: 14px; overflow: hidden; }
    /* Keep fieldset legends visible on iOS when mobile sections are collapsed. */
    #documentRequestForm > .barangay-form-section { overflow: visible; }
    .barangay-form-section legend { width: 100%; min-height: 48px; margin: 0; padding: 10px 38px 10px 11px; position: relative; cursor: pointer; }
    .barangay-form-section legend::after { content: '−'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 1.25rem; }
    .barangay-form-section.is-collapsed legend::after { content: '+'; }
    .barangay-form-section.is-collapsed > :not(legend) { display: none !important; }
    .barangay-form-section > .barangay-field, .barangay-form-section > .barangay-form-grid, .barangay-form-section > .barangay-payment-notice, .barangay-form-section > .barangay-gcash-sample { margin: 12px; }
    .barangay-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 9px; }
    .barangay-field-wide, .barangay-checkbox { grid-column: 1 / -1; }
    .barangay-id-upload-grid { grid-template-columns: 1fr; }
    .barangay-form-actions { position: sticky; bottom: 8px; z-index: 15; padding: 10px; border-radius: 14px; background: rgba(255,248,247,.96); box-shadow: 0 8px 28px rgba(74,15,25,.2); }
    .barangay-form-actions p { display: none; }
    .barangay-form-actions button { width: 100%; min-height: 48px; }
    .barangay-modal { align-items: flex-end; padding: 0; }
    .barangay-modal-card { width: 100%; max-height: 88dvh; padding: 18px 14px; border-radius: 22px 22px 0 0; overflow-y: auto; }
}

@media (max-width: 390px) {
    .barangay-form-grid { grid-template-columns: 1fr; }
    .barangay-field { grid-column: 1 / -1; }
}

/* Organized resident homepage */
.resident-home-body .resident-header { min-height: 70px; padding: 10px max(24px, calc((100vw - 1120px) / 2)); gap: 24px; box-shadow: none; }
.resident-home-body .resident-brand-mark { width: 40px; height: 40px; border-radius: 10px; box-shadow: none; }
.resident-home-body .resident-hero { display: block; min-height: 0; padding: 48px max(24px, calc((100vw - 1120px) / 2)) 44px; background: #fbf8f6; }
.resident-home-body .resident-hero-copy { max-width: 720px; }
.resident-home-body .resident-hero h1 { max-width: 680px; font-size: clamp(2.55rem, 4.5vw, 4rem); line-height: 1.05; }
.resident-home-body .resident-hero-copy > p:not(.resident-eyebrow) { max-width: 620px; margin: 14px 0 0; font-size: 1rem; line-height: 1.6; }
.resident-home-body .resident-section,
.resident-home-body .resident-dashboard-row { width: min(1120px, calc(100% - 48px)); }
.resident-home-body .resident-section { padding: 44px 0 20px; }
.resident-home-body .resident-section-heading { align-items: end; margin-bottom: 22px; }
.resident-home-body .resident-section-heading > p { max-width: 410px; }
.resident-home-body .resident-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.resident-home-body .resident-module-card { display: flex; flex-direction: column; min-width: 0; min-height: 350px; padding: 26px; border: 1px solid #e4dad5; border-radius: 14px; background: #fff; }
.resident-home-body .resident-module-card h3 { margin: 0; color: #42141e; font-size: clamp(1.45rem, 2.4vw, 1.85rem); }
.resident-home-body .resident-module-card > div > p:not(.resident-card-label) { max-width: 470px; margin: 10px 0 22px; color: #756965; line-height: 1.6; }
.resident-home-body .resident-module-barangay { background: #f4e9e8; }
.resident-home-body .resident-module-barangay .resident-button { align-self: flex-start; margin-top: auto; }
.resident-home-body .resident-module-lost-found .resident-search { max-width: none; margin-top: auto; padding: 14px; border-radius: 12px; box-shadow: none; }
.resident-home-body .resident-module-lost-found .resident-hero-actions { margin-top: 14px; }
.resident-home-body .resident-module-lost-found .resident-button { min-height: 44px; }
.resident-home-body .resident-dashboard-row { display: block; padding: 16px 0 52px; }
.resident-home-body .resident-personal-panel { padding: 26px; border-radius: 14px; }
.resident-home-body .resident-shortcut-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.resident-home-body .resident-footer { gap: 32px; padding: 32px max(24px, calc((100vw - 1120px) / 2)); }
@media (max-width: 900px) {
    .resident-home-body .resident-module-grid { grid-template-columns: 1fr; }
    .resident-home-body .resident-module-card { min-height: 0; }
    .resident-home-body .resident-module-barangay .resident-button { margin-top: 18px; }
}

@media (max-width: 700px) {
    .resident-home-body .resident-header { padding: 10px 12px; gap: 8px; }
    .resident-home-body .resident-hero { padding: 34px 16px 32px; }
    .resident-home-body .resident-hero h1 { font-size: 2.35rem; }
    .resident-home-body .resident-section, .resident-home-body .resident-dashboard-row { width: min(100% - 32px, 1120px); }
    .resident-home-body .resident-section { padding: 34px 0 14px; }
    .resident-home-body .resident-section-heading { gap: 10px; margin-bottom: 18px; text-align: left; }
    .resident-home-body .resident-section-heading > div { width: 100%; text-align: left; }
    .resident-home-body .resident-module-card, .resident-home-body .resident-personal-panel { padding: 20px; }
    .resident-home-body .resident-shortcut-grid { grid-template-columns: 1fr; }
    .resident-home-body .resident-dashboard-row { padding: 14px 0 40px; }
}

/* Resident Portal refresh - scoped away from admin pages */
body.resident-portal-page { background: #fffaf7; color: #24171a; }
body.resident-portal-page, body.resident-portal-page *, body.resident-portal-page *::before, body.resident-portal-page *::after { box-sizing: border-box; }
.resident-page-shell, .resident-home, .resident-service-shell { min-height: 100vh; padding: 0 0 104px; }
.resident-portal-page .form-page::before, .resident-portal-page .form-page::after { display: none; }
.resident-shell-header { position: sticky; top: 0; z-index: 60; display: grid; grid-template-columns: minmax(220px,auto) minmax(0,1fr) auto; align-items: center; gap: 24px; width: 100vw; max-width: 100vw; min-height: 72px; padding: 10px max(28px, calc((100vw - 1320px) / 2)); border-bottom: 1px solid rgba(101,22,36,.11); background: rgba(255,255,255,.94); box-shadow: 0 6px 18px rgba(56,24,29,.06); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.resident-brand { display: inline-flex; align-items: center; min-width: 0; gap: 12px; color: #4a0f19; text-decoration: none; }
.resident-brand-logo { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 50%; object-fit: contain; background: #fff; box-shadow: 0 6px 14px rgba(64,26,31,.12); }
.resident-brand strong, .resident-brand small { display: block; white-space: nowrap; }
.resident-brand strong { font-size: 1.05rem; line-height: 1.12; }
.resident-brand small { margin-top: 3px; color: #68585b; font-size: .8rem; font-weight: 500; }
.resident-top-nav { display: flex; align-items: center; justify-content: center; min-width: 0; gap: 20px; }
.resident-top-nav a, .resident-menu-button { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 4px; border: 0; border-radius: 0; background: transparent; color: #30272a; box-shadow: none; font-size: .95rem; font-weight: 650; text-decoration: none; }
.resident-top-nav a::after, .resident-menu-button::after { content: ''; position: absolute; right: 0; bottom: 3px; left: 0; height: 3px; border-radius: 99px; background: transparent; }
.resident-top-nav a:hover, .resident-top-nav a:focus-visible, .resident-top-nav a.is-active, .resident-menu-button:hover, .resident-menu-button:focus-visible, .resident-menu-button.is-active { color: #7a1f2f; }
.resident-top-nav a.is-active::after, .resident-menu-button.is-active::after { background: #7a1f2f; }
.resident-header-actions { display: flex; align-items: center; gap: 12px; }
.resident-notification-menu { position: relative; }
.resident-notification-link { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #2f2528; text-decoration: none; }
.resident-notification-icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.resident-notification-link:hover, .resident-notification-link:focus-visible, .resident-notification-link.is-active { color: #7a1f2f; background: #f7ecec; }
.resident-unread-count { position: absolute; top: 2px; right: 2px; display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; background: #a30f28; color: #fff; font-size: .7rem; font-weight: 800; line-height: 1; }
.resident-notification-panel { position: absolute; top: calc(100% + 14px); right: 0; z-index: 95; width: min(320px, calc(100vw - 40px)); max-height: min(440px, calc(100dvh - 96px)); display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 12px; padding: 12px; overflow: hidden; border: 1px solid rgba(101,22,36,.14); border-radius: 18px; background: #fff; box-shadow: 0 22px 46px rgba(48,17,23,.18); }
.resident-notification-panel[hidden] { display: none; }
.resident-notification-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.resident-notification-panel-header h3 { margin: 0; color: #24171a; font-size: 1rem; line-height: 1.2; }
.resident-notification-panel-header span { display: block; margin-top: 3px; color: #7a1f2f; font-size: .78rem; font-weight: 800; }
.resident-notification-panel-header button { width: auto; min-height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; color: #7a1f2f; box-shadow: none; font-size: .78rem; font-weight: 850; white-space: nowrap; }
.resident-notification-panel-header button:disabled { color: #9d8b90; cursor: default; }
.resident-notification-panel-list { display: grid; align-content: start; gap: 9px; min-height: 0; max-height: min(290px, calc(100dvh - 222px)); overflow-y: auto; padding-right: 2px; }
.resident-notification-panel-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid rgba(101,22,36,.12); border-radius: 14px; background: #fff8f6; box-shadow: none; }
.resident-notification-panel-item.is-unread { border-color: rgba(122,31,47,.28); box-shadow: inset 4px 0 0 #7a1f2f; }
.resident-notification-panel-item span { display: block; margin-bottom: 4px; color: #7a5a5c; font-size: .74rem; font-weight: 750; }
.resident-notification-panel-item strong { display: block; color: #24171a; font-size: .9rem; line-height: 1.25; }
.resident-notification-panel-item p { margin: 4px 0 0; color: #65575b; font-size: .8rem; line-height: 1.35; }
.resident-notification-panel-item a, .resident-notification-view-all { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 8px 10px; border-radius: 10px; background: #97001f; color: #fff; font-size: .78rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.resident-notification-view-all { width: 100%; background: #f7ecec; color: #7a1f2f; }
.resident-notification-empty { margin: 0; padding: 14px 4px; color: #6a5b5f; font-size: .9rem; font-weight: 700; }
@media (max-width: 480px) {
    .resident-notification-panel { position: fixed; top: 76px; right: 12px; width: min(320px, calc(100vw - 24px)); }
    .resident-notification-panel-header { flex-wrap: wrap; }
    .resident-notification-panel-item > div { min-width: 0; overflow-wrap: anywhere; }
}
.resident-menu { position: relative; }
.resident-menu-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 80; display: grid; min-width: 200px; gap: 5px; padding: 8px; border: 1px solid rgba(101,22,36,.14); border-radius: 14px; background: #fff; box-shadow: 0 18px 38px rgba(48,17,23,.16); }
.resident-top-nav .resident-menu-panel { right: auto; left: 50%; transform: translateX(-50%); }
.resident-menu-panel[hidden] { display: none; }
.resident-menu-panel a { position: static; display: flex; align-items: center; justify-content: flex-start; min-height: 42px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: #3a2a2e; box-shadow: none; text-decoration: none; font-size: .9rem; font-weight: 700; text-align: left; }
.resident-menu-panel a:hover, .resident-menu-panel a:focus-visible { background: #f7ecec; color: #7a1f2f; }
.resident-profile-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 210px; padding: 4px 8px 4px 4px; border: 0; border-radius: 999px; background: transparent; color: #2d2326; box-shadow: none; }
.resident-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: #ead8da; color: #651624; font-weight: 850; }
.resident-profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.visitor-auth-links { display: inline-flex; align-items: center; gap: 8px; }
.visitor-auth-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 13px; border: 1px solid rgba(122,31,47,.22); border-radius: 999px; color: #7a1f2f; background: #fff; text-decoration: none; font-weight: 800; font-size: .86rem; }
.visitor-auth-links a:first-child { background: #8b001b; color: #fff; border-color: #8b001b; }
.visitor-auth-modal[hidden] { display: none; }
.visitor-auth-modal { position: fixed; inset: 0; z-index: 12000; display: flex; align-items: center; justify-content: center; width: 100vw; min-height: 100dvh; padding: 24px; overflow-y: auto; background: rgba(28,18,20,.46); }
.visitor-auth-card { width: min(440px, 100%); padding: 26px; border-radius: 18px; background: #fff; box-shadow: 0 22px 60px rgba(30,12,16,.24); }
.visitor-auth-card h2 { margin: 0 0 10px; color: #651624; font-size: 1.35rem; line-height: 1.25; }
.visitor-auth-card p { margin: 0; color: #6b5c60; line-height: 1.55; }
.visitor-auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.visitor-auth-open { overflow: hidden; }
.resident-hero { position: relative; min-height: min(440px,48vw); display: grid; align-items: center; padding: clamp(46px,7vw,86px) max(24px, calc((100vw - 1320px) / 2)); overflow: hidden; background: linear-gradient(90deg, rgba(255,250,247,.98) 0%, rgba(255,250,247,.91) 35%, rgba(255,250,247,.58) 58%, rgba(255,250,247,.12) 100%), url("img/barangay-del-rosario-building.jpg") center / cover no-repeat; border-bottom: 1px solid rgba(101,22,36,.1); }
.resident-hero-copy { width: min(620px,100%); }
.resident-hero h1 { margin: 0; color: #71091d; font-size: clamp(2.4rem,5.1vw,4.4rem); line-height: 1.05; letter-spacing: 0; }
.resident-hero-copy p { margin: 18px 0 0; color: #4e4a4d; font-size: 1.15rem; line-height: 1.65; }
.resident-section, .resident-home-panels { width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
.resident-actions-section { padding: 30px 0 20px; }
.resident-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.resident-section-heading h2, .resident-panel-heading h2 { margin: 0; color: #171113; font-size: clamp(1.6rem,2.7vw,2.15rem); line-height: 1.16; letter-spacing: 0; }
.resident-action-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.resident-action-card, .resident-info-panel { border: 1px solid rgba(101,22,36,.12); border-radius: 18px; background: #fff; box-shadow: 0 12px 28px rgba(55,24,28,.07); }
.resident-action-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; min-height: 158px; gap: 24px; padding: 24px; }
.resident-action-card > div { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 18px; align-items: center; }
.resident-action-card h3 { margin: 0 0 6px; color: #71091d; font-size: 1.35rem; line-height: 1.2; }
.resident-action-card p { margin: 0; color: #5f5356; line-height: 1.5; }
.resident-action-icon { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; background: #f3dfe2; color: #7a1f2f; font-size: 1.8rem; font-weight: 850; }
.resident-action-found { background: #f7fcf5; }
.resident-action-found .resident-action-icon { background: #dfeedd; color: #0f6a3a; }
.resident-home-search { margin: 18px 0 0; padding: 16px; border: 1px solid rgba(101,22,36,.12); border-radius: 16px; background: #fff; box-shadow: 0 10px 24px rgba(55,24,28,.06); }
.resident-home-search label { display: block; margin-bottom: 8px; color: #4f3036; font-weight: 800; }
.resident-search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.resident-search-row input { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid rgba(101,22,36,.14); background: #fffdfb; color: #24171a; }
.resident-search-row button { min-height: 46px; padding: 10px 18px; border: 0; border-radius: 10px; background: #8b001b; color: #fff; font-weight: 800; }
.resident-home-search small { display: block; margin-top: 8px; color: #6f6265; }
.resident-portal-page .resident-button, .resident-portal-page .button-link, .resident-portal-page .back-btn, .resident-portal-page .backbtn, .resident-portal-page .search-btn, .resident-portal-page .download-claim-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; font-weight: 800; }
.resident-portal-page .resident-button-primary, .resident-portal-page .button-link, .resident-portal-page .search-btn, .resident-portal-page .download-claim-button { background: #8b001b; color: #fff; }
.resident-button-positive { background: #0d673a; color: #fff; }
.resident-portal-page .resident-button:hover, .resident-portal-page .button-link:hover, .resident-portal-page .back-btn:hover, .resident-portal-page .backbtn:hover, .resident-portal-page .search-btn:hover, .resident-portal-page .download-claim-button:hover { transform: translateY(-1px); }
.resident-home-panels { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,.95fr); gap: 22px; padding: 8px 0 48px; }
.resident-info-panel { padding: 22px; }
.resident-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid rgba(101,22,36,.11); }
.resident-panel-heading a { color: #8b001b; text-decoration: none; font-size: .9rem; font-weight: 800; white-space: nowrap; }
.resident-update-list { display: grid; gap: 12px; padding-top: 16px; }
.resident-update-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 16px; border: 1px solid rgba(101,22,36,.1); border-radius: 14px; background: #fffdfb; }
.resident-update-card span { color: #776a6d; font-size: .8rem; font-weight: 700; }
.resident-update-card h3 { margin: 4px 0; color: #221719; font-size: 1rem; line-height: 1.3; }
.resident-update-card p { margin: 0; color: #625659; line-height: 1.48; }
.resident-update-card a { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 16px; border-radius: 10px; background: #8b001b; color: #fff; text-decoration: none; font-weight: 800; white-space: nowrap; }
.resident-empty-state { display: grid; min-height: 104px; margin: 0; place-items: center; padding: 18px; border: 1px dashed rgba(101,22,36,.22); border-radius: 14px; color: #675b5e; text-align: center; }
.resident-footer { display: grid; grid-template-columns: 1fr 1fr auto; gap: 26px; padding: 32px max(24px, calc((100vw - 1320px) / 2)); border-top: 1px solid rgba(101,22,36,.1); background: #fff6f3; color: #3e3033; }
.resident-footer p { margin: 7px 0 0; color: #716467; }
.resident-footer nav { display: grid; gap: 8px; }
.resident-footer a { color: #7a1f2f; text-decoration: none; font-weight: 700; }
.resident-portal-page .browse-page, .resident-portal-page .form-page, .resident-portal-page .details-page, .resident-portal-page .site-shell { padding: 0 0 104px; }
.resident-page-hero, .resident-portal-page .browse-hero, .resident-portal-page .form-hero, .resident-portal-page .details-hero, .resident-portal-page .barangay-topbar { width: min(1120px, calc(100% - 48px)); margin: 24px auto 0; padding: 26px 0 8px; text-align: left; border: 0; box-shadow: none; background: transparent; }
.resident-portal-page .browse-hero h1, .resident-portal-page .form-hero h1, .resident-portal-page .details-hero h1, .resident-portal-page .barangay-topbar h2 { margin: 0; color: #71091d; font-size: clamp(2rem,4vw,3rem); line-height: 1.12; letter-spacing: 0; }
.resident-portal-page .browse-hero p, .resident-portal-page .form-hero p, .resident-portal-page .details-hero p, .resident-portal-page .barangay-topbar-copy { max-width: 720px; margin: 10px 0 0; color: #60565a; line-height: 1.65; }
.resident-portal-page .browse-search-panel, .resident-portal-page .browse-tabs, .resident-portal-page .browse-grid, .resident-portal-page .claims-list, .resident-portal-page .form-container, .resident-portal-page .details-form-wrap, .resident-portal-page .notification-toolbar, .resident-portal-page .notifications-list, .resident-portal-page .matching-explanation, .resident-portal-page .announcement-public-card { width: min(1120px, calc(100% - 48px)); }
.resident-portal-page .browse-search-form, .resident-portal-page .lost-item-form, .resident-portal-page .details-form-card, .resident-portal-page .claim-card, .resident-portal-page .notification-card, .resident-portal-page .announcement-public-card, .resident-portal-page .matching-explanation { border: 1px solid rgba(101,22,36,.12); border-radius: 18px; background: #fff; box-shadow: 0 12px 28px rgba(55,24,28,.07); }
.resident-portal-page .browse-search-form { grid-template-columns: minmax(0,1.5fr) minmax(170px,.72fr) auto; padding: 16px; }
.resident-portal-page .browse-tabs { margin-top: 18px; border: 1px solid rgba(101,22,36,.11); background: #f9eeee; box-shadow: none; }
.resident-portal-page .browse-tab { min-height: 44px; border-radius: 11px; }
.resident-portal-page .browse-tab.is-active { background: #8b001b; }
.resident-portal-page .browse-column-heading { min-height: 0; }
.resident-portal-page .browse-column-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
.resident-portal-page .browse-result-card { border: 1px solid rgba(101,22,36,.1); border-radius: 16px; background: #fff; box-shadow: 0 10px 22px rgba(55,24,28,.06); }
.resident-portal-page .browse-result-card button { min-height: 44px; border: 0; border-radius: 10px; background: #8b001b; color: #fff; font-weight: 800; }
.resident-portal-page input, .resident-portal-page select, .resident-portal-page textarea { min-height: 44px; border-radius: 10px; }
.resident-portal-page .form-container, .resident-portal-page .details-form-wrap { margin-top: 16px; }
.resident-portal-page .form-actions { display: flex; flex-wrap: wrap; align-items: center; }
.resident-portal-page .form-actions > * { width: auto; }
.resident-portal-page .form-actions button { min-width: 220px; }
.resident-portal-page .back-btn, .resident-portal-page .backbtn { border-color: rgba(101,22,36,.16); background: #fff7f5; color: #7a1f2f; }
.resident-service-shell { display: block; }
.resident-service-shell .barangay-main { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 72px; }
.resident-service-shell .barangay-topbar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.resident-service-tabs { display: flex; gap: 10px; margin: 18px 0 20px; padding: 8px; border: 1px solid rgba(101,22,36,.12); border-radius: 16px; background: #fff; box-shadow: 0 10px 24px rgba(55,24,28,.06); }
.resident-service-tabs .barangay-nav-link { flex: 1; justify-content: center; min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: #5a4c50; }
.resident-service-tabs .barangay-nav-link.is-active { background: #8b001b; color: #fff; }
.resident-service-shell .barangay-dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 18px auto; }
.resident-service-shell .barangay-dashboard-grid .barangay-stat-card { grid-template-columns: 1fr; min-height: 118px; place-items: center; text-align: center; }
.resident-service-shell .barangay-stat-card, .resident-service-shell .barangay-card, .resident-service-shell .barangay-overview-actions article { border-color: rgba(101,22,36,.12); border-radius: 18px; background: #fff; box-shadow: 0 12px 28px rgba(55,24,28,.07); }
.resident-bottom-nav { display: none; }
@media (max-width: 1120px) {
    .resident-shell-header { grid-template-columns: minmax(200px,auto) 1fr auto; gap: 14px; }
    .resident-top-nav { gap: 12px; }
    .resident-profile-name { display: none; }
    .resident-action-card { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .resident-shell-header { grid-template-columns: 1fr auto; min-height: 68px; padding: 10px 14px; }
    .resident-top-nav { display: none; }
    .resident-brand-logo { width: 48px; height: 48px; }
    .resident-brand strong { font-size: .98rem; }
    .resident-brand small { font-size: .76rem; }
    .resident-hero { min-height: 214px; margin: 12px 12px 0; padding: 24px 18px; border: 1px solid rgba(101,22,36,.1); border-radius: 18px; background: linear-gradient(90deg, rgba(255,244,241,.98) 0%, rgba(255,244,241,.86) 56%, rgba(255,244,241,.18) 100%), url("img/barangay-del-rosario-building.jpg") center / cover no-repeat; }
    .resident-hero h1 { font-size: 1.65rem; }
    .resident-hero-copy p { max-width: 58%; margin-top: 12px; font-size: .98rem; line-height: 1.42; }
    .resident-section, .resident-home-panels { width: calc(100% - 24px); }
    .resident-actions-section { padding-top: 22px; }
    .resident-action-grid, .resident-home-panels { grid-template-columns: 1fr; gap: 14px; }
    .resident-action-card { min-height: 136px; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 16px; }
    .resident-action-card > div { gap: 12px; }
    .resident-action-document { grid-template-columns: 1fr; }
    .resident-action-icon { width: 60px; height: 60px; font-size: 1.35rem; }
    .resident-action-card h3 { font-size: 1.04rem; }
    .resident-action-card p { font-size: .86rem; }
    .resident-action-card .resident-button { min-width: 44px; padding: 10px 12px; }
    .resident-action-document .resident-button { width: 100%; }
    .resident-search-row { grid-template-columns: 1fr; }
    .resident-search-row button { width: 100%; }
    .resident-home-panels { padding-bottom: 24px; }
    .resident-info-panel { padding: 14px; }
    .resident-update-card { grid-template-columns: 1fr; }
    .resident-footer { display: none; }
    .resident-home-body .resident-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 16px calc(108px + env(safe-area-inset-bottom, 0px)); }
    .resident-portal-page .browse-page, .resident-portal-page .form-page, .resident-portal-page .details-page, .resident-portal-page .site-shell, .resident-page-shell, .resident-home, .resident-service-shell { padding-bottom: 108px; }
    .resident-portal-page .browse-hero, .resident-portal-page .form-hero, .resident-portal-page .details-hero, .resident-portal-page .barangay-topbar, .resident-portal-page .browse-search-panel, .resident-portal-page .browse-tabs, .resident-portal-page .browse-grid, .resident-portal-page .claims-list, .resident-portal-page .form-container, .resident-portal-page .details-form-wrap, .resident-portal-page .notification-toolbar, .resident-portal-page .notifications-list, .resident-portal-page .matching-explanation, .resident-portal-page .announcement-public-card, .resident-service-shell .barangay-main { width: calc(100% - 24px); }
    .resident-portal-page .browse-hero, .resident-portal-page .form-hero, .resident-portal-page .details-hero, .resident-portal-page .barangay-topbar { margin-top: 18px; padding-top: 8px; }
    .resident-portal-page .browse-search-form { grid-template-columns: 1fr; }
    .resident-portal-page .browse-column-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .resident-portal-page .form-actions { align-items: stretch; flex-direction: column; }
    .resident-portal-page .form-actions > *, .resident-portal-page .form-actions button { width: 100%; min-width: 0; }
    .resident-service-shell .barangay-topbar { align-items: stretch; flex-direction: column; }
    .resident-service-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; gap: 4px; padding: 4px; overflow: visible; }
    .resident-service-tabs .barangay-nav-link { min-width: 0; padding: 8px 4px; font-size: clamp(11px, 3.1vw, 13px); line-height: 1.3; white-space: normal; overflow-wrap: break-word; text-align: center; }
    .resident-service-shell .barangay-form-actions { bottom: 86px; }
    .resident-bottom-nav { position: fixed; right: auto; bottom: 0; left: 0; z-index: 70; display: flex; align-items: end; width: 100vw; max-width: 100vw; min-width: 0; min-height: 76px; overflow: visible; padding: 8px 0 max(8px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(101,22,36,.14); background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(43,17,21,.1); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
    .resident-bottom-nav > a, .resident-bottom-nav > .resident-bottom-menu { flex: 0 0 20%; width: 20%; max-width: 20%; min-width: 0; }
    .resident-bottom-nav a, .resident-bottom-nav button { display: grid; place-items: center; gap: 3px; width: 100%; min-width: 0; min-height: 52px; border: 0; border-radius: 14px; background: transparent; color: #5f5d63; box-shadow: none; text-decoration: none; }
    .resident-bottom-nav span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; font-size: .84rem; font-weight: 850; }
    .resident-bottom-nav strong { overflow: hidden; max-width: 100%; font-size: .72rem; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
    .resident-bottom-nav .is-active { color: #8b001b; }
    .resident-bottom-nav .is-active span { background: #f5e4e7; }
    .resident-bottom-report { transform: none; color: #8b001b !important; }
    .resident-bottom-report span { width: 54px; height: 54px; border-radius: 50%; background: #8b001b !important; color: #fff; box-shadow: 0 10px 26px rgba(139,0,27,.28); font-size: 1.7rem; }
    .resident-bottom-menu { position: relative; min-width: 0; }
    .resident-bottom-panel { position: absolute; right: 6px; bottom: 76px; display: grid; min-width: 188px; gap: 6px; padding: 8px; border: 1px solid rgba(101,22,36,.14); border-radius: 14px; background: #fff; box-shadow: 0 18px 38px rgba(48,17,23,.18); }
    .resident-bottom-menu:nth-child(3) .resident-bottom-panel { right: auto; left: 50%; transform: translateX(-50%); }
    .resident-bottom-panel[hidden] { display: none; }
    .resident-bottom-panel a { display: flex; align-items: center; justify-content: flex-start; min-height: 44px; padding: 10px 12px; color: #35131a; font-size: .9rem; font-weight: 800; }
}

@media (max-width: 560px) {
    .resident-brand { gap: 9px; }
    .resident-brand-logo { width: 46px; height: 46px; }
    .resident-brand strong { max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
    .resident-hero-copy p { max-width: 64%; font-size: .9rem; }
    .resident-action-card { grid-template-columns: 1fr; }
    .resident-action-card .resident-button { width: 100%; }
    .resident-portal-page .browse-column-list { grid-template-columns: 1fr; }
    .resident-portal-page .notification-toolbar { align-items: stretch; flex-direction: column; }
    .resident-portal-page .notification-secondary-button { width: 100%; }
    .resident-portal-page .notification-card { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
    .resident-shell-header { padding-inline: 10px; }
    .resident-brand strong { max-width: 180px; font-size: .9rem; }
    .resident-brand small { font-size: .68rem; }
    .resident-hero { min-height: 200px; padding: 20px 14px; }
    .resident-hero h1 { font-size: 1.42rem; }
    .resident-hero-copy p { max-width: 70%; font-size: .82rem; }
    .resident-section-heading h2, .resident-panel-heading h2 { font-size: 1.35rem; }
    .resident-bottom-nav { padding-inline: 6px; }
    .resident-bottom-nav strong { font-size: .66rem; }
}

body.resident-portal-page { overflow-x: hidden; }
body.resident-portal-page .resident-hero { position: relative; min-height: min(440px,48vw); display: grid; align-items: center; padding: clamp(46px,7vw,86px) max(24px, calc((100vw - 1320px) / 2)); overflow: hidden; background: linear-gradient(90deg, rgba(255,250,247,.98) 0%, rgba(255,250,247,.91) 35%, rgba(255,250,247,.58) 58%, rgba(255,250,247,.12) 100%), url("img/barangay-del-rosario-building.jpg") center / cover no-repeat; border-bottom: 1px solid rgba(101,22,36,.1); }
body.resident-portal-page .resident-hero-copy { width: min(620px,100%); max-width: 620px; }
body.resident-portal-page .resident-hero h1 { margin: 0; color: #71091d; font-size: clamp(2.4rem,5.1vw,4.4rem); line-height: 1.05; letter-spacing: 0; }
body.resident-portal-page .resident-hero-copy > p { max-width: 620px; margin: 18px 0 0; color: #4e4a4d; font-size: 1.15rem; line-height: 1.65; }
.resident-action-card { grid-template-columns: 1fr; align-content: start; align-items: stretch; }
.resident-action-card .resident-button { justify-self: start; width: min(230px,100%); }
.resident-action-card h3, .resident-action-card p { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
.resident-service-shell .barangay-topbar h2 { overflow-wrap: anywhere; }

@media (max-width: 900px) {
    body.resident-portal-page .resident-hero { min-height: 214px; margin: 12px 12px 0; padding: 24px 18px; border: 1px solid rgba(101,22,36,.1); border-radius: 18px; background: linear-gradient(90deg, rgba(255,244,241,.98) 0%, rgba(255,244,241,.86) 56%, rgba(255,244,241,.18) 100%), url("img/barangay-del-rosario-building.jpg") center / cover no-repeat; }
    body.resident-portal-page .resident-hero h1 { font-size: 1.65rem; }
    body.resident-portal-page .resident-hero-copy > p { max-width: 68%; margin-top: 12px; font-size: .9rem; line-height: 1.42; }
    body.resident-portal-page.resident-home-body .resident-hero-copy > p:not(.resident-eyebrow) { max-width: min(100%, 340px); }
    .resident-service-shell .barangay-dashboard-grid { grid-template-columns: 1fr; }
    .resident-shell-header, .resident-bottom-nav { width: 100%; max-width: 100%; }
    .resident-bottom-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); }
    .resident-bottom-nav > a, .resident-bottom-nav > .resident-bottom-menu { width: auto; max-width: none; }
}

@media (max-width: 560px) {
    .resident-header-actions { gap: 6px; }
    .resident-profile-button { width: 40px; padding: 2px; }
    .resident-avatar { width: 36px; height: 36px; }
    .resident-action-card h3, .resident-action-card p { grid-column: 1 / -1; }
    body.resident-portal-page .resident-hero-copy > p { max-width: 72%; font-size: .84rem; }
    .resident-action-card > div { grid-template-columns: auto minmax(0,1fr); }
}

@media (max-width: 390px) {
    .resident-brand-logo { width: 44px; height: 44px; }
    .resident-notification-link { width: 40px; height: 40px; }
    .resident-header-actions { gap: 4px; }
    body.resident-portal-page .resident-hero-copy > p { max-width: 74%; font-size: .8rem; }
    body.resident-portal-page.resident-home-body .resident-hero-copy > p:not(.resident-eyebrow) { max-width: min(100%, 300px); }
}

/* Resident presentation correction: resolves duplicate resident cascade safely. */
body.resident-portal-page .resident-shell-header {
    grid-template-columns: minmax(240px, auto) minmax(360px, 1fr) auto;
    justify-content: center;
    width: 100%;
    min-height: 76px;
    padding: 10px max(24px, calc((100% - 1320px) / 2));
}

body.resident-portal-page .resident-top-nav {
    display: flex;
    justify-content: center;
    gap: clamp(18px, 2.6vw, 42px);
}

body.resident-portal-page .resident-header-actions {
    justify-content: flex-end;
    min-width: 116px;
}

body.resident-portal-page .resident-hero {
    min-height: clamp(330px, 30vw, 430px);
    margin: 0;
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(90deg, rgba(255,250,247,.96) 0%, rgba(255,250,247,.84) 43%, rgba(255,250,247,.28) 70%, rgba(255,250,247,.06) 100%),
        url("img/barangay-del-rosario-building.jpg") center 72% / cover no-repeat;
}

body.resident-portal-page .resident-announcement-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

body.resident-portal-page .resident-announcement-slider::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,250,247,.96) 0%, rgba(255,250,247,.84) 43%, rgba(255,250,247,.28) 70%, rgba(255,250,247,.06) 100%);
    pointer-events: none;
    transition: opacity .45s ease;
}

body.resident-portal-page .resident-hero.is-announcement-slide .resident-announcement-slider::after {
    opacity: 0;
}

body.resident-portal-page .resident-hero.is-announcement-slide {
    background: #fbf8f6;
}

body.resident-portal-page .resident-announcement-slider img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 72%;
    opacity: 1;
    transform: scale(1.01);
    filter: saturate(1);
    transition: opacity .42s ease, transform .72s cubic-bezier(.2, .8, .2, 1), filter .42s ease;
    will-change: opacity, transform, filter;
}

body.resident-portal-page .resident-hero.is-announcement-slide .resident-announcement-slider img {
    object-fit: cover;
    object-position: center;
    transform: none;
}

body.resident-portal-page .resident-announcement-slider.is-transitioning img {
    opacity: .34;
    transform: scale(1.055);
    filter: saturate(.9) blur(2px);
}

body.resident-portal-page .resident-hero.is-announcement-slide .resident-announcement-slider.is-transitioning img {
    transform: none;
    filter: saturate(.95);
}

body.resident-portal-page .resident-hero-copy {
    position: relative;
    z-index: 1;
    transition: opacity .2s ease, visibility .2s ease;
}

body.resident-portal-page .resident-hero.is-announcement-slide .resident-hero-copy {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

body.resident-portal-page .resident-slider-arrow {
    position: absolute;
    bottom: 16px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #79091e;
    box-shadow: none;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
}

body.resident-portal-page .resident-slider-arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-left: -4px;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: translate(-50%, -50%) rotate(-45deg);
    filter: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff)
        drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff)
        drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
    pointer-events: none;
}

body.resident-portal-page .resident-slider-prev::before {
    margin-left: 4px;
    transform: translate(-50%, -50%) rotate(135deg);
}

body.resident-portal-page .resident-slider-indicators {
    position: absolute;
    left: 50%;
    bottom: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 44px;
    max-width: calc(100% - 128px);
    overflow-x: auto;
    scrollbar-width: none;
    transform: translateX(-50%);
}

body.resident-portal-page .resident-slider-dot {
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

body.resident-portal-page .resident-slider-dot::before {
    content: "";
    width: 10px;
    height: 10px;
    border: 1px solid #79091e;
    border-radius: 50%;
    background: rgba(255, 255, 255, .86);
}

body.resident-portal-page .resident-slider-dot.is-active::before {
    background: #79091e;
}

body.resident-portal-page .resident-slider-dot:focus-visible {
    outline: 2px solid #79091e;
    outline-offset: -2px;
}

body.resident-portal-page .resident-slider-arrow[hidden] {
    display: none;
}

body.resident-portal-page .resident-slider-arrow:hover,
body.resident-portal-page .resident-slider-arrow:focus-visible {
    background: transparent;
    color: #5b0716;
}

body.resident-portal-page .resident-slider-arrow:focus-visible {
    outline: 2px solid #79091e;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    body.resident-portal-page .resident-announcement-slider::after,
    body.resident-portal-page .resident-announcement-slider img {
        transition: none;
    }
}

body.resident-portal-page .resident-slider-prev {
    left: 18px;
}

body.resident-portal-page .resident-slider-next {
    right: 18px;
}

body.resident-portal-page .resident-hero h1 {
    max-width: 780px;
    color: #79091e;
    font-size: clamp(2.7rem, 5vw, 4.35rem);
}

body.resident-portal-page .resident-hero-copy > p {
    max-width: 680px;
    color: #504a4d;
}

body.resident-portal-page .resident-actions-section {
    padding-top: 34px;
}

body.resident-portal-page .resident-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

body.resident-portal-page .resident-action-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 214px;
    padding: 24px;
}

body.resident-portal-page .resident-action-card > div {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 8px 18px;
    align-items: start;
}

body.resident-portal-page .resident-action-card h3,
body.resident-portal-page .resident-action-card p {
    grid-column: 2;
}

body.resident-portal-page .resident-action-card h3 {
    align-self: start;
    min-height: 2.45em;
    margin: 0;
}

body.resident-portal-page .resident-action-card p {
    align-self: start;
    margin: 0;
}

body.resident-portal-page .resident-action-card .resident-button {
    width: 100%;
    min-height: 48px;
    margin-top: auto;
}

body.resident-portal-page .resident-action-icon {
    position: relative;
    grid-row: 1 / span 2;
    font-size: 0;
}

body.resident-portal-page .resident-action-icon::before,
body.resident-portal-page .resident-action-icon::after,
body.resident-portal-page .resident-bottom-nav span::before,
body.resident-portal-page .resident-bottom-nav span::after {
    content: "";
    position: absolute;
    display: block;
}

body.resident-portal-page .resident-action-icon-search::before {
    width: 27px;
    height: 27px;
    border: 6px solid currentColor;
    border-radius: 50%;
    transform: translate(-7px, -8px);
}

body.resident-portal-page .resident-action-icon-search::after {
    width: 24px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(13px, 14px) rotate(45deg);
}

body.resident-portal-page .resident-action-icon-box::before {
    width: 33px;
    height: 29px;
    border: 5px solid currentColor;
    border-radius: 5px;
    transform: translateY(3px) skewY(-5deg);
}

body.resident-portal-page .resident-action-icon-box::after {
    width: 29px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    transform: translateY(-12px) rotate(25deg);
}

body.resident-portal-page .resident-action-icon-document::before {
    width: 30px;
    height: 38px;
    border: 5px solid currentColor;
    border-radius: 4px;
    transform: translateY(1px);
}

body.resident-portal-page .resident-action-icon-document::after {
    width: 16px;
    height: 5px;
    box-shadow: 0 10px 0 currentColor, 0 20px 0 currentColor;
    background: currentColor;
    transform: translate(1px, -9px);
}

body.resident-portal-page .resident-info-panel {
    min-width: 0;
}

body.resident-portal-page .resident-bottom-nav {
    display: none;
}

@media (max-width: 1120px) {
    body.resident-portal-page .resident-shell-header {
        grid-template-columns: minmax(210px, auto) minmax(280px, 1fr) auto;
        gap: 14px;
    }

    body.resident-portal-page .resident-top-nav {
        gap: 14px;
    }
}

@media (max-width: 900px) {
    body.resident-portal-page .resident-shell-header {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 68px;
        padding: 10px 14px;
    }

    body.resident-portal-page .resident-top-nav {
        display: none;
    }

    body.resident-portal-page .resident-header-actions {
        min-width: 0;
    }

    body.resident-portal-page .resident-hero {
        min-height: 214px;
        margin: 12px 12px 0;
        padding: 24px 18px;
        border: 1px solid rgba(101,22,36,.1);
        border-radius: 18px;
        background:
            linear-gradient(90deg, rgba(255,244,241,.96) 0%, rgba(255,244,241,.8) 62%, rgba(255,244,241,.1) 100%),
            url("img/barangay-del-rosario-building.jpg") center 70% / cover no-repeat;
    }

    body.resident-portal-page .resident-announcement-slider::after {
        background: linear-gradient(90deg, rgba(255,244,241,.96) 0%, rgba(255,244,241,.8) 62%, rgba(255,244,241,.1) 100%);
    }

    body.resident-portal-page .resident-announcement-slider img {
        object-position: center 70%;
    }

    body.resident-portal-page .resident-hero.is-announcement-slide .resident-announcement-slider::before {
        content: "";
        position: absolute;
        inset: -14px;
        z-index: 0;
        background:
            linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)),
            url("img/barangay-del-rosario-building.jpg") center 70% / cover no-repeat;
        filter: blur(8px);
        pointer-events: none;
    }

    body.resident-portal-page .resident-hero.is-announcement-slide .resident-announcement-slider img {
        object-fit: contain;
        object-position: center;
        position: relative;
        z-index: 1;
    }

    body.resident-portal-page .resident-slider-arrow {
        width: 28px;
        height: 28px;
        bottom: 12px;
    }

    body.resident-portal-page .resident-slider-prev {
        left: 12px;
    }

    body.resident-portal-page .resident-slider-next {
        right: 12px;
    }

    body.resident-portal-page.resident-home-body .resident-hero {
        padding-bottom: 56px;
    }

    body.resident-portal-page .resident-slider-indicators {
        bottom: 12px;
        height: 28px;
        max-width: calc(100% - 96px);
        gap: 2px;
    }

    body.resident-portal-page .resident-slider-dot {
        flex-basis: 14px;
        width: 14px;
        height: 28px;
    }

    body.resident-portal-page .resident-hero h1 {
        font-size: 1.65rem;
    }

    body.resident-portal-page .resident-hero-copy > p,
    body.resident-portal-page.resident-home-body .resident-hero-copy > p:not(.resident-eyebrow) {
        max-width: min(100%, 345px);
        font-size: .9rem;
        line-height: 1.42;
    }

    body.resident-portal-page .resident-action-grid,
    body.resident-portal-page .resident-home-panels {
        grid-template-columns: 1fr;
    }

    body.resident-portal-page .resident-action-card {
        min-height: 0;
        padding: 16px;
    }

    body.resident-portal-page .resident-action-card > div {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 14px;
    }

    body.resident-portal-page .resident-action-card h3,
    body.resident-portal-page .resident-action-card p {
        grid-column: 2;
    }

    body.resident-portal-page .resident-action-card h3 {
        min-height: 0;
    }

    body.resident-portal-page .resident-action-card .resident-button,
    body.resident-portal-page .resident-action-document .resident-button {
        width: 100%;
    }

    body.resident-portal-page .resident-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: end;
        width: 100%;
        min-height: 78px;
        padding: 8px 0 max(8px, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(101,22,36,.14);
        background: rgba(255,255,255,.96);
        box-shadow: 0 -8px 24px rgba(43,17,21,.1);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    body.resident-portal-page .resident-bottom-nav > a,
    body.resident-portal-page .resident-bottom-nav > .resident-bottom-menu {
        width: auto;
        min-width: 0;
        max-width: none;
    }

    body.resident-portal-page .resident-bottom-nav a,
    body.resident-portal-page .resident-bottom-nav button {
        display: grid;
        place-items: center;
        gap: 4px;
        width: 100%;
        min-height: 54px;
        color: #5f5d63;
        text-decoration: none;
    }

    body.resident-portal-page .resident-bottom-nav strong {
        max-width: none;
        overflow: visible;
        font-size: .64rem;
        line-height: 1.1;
        text-overflow: clip;
        white-space: nowrap;
    }

    body.resident-portal-page .resident-bottom-nav span {
        position: relative;
        width: 30px;
        height: 30px;
        font-size: 0;
        color: currentColor;
    }

    body.resident-portal-page .resident-bottom-nav > a:nth-child(1) span::before {
        width: 18px;
        height: 15px;
        border: 4px solid currentColor;
        border-top: 0;
        border-radius: 2px;
        transform: translateY(7px);
    }

    body.resident-portal-page .resident-bottom-nav > a:nth-child(1) span::after {
        width: 18px;
        height: 18px;
        border-top: 4px solid currentColor;
        border-left: 4px solid currentColor;
        transform: translateY(-2px) rotate(45deg);
    }

    body.resident-portal-page .resident-bottom-nav > a:nth-child(2) span::before {
        width: 17px;
        height: 17px;
        border: 4px solid currentColor;
        border-radius: 50%;
        transform: translate(-4px, -3px);
    }

    body.resident-portal-page .resident-bottom-nav > a:nth-child(2) span::after {
        width: 13px;
        height: 4px;
        border-radius: 999px;
        background: currentColor;
        transform: translate(9px, 11px) rotate(45deg);
    }

    body.resident-portal-page .resident-bottom-menu:nth-child(3) span::before,
    body.resident-portal-page .resident-bottom-menu:nth-child(3) span::after {
        width: 22px;
        height: 4px;
        border-radius: 999px;
        background: #fff;
    }

    body.resident-portal-page .resident-bottom-menu:nth-child(3) span::after {
        transform: rotate(90deg);
    }

    body.resident-portal-page .resident-bottom-menu:nth-child(4) span::before {
        width: 22px;
        height: 22px;
        border: 4px solid currentColor;
        border-radius: 50%;
    }

    body.resident-portal-page .resident-bottom-menu:nth-child(4) span::after {
        width: 9px;
        height: 9px;
        border-bottom: 4px solid currentColor;
        border-left: 4px solid currentColor;
        transform: translate(3px, -2px);
    }

    body.resident-portal-page .resident-bottom-nav > a:nth-child(5) span::before {
        width: 8px;
        height: 8px;
        background: currentColor;
        box-shadow: 13px 0 0 currentColor, 0 13px 0 currentColor, 13px 13px 0 currentColor;
        border-radius: 2px;
        transform: translate(-7px, -7px);
    }
}

@media (max-width: 430px) {
    body.resident-portal-page .resident-brand strong {
        max-width: 205px;
    }

    body.resident-portal-page .resident-action-card > div {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    body.resident-portal-page .resident-action-icon {
        width: 58px;
        height: 58px;
    }
}

@media (max-width: 360px) {
    body.resident-portal-page .resident-brand strong {
        max-width: 165px;
        font-size: .88rem;
    }

    body.resident-portal-page .resident-brand small {
        font-size: .68rem;
    }

    body.resident-portal-page .resident-hero-copy > p,
    body.resident-portal-page.resident-home-body .resident-hero-copy > p:not(.resident-eyebrow) {
        max-width: 100%;
    }

    body.resident-portal-page .resident-bottom-nav strong {
        font-size: .62rem;
    }
}

/* Constrain native date controls to their report field on narrow screens. */
@media (max-width: 700px) {
    .resident-form-page .question-system-form .report-section { min-inline-size: 0; max-inline-size: 100%; }
    .resident-form-page #date_lost,
    .resident-form-page #date_found {
        display: block;
        box-sizing: border-box;
        min-width: 0;
        min-inline-size: 0;
        width: 100%;
        max-width: 100%;
        -webkit-appearance: none;
        appearance: none;
    }
    .resident-form-page #date_lost::-webkit-datetime-edit,
    .resident-form-page #date_found::-webkit-datetime-edit { min-width: 0; padding: 0; }
    .resident-form-page #date_lost::-webkit-date-and-time-value,
    .resident-form-page #date_found::-webkit-date-and-time-value { min-width: 0; text-align: left; }
}

/* Resident profile control: retain the shared header and existing menu behavior. */
.resident-profile-ready .resident-profile-button { min-width: 0; }
.resident-profile-ready .resident-profile-name { display: block; min-width: 0; flex: 1 1 auto; }
.resident-profile-ready .resident-profile-caret { flex: 0 0 auto; font-size: .75rem; line-height: 1; transition: transform .2s ease; }
.resident-profile-ready .resident-profile-button[aria-expanded="true"] .resident-profile-caret { transform: rotate(180deg); }
.resident-profile-ready .resident-profile-panel { min-width: min(200px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
@media (max-width: 1120px) {
    .resident-profile-ready .resident-profile-button { max-width: 170px; }
}
@media (max-width: 900px) {
    body.resident-portal-page .resident-shell-header.resident-profile-ready { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    body.resident-portal-page .resident-shell-header .resident-brand > span { min-width: 0; }
    body.resident-portal-page .resident-shell-header .resident-brand strong,
    body.resident-portal-page .resident-shell-header .resident-brand small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .resident-profile-ready .resident-profile-button { width: auto; max-width: clamp(104px, 30vw, 170px); padding: 4px; gap: 5px; }
    .resident-profile-ready .resident-avatar { width: 32px; height: 32px; }
    .resident-profile-ready .resident-profile-name { font-size: .78rem; }
}

/* Compact guest header controls on phones without shortening the barangay name. */
@media (max-width: 560px) {
    body.resident-portal-page[data-visitor="1"] .resident-shell-header { column-gap: 6px; padding-inline: 10px; }
    body.resident-portal-page[data-visitor="1"] .resident-shell-header .resident-header-actions { gap: 4px; }
    body.resident-portal-page[data-visitor="1"] .resident-shell-header .visitor-auth-links { gap: 4px; }
    body.resident-portal-page[data-visitor="1"] .resident-shell-header .visitor-auth-links a { min-height: 34px; padding: 5px 6px; font-size: .75rem; white-space: nowrap; }
    body.resident-portal-page[data-visitor="1"] .resident-shell-header .resident-brand strong { white-space: normal; text-overflow: clip; }
}

/* Decorative motion is limited to the resident homepage. */
.resident-home-body .resident-home #home-title {
    animation: resident-home-greeting 550ms ease-out both;
}
.resident-home-body .resident-home .resident-action-card {
    transition: transform 225ms ease, box-shadow 225ms ease, border-color 225ms ease;
}
.resident-home-body .resident-home .home-found-check {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}
.resident-home-body .resident-home .home-document-paper,
.resident-home-body .resident-home .home-document-check {
    transition: transform 225ms ease, opacity 225ms ease;
}
.resident-home-body .resident-home .home-document-check { opacity: 0; }
.resident-home-body .resident-home .resident-action-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(55, 24, 28, .12);
    border-color: rgba(101, 22, 36, .3);
}
.resident-home-body .resident-home .resident-action-card:focus-within .home-lost-lens {
    animation: resident-home-search 750ms ease-in-out;
}
.resident-home-body .resident-home .resident-action-card:focus-within .home-found-check {
    animation: resident-home-check 450ms ease-out;
}
.resident-home-body .resident-home .resident-action-card:focus-within .home-document-paper { transform: translateY(-3px); }
.resident-home-body .resident-home .resident-action-card:focus-within .home-document-check { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
    .resident-home-body .resident-home .resident-action-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(55, 24, 28, .12);
        border-color: rgba(101, 22, 36, .3);
    }
    .resident-home-body .resident-home .resident-action-card:hover .home-lost-lens { animation: resident-home-search 750ms ease-in-out; }
    .resident-home-body .resident-home .resident-action-card:hover .home-found-check { animation: resident-home-check 450ms ease-out; }
    .resident-home-body .resident-home .resident-action-card:hover .home-document-paper { transform: translateY(-3px); }
    .resident-home-body .resident-home .resident-action-card:hover .home-document-check { opacity: 1; }
}
body.resident-home-body .resident-home .resident-announcement-slider img {
    transition: none;
    will-change: auto;
}
body.resident-home-body .resident-home .resident-announcement-slider [data-announcement-slide-outgoing] {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 420ms ease;
}
body.resident-home-body .resident-home .resident-announcement-slider [data-announcement-slide-outgoing][hidden] { display: none; }
@keyframes resident-home-greeting {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: none; }
}
@keyframes resident-home-search {
    0%, 100% { transform: translate(0, 0); }
    35% { transform: translate(-2px, -1px); }
    70% { transform: translate(2px, -1px); }
}
@keyframes resident-home-check {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .resident-home-body .resident-home #home-title,
    .resident-home-body .resident-home .resident-action-card,
    .resident-home-body .resident-home .resident-action-card *,
    .resident-home-body .resident-home .resident-hero-copy,
    .resident-home-body .resident-home .resident-announcement-slider::after,
    body.resident-home-body .resident-home .resident-announcement-slider [data-announcement-slide-outgoing] {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Document Request History status filter, scoped to the resident history. */
#history .document-history-filters{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 20px}
#history .document-history-filters label{display:flex;flex-direction:column;gap:7px;min-width:0;max-width:100%;font-weight:700;color:#65182b}
#history .document-history-filters select{width:240px;max-width:100%;min-height:44px;padding:10px 12px;border:1px solid #dfcbd1;border-radius:10px;background:#fff;font:inherit}
#history .document-history-filters p{margin:0;color:#765b64;font-size:13px}
#history .barangay-history-head{gap:12px;flex-wrap:wrap}
#history .barangay-history-head .barangay-status{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
#history .barangay-status-expired{background:#f0e8f5;color:#6c4380}
@media(max-width:480px){#history .document-history-filters label,#history .document-history-filters select{width:100%}#history .barangay-history-card{min-width:0}#history .barangay-history-meta span{min-width:0;overflow-wrap:anywhere}}

#history .barangay-status-issued { color: #175566; background: #e1f2f5; }
#history .barangay-issued-message { margin-top: 14px; padding: 12px 14px; border-radius: 8px; color: #175566; background: #eef8fa; line-height: 1.5; }

/* Resident pickup rescheduling only. */
#history .document-reschedule-action{display:flex;justify-content:flex-end;margin-top:12px}
#history .document-reschedule-action button{min-height:44px;padding:10px 16px;border:1px solid #800020;border-radius:9px;background:#fff;color:#800020;font:inherit;font-weight:700;cursor:pointer}
#documentRescheduleDialog{box-sizing:border-box;min-inline-size:0;width:min(460px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid #e3cbd2;border-radius:16px;color:#471820;background:#fff;box-shadow:0 18px 60px #32101d33}
#documentRescheduleDialog::backdrop{background:#25101980}
#documentRescheduleForm{min-width:0;min-inline-size:0;max-width:100%}
#documentRescheduleDialog h2{margin:0 0 10px;font-size:22px}
#documentRescheduleDialog p{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
#documentRescheduleReference{font-weight:700}
#documentRescheduleDialog .document-reschedule-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#documentRescheduleDialog label{display:block;min-width:0;font-size:14px;font-weight:700}
#documentRescheduleDialog input,#documentRescheduleDialog select{box-sizing:border-box;display:block;width:100%;min-width:0;max-width:100%;min-height:46px;margin-top:8px;padding:10px;border:1px solid #bd98a3;border-radius:9px;background:#fff;font:inherit;font-size:16px;color:#471820}
#documentRescheduleDate{min-inline-size:0;max-inline-size:100%;-webkit-appearance:none;appearance:none}
#documentRescheduleDate::-webkit-datetime-edit{min-width:0;padding:0}
#documentRescheduleDate::-webkit-date-and-time-value{min-width:0;text-align:left}
#documentRescheduleMessage{min-height:22px;color:#a12836}
#documentRescheduleDialog .document-reschedule-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
#documentRescheduleDialog button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:44px;padding:10px 16px;border:1px solid #800020;border-radius:9px;background:#800020;color:#fff;font:inherit;font-weight:700;cursor:pointer}
#documentRescheduleDialog #documentRescheduleCancel{background:#fff;color:#800020}
#documentRescheduleDialog button:disabled{opacity:.6;cursor:wait}
@media(max-width:480px){#documentRescheduleDialog{padding:18px}#documentRescheduleDialog .document-reschedule-fields{grid-template-columns:minmax(0,1fr)}#documentRescheduleDialog .document-reschedule-actions button{flex:1;min-width:0}#history .document-reschedule-action button{max-width:100%}}
@media(max-width:360px){#documentRescheduleDialog .document-reschedule-actions{flex-direction:column}#documentRescheduleDialog .document-reschedule-actions button{width:100%}}
