/* App Báo cáo tình trạng rác — một màu nhấn (xanh lá của logo), nền trung tính. */
:root {
    --nen: #f4f7f5;
    --the: #ffffff;
    --vien: #e2e8f0;
    --vien-o: #cbd5e1;
    --chu: #0f172a;
    --chu-nhan: #334155;
    --chu-phu: #64748b;
    --nhan: #15803d;
    --nhan-dam: #166534;
    --nhan-vong: rgba(21, 128, 61, 0.18);
    --loi: #b91c1c;
    --loi-nen: #fef2f2;
    --loi-vien: #fecaca;
    --bong: 0 10px 30px rgba(15, 23, 42, 0.07);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--nen);
    color: var(--chu);
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

[hidden] {
    display: none !important;
}

/* ---------- Trang đăng nhập / đăng ký ---------- */

.trang-xac-thuc {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.khung {
    width: 100%;
    max-width: 400px;
}

.khung-rong {
    max-width: 480px;
}

.thuong-hieu {
    text-align: center;
    margin-bottom: 18px;
}

.thuong-hieu img {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
}

.thuong-hieu h1 {
    margin: 12px 0 0;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--chu-nhan);
    white-space: nowrap;
}

.the {
    background: var(--the);
    border: 1px solid var(--vien);
    border-radius: 16px;
    box-shadow: var(--bong);
    padding: 24px 22px;
}

.the h2 {
    margin: 0 0 18px;
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
}

.chu-phu {
    margin: 0;
    color: var(--chu-phu);
}

.bao-loi {
    margin-bottom: 16px;
    padding: 10px 12px;
    background: var(--loi-nen);
    border: 1px solid var(--loi-vien);
    border-radius: 10px;
    color: var(--loi);
    font-size: 0.86rem;
}

.truong {
    margin-bottom: 14px;
    min-width: 0;
}

.truong label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--chu-nhan);
    white-space: nowrap;
}

.truong input,
.truong select {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--vien-o);
    border-radius: 10px;
    background: #ffffff;
    color: var(--chu);
    font: inherit;
    font-size: 16px; /* dưới 16px iPhone tự phóng to khi chạm vào ô */
    touch-action: manipulation;
}

.truong select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    text-overflow: ellipsis;
}

.truong select:invalid {
    color: var(--chu-phu);
}

.truong select option {
    color: var(--chu);
}

.truong input:focus,
.truong select:focus {
    outline: none;
    border-color: var(--nhan);
    box-shadow: 0 0 0 3px var(--nhan-vong);
}

.truong input[aria-invalid="true"],
.truong select[aria-invalid="true"] {
    border-color: var(--loi);
}

.truong input[aria-invalid="true"]:focus,
.truong select[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

.loi-truong {
    margin: 6px 0 0;
    color: var(--loi);
    font-size: 0.8rem;
}

/* Hai ô một hàng (Phường | Thành phố); điện thoại hẹp thì xếp dọc. */
.hang-doi {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.o-mat-khau {
    position: relative;
}

.o-mat-khau input {
    padding-right: 48px;
}

.nut-mat {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--chu-phu);
    cursor: pointer;
}

.nut-mat:hover {
    background: #f1f5f9;
    color: var(--chu);
}

.nut-mat:focus-visible {
    outline: 2px solid var(--nhan);
    outline-offset: 1px;
}

.nut-mat svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nut-mat .mat-dong,
.nut-mat.dang-hien .mat-mo {
    display: none;
}

.nut-mat.dang-hien .mat-dong {
    display: block;
}

.nut {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
}

.nut:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--nhan-vong);
}

.nut-chinh {
    margin-top: 6px;
    background: var(--nhan);
    color: #ffffff;
}

.nut-chinh:hover {
    background: var(--nhan-dam);
}

.nut-chinh:disabled {
    opacity: 0.65;
    cursor: default;
}

.nut-phu {
    margin-top: 10px;
    background: #ffffff;
    border-color: var(--vien-o);
    color: var(--chu);
}

.nut-phu:hover {
    background: #f1f5f9;
}

/* ---------- Trang sau khi đăng nhập ---------- */

.thanh-tren {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
    padding: 0 24px;
    background: var(--the);
    border-bottom: 1px solid var(--vien);
}

.thanh-tren .logo {
    height: 30px;
    width: auto;
    min-width: 0;
    flex: 0 1 auto;
    object-fit: contain;
    object-position: left center;
}

.nguoi-dung {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ten-nguoi-dung {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: var(--chu-nhan);
}

.nut-nho {
    width: auto;
    height: 36px;
    margin: 0;
    padding: 0 14px;
    font-size: 0.88rem;
    flex: 0 0 auto;
}

.noi-dung {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

/* Thẻ "Đăng ký thành công" ở trang chủ ngay sau khi đăng ký. */
.the-xong {
    max-width: 480px;
    margin: 24px auto 0;
    text-align: center;
}

.the-xong svg {
    width: 56px;
    height: 56px;
    fill: none;
    stroke: var(--nhan);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.the-xong h2 {
    margin: 12px 0 18px;
    color: var(--nhan);
}

.the-xong dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 0;
    text-align: left;
}

.the-xong dt {
    color: var(--chu-phu);
    font-size: 0.88rem;
    white-space: nowrap;
}

.the-xong dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* ---------- Điện thoại ---------- */

@media (max-width: 480px) {
    .trang-xac-thuc {
        justify-content: flex-start;
        padding: 24px 16px;
    }

    .the {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .hang-doi {
        grid-template-columns: 1fr;
    }

    .thanh-tren {
        padding: 0 16px;
        gap: 10px;
    }

    .thanh-tren .logo {
        height: 24px;
        max-width: 46%;
    }

    .nguoi-dung {
        gap: 8px;
    }

    .noi-dung {
        padding: 16px;
    }
}
