.warga-locked {
    background: var(--wash);
}

.warga-locked .warga-login {
    min-height: calc(100vh - 88px);
    background:
        radial-gradient(circle at 82% 12%, rgba(255, 209, 0, .2), transparent 25%),
        radial-gradient(circle at 15% 85%, rgba(215, 25, 32, .2), transparent 28%),
        linear-gradient(135deg, var(--navy-950), var(--navy-900) 58%, var(--navy-800));
}

.warga-login {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
}

.warga-login-card {
    width: min(420px, 100%);
    padding: 35px;
    text-align: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 25px 75px rgba(0, 0, 0, .28);
}

.warga-login-logo {
    width: 86px;
    height: 86px;
    object-fit: contain;
}

.login-eyebrow {
    margin: 17px 0 6px;
    color: var(--blue-600);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.warga-login-card h1 {
    margin: 0;
    font-size: 1.75rem;
}

.login-copy {
    margin: 11px 0 24px;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.6;
}

.warga-login-card label {
    display: block;
    margin-bottom: 7px;
    text-align: left;
    font-size: .8rem;
    font-weight: 700;
}

.warga-login-card input {
    width: 100%;
    height: 48px;
    padding: 0 13px;
    text-align: center;
    border: 1px solid #cbd7e0;
    border-radius: 9px;
    font: inherit;
    letter-spacing: .25em;
}

.warga-login-card button {
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    color: #fff;
    cursor: pointer;
    background: var(--navy-800);
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-weight: 750;
}

.login-error {
    padding: 10px 12px;
    margin-bottom: 15px;
    color: #84251f;
    background: #fbe8e6;
    border-radius: 8px;
    font-size: .8rem;
}

.back-home {
    display: inline-block;
    margin-top: 19px;
    color: var(--blue-600);
    font-size: .77rem;
    font-weight: 700;
    text-decoration: none;
}

.warga-hero {
    color: #fff;
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 209, 0, .2), transparent 25%),
        radial-gradient(circle at 58% 130%, rgba(215, 25, 32, .18), transparent 32%),
        linear-gradient(120deg, var(--navy-950), var(--navy-900) 55%, var(--navy-800));
}

.warga-hero-inner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
    padding-block: 62px 68px;
    gap: 30px;
}

.warga-hero h1 {
    margin: 0;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    line-height: .95;
    letter-spacing: -.05em;
}

.warga-hero p:last-child {
    max-width: 680px;
    margin: 18px 0 0;
    color: #d2e0ea;
    line-height: 1.65;
}

.warga-total {
    display: grid;
    flex: 0 0 auto;
    width: 112px;
    height: 112px;
    color: var(--navy-950);
    text-align: center;
    background: var(--gold-500);
    border-radius: 50%;
    place-content: center;
}

.warga-total strong {
    font-size: 2rem;
    line-height: 1;
}

.warga-total span {
    margin-top: 3px;
    font-size: .67rem;
    font-weight: 800;
    text-transform: uppercase;
}

.warga-content {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
    padding-block: 35px 75px;
}

.warga-toolbar {
    position: sticky;
    top: 10px;
    z-index: 8;
    padding: 15px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: 0 8px 28px rgba(20, 45, 67, .08);
    backdrop-filter: blur(10px);
}

.warga-search label {
    display: block;
    margin-bottom: 6px;
    font-size: .75rem;
    font-weight: 750;
}

.warga-search input {
    width: 100%;
    height: 43px;
    padding: 0 12px;
    border: 1px solid #cbd7e0;
    border-radius: 8px;
    font: inherit;
}

.warga-categories {
    display: flex;
    margin-top: 11px;
    overflow-x: auto;
    gap: 7px;
}

.warga-categories button {
    flex: 0 0 auto;
    padding: 8px 11px;
    color: var(--navy-800);
    cursor: pointer;
    background: #eaf0f5;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-size: .71rem;
    font-weight: 750;
}

.warga-categories button.active {
    color: var(--navy-950);
    background: var(--gold-500);
}

.warga-section {
    margin-bottom: 46px;
}

.warga-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 17px;
    gap: 20px;
}

.warga-section-heading h2 {
    margin: 0;
    font-size: clamp(1.45rem, 4vw, 2rem);
}

.warga-section-heading > span {
    padding: 7px 10px;
    color: var(--navy-800);
    background: #e4edf4;
    border-radius: 99px;
    font-size: .7rem;
    font-weight: 800;
}

.warga-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.warga-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: 0 8px 25px rgba(20, 45, 67, .065);
    transition: transform .2s ease, box-shadow .2s ease;
}

.warga-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(20, 45, 67, .12);
}

.warga-photo-button {
    display: block;
    width: 100%;
    padding: 0;
    cursor: zoom-in;
    background: #dce5eb;
    border: 0;
    aspect-ratio: 4 / 4.5;
}

.warga-photo-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.warga-photo-placeholder {
    display: grid;
    color: #8093a1;
    background: #e8eef2;
    aspect-ratio: 4 / 4.5;
    font-size: .7rem;
    place-items: center;
}

.warga-info {
    padding: 13px;
}

.warga-info h3 {
    margin: 0;
    font-size: .77rem;
    line-height: 1.42;
}

.warga-info p {
    margin: 7px 0 0;
    color: var(--blue-600);
    font-size: .64rem;
    font-weight: 700;
    line-height: 1.4;
}

.warga-no-results,
.warga-empty {
    padding: 45px 20px;
    text-align: center;
    background: #fff;
    border: 1px dashed #b9c8d4;
    border-radius: 13px;
}

.warga-empty h2,
.warga-empty p {
    margin: 0;
}

.warga-empty p {
    margin-top: 7px;
    color: var(--muted);
}

.warga-cache-note {
    color: var(--muted);
    font-size: .72rem;
}

.back-to-top,
.logout-form button {
    position: fixed;
    right: 20px;
    z-index: 30;
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    cursor: pointer;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .22);
    font: inherit;
    font-size: .72rem;
    font-weight: 800;
    place-items: center;
}

.back-to-top {
    bottom: 20px;
    color: #fff;
    background: var(--navy-800);
}

.logout-form button {
    bottom: 78px;
    color: #fff;
    background: var(--red-500);
}

#warga-dialog {
    width: min(520px, calc(100% - 28px));
    max-height: calc(100vh - 28px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 17px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .45);
}

#warga-dialog::backdrop {
    background: rgba(3, 13, 23, .83);
}

#warga-dialog > img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    background: var(--navy-950);
}

.warga-dialog-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 18px;
}

.warga-dialog-info h2 {
    margin: 0;
    font-size: .95rem;
}

.warga-dialog-info p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .72rem;
}

.warga-dialog-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
}

.warga-dialog-actions a,
.warga-dialog-actions button {
    padding: 8px 10px;
    color: #fff;
    cursor: pointer;
    background: var(--navy-800);
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-size: .68rem;
    font-weight: 750;
    text-decoration: none;
}

@media (max-width: 1000px) {
    .warga-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .warga-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .warga-hero-inner,
    .warga-content {
        width: min(100% - 28px, 1180px);
    }

    .warga-hero-inner {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 45px 50px;
    }

    .warga-total {
        width: 84px;
        height: 84px;
    }

    .warga-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .warga-info {
        padding: 10px;
    }

    .warga-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .warga-dialog-info {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Penyeragaman portal rasmi */
.warga-login-card {
    border-top: 5px solid var(--red-500);
    border-radius: 8px;
}

.warga-hero {
    background: var(--navy-900);
    border-bottom: 5px solid var(--gold-500);
}

.warga-total,
.warga-toolbar,
.warga-card,
.warga-empty {
    border-radius: 7px;
}

.warga-card {
    box-shadow: var(--shadow-sm);
}

.warga-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.warga-photo-button {
    border-radius: 0;
}

#warga-dialog {
    border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
    .warga-card {
        transition: none;
    }
}
